1 /***************************************************************************
6 ***************************************************************************
11 ***************************************************************************
14 * Revision 1.1.1.1 2007/04/25 15:38:41 panos
15 * Importing the HBT code dir
17 * Revision 1.4 2007-04-03 16:00:08 mchojnacki
18 * Changes to iprove memory managing
20 * Revision 1.3 2007/03/13 15:30:03 mchojnacki
21 * adding reader for simulated data
23 * Revision 1.2 2007/03/08 14:58:03 mchojnacki
24 * adding some alice stuff
26 * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki
27 * First version on CVS
29 **************************************************************************/
31 #include "AliFemtoESDTrackCut.h"
35 ClassImp(AliFemtoESDTrackCut)
38 AliFemtoESDTrackCut::AliFemtoESDTrackCut()
40 fNTracksPassed = fNTracksFailed = 0;
41 fCharge = 0; // takes both charges 0
42 fPt[0]=0.0; fPt[1] = 100.0;//100
43 fRapidity[0]=-2; fRapidity[1]=2;//-2 2
44 fPidProbElectron[0]=-1;fPidProbElectron[1]=2;
45 fPidProbPion[0]=-1; fPidProbPion[1]=2;
46 fPidProbKaon[0]=-1;fPidProbKaon[1]=2;
47 fPidProbProton[0]=-1;fPidProbProton[1]=2;
48 fPidProbMuon[0]=-1;fPidProbMuon[1]=2;
55 //------------------------------
56 //AliFemtoESDTrackCut::~AliFemtoESDTrackCut(){
59 //------------------------------
60 bool AliFemtoESDTrackCut::Pass(const AliFemtoTrack* track)
62 //cout<<"AliFemtoESD cut"<<endl;
63 //cout<<fPidProbPion[0]<<" < pi ="<<track->PidProbPion()<<" <"<<fPidProbPion[1]<<endl;
66 //cout<<" status "<<track->Label()<<" "<<track->Flags()<<" "<<track->TPCnclsF()<<" "<<track->ITSncls()<<endl;
67 if ((track->Flags()&fStatus)!=fStatus)
69 // cout<<track->Flags()<<" "<<fStatus<<" no go through status"<<endl;
74 if (fminTPCclsF>track->TPCnclsF())
76 //cout<<" No go because TPC Number of ClsF"<<fminTPCclsF<< " "<<track->TPCnclsF()<<endl;
79 if (fminITScls>track->ITSncls())
81 //cout<<" No go because ITS Number of Cls"<<fminITScls<< " "<<track->ITSncls()<<endl;
87 //cout<<"labels"<<endl;
91 // cout<<"No Go Through the cut"<<endl;
92 // cout<<fLabel<<" Label="<<track->Label()<<endl;
98 //cout<<"AliFemtoESD cut ch "<<endl;
99 //cout<<fCharge<<" Charge="<<track->Charge()<<endl;
100 if (track->Charge()!= fCharge)
103 // cout<<"No Go Through the cut"<<endl;
104 // cout<<fCharge<<" Charge="<<track->Charge()<<endl;
108 float TEnergy = ::sqrt(track->P().mag2()+fMass*fMass);
109 float TRapidity = 0.5*::log((TEnergy+track->P().z())/(TEnergy-track->P().z()));
110 float Pt = ::sqrt((track->P().x())*(track->P().x())+(track->P().y())*(track->P().y()));
111 if ((TRapidity<fRapidity[0])||(TRapidity>fRapidity[1]))
114 //cout<<"No Go Through the cut"<<endl;
115 //cout<<fRapidity[0]<<" < Rapidity ="<<TRapidity<<" <"<<fRapidity[1]<<endl;
118 if ((Pt<fPt[0])||(Pt>fPt[1]))
121 //cout<<"No Go Through the cut"<<endl;
122 //cout<<fPt[0]<<" < Pt ="<<Pt<<" <"<<fPt[1]<<endl;
125 if ((track->PidProbElectron()<fPidProbElectron[0])||(track->PidProbElectron()>fPidProbElectron[1]))
128 //cout<<"No Go Through the cut"<<endl;
129 //cout<<fPidProbElectron[0]<<" < e ="<<track->PidProbElectron()<<" <"<<fPidProbElectron[1]<<endl;
132 if ((track->PidProbPion()<fPidProbPion[0])||(track->PidProbPion()>fPidProbPion[1]))
135 //cout<<"No Go Through the cut"<<endl;
136 //cout<<fPidProbPion[0]<<" < pi ="<<track->PidProbPion()<<" <"<<fPidProbPion[1]<<endl;
139 if ((track->PidProbKaon()<fPidProbKaon[0])||(track->PidProbKaon()>fPidProbKaon[1]))
142 //cout<<"No Go Through the cut"<<endl;
143 //cout<<fPidProbKaon[0]<<" < k ="<<track->PidProbKaon()<<" <"<<fPidProbKaon[1]<<endl;
146 if ((track->PidProbProton()<fPidProbProton[0])||(track->PidProbProton()>fPidProbProton[1]))
149 //cout<<"No Go Through the cut"<<endl;
150 //cout<<fPidProbProton[0]<<" < p ="<<track->PidProbProton()<<" <"<<fPidProbProton[1]<<endl;
153 if ((track->PidProbMuon()<fPidProbMuon[0])||(track->PidProbMuon()>fPidProbMuon[1]))
156 //cout<<"No Go Through the cut"<<endl;
157 //cout<<fPidProbMuon[0]<<" < mi="<<track->PidProbMuon()<<" <"<<fPidProbMuon[1]<<endl;
161 // cout<<"Go Through the cut"<<endl;
162 // cout<<fLabel<<" Label="<<track->Label()<<endl;
163 // cout<<fCharge<<" Charge="<<track->Charge()<<endl;
164 // cout<<fPt[0]<<" < Pt ="<<Pt<<" <"<<fPt[1]<<endl;
165 //cout<<fRapidity[0]<<" < Rapidity ="<<TRapidity<<" <"<<fRapidity[1]<<endl;
166 //cout<<fPidProbElectron[0]<<" < e="<<track->PidProbElectron()<<" <"<<fPidProbElectron[1]<<endl;
167 //cout<<fPidProbPion[0]<<" < pi="<<track->PidProbPion()<<" <"<<fPidProbPion[1]<<endl;
168 //cout<<fPidProbKaon[0]<<" < k="<<track->PidProbKaon()<<" <"<<fPidProbKaon[1]<<endl;
169 //cout<<fPidProbProton[0]<<" < p="<<track->PidProbProton()<<" <"<<fPidProbProton[1]<<endl;
170 //cout<<fPidProbMuon[0]<<" < mi="<<track->PidProbMuon()<<" <"<<fPidProbMuon[1]<<endl;
176 //------------------------------
177 AliFemtoString AliFemtoESDTrackCut::Report()
181 sprintf(Ctemp,"Particle mass:\t%E\n",this->Mass());
183 sprintf(Ctemp,"Particle charge:\t%d\n",fCharge);
185 sprintf(Ctemp,"Particle pT:\t%E - %E\n",fPt[0],fPt[1]);
187 sprintf(Ctemp,"Particle rapidity:\t%E - %E\n",fRapidity[0],fRapidity[1]);
189 sprintf(Ctemp,"Number of tracks which passed:\t%ld Number which failed:\t%ld\n",fNTracksPassed,fNTracksFailed);
191 AliFemtoString returnThis = Stemp;