1 /***************************************************************************
6 ***************************************************************************
11 ***************************************************************************
14 * Revision 1.4 2007-04-03 16:00:08 mchojnacki
15 * Changes to iprove memory managing
17 * Revision 1.3 2007/03/13 15:30:03 mchojnacki
18 * adding reader for simulated data
20 * Revision 1.2 2007/03/08 14:58:03 mchojnacki
21 * adding some alice stuff
23 * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki
24 * First version on CVS
26 **************************************************************************/
28 #include "Cut/AliFemtoESDTrackCut.h"
32 ClassImp(AliFemtoESDTrackCut)
35 AliFemtoESDTrackCut::AliFemtoESDTrackCut()
37 fNTracksPassed = fNTracksFailed = 0;
38 fCharge = 0; // takes both charges 0
39 fPt[0]=0.0; fPt[1] = 100.0;//100
40 fRapidity[0]=-2; fRapidity[1]=2;//-2 2
41 fPidProbElectron[0]=-1;fPidProbElectron[1]=2;
42 fPidProbPion[0]=-1; fPidProbPion[1]=2;
43 fPidProbKaon[0]=-1;fPidProbKaon[1]=2;
44 fPidProbProton[0]=-1;fPidProbProton[1]=2;
45 fPidProbMuon[0]=-1;fPidProbMuon[1]=2;
52 //------------------------------
53 //AliFemtoESDTrackCut::~AliFemtoESDTrackCut(){
56 //------------------------------
57 bool AliFemtoESDTrackCut::Pass(const AliFemtoTrack* track)
59 //cout<<"AliFemtoESD cut"<<endl;
60 //cout<<fPidProbPion[0]<<" < pi ="<<track->PidProbPion()<<" <"<<fPidProbPion[1]<<endl;
63 //cout<<" status "<<track->Label()<<" "<<track->Flags()<<" "<<track->TPCnclsF()<<" "<<track->ITSncls()<<endl;
64 if ((track->Flags()&fStatus)!=fStatus)
66 // cout<<track->Flags()<<" "<<fStatus<<" no go through status"<<endl;
71 if (fminTPCclsF>track->TPCnclsF())
73 //cout<<" No go because TPC Number of ClsF"<<fminTPCclsF<< " "<<track->TPCnclsF()<<endl;
76 if (fminITScls>track->ITSncls())
78 //cout<<" No go because ITS Number of Cls"<<fminITScls<< " "<<track->ITSncls()<<endl;
84 //cout<<"labels"<<endl;
88 // cout<<"No Go Through the cut"<<endl;
89 // cout<<fLabel<<" Label="<<track->Label()<<endl;
95 //cout<<"AliFemtoESD cut ch "<<endl;
96 //cout<<fCharge<<" Charge="<<track->Charge()<<endl;
97 if (track->Charge()!= fCharge)
100 // cout<<"No Go Through the cut"<<endl;
101 // cout<<fCharge<<" Charge="<<track->Charge()<<endl;
105 float TEnergy = ::sqrt(track->P().mag2()+fMass*fMass);
106 float TRapidity = 0.5*::log((TEnergy+track->P().z())/(TEnergy-track->P().z()));
107 float Pt = ::sqrt((track->P().x())*(track->P().x())+(track->P().y())*(track->P().y()));
108 if ((TRapidity<fRapidity[0])||(TRapidity>fRapidity[1]))
111 //cout<<"No Go Through the cut"<<endl;
112 //cout<<fRapidity[0]<<" < Rapidity ="<<TRapidity<<" <"<<fRapidity[1]<<endl;
115 if ((Pt<fPt[0])||(Pt>fPt[1]))
118 //cout<<"No Go Through the cut"<<endl;
119 //cout<<fPt[0]<<" < Pt ="<<Pt<<" <"<<fPt[1]<<endl;
122 if ((track->PidProbElectron()<fPidProbElectron[0])||(track->PidProbElectron()>fPidProbElectron[1]))
125 //cout<<"No Go Through the cut"<<endl;
126 //cout<<fPidProbElectron[0]<<" < e ="<<track->PidProbElectron()<<" <"<<fPidProbElectron[1]<<endl;
129 if ((track->PidProbPion()<fPidProbPion[0])||(track->PidProbPion()>fPidProbPion[1]))
132 //cout<<"No Go Through the cut"<<endl;
133 //cout<<fPidProbPion[0]<<" < pi ="<<track->PidProbPion()<<" <"<<fPidProbPion[1]<<endl;
136 if ((track->PidProbKaon()<fPidProbKaon[0])||(track->PidProbKaon()>fPidProbKaon[1]))
139 //cout<<"No Go Through the cut"<<endl;
140 //cout<<fPidProbKaon[0]<<" < k ="<<track->PidProbKaon()<<" <"<<fPidProbKaon[1]<<endl;
143 if ((track->PidProbProton()<fPidProbProton[0])||(track->PidProbProton()>fPidProbProton[1]))
146 //cout<<"No Go Through the cut"<<endl;
147 //cout<<fPidProbProton[0]<<" < p ="<<track->PidProbProton()<<" <"<<fPidProbProton[1]<<endl;
150 if ((track->PidProbMuon()<fPidProbMuon[0])||(track->PidProbMuon()>fPidProbMuon[1]))
153 //cout<<"No Go Through the cut"<<endl;
154 //cout<<fPidProbMuon[0]<<" < mi="<<track->PidProbMuon()<<" <"<<fPidProbMuon[1]<<endl;
158 // cout<<"Go Through the cut"<<endl;
159 // cout<<fLabel<<" Label="<<track->Label()<<endl;
160 // cout<<fCharge<<" Charge="<<track->Charge()<<endl;
161 // cout<<fPt[0]<<" < Pt ="<<Pt<<" <"<<fPt[1]<<endl;
162 //cout<<fRapidity[0]<<" < Rapidity ="<<TRapidity<<" <"<<fRapidity[1]<<endl;
163 //cout<<fPidProbElectron[0]<<" < e="<<track->PidProbElectron()<<" <"<<fPidProbElectron[1]<<endl;
164 //cout<<fPidProbPion[0]<<" < pi="<<track->PidProbPion()<<" <"<<fPidProbPion[1]<<endl;
165 //cout<<fPidProbKaon[0]<<" < k="<<track->PidProbKaon()<<" <"<<fPidProbKaon[1]<<endl;
166 //cout<<fPidProbProton[0]<<" < p="<<track->PidProbProton()<<" <"<<fPidProbProton[1]<<endl;
167 //cout<<fPidProbMuon[0]<<" < mi="<<track->PidProbMuon()<<" <"<<fPidProbMuon[1]<<endl;
173 //------------------------------
174 AliFemtoString AliFemtoESDTrackCut::Report()
178 sprintf(Ctemp,"Particle mass:\t%E\n",this->Mass());
180 sprintf(Ctemp,"Particle charge:\t%d\n",fCharge);
182 sprintf(Ctemp,"Particle pT:\t%E - %E\n",fPt[0],fPt[1]);
184 sprintf(Ctemp,"Particle rapidity:\t%E - %E\n",fRapidity[0],fRapidity[1]);
186 sprintf(Ctemp,"Number of tracks which passed:\t%ld Number which failed:\t%ld\n",fNTracksPassed,fNTracksFailed);
188 AliFemtoString returnThis = Stemp;