]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TOF/AliTOFTrackV2.cxx
To follow coding conventions
[u/mrichter/AliRoot.git] / TOF / AliTOFTrackV2.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
7  * Permission to use, copy, modify and distribute this software and its   *
8  * documentation strictly for non-commercial purposes is hereby granted   *
9  * without fee, provided that the above copyright notice appears in all   *
10  * copies and that both the copyright notice and this permission notice   *
11  * appear in the supporting documentation. The authors make no claims     *
12  * about the suitability of this software for any purpose. It is          *
13  * provided "as is" without express or implied warranty.                  *
14  **************************************************************************/
15
16 ////////////////////////////////////////////////////////////////////////
17 //
18 // AliTOFTrackV2 class
19 //
20 // Author: F. Pierella | pierella@bo.infn.it
21 //
22 // Description: output of AliTOFReconstructionerV2
23 // TRD tracking capabilities have been foreseen by including the member
24 // variables fxTRD, fyTRD, fzTRD and momentum components fPxTRD, fPyTRD, fPzTRD.
25 // Class to be written in TreeR for each event.
26 //
27 // Member variable summary description: 
28 // - track momentum and position in the last TPC padrow 
29 // - track length as given by the geometrical propagation
30 // - reconstructed mass from time of flight and time of flight itself
31 // - fMatchingStatus
32 //             -2 backpropagation goes out of the z acceptance of the TOF
33 //             -1 failed backpropagation on TOF inner radius
34 //              0 for fake tracks
35 //              1 for tracks matched with no signal on TOF (failed DigitFinder)
36 //              3 for tracks matched with the actual digit
37 //              4 for tracks matched with a wrong (not its own) TOF digit
38 ////////////////////////////////////////////////////////////////////////
39
40 #include "AliTOFTrackV2.h"
41
42 ClassImp(AliTOFTrackV2)
43
44 AliTOFTrackV2::AliTOFTrackV2() 
45 {
46   //
47   // Default ctor
48   //
49   fTrackLabel=-1;
50   fTOFDigitTrackLabel=-1;
51   fPTPC=-1;
52   fPdgCode=-1;
53   fdEdX=-1;
54   fxTPC=-1;
55   fyTPC=-1;
56   fzTPC=-1;
57   fPtTPC=-1;
58   fPzTPC=-1;
59   fxTRD=-1;
60   fyTRD=-1;
61   fzTRD=-1;
62   fPxTRD=-1;
63   fPyTRD=-1;
64   fPzTRD=-1;
65   fMatchingStatus=-1;
66   fLength=-1;
67   fTof=-1;
68   fMassTOF=-1;
69   // vertex variables from reconstruction
70   fXRecVtx=-1;
71   fYRecVtx=-1;
72   fZRecVtx=-1;
73   fPxRecVtx=-1;
74   fPyRecVtx=-1;
75   fPzRecVtx=-1;
76   fRecTrackLength=-1;
77 }
78
79 //_____________________________________________________________________________
80 AliTOFTrackV2::AliTOFTrackV2(Int_t trackLabel, Int_t matchingStatus, 
81                              Float_t tpcMom, Float_t dEdX, Float_t* tpcXYZ, 
82                              Float_t* tpcPtPz, Float_t* /* trdXYZ */, 
83                              Float_t* /* trdPxPyPz */)
84 {
85   //
86   // par ctor
87   //
88
89   fTrackLabel=trackLabel;
90   fTOFDigitTrackLabel=-1;
91   fPTPC=tpcMom;
92   fPdgCode=-1;
93
94   fdEdX=dEdX;
95   fxTPC=tpcXYZ[0];
96   fyTPC=tpcXYZ[1];
97   fzTPC=tpcXYZ[2];
98   fPtTPC=tpcPtPz[0];
99   fPzTPC=tpcPtPz[1];
100
101   fxTRD=-1;
102   fyTRD=-1;
103   fzTRD=-1;
104   fPxTRD=-1;
105   fPyTRD=-1;
106   fPzTRD=-1;
107
108   fMatchingStatus=matchingStatus;
109   fLength=-1;
110   fTof=-1;
111   fMassTOF=-1;
112
113   // vertex variables from reconstruction
114   fXRecVtx=-1;
115   fYRecVtx=-1;
116   fZRecVtx=-1;
117   fPxRecVtx=-1;
118   fPyRecVtx=-1;
119   fPzRecVtx=-1;
120   fRecTrackLength=-1;
121 }
122
123 //_____________________________________________________________________________
124 void AliTOFTrackV2::UpdateTrack(Int_t tofDigitTrackLabel, Int_t matching, Float_t tof)
125 {
126   //
127   // update the track after the TOF digit assignment
128   //
129   fTOFDigitTrackLabel=tofDigitTrackLabel;
130   fMatchingStatus=matching;
131   fTof=tof;
132 }
133
134 //_____________________________________________________________________________
135 void AliTOFTrackV2::UpdateTrack(Int_t pdgCode, Float_t trackLength)
136 {
137   //
138   // update the track 
139   //
140   fPdgCode=pdgCode;
141   fLength=trackLength;
142 }