StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StTinyMcTrack.cxx
Go to the documentation of this file.
1 
11 #include <assert.h>
12 #include "StTinyMcTrack.h"
13 #include "Stiostream.h"
14 #include "TString.h"
15 ClassImp(StTinyMcTrack);
16 //________________________________________________________________________________
17 void StTinyMcTrack::setGeantId(int val)
18 {
19  assert(val>=0 && val <= 0xFFFF);
20  mGeantId=val;
21 }
22 //________________________________________________________________________________
23  void StTinyMcTrack::setParentGeantId(int val)
24 {
25  assert(val>=0 && val <= 0xFFFF);
26  mParentGeantId=val;
27 }
28 
29 StTinyMcTrack::StTinyMcTrack() {memset(&mIsValid, 0,((Char_t*) &mIsPrimary)-&mIsValid);}
30 //________________________________________________________________________________
31 void StTinyMcTrack::Print(Option_t *option) const {
32  if (TString(option).Contains("desc",TString::kIgnoreCase)) {
33  cout << Form(" V pT pZ eta phi HitMc Svt Ssd Ftpc GiD Char R Key nGl nPr isPr") << endl;
34  } else {
35  if (mIsValid) {
36  Double_t R = mStopR;
37  if (R < 0) R = 0;
38  if (R > 999.99) R = 999.99;
39 // // cout << Form("Mc%2i%8.3f%8.3f%8.3f%8.3f%5i%4i%4i%4i%4i%4i%4i%4i%4i%4i%4i%4i%4i%4i%8.3f%4i%8.3f%8.3f%4i%4i%4i%4i%2i",
40 // cout << Form("Mc%2i%8.3f%8.3f%8.3f%8.3f%5i%4i%4i%4i%4i%4i%4i%4i%4i%4i%4i%4i%4i%6i%8.3f%4i%4i%8.3f%8.3f%4i%4i%2i",
41 // (int) mIsValid, mPtMc, mPzMc, mEtaMc, mPhiMc,
42 // mNHitMc, mNSvtHitMc, mNSsdHitMc, mNFtpcHitMc,
43 // mNBemcHitMc, mNBprsHitMc, mNBsmdeHitMc, mNBsmdpHitMc,
44 // mNEemcHitMc, mNEprsHitMc, mNEsmduHitMc, mNEsmdvHitMc,
45 // mGeantId, mChargeMc, R, mKey, mParentKey, mEmcEnergyMcHit[0], mEmcEnergyMcSum, mEmcSoftIdHiTowerMc[0], mNAssocGl, mNAssocPr, (int) mIsPrimary) << endl;
46  }
47  }
48 }
49 //
50 // $Log: StTinyMcTrack.cxx,v $
51 // Revision 1.7 2019/01/18 01:10:15 perev
52 // OverComplicated print commented out
53 //
54 // Revision 1.6 2011/02/16 00:49:06 perev
55 // geandId could be zero
56 //
57 // Revision 1.5 2011/02/11 03:32:14 perev
58 // geantid now is ushort
59 //
60 // Revision 1.4 2010/08/02 20:14:16 perev
61 // Format fix, thanks to Hiroshi
62 //
63 // Revision 1.3 2007/12/22 20:37:53 calderon
64 // Added EMC information to tracks. MC info obtained from StMcTrack, Rec Info
65 // obtained from track extrapolation to BEMC of rec track.
66 //
67 // Revision 1.2 2007/02/23 17:07:00 fisyak
68 // Add Ssd and DCA
69 //
70 // Revision 1.1 2002/05/30 01:20:58 calderon
71 // Classes for use in a general framework for extracting efficiencies
72 // from both embedding and full simulations
73 // (after GSTAR+TRS+StEvent+StMcEvent+StAssociationMaker)
74 // so that the information of the track matches gets stored persistently.
75 //
76 //
Persistent MC track class.