115 double p = t->
p4().Vect().Mag();
116 double charge = t->
charge();
120 if (abs(type)==11) idx=0;
121 else if (abs(type)==13) idx=1;
122 else if (abs(type)==211) idx=2;
123 else if (abs(type)==321) idx=3;
124 else if (type==2212) idx=4;
128 double hpmax =
_emcPidPdf[0]->GetXaxis()->GetXmax();
129 if (p>hpmax) p=hpmax;
132 int currbin =
_emcPidPdf[0]->GetXaxis()->FindBin(p);
135 TH1D *hpdf =
_emcPidPdf[
idx]->ProjectionY(
"_tmppdf",currbin, currbin);
140 if (hpdf->Integral()>0) xsig = hpdf->GetRandom();
146 int xsigbin = hpdf->FindBin(xsig);
149 double P[6], Psum=0.;
151 for (
int k=0;k<6;++k)
153 P[k] =
_emcPidPdf[k]->GetBinContent(currbin,xsigbin);
154 if (k<4) Psum += P[k];
158 if (charge>0) Psum+=P[4];
161 if (Psum<=0.) Psum=1.;
177 double theta = t->
p4().Theta();
178 double phi = t->
p4().Phi();
179 double p=t->
p4().Vect().Mag();
180 double pt=t->
p4().Pt();
181 double charge=t->
charge();
191 o <<
"Detector <"<<
_detName<<
">"<<endl;
192 o <<
" _pmin = "<<
_pmin<<endl;
193 o <<
" _ptmin = "<<
_ptmin<<endl;
194 o <<
" _thtMin = "<<
_thtMin<<endl;
195 o <<
" _thtMax = "<<
_thtMax<<endl;
196 o <<
" _phiMin = "<<
_phiMin<<endl;
197 o <<
" _phiMax = "<<
_phiMax<<endl;
231 if (name ==
"thtMin")
234 if (name ==
"thtMax")
237 if (name ==
"phiMin")
240 if (name ==
"phiMax")
243 if (name ==
"efficiency")
256 for (
int i=0;
i<6;
i++)
263 cout <<
" -W- (PndFsmEmcPid::readParameters) - file "<<
_parFileName.c_str()
264 <<
" doesn't exist."<<endl;
void setLHElectron(double val)
void setLHProton(double val)
std::list< std::string > ArgList
bool setParameter(std::string &name, double value)
void setLHMuon(double val)
void parseParameterList(ArgList &par)
TString pt(TString pts, TString exts="px py pz")
basic_ostream< char, char_traits< char > > ostream
void setDetector(PndFsmAbsDet *detector)
void setLHKaon(double val)
friend F32vec4 fabs(const F32vec4 &a)
bool detected(PndFsmTrack *t) const
void setEmcEcal(double val)
void print(std::ostream &o)
void setDetected(bool isdet)
virtual PndFsmResponse * respond(PndFsmTrack *t)
void setLHPion(double val)