StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StHbtTTreeTrack.cxx
1 /***************************************************************************
2  *
3  * $Id: StHbtTTreeTrack.cxx,v 1.3 2003/01/31 19:57:15 magestro Exp $
4  *
5  * Author: Frank Laue, BNL, laue@bnl.gov
6  ***************************************************************************/
7 
8 #include "StHbtTTreeTrack.h"
9 #include "StExceptions.hh"
10 
11 #include "StHbtEvent.hh"
12 #include "StHbtTrack.hh"
13 // #include "StEvent/StEventTypes.h"
14 // #include "StEvent/StTpcDedxPidAlgorithm.h"
15 
16 #include "StarClassLibrary/StElectron.hh"
17 #include "StarClassLibrary/StPionPlus.hh"
18 #include "StarClassLibrary/StKaonPlus.hh"
19 #include "StarClassLibrary/StProton.hh"
20 
21 // StGlobalTrack* gTrack = (StGlobalTrack*)track->node()->track(global);
22 // StPrimaryTrack* pTrack = (StPrimaryTrack*)track->node()->track(primary);
23 // StTrack* cTrack;
24 // if (pTrack) cTrack=pTrack;
25 // else cTrack=gTrack;
26 // if (!gTrack)
27 // throw StExceptionNullPointer("StHbtTTreeTrack::StHbtTTreeTrack(...) - gTrack");
28 // StTpcDedxPidAlgorithm* PidAlgorithm = new StTpcDedxPidAlgorithm();
29 
30 //----------------------------------------------------------------------------
31 //----------------------------------------------------------------------------
32 //----------------------------------------------------------------------------
33 StHbtTTreeTrack::StHbtTTreeTrack(const StHbtEvent* event, const StHbtTrack* track) {
34  StThreeVectorF vp = event->mPrimVertPos;
35  // fill for global track values
36 
37  mHelixGlobalC = track->mHelixGlobal.curvature();
38  mHelixGlobalDip = track->mHelixGlobal.dipAngle();
39  mHelixGlobalPhase = track->mHelixGlobal.phase();
40  mHelixGlobalX = track->mHelixGlobal.origin().x();
41  mHelixGlobalY = track->mHelixGlobal.origin().y();
42  mHelixGlobalZ = track->mHelixGlobal.origin().z();
43  mHelixGlobalH = track->mHelixGlobal.h();
44 
45  mHelixC = track->mHelix.curvature();
46  mHelixDip = track->mHelix.dipAngle();
47  mHelixPhase = track->mHelix.phase();
48  mHelixX = track->mHelix.origin().x();
49  mHelixY = track->mHelix.origin().y();
50  mHelixZ = track->mHelix.origin().z();
51  mHelixH = track->mHelix.h();
52 
53  mMap[0] = track->mMap[0];
54  mMap[1] = track->mMap[1];
55  mNHits = track->mNHits;
56  mNHitsPoss = track->mNHitsPoss;
57  mNHitsDedx = track->mNHitsDedx;
58  mChiSqXY = track->mChiSqXY;
59  mChiSqZ = track->mChiSqXY;
60  mdEdx = track->mdEdx;
61  mNSigmaElectron = track->mNSigmaElectron;
62  mNSigmaPion = track->mNSigmaPion;
63  mNSigmaKaon = track->mNSigmaKaon;
64  mNSigmaProton = track->mNSigmaProton;
65  mPidProbElectron = (short) (1000.*track->mPidProbElectron+.5);
66  mPidProbPion = (short) (1000.*track->mPidProbPion+.5);
67  mPidProbKaon = (short) (1000.*track->mPidProbKaon+.5);
68  mPidProbProton = (short) (1000.*track->mPidProbProton+.5);
69 
70  mTrackId = track->mTrackId;
71  mTrackType = track->mTrackType;
72 };
73 
74 ClassImp(StHbtTTreeTrack)
75 
76 
77 /***************************************************************************
78  *
79  * $Log: StHbtTTreeTrack.cxx,v $
80  * Revision 1.3 2003/01/31 19:57:15 magestro
81  * Cleared up simple compiler warnings on i386_linux24
82  *
83  * Revision 1.2 2001/09/05 20:41:42 laue
84  * Updates of the hbtMuDstTree microDSTs
85  *
86  * Revision 1.1 2001/06/21 19:15:47 laue
87  * Modified fiels:
88  * CTH.hh : new constructor added
89  * StHbtEvent, StHbtKink, StHbtTrack : constructors from the persistent
90  * (TTree) classes added
91  * StHbtLikeSignAnalysis : minor changes, for debugging
92  * StHbtTypes: split into different files
93  * Added files: for the new TTree muDst's
94  * StExceptions.cxx StExceptions.hh StHbtEnumeration.hh
95  * StHbtHelix.hh StHbtHisto.hh StHbtString.hh StHbtTFile.hh
96  * StHbtTTreeEvent.cxx StHbtTTreeEvent.h StHbtTTreeKink.cxx
97  * StHbtTTreeKink.h StHbtTTreeTrack.cxx StHbtTTreeTrack.h
98  * StHbtTTreeV0.cxx StHbtTTreeV0.h StHbtVector.hh
99  *
100  *
101  **************************************************************************/
int h() const
y-center of circle in xy-plane
Definition: StHelix.hh:174
const StThreeVector< double > & origin() const
-sign(q*B);
Definition: StHelix.hh:224
double phase() const
1/R in xy-plane
Definition: StHelix.hh:180