AliPhysics  328058c (328058c)
AliCaloTrackParticle.cxx
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright(c) 1998-2007, 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 #include "AliCaloTrackParticle.h"
17 
19 ClassImp(AliCaloTrackParticle)
21 
22 //______________________________________________________________________________
27 AliVParticle(),
28 fMomentum(0),fPdg(-1), fTag(0), fLabel(-1),
29 fCaloLabel(), fTrackLabel(), fDetectorTag(-1),
30 fBadDist(0), fNLM(0), fM02(0), fM20(0),
31 fTime(0),fNCells(0),fSuperModule(0),
32 fDecayTag(0),fIsolated(0), fLeadingParticle(0),
33 fIsoConePtLead(), fIsoConeSumPt(),
34 fDisp(0), fTof(0), fCharged(0),
35 fTagged(0), fFidArea(0), fInputFileIndex(0),fBtag(0)
36 {
37  fCaloLabel [0] = -1;
38  fCaloLabel [1] = -1;
39  fTrackLabel[0] = -1;
40  fTrackLabel[1] = -1;
41  fTrackLabel[2] = -1;
42  fTrackLabel[3] = -1;
43 
44  fIsoConePtLead[0] = 0.;
45  fIsoConeSumPt [0] = 0.;
46  fIsoConePtLead[1] = 0.;
47  fIsoConeSumPt [1] = 0.;
48 }
49 
50 //______________________________________________________________________________
62  AliVParticle(),
63  fMomentum(0),fPdg(-1), fTag(0), fLabel(-1),
64  fCaloLabel(), fTrackLabel(), fDetectorTag(-1),
65  fBadDist(0), fNLM(0), fM02(0), fM20(0),
66  fTime(0),fNCells(0),fSuperModule(0),
67  fDecayTag(0),fIsolated(0), fLeadingParticle(0),
68  fIsoConePtLead(), fIsoConeSumPt(),
69  fDisp(0), fTof(0), fCharged(0),
70  fTagged(0), fFidArea(0), fInputFileIndex(0),fBtag(0)
71 {
72  fMomentum = new TLorentzVector(px, py, pz, e);
73 
74  fCaloLabel [0] = -1;
75  fCaloLabel [1] = -1;
76  fTrackLabel[0] = -1;
77  fTrackLabel[1] = -1;
78  fTrackLabel[2] = -1;
79  fTrackLabel[3] = -1;
80 
81  fIsoConePtLead[0] = 0.;
82  fIsoConeSumPt [0] = 0.;
83  fIsoConePtLead[1] = 0.;
84  fIsoConeSumPt [1] = 0.;
85 }
86 
87 //______________________________________________________________________________
96  AliVParticle(),
97  fMomentum(0),fPdg(-1), fTag(0), fLabel(-1),
99  fBadDist(0), fNLM(0), fM02(0), fM20(0),
100  fTime(0),fNCells(0),fSuperModule(0),
103  fDisp(0), fTof(0), fCharged(0),
104  fTagged(0), fFidArea(0), fInputFileIndex(0),fBtag(0)
105 {
106  fMomentum = new TLorentzVector(p);
107 
108  fCaloLabel [0] = -1;
109  fCaloLabel [1] = -1;
110  fTrackLabel[0] = -1;
111  fTrackLabel[1] = -1;
112  fTrackLabel[2] = -1;
113  fTrackLabel[3] = -1;
114 
115  fIsoConePtLead[0] = 0.;
116  fIsoConeSumPt [0] = 0.;
117  fIsoConePtLead[1] = 0.;
118  fIsoConeSumPt [1] = 0.;
119 }
120 
121 //______________________________________________________________________________
126 {
127  delete fMomentum;
128 }
129 
130 //______________________________________________________________________________
135 {
136  delete fMomentum;
137 }
138 
139 //______________________________________________________________________________
144  AliVParticle(part),
145  fMomentum(0), fPdg(part.fPdg), fTag(part.fTag), fLabel(part.fLabel),
147  fBadDist(part.fBadDist),fNLM(part.fNLM), fM02(part.fM02), fM20(part.fM20),
150  fDisp(part.fDisp), fTof(part.fTof), fCharged(part.fCharged),
152 {
153  fMomentum = new TLorentzVector(*part.fMomentum);
154 
155  fCaloLabel [0] = part.fCaloLabel[0];
156  fCaloLabel [1] = part.fCaloLabel[1];
157  fTrackLabel[0] = part.fTrackLabel[0];
158  fTrackLabel[1] = part.fTrackLabel[1];
159  fTrackLabel[2] = part.fTrackLabel[2];
160  fTrackLabel[3] = part.fTrackLabel[3];
161 
162  fIsoConePtLead[0] = part.fIsoConePtLead[0];
163  fIsoConeSumPt [0] = part.fIsoConeSumPt [0];
164  fIsoConePtLead[1] = part.fIsoConePtLead[1];
165  fIsoConeSumPt [1] = part.fIsoConeSumPt [1];
166 }
167 
168 //________________________________________________________________________________
173 {
174  if(this!=&part)
175  {
176  fPdg = part.fPdg;
177  fTag = part.fTag;
178  fLabel = part.fLabel;
179 
180  fCaloLabel [0] = part.fCaloLabel[0];
181  fCaloLabel [1] = part.fCaloLabel[1];
182  fTrackLabel[0] = part.fTrackLabel[0];
183  fTrackLabel[1] = part.fTrackLabel[1];
184 
185  fIsoConePtLead[0] = part.fIsoConePtLead[0];
186  fIsoConeSumPt [0] = part.fIsoConeSumPt [0];
187  fIsoConePtLead[1] = part.fIsoConePtLead[1];
188  fIsoConeSumPt [1] = part.fIsoConeSumPt [1];
189 
190  fDetectorTag = part.fDetectorTag;
191  fDisp = part.fDisp;
192  fTof = part.fTof;
193  fCharged = part.fCharged;
194  fBadDist = part.fBadDist;
195  fDecayTag = part.fDecayTag;
196 
197  fNLM = part.fNLM;
198  fM02 = part.fM02;
199  fM20 = part.fM20;
200  fIsolated = part.fIsolated;
202 
203  fBtag = part.fBtag;
204  fFidArea = part.fFidArea;
205  fTagged = part.fTagged;
207 
208  if (fMomentum ) delete fMomentum;
209  fMomentum = new TLorentzVector(*part.fMomentum);
210  }
211 
212  return *this;
213 }
214 
215 //_______________________________________________________________
220 {
221  switch(ipid)
222  {
223  case 0: return kTRUE ; //No PID at all
224  case 1:
225  {
226  if (fPdg == pdgwanted) return kTRUE;
227  else return kFALSE; //Overall PID calculated with bayesian methods.
228  }
229  case 2: return fDisp ; //only dispersion cut
230  case 3: return fTof ; //Only TOF cut
231  case 4: return fCharged ; //Only Charged cut
232  case 5: return fDisp && fTof ; //Dispersion and TOF
233  case 6: return fDisp && fCharged ; //Dispersion and Charged
234  case 7: return fTof && fCharged ; //TOF and Charged
235  case 8: return fDisp && fTof && fCharged ; // all 3 cuts
236  default: return kFALSE ; //Not known combination
237  }
238 }
239 
240 //_________________________________________________________
244 void AliCaloTrackParticle::Print(Option_t* /*option*/) const
245 {
246  printf("Particle 4-vector:\n");
247  printf(" E = %13.3f", E() );
248  printf(" Px = %13.3f", Px());
249  printf(" Py = %13.3f", Py());
250  printf(" Pz = %13.3f\n", Pz());
251  printf("Id PDG : %d\n",fPdg);
252  printf("MC Tag : %d\n",fTag);
253  printf("Dist. to bad channel : %d\n",fBadDist);
254 
255  printf("Detector : %d, Labels:\n",fDetectorTag);
256  printf(" Calo: %d, %d \n",fCaloLabel[0],fCaloLabel[1]);
257  printf(" Track: %d, %d, %d, %d \n",fTrackLabel[0],fTrackLabel[1],fTrackLabel[2],fTrackLabel[3]);
258 
259  if(fDetectorTag!=2) // Avoid tracks, AliFiducialCut::kCTS
260  {
261  printf("Calo param: \n");
262  printf(" M02: %2.2f\n",fM02);
263  printf(" M20: %2.2f\n",fM20);
264  printf(" NCell: %d\n",fNCells);
265  printf(" Time: %2.3f\n",fTime);
266  printf(" SModule: %d\n",fSuperModule);
267  }
268 
269  printf("Tags: \n");
270 // printf("Btag : %d\n",fBtag);
271  printf(" Pi0 Tag : %d\n",fDecayTag);
272  if(fIsolated) printf(" Isolated! \n");
273  if(fLeadingParticle) printf(" Leading! \n");
274 
275  printf("Isolation cone: \n");
276  printf("\t charged: pT Max %2.2f, Sum pT %2.2f",fIsoConePtLead[0],fIsoConeSumPt[0]);
277  printf("\t neutral: pT Max %2.2f, Sum pT %2.2f",fIsoConePtLead[1],fIsoConeSumPt[1]);
278 
279  printf("PID bits :\n");
280  printf(" TOF : %d",fTof);
281  printf(" Charged : %d",fCharged);
282  printf(" Dispersion : %d\n",fDisp);
283 
284  // printf("Fid Area : %d\n",fFidArea);
285  // printf("Input File Index : %d\n",fInputFileIndex);
286 }
Bool_t fCharged
Charged bit.
virtual Double_t Pz() const
double Double_t
Definition: External.C:58
UInt_t fDetectorTag
Detector where particle was measured, integer.
Int_t fPdg
type of identified particle, same code as PDG, but this is not a MonteCarlo particle ...
Int_t fInputFileIndex
0, standard input, 1 first input added. Only possible one for now, not really used.
Int_t fBadDist
Distance to calorimeter bad cell in cell units.
Bool_t IsPIDOK(Int_t ipid, Int_t pdgwanted) const
TString part
use mixed event to constrain combinatorial background
Definition: InvMassFit.C:52
virtual Double_t E() const
Float_t fIsoConePtLead[2]
Pt of track [0] and calo cluster [1] with highest energy in the isolation cone.
Int_t fFidArea
Type of fiducial area hit by this photon.
int Int_t
Definition: External.C:63
virtual void Print(Option_t *) const
Container for input particle information on CaloTrackCorr package.
Bool_t fDisp
Dispersion bit.
Int_t fCaloLabel[2]
CaloCluster index, 1 for photons, 2 for pi0.
virtual Double_t Py() const
Bool_t fLeadingParticle
Particle is leading or not.
AliCaloTrackParticle & operator=(const AliCaloTrackParticle &photon)
Int_t fNCells
Store the number of cells in calorimeter cluster.
Int_t fBtag
tag particle from B.
virtual void Clear(const Option_t *)
Int_t fDecayTag
Tag the photon as decay from, pi0, eta, pi0 side band, eta side band.
Float_t fM20
Store the second axis of the calorimeter shower shape.
Int_t fTrackLabel[4]
Track lable, 1 for pions, 2 for conversion photons.
Float_t fM02
Store the main axis of the calorimeter shower shape.
virtual Double_t Px() const
UInt_t fNLM
Store the number of local maxima in calorimeter cluster.
Bool_t fTagged
If photon tagged (pi0 decay), not used anymore, replace by fDecayTag.
Bool_t fIsolated
Particle is isolated or not.
Int_t fTag
tag of particle (decay, fragment, prompt photon), MC
TLorentzVector * fMomentum
Photon 4-momentum vector.
const char Option_t
Definition: External.C:48
bool Bool_t
Definition: External.C:53
Float_t fIsoConeSumPt[2]
Sum of Pt of tracks [0] and calo clusters [1] in the isolation cone.
Int_t fSuperModule
Store the super-module number of calorimeter cluster.
Float_t fTime
Store the time of calorimeter cluster or track, nano seconds.