]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/ESD/AliESDCosmicTrack.cxx
Updates in event mixing code for low-pt code
[u/mrichter/AliRoot.git] / STEER / ESD / AliESDCosmicTrack.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 //  derived from AliExternalTrackParam, itself is the trackpar at the upper end of the cosmic ray in TPC
17 //  its lower partner is fLowerTrackParam
18 //  number of cluster of the whole cosmic ray, its lever arm, chi2/ncls and impact parameters(D, Z) are also stored as important information of the combined TPC track quality
19 //           
20 //  Xianguo Lu 
21 //  lu@physi.uni-heidelberg.de
22 //  Xianguo.Lu@cern.ch
23 //           
24
25 #include "AliExternalTrackParam.h"
26 #include "AliESDCosmicTrack.h"
27
28 ClassImp(AliESDCosmicTrack);
29
30 AliESDCosmicTrack::AliESDCosmicTrack():
31   AliExternalTrackParam()
32
33   , fLowerTrackParam(0x0)
34   , fX0UpperTrackParam(0x0)
35   , fX0LowerTrackParam(0x0)
36   , fInnerClusterUpper(0x0)
37   , fInnerClusterLower(0x0)
38
39   , fNCluster(-999)
40   , fLeverArm(-999)
41   , fChi2PerCluster(-999)
42   , fImpactD(-999)
43   , fImpactZ(-999)
44   , fIsReuse(-999)
45   , fFindableRatio(-999)
46 {
47   //
48   // default constructor
49   // important to have default constructor in TTree
50   //
51   for(Int_t ii=0; ii<2; ii++)
52     fESDtrackIndex[ii] = 0;
53 }
54
55 AliESDCosmicTrack::AliESDCosmicTrack(const Int_t idUp, const Int_t idLow, const AliExternalTrackParam * trkparUp, const AliExternalTrackParam * trkparLow, const AliExternalTrackParam * parx0Up, const AliExternalTrackParam * parx0Low, const Int_t ncls, const Double_t la, const Double_t chi2, const Double_t impd, const Double_t impz, const Bool_t isreuse, const Double_t findable, const TVector3 innerclusterupper, const TVector3 innerclusterlower): 
56   AliExternalTrackParam(*trkparUp)
57   , fLowerTrackParam(new AliExternalTrackParam(*trkparLow))
58   , fX0UpperTrackParam(new AliExternalTrackParam(*parx0Up))
59   , fX0LowerTrackParam(new AliExternalTrackParam(*parx0Low))
60   , fInnerClusterUpper(new TVector3(innerclusterupper))
61   , fInnerClusterLower(new TVector3(innerclusterlower))
62   , fNCluster(ncls)
63   , fLeverArm(la)
64   , fChi2PerCluster(chi2)
65   , fImpactD(impd)
66   , fImpactZ(impz)
67   , fIsReuse(isreuse)
68   , fFindableRatio(findable)
69 {
70   //
71   // constructor
72   //
73   fESDtrackIndex[0] = idUp;
74   fESDtrackIndex[1] = idLow;
75 }
76
77 AliESDCosmicTrack::AliESDCosmicTrack(const AliESDCosmicTrack & costrk):
78   AliExternalTrackParam(costrk)
79   , fLowerTrackParam(new AliExternalTrackParam(*costrk.fLowerTrackParam))
80   , fX0UpperTrackParam(new AliExternalTrackParam(*costrk.fX0UpperTrackParam))
81   , fX0LowerTrackParam(new AliExternalTrackParam(*costrk.fX0LowerTrackParam))
82   , fInnerClusterUpper(new TVector3(*costrk.fInnerClusterUpper))
83   , fInnerClusterLower(new TVector3(*costrk.fInnerClusterLower))
84   , fNCluster(costrk.fNCluster)
85   , fLeverArm(costrk.fLeverArm)
86   , fChi2PerCluster(costrk.fChi2PerCluster)
87   , fImpactD(costrk.fImpactD)
88   , fImpactZ(costrk.fImpactZ)
89   , fIsReuse(costrk.fIsReuse)
90   , fFindableRatio(costrk.fFindableRatio)
91 {
92   //
93   // copy constructor
94   //
95   for(Int_t ii=0; ii<2; ii++){
96     fESDtrackIndex[ii] = costrk.fESDtrackIndex[ii];
97   }
98 }
99
100 AliESDCosmicTrack &AliESDCosmicTrack::operator=(const AliESDCosmicTrack & costrk)
101 {
102   //
103   // assignment operator
104   //
105   if(&costrk == this) return *this;
106   AliExternalTrackParam::operator=(costrk);
107   fLowerTrackParam = new AliExternalTrackParam(*costrk.fLowerTrackParam);
108   fX0UpperTrackParam = new AliExternalTrackParam(*costrk.fX0UpperTrackParam);
109   fX0LowerTrackParam = new AliExternalTrackParam(*costrk.fX0LowerTrackParam);
110   fInnerClusterUpper = new TVector3(*costrk.fInnerClusterUpper);
111   fInnerClusterLower = new TVector3(*costrk.fInnerClusterLower);
112   fNCluster = costrk.fNCluster;
113   fLeverArm = costrk.fLeverArm;
114   fChi2PerCluster = costrk.fChi2PerCluster;
115   fImpactD = costrk.fImpactD;
116   fImpactZ = costrk.fImpactZ;
117   fIsReuse = costrk.fIsReuse;
118   fFindableRatio = costrk.fFindableRatio;
119
120   for(Int_t ii=0; ii<2; ii++){
121     fESDtrackIndex[ii] = costrk.fESDtrackIndex[ii];
122   }
123   return *this;
124 }
125
126 AliESDCosmicTrack::~AliESDCosmicTrack()
127 {
128   delete fLowerTrackParam;
129   delete fX0UpperTrackParam;
130   delete fX0LowerTrackParam;
131
132   delete fInnerClusterUpper;
133   delete fInnerClusterLower;
134 }
135