StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StTinyMcTrack.h
Go to the documentation of this file.
1 
13 #ifndef StTinyMcTrack_H
14 #define StTinyMcTrack_H
15 
16 #include "TObject.h"
17 #include <cmath>
18 
19 class StTinyMcTrack : public TObject {
20  public:
21  StTinyMcTrack();
22  virtual ~StTinyMcTrack() {}
23 
24  void setPtMc(Float_t val) { mPtMc=val; }
25  void setPzMc(Float_t val) { mPzMc=val; }
26  void setEtaMc(Float_t val) { mEtaMc=val; }
27  void setPhiMc(Float_t val) { mPhiMc=val; }
28  void setNHitMc(Short_t val) { mNHitMc=val; }
29  void setNSvtHitMc(Short_t val) { mNSvtHitMc=val; }
30  void setNSsdHitMc(Short_t val) { mNSsdHitMc=val; }
31  void setNFtpcHitMc(Short_t val) { mNFtpcHitMc=val; }
32  void setNBemcHitMc(Short_t val) { mNBemcHitMc=val; }
33  void setNBprsHitMc(Short_t val) { mNBprsHitMc=val; }
34  void setNBsmdeHitMc(Short_t val) { mNBsmdeHitMc=val; }
35  void setNBsmdpHitMc(Short_t val) { mNBsmdpHitMc=val; }
36  void setNEemcHitMc(Short_t val) { mNEemcHitMc=val; }
37  void setNEprsHitMc(Short_t val) { mNEprsHitMc=val; }
38  void setNEsmduHitMc(Short_t val) { mNEsmduHitMc=val; }
39  void setNEsmdvHitMc(Short_t val) { mNEsmdvHitMc=val; }
40  void setGeantId(int val);
41  void setPdgId(int val) { mPdgId = val; }
42  void setChargeMc(Short_t val) { mChargeMc= val; }
43  void setNAssocGl(Short_t val) { mNAssocGl= val; }
44  void setNAssocPr(Short_t val) { mNAssocPr= val; }
45  void setStopR(Float_t val) { mStopR=val; }
46  void setKey(Int_t val) { mKey=val; }
47  void setPrimary(Bool_t val) { mIsPrimary = val;}
48  void setValid() {mIsValid = 1;}
49  void setParentKey(Int_t val) { mParentKey=val; }
50  void setParentGeantId(int val);
51  void setEmcEnergyMcHit(Float_t val,size_t index) {if (index<3) mEmcEnergyMcHit[index]=val;}
52  void setEmcEnergyMcSum(Float_t val) {mEmcEnergyMcSum=val;}
53  void setEmcSoftIdHiTowerMc(Short_t val,size_t index) {if (index<3) mEmcSoftIdHiTowerMc[index]=val;}
54 
55  float ptMc() const { return mPtMc; }
56  float pxMc() const { return mPtMc*cos(mPhiMc); }
57  float pyMc() const { return mPtMc*sin(mPhiMc); }
58  float pzMc() const { return mPzMc; }
59  float pMc() const { return ::sqrt((mPtMc*mPtMc)+(mPzMc*mPzMc)); }
60  float etaMc() const { return mEtaMc; }
61  float phiMc() const { return mPhiMc; }
62  short nHitMc() const { return mNHitMc; }
63  short nSvtHitMc() const { return mNSvtHitMc; }
64  short nSsdHitMc() const { return mNSsdHitMc; }
65  short nFtpcHitMc() const { return mNFtpcHitMc; }
66  short nBemcHitMc() const { return mNBemcHitMc; }
67  short nBprsHitMc() const { return mNBprsHitMc; }
68  short nBsmdeHitMc() const { return mNBsmdeHitMc; }
69  short nBsmdpHitMc() const { return mNBsmdpHitMc; }
70  short nEemcHitMc() const { return mNEemcHitMc; }
71  short nEprsHitMc() const { return mNEprsHitMc; }
72  short nEsmduHitMc() const { return mNEsmduHitMc; }
73  short nEsmdvHitMc() const { return mNEsmdvHitMc; }
74  int geantId() const { return mGeantId; }
75  short chargeMc() const { return mChargeMc; }
76  short nAssocGl() const { return mNAssocGl; }
77  short nAssocPr() const { return mNAssocPr; }
78  float stopR() const { return mStopR; }
79  int key() const { return mKey; }
80  Bool_t isPrimary() const {return mIsPrimary;}
81  Bool_t isValid() {return mIsValid;}
82  virtual void Print(Option_t *option="") const;
83  int parentKey() const { return mParentKey; }
84  int parentGeantId() const { return mParentGeantId; }
85  float emcEnergyMcHit(size_t index) const { if (index<3) return mEmcEnergyMcHit[index]; else return -999;}
86  float emcEnergyMcSum() const { return mEmcEnergyMcSum; }
87  short emcSoftIdHiTowerMc(size_t index) const { if (index<3) return mEmcSoftIdHiTowerMc[index]; else return -999; }
88 private:
89  // mc stuff
90 
91  Char_t mIsValid;
92  Float_t mPtMc;
93  Float_t mPzMc;
94  Float_t mEtaMc;
95  Float_t mPhiMc;
96  Short_t mNHitMc;
97  Short_t mNSvtHitMc;
98  Short_t mNSsdHitMc;
99  Short_t mNFtpcHitMc;
100  Short_t mNBemcHitMc;
101  Short_t mNBprsHitMc;
102  Short_t mNBsmdeHitMc;
103  Short_t mNBsmdpHitMc;
104  Short_t mNEemcHitMc;
105  Short_t mNEprsHitMc;
106  Short_t mNEsmduHitMc;
107  Short_t mNEsmdvHitMc;
108  UShort_t mGeantId; //Geant particle id
109  Int_t mPdgId; //PDG particle id
110  Short_t mChargeMc;
111  Float_t mStopR;
112  Int_t mKey; //Geant track id
113  Int_t mParentKey; //Geant vertex id
114  UShort_t mParentGeantId; //Geant Parent particle id
115  Float_t mEmcEnergyMcHit[3];
116  Float_t mEmcEnergyMcSum;
117  Short_t mEmcSoftIdHiTowerMc[3];
118 
119  // assoc stuff
120  Short_t mNAssocGl; //Number of rc globals assigned to this mc track
121  Short_t mNAssocPr; //Number of rc primaries assigned to this mc track
122  Bool_t mIsPrimary;
123 
124  ClassDef(StTinyMcTrack,6)
125 };
126 
127 #endif
128 //
129 // $Log: StTinyMcTrack.h,v $
130 // Revision 1.14 2018/01/03 18:18:09 genevb
131 // idTruths and keys moved from short to int
132 //
133 // Revision 1.13 2011/04/01 20:00:17 perev
134 // Comments++
135 //
136 // Revision 1.12 2011/02/24 17:58:03 perev
137 // change IO version
138 //
139 // Revision 1.11 2011/02/16 16:46:30 perev
140 // setPdgId imp added
141 //
142 // Revision 1.10 2011/02/16 00:49:48 perev
143 // mPdgId added
144 //
145 // Revision 1.9 2011/02/11 03:32:14 perev
146 // geantid now is ushort
147 //
148 // Revision 1.8 2007/12/22 20:37:53 calderon
149 // Added EMC information to tracks. MC info obtained from StMcTrack, Rec Info
150 // obtained from track extrapolation to BEMC of rec track.
151 //
152 // Revision 1.7 2007/02/23 17:07:01 fisyak
153 // Add Ssd and DCA
154 //
155 // Revision 1.6 2006/07/24 19:03:16 calderon
156 // Added parent key data member to StTinyMcTrack.
157 // Added reco key data member to StTinyRcTrack.
158 //
159 // Revision 1.5 2004/03/31 23:42:46 calderon
160 // Adding info to evaluate idTruth information.
161 // -Add key to StTinyMcTrack.h
162 // -Add dominatrack, common hits to dominatrack and average hit quality to StMiniMcPair.h
163 //
164 // Revision 1.4 2003/09/02 17:58:43 perev
165 // gcc 3.2 updates + WarnOff
166 //
167 // Revision 1.3 2003/05/08 02:09:20 calderon
168 // Added data members for svt and ftpc fit points for StTinyRcTrack.
169 // Added data members for svt and ftpc hits for StTinyMcTrack.
170 // Added methods to calculate px, py, and p from the available pt, phi and pz, for
171 // global and primary momenta and also for monte carlo momentum.
172 // Cleaned up includes in StMiniMcEvent.
173 //
174 // Revision 1.2 2002/06/11 21:12:00 calderon
175 // fix typo, pttMc() -> ptMc()
176 //
177 // Revision 1.1 2002/05/30 01:20:58 calderon
178 // Classes for use in a general framework for extracting efficiencies
179 // from both embedding and full simulations
180 // (after GSTAR+TRS+StEvent+StMcEvent+StAssociationMaker)
181 // so that the information of the track matches gets stored persistently.
182 //
183 //