StRoot
1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
StJetMaker
emulator
StMuTrackFourVec.h
1
// -*- mode: c++;-*-
2
// $Id: StMuTrackFourVec.h,v 1.6 2009/12/09 05:12:12 pibero Exp $
3
#ifndef STMUTRACKFOURVEC_H
4
#define STMUTRACKFOURVEC_H
5
6
#include "StJetFinder/AbstractFourVec.h"
7
8
#include "StMuTrackEmu.h"
9
#include "StMuTowerEmu.h"
10
#include "StMcTrackEmu.h"
11
12
#include "StDetectorId.h"
13
14
#include <TLorentzVector.h>
15
16
#include <iostream>
17
#include <string>
18
19
class
StMuTrackFourVec
:
public
AbstractFourVec
{
20
21
public
:
22
23
StMuTrackFourVec
() : _track(0), _tower(0), _mctrack(0), _index(0), _detId(kUnknownId), _charge(0) {}
24
25
StMuTrackFourVec
(
StMuTrackEmu
*
track
,
StMuTowerEmu
* tower,
StMcTrackEmu
* mctrack,
const
TLorentzVector& p,
double
charge,
int
i,
int
detectorId)
26
: _track(track)
27
, _tower(tower)
28
, _mctrack(mctrack)
29
, _vec(p)
30
, _index(i)
31
, _detId(detectorId)
32
, _charge(charge)
33
{
34
}
35
36
virtual
~
StMuTrackFourVec
()
37
{
38
if
(_track)
delete
_track; _track = 0;
39
if
(_tower)
delete
_tower; _tower = 0;
40
if
(_mctrack)
delete
_mctrack; _mctrack = 0;
41
}
42
44
double
pt
()
const
{
return
_vec.Pt(); }
45
double
px()
const
{
return
_vec.Px(); }
46
double
py()
const
{
return
_vec.Py(); }
47
double
pz()
const
{
return
_vec.Pz(); }
48
50
double
phi
()
const
{
return
_vec.Phi(); }
51
double
eta()
const
{
return
_vec.Eta(); }
52
53
//4-th component
54
double
eT()
const
{
return
_vec.Et(); }
55
double
e()
const
{
return
_vec.E (); }
56
double
mass()
const
{
return
_vec.M (); }
57
58
//charge
59
double
charge()
const
{
return
_charge; }
60
61
// Mu StjTrack
62
StMuTrackEmu
* track()
const
{
return
_track; }
63
64
// Mu StjTower
65
StMuTowerEmu
* tower()
const
{
return
_tower; }
66
67
// Mc StjTrack
68
StMcTrackEmu
* mctrack()
const
{
return
_mctrack; }
69
70
//Index of the track/tower/cluster/point in the container that it came from
71
int
getIndex()
const
{
return
_index; }
72
73
//Id of the detector that generated this 4-vector
74
int
detectorId()
const
{
return
_detId; }
75
76
private
:
77
78
StMuTrackEmu
* _track;
79
StMuTowerEmu
* _tower;
80
StMcTrackEmu
* _mctrack;
81
TLorentzVector _vec;
82
int
_index;
83
int
_detId;
84
double
_charge;
85
};
86
87
#endif // STMUTRACKFOURVEC_H
StMuTowerEmu
Definition:
StMuTowerEmu.h:12
StMuTrackEmu
Definition:
StMuTrackEmu.h:9
track
Definition:
MapTableTest.C:38
StMcTrackEmu
Definition:
StMcTrackEmu.h:11
StMuTrackFourVec::phi
double phi() const
angles
Definition:
StMuTrackFourVec.h:50
AbstractFourVec
Definition:
AbstractFourVec.h:15
StMuTrackFourVec
Definition:
StMuTrackFourVec.h:19
StMuTrackFourVec::pt
double pt() const
momenta
Definition:
StMuTrackFourVec.h:44
Generated by
1.8.5