1 /**************************************************************************
\r
2 * Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
\r
4 * Author: The ALICE Off-line Project. *
\r
5 * Contributors are mentioned in the code where appropriate. *
\r
7 * Permission to use, copy, modify and distribute this software and its *
\r
8 * documentation strictly for non-commercial purposes is hereby granted *
\r
9 * without fee, provided that the above copyright notice appears in all *
\r
10 * copies and that both the copyright notice and this permission notice *
\r
11 * appear in the supporting documentation. The authors make no claims *
\r
12 * about the suitability of this software for any purpose. It is *
\r
13 * provided "as is" without express or implied warranty. *
\r
14 **************************************************************************/
\r
16 /* $Id: AliAODPWG4Particle.h $ */
\r
18 //-------------------------------------------------------------------------
\r
19 // AOD class for photon and other particles storage and
\r
20 // correlation studies
\r
21 // Author: Yves Schutz, CERN, Gustavo Conesa, INFN
\r
22 //-------------------------------------------------------------------------
\r
26 //-- Analysis system
\r
27 #include "AliAODPWG4Particle.h"
\r
29 ClassImp(AliAODPWG4Particle)
\r
32 //______________________________________________________________________________
\r
33 AliAODPWG4Particle::AliAODPWG4Particle() :
\r
35 fMomentum(0),fPdg(-1), fTag(0), fBtag(-1), fLabel(-1), fCaloLabel(), fTrackLabel(),
\r
36 fDetector(""), fDisp(0), fTof(0), fCharged(0), fTagged(0), fBadDist(0), fFidArea(0), fInputFileIndex(0)
\r
39 fCaloLabel [0] = -1;
\r
40 fCaloLabel [1] = -1;
\r
41 fTrackLabel[0] = -1;
\r
42 fTrackLabel[1] = -1;
\r
45 //______________________________________________________________________________
\r
46 AliAODPWG4Particle::AliAODPWG4Particle(Double_t px, Double_t py, Double_t pz, Double_t e):
\r
48 fMomentum(0),fPdg(-1), fTag(0), fBtag(-1), fLabel(-1),fCaloLabel(), fTrackLabel(),
\r
49 fDetector(""), fDisp(0), fTof(0),fCharged(0), fTagged(0), fBadDist(0), fFidArea(0), fInputFileIndex(0)
\r
52 fMomentum = new TLorentzVector(px, py, pz, e);
\r
54 fCaloLabel [0] = -1;
\r
55 fCaloLabel [1] = -1;
\r
56 fTrackLabel[0] = -1;
\r
57 fTrackLabel[1] = -1;
\r
60 //______________________________________________________________________________
\r
61 AliAODPWG4Particle::AliAODPWG4Particle(TLorentzVector & p):
\r
63 fMomentum(0),fPdg(-1), fTag(0), fBtag(-1), fLabel(-1),fCaloLabel(), fTrackLabel(),
\r
64 fDetector(""), fDisp(0), fTof(0), fCharged(0), fTagged(0), fBadDist(0), fFidArea(0), fInputFileIndex(0)
\r
67 fMomentum = new TLorentzVector(p);
\r
69 fCaloLabel [0] = -1;
\r
70 fCaloLabel [1] = -1;
\r
71 fTrackLabel[0] = -1;
\r
72 fTrackLabel[1] = -1;
\r
76 //______________________________________________________________________________
\r
77 AliAODPWG4Particle::~AliAODPWG4Particle()
\r
83 //______________________________________________________________________________
\r
84 AliAODPWG4Particle::AliAODPWG4Particle(const AliAODPWG4Particle& part) :
\r
86 fMomentum(0), fPdg(part.fPdg), fTag(part.fTag), fBtag(part.fBtag), fLabel(part.fLabel),
\r
87 fCaloLabel(), fTrackLabel(), fDetector(part.fDetector),fDisp(part.fDisp),
\r
88 fTof(part.fTof), fCharged(part.fCharged), fTagged(part.fTagged), fBadDist(part.fBadDist),
\r
89 fFidArea(part.fFidArea), fInputFileIndex(part.fInputFileIndex)
\r
92 fMomentum = new TLorentzVector(*part.fMomentum);
\r
94 fCaloLabel [0] = part.fCaloLabel[0];
\r
95 fCaloLabel [1] = part.fCaloLabel[1];
\r
96 fTrackLabel[0] = part.fTrackLabel[0];
\r
97 fTrackLabel[1] = part.fTrackLabel[1];
\r
100 //______________________________________________________________________________
\r
101 AliAODPWG4Particle& AliAODPWG4Particle::operator=(const AliAODPWG4Particle& part)
\r
103 // Assignment operator
\r
108 fBtag = part.fBtag;
\r
109 fLabel = part.fLabel;
\r
111 fCaloLabel [0] = part.fCaloLabel[0];
\r
112 fCaloLabel [1] = part.fCaloLabel[1];
\r
113 fTrackLabel[0] = part.fTrackLabel[0];
\r
114 fTrackLabel[1] = part.fTrackLabel[1];
\r
116 fDetector = part.fDetector;
\r
117 fDisp = part.fDisp;
\r
119 fCharged = part.fCharged;
\r
120 fTagged = part.fTagged;
\r
121 fBadDist = part.fBadDist;
\r
122 fFidArea = part.fFidArea;
\r
123 fInputFileIndex = part.fInputFileIndex;
\r
125 if (fMomentum ) delete fMomentum;
\r
126 fMomentum = new TLorentzVector(*part.fMomentum);
\r
133 //_______________________________________________________________
\r
134 Bool_t AliAODPWG4Particle::IsPIDOK(const Int_t ipid, const Int_t pdgwanted) const{
\r
135 // returns true if particle satisfies given PID criterium
\r
137 case 0: return kTRUE ; //No PID at all
\r
140 if (fPdg == pdgwanted) return kTRUE;
\r
141 else return kFALSE; //Overall PID calculated with bayesian methods.
\r
143 case 2: return fDisp ; //only dispersion cut
\r
144 case 3: return fTof ; //Only TOF cut
\r
145 case 4: return fCharged ; //Only Charged cut
\r
146 case 5: return fDisp && fTof ; //Dispersion and TOF
\r
147 case 6: return fDisp && fCharged ; //Dispersion and Charged
\r
148 case 7: return fTof && fCharged ; //TOF and Charged
\r
149 case 8: return fDisp && fTof && fCharged ; // all 3 cuts
\r
150 default: return kFALSE ; //Not known combination
\r
154 //______________________________________________________________________________
\r
155 void AliAODPWG4Particle::Print(Option_t* /*option*/) const
\r
157 // Print information of all data members
\r
158 printf("Particle 4-vector:\n");
\r
159 printf(" E = %13.3f", E() );
\r
160 printf(" Px = %13.3f", Px());
\r
161 printf(" Py = %13.3f", Py());
\r
162 printf(" Pz = %13.3f\n", Pz());
\r
163 printf("PID bits :\n");
\r
164 printf(" TOF : %d",fTof);
\r
165 printf(" Charged : %d",fCharged);
\r
166 printf(" Dispersion : %d\n",fDisp);
\r
167 printf("PDG : %d\n",fPdg);
\r
168 printf("Tag : %d\n",fTag);
\r
169 printf("Btag : %d\n",fBtag);
\r
170 printf("Pi0 Tag : %d\n",fTagged);
\r
171 printf("Dist. to bad channel : %d\n",fBadDist);
\r
172 printf("Fid Area : %d\n",fFidArea);
\r
173 printf("Input File Index : %d\n",fInputFileIndex);
\r
174 printf("Detector : %s\n",fDetector.Data());
\r