]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TOF/AliTOFTrackV2.cxx
Transition to NewIO
[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 ////////////////////////////////////////////////////////////////////////
32
33 #include "AliTOFTrackV2.h"
34
35 ClassImp(AliTOFTrackV2)
36
37 AliTOFTrackV2::AliTOFTrackV2() 
38 {
39   //
40   // Default ctor
41   //
42   fTrackLabel=-1;
43   fTOFDigitTrackLabel=-1;
44   fPTPC=-1;
45   fPdgCode=-1;
46   fdEdX=-1;
47   fxTPC=-1;
48   fyTPC=-1;
49   fzTPC=-1;
50   fPtTPC=-1;
51   fPzTPC=-1;
52   fxTRD=-1;
53   fyTRD=-1;
54   fzTRD=-1;
55   fPxTRD=-1;
56   fPyTRD=-1;
57   fPzTRD=-1;
58   fMatchingStatus=-1;
59   fLength=-1;
60   fTof=-1;
61   fMassTOF=-1;
62 }
63
64 //_____________________________________________________________________________
65 AliTOFTrackV2::AliTOFTrackV2(Int_t trackLabel, Int_t matchingStatus, Float_t tpcMom, Float_t dEdX, 
66                              Float_t* tpcXYZ, Float_t* tpcPtPz, Float_t* /*trdXYZ*/, Float_t* /*trdPxPyPz*/)
67 {
68   //
69   // par ctor
70   //
71
72   fTrackLabel=trackLabel;
73   fTOFDigitTrackLabel=-1;
74   fPTPC=tpcMom;
75   fPdgCode=-1;
76
77   fdEdX=dEdX;
78   fxTPC=tpcXYZ[0];
79   fyTPC=tpcXYZ[1];
80   fzTPC=tpcXYZ[2];
81   fPtTPC=tpcPtPz[0];
82   fPzTPC=tpcPtPz[1];
83
84   fxTRD=-1;
85   fyTRD=-1;
86   fzTRD=-1;
87   fPxTRD=-1;
88   fPyTRD=-1;
89   fPzTRD=-1;
90
91   fMatchingStatus=matchingStatus;
92   fLength=-1;
93   fTof=-1;
94   fMassTOF=-1;
95 }
96
97 //_____________________________________________________________________________
98 void AliTOFTrackV2::UpdateTrack(Int_t tofDigitTrackLabel, Int_t matching, Float_t tof)
99 {
100   //
101   // update the track after the TOF digit assignment
102   //
103   fTOFDigitTrackLabel=tofDigitTrackLabel;
104   fMatchingStatus=matching;
105   fTof=tof;
106 }
107
108 //_____________________________________________________________________________
109 void AliTOFTrackV2::UpdateTrack(Int_t pdgCode, Float_t trackLength)
110 {
111   //
112   // update the track 
113   //
114   fPdgCode=pdgCode;
115   fLength=trackLength;
116 }