FairRoot/PandaRoot
Public Types | Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
PndMyAnalysisTask Class Reference

#include <PndMyAnalysisTask.h>

Inheritance diagram for PndMyAnalysisTask:

Public Types

typedef std::map< Int_t, Float_t > mapper
 

Public Member Functions

 PndMyAnalysisTask ()
 
 ~PndMyAnalysisTask ()
 
virtual InitStatus Init ()
 
virtual void Exec (Option_t *opt)
 
virtual void Finish ()
 

Protected Attributes

int evcount
 
int epmax
 
int emmax
 
int pipmax
 
int pimmax
 
int mcmax
 

Private Member Functions

void FillMassHisto (TH1F *h, RhoCandList &l)
 
int SelectPdgCode (RhoCandList &mct, RhoCandList &l)
 
virtual void SetParContainers ()
 
 ClassDef (PndMyAnalysisTask, 1)
 

Private Attributes

RhoMassParticleSelectorjpsiMassSel
 
TH1F * hjpsim_nopid
 
TH1F * hpsim_nopid
 
TH1F * hjpsim_lpid
 
TH1F * hpsim_lpid
 
TH1F * hjpsim_tpid
 
TH1F * hpsim_tpid
 
TH1F * hjpsim_ftm
 
TH1F * hpsim_ftm
 
TH1F * hjpsim_nm
 
TH1F * hpsim_nm
 
TH1F * hjpsim_diff
 
TH1F * hpsim_diff
 
TH1F * hjpsim_vf
 
TH1F * hjpsim_4cf
 
TH1F * hjpsim_mcf
 
TH1F * hjpsi_chi2_vf
 
TH1F * hpsi_chi2_4c
 
TH1F * hjpsi_chi2_mf
 
TH2F * hvpos
 
RhoTuplentp
 
RhoTuplentp2
 
PndAnalysistheAnalysis
 
TStopwatch * timer
 

Detailed Description

Definition at line 20 of file PndMyAnalysisTask.h.

Member Typedef Documentation

typedef std::map<Int_t, Float_t> PndMyAnalysisTask::mapper

Definition at line 24 of file PndMyAnalysisTask.h.

Constructor & Destructor Documentation

PndMyAnalysisTask::PndMyAnalysisTask ( )

Default constructor

Definition at line 43 of file PndMyAnalysisTask.cxx.

43  :
44  FairTask("Panda Analysis Task")
45 {
46 }
PndMyAnalysisTask::~PndMyAnalysisTask ( )

Destructor

Definition at line 50 of file PndMyAnalysisTask.cxx.

50 { }

Member Function Documentation

PndMyAnalysisTask::ClassDef ( PndMyAnalysisTask  ,
 
)
private
void PndMyAnalysisTask::Exec ( Option_t *  opt)
virtual

Virtual method Exec

TODO recheck the MC truth access! Is the truth list available?

Definition at line 131 of file PndMyAnalysisTask.cxx.

References RhoKinFitter::AddMassConstraint(), all, RhoTuple::Column(), RhoCandList::Combine(), RhoTuple::DumpData(), eminus, emmax, eplus, epmax, evcount, PndAnalysis::FillList(), RhoKinFitter::Fit(), RhoFitterBase::Fit(), Rho4CFitter::FitConserveMasses(), RhoFactory::GetCandidateWatermark(), RhoFitterBase::GetChi2(), PndAnalysis::GetEvent(), RhoCandList::GetLength(), RhoCandidate::GetPidInfo(), hjpsi_chi2_mf, hjpsi_chi2_vf, hjpsim_4cf, hjpsim_diff, hjpsim_ftm, hjpsim_lpid, hjpsim_mcf, hjpsim_nm, hjpsim_nopid, hjpsim_tpid, hjpsim_vf, hpsi_chi2_4c, hpsim_diff, hpsim_ftm, hpsim_lpid, hpsim_nm, hpsim_nopid, hpsim_tpid, hvpos, RhoFactory::Instance(), RhoCandidate::M(), mcmax, PndAnalysis::McTruthMatch(), ntp, ntp2, P, RhoCandidate::P(), RhoCandidate::P4(), piminus, pimmax, piplus, pipmax, RhoCandidate::Pos(), RhoCandList::SetType(), theAnalysis, and timer.

132 {
133  Int_t j=0;
134 
136 
137  if (!(++evcount%100)) {
138  cout <<"evt "<<evcount;
139  timer->Stop();
140  cout <<" t="<< timer->CpuTime();
141  timer->Start();
142  cout <<" Cand Watermark = "<<RhoFactory::Instance()->GetCandidateWatermark();
143  cout <<" epmax:"<<epmax;
144  cout <<" emmax:"<<emmax;
145  cout <<" pipmax:"<<pipmax;
146  cout <<" pimmax:"<<pimmax;
147  cout <<" mcmax:"<<mcmax;
148  cout <<endl;
149  }
150 
151 
152  // **** create all the particle lists we'll need for rebuilding the decay tree
153  //
154  //RhoCandList eplus, eminus, piplus, piminus, jpsi, psi, mctrk;
155 
156  RhoCandList all, chrg, el, eplus, eminus, piplus, piminus, jpsi, jpsi2, psi2s;
157  RhoCandList epsel, emsel;
158 
159  TLorentzVector ini(0, 0, 6.231552, 7.240065);
160 
161 
162 // cout <<" #### mct="<<mctrk.GetLength()<<endl;
163 
164  // *** Select with no PID info ('All'); type and mass are set
165  theAnalysis->FillList(eplus, "ElectronAllPlus","PidAlgoEmcBayes");
166  theAnalysis->FillList(eminus, "ElectronAllMinus","PidAlgoEmcBayes");
167  theAnalysis->FillList(piplus, "PionAllPlus","PidAlgoEmcBayes");
168  theAnalysis->FillList(piminus, "PionAllMinus","PidAlgoEmcBayes");
169 
170 
171  int nep = eplus.GetLength();
172  int nem = eminus.GetLength();
173  int npip = piplus.GetLength();
174  int npim = piminus.GetLength();
175 
176  if (nep>epmax) { epmax=nep; }
177  if (nem>emmax) { emmax=nem; }
178  if (npip>pipmax) { pipmax=npip; }
179  if (npim>pimmax) { pimmax=npim; }
180 
181 // jpsi.Combine(eplus, eminus);
182 // FillMassHisto(hjpsimass, jpsi);
183 // jpsi.Select(jpsiMSel);
184 //
185 // psi.Combine(jpsi, piplus, piminus);
186 // FillMassHisto(hpsimass, psi);
187 
188 
189  jpsi.Combine(eplus, eminus);
190 
191  // *** do the truth match for jpsi
192  jpsi.SetType("J/psi");
193  for (j=0; j<jpsi.GetLength(); ++j) {
194  hjpsim_nopid->Fill( jpsi[j]->M() );
195  if (theAnalysis->McTruthMatch(jpsi[j])) { hjpsim_ftm->Fill( jpsi[j]->M() ); }
196  else { hjpsim_nm->Fill( jpsi[j]->M() ); }
197  }
198 
199  // *** do vertex fitting (J/psi)
200  for (j=0; j<jpsi.GetLength(); ++j) {
201  RhoKinVtxFitter vtxfitter(jpsi[j]); // instantiate a vertex fitter
202 
203  vtxfitter.Fit();
204  const RhoCandidate* jfit = jpsi[j]->GetFit(); // access the fitted cand
205  TVector3 jVtx=jfit->Pos(); // and the decay vertex position
206 
207  double chi2_vtx=vtxfitter.GetChi2(); // access chi2 of fit
208  hjpsi_chi2_vf->Fill(chi2_vtx);
209 
210  if (chi2_vtx<2) { // when good enough, fill some histos
211  hjpsim_vf->Fill(jfit->M());
212  hvpos->Fill(jVtx.X(),jVtx.Y());
213  }
214 
215  bool match = theAnalysis->McTruthMatch(jpsi[j]);
216 
217  //ntp->Fill(jpsi[j]->M(),jfit->M(),chi2_vtx,jVtx.X(),jVtx.Y(),jVtx.Z(),match);
218 
219  RhoCandidate* ep = jpsi[j]->Daughter(0);
220  RhoCandidate* em = jpsi[j]->Daughter(1);
221 
222  ntp->Column("jpsim", jpsi[j]->M(), -1.);
223  ntp->Column("jpsitht", jpsi[j]->P4().Theta(), -999.);
224  ntp->Column("jpsip", jpsi[j]->P(), -1.);
225  ntp->Column("jpsiphi", jpsi[j]->P4().Phi(), -999.);
226 
227  ntp->Column("eptht", ep->P4().Theta(), -999.);
228  ntp->Column("epp", ep->P(), -1.);
229  ntp->Column("epphi", ep->P4().Phi(), -999.);
230  ntp->Column("eppid0", ep->GetPidInfo(0), -1.);
231  ntp->Column("eppid1", ep->GetPidInfo(1), -1.);
232  ntp->Column("eppid2", ep->GetPidInfo(2), -1.);
233  ntp->Column("eppid3", ep->GetPidInfo(3), -1.);
234  ntp->Column("eppid4", ep->GetPidInfo(4), -1.);
235 
236  ntp->Column("emtht", em->P4().Theta(), -999.);
237  ntp->Column("emp", em->P(), -1.);
238  ntp->Column("emphi", em->P4().Phi(), -999.);
239  ntp->Column("empid0", em->GetPidInfo(0), -1.);
240  ntp->Column("empid1", em->GetPidInfo(1), -1.);
241  ntp->Column("empid2", em->GetPidInfo(2), -1.);
242  ntp->Column("empid3", em->GetPidInfo(3), -1.);
243  ntp->Column("empid4", em->GetPidInfo(4), -1.);
244 
245  ntp->Column("jpsifitm", jfit->M(), -1.);
246  ntp->Column("vchi2", chi2_vtx, 9999.);
247  ntp->Column("vx", jVtx.X(), 9999.);
248  ntp->Column("vy", jVtx.Y(), 9999.);
249  ntp->Column("vz", jVtx.Z(), 9999.);
250  ntp->Column("jmct", match, kFALSE);
251 
252  ntp->DumpData();
253  }
254 
255  // *** some rough mass selection
256  //jpsi.Select(jpsiMassSel);
257 
258  psi2s.Combine(jpsi, piplus, piminus);
259 
260  // *** do the truth match for psi2s
261  psi2s.SetType("psi(2S)0");
262 
263  for (j=0; j<psi2s.GetLength(); ++j) {
264  hpsim_nopid->Fill( psi2s[j]->M() );
265  if (theAnalysis->McTruthMatch(psi2s[j])) {
266  hpsim_ftm->Fill( psi2s[j]->M() );
267 
269  const RhoCandidate* truePsi = psi2s[j]->GetMcTruth();
270  const RhoCandidate* trueJ = psi2s[j]->Daughter(0)->GetMcTruth();
271 
272  hjpsim_diff->Fill(trueJ->M()-psi2s[j]->Daughter(0)->M());
273  hpsim_diff->Fill(truePsi->M()-psi2s[j]->M());
274  } else { hpsim_nm->Fill( psi2s[j]->M() ); }
275  }
276 
277  // *** do 4c fit (initial psi(2S) system)
278  for (j=0; j<psi2s.GetLength(); ++j) {
279  Rho4CFitter fitter(psi2s[j],ini);
280  fitter.FitConserveMasses();
281 
282  double chi2_4c=fitter.GetChi2();
283  hpsi_chi2_4c->Fill(chi2_4c);
284 
285  //const RhoCandidate* jfit = (psi2s[j]->Daughter(0))->GetFit();
286 
287  const RhoCandidate* epfit = (psi2s[j]->Daughter(0)->Daughter(0))->GetFit();
288  const RhoCandidate* emfit = (psi2s[j]->Daughter(0)->Daughter(1))->GetFit();
289 
290  TLorentzVector tlvepf = epfit->P4();
291  TLorentzVector tlvemf = emfit->P4();
292 
293  hjpsim_4cf->Fill((tlvepf+tlvemf).M());
294 
295 
296 
297  RhoCandidate* ep = psi2s[j]->Daughter(0)->Daughter(0);
298  RhoCandidate* em = psi2s[j]->Daughter(0)->Daughter(1);
299  RhoCandidate* pip = psi2s[j]->Daughter(1);
300  RhoCandidate* pim = psi2s[j]->Daughter(2);
301  RhoCandidate* jpsic = psi2s[j]->Daughter(0);
302 
303  bool match = theAnalysis->McTruthMatch(psi2s[j]);
304  bool matchj = theAnalysis->McTruthMatch(jpsic);
305 
306  ntp2->Column("psim", psi2s[j]->M(), -1.);
307  ntp2->Column("fcchi2", chi2_4c, 9999.);
308  ntp2->Column("psimct", match, kFALSE);
309 
310  ntp2->Column("jmct", matchj, kFALSE);
311  ntp2->Column("jfitm", (tlvepf+tlvemf).M(), -1.);
312  ntp2->Column("jpsim", jpsic->M(), -1.);
313  ntp->Column("jpsitht", jpsic->P4().Theta(), -999.);
314  ntp->Column("jpsip", jpsic->P(), -1.);
315  ntp->Column("jpsiphi", jpsic->P4().Phi(), -999.);
316 
317  ntp2->Column("eptht", ep->P4().Theta(), -999.);
318  ntp2->Column("epp", ep->P(), -1.);
319  ntp2->Column("epphi", ep->P4().Phi(), -999.);
320  ntp2->Column("eppid0", ep->GetPidInfo(0), -1.);
321  ntp2->Column("eppid1", ep->GetPidInfo(1), -1.);
322  ntp2->Column("eppid2", ep->GetPidInfo(2), -1.);
323  ntp2->Column("eppid3", ep->GetPidInfo(3), -1.);
324  ntp2->Column("eppid4", ep->GetPidInfo(4), -1.);
325 
326  ntp2->Column("emtht", em->P4().Theta(), -999.);
327  ntp2->Column("emp", em->P(), -1.);
328  ntp2->Column("emphi", em->P4().Phi(), -999.);
329  ntp2->Column("empid0", em->GetPidInfo(0), -1.);
330  ntp2->Column("empid1", em->GetPidInfo(1), -1.);
331  ntp2->Column("empid2", em->GetPidInfo(2), -1.);
332  ntp2->Column("empid3", em->GetPidInfo(3), -1.);
333  ntp2->Column("empid4", em->GetPidInfo(4), -1.);
334 
335  ntp2->Column("piptht", pip->P4().Theta(), -999.);
336  ntp2->Column("pipp", pip->P(), -1.);
337  ntp2->Column("pipphi", pip->P4().Phi(), -999.);
338  ntp2->Column("pippid0", pip->GetPidInfo(0), -1.);
339  ntp2->Column("pippid1", pip->GetPidInfo(1), -1.);
340  ntp2->Column("pippid2", pip->GetPidInfo(2), -1.);
341  ntp2->Column("pippid3", pip->GetPidInfo(3), -1.);
342  ntp2->Column("pippid4", pip->GetPidInfo(4), -1.);
343 
344  ntp2->Column("pimtht", pim->P4().Theta(), -999.);
345  ntp2->Column("pimp", pim->P(), -1.);
346  ntp2->Column("pimphi", pim->P4().Phi(), -999.);
347  ntp2->Column("pimpid0", pim->GetPidInfo(0), -1.);
348  ntp2->Column("pimpid1", pim->GetPidInfo(1), -1.);
349  ntp2->Column("pimpid2", pim->GetPidInfo(2), -1.);
350  ntp2->Column("pimpid3", pim->GetPidInfo(3), -1.);
351  ntp2->Column("pimpid4", pim->GetPidInfo(4), -1.);
352 
353  ntp2->DumpData();
354 
355  }
356 
357  // do mass constraint fit
358  for (j=0; j<jpsi.GetLength(); ++j) {
359  RhoKinFitter mfitter(jpsi[j]);
360  mfitter.AddMassConstraint(3.0965);
361  mfitter.Fit();
362  double chi2_m = mfitter.GetChi2();
363  hjpsi_chi2_mf->Fill(chi2_m);
364 
365  if (chi2_m<2) { hjpsim_mcf->Fill(jpsi[j]->M()); }
366  }
367 
368 
369  // *** all combinatorics again with true PID
370  jpsi.Combine(eplus, eminus);
371  for (j=0; j<jpsi.GetLength(); ++j) { hjpsim_tpid->Fill( jpsi[j]->M() ); }
372 
373  //jpsi.Select(jpsiMassSel);
374 
375  psi2s.Combine(jpsi, piplus, piminus);
376  for (j=0; j<psi2s.GetLength(); ++j) { hpsim_tpid->Fill( psi2s[j]->M() ); }
377 
378  // *** and again with PidAlgoEmcBayes and loose selection
379  theAnalysis->FillList(eplus, "ElectronLoosePlus","PidAlgoEmcBayes");
380  theAnalysis->FillList(eminus, "ElectronLooseMinus","PidAlgoEmcBayes");
381  theAnalysis->FillList(piplus, "PionLoosePlus","PidAlgoEmcBayes");
382  theAnalysis->FillList(piminus, "PionLooseMinus","PidAlgoEmcBayes");
383 
384  jpsi.Combine(eplus, eminus);
385  for (j=0; j<jpsi.GetLength(); ++j) { hjpsim_lpid->Fill( jpsi[j]->M() ); }
386 
387  //jpsi.Select(jpsiMassSel);
388  //SelectMass(jpsi,3.096,1.0);
389 
390  psi2s.Combine(jpsi, piplus, piminus);
391  for (j=0; j<psi2s.GetLength(); ++j) { hpsim_lpid->Fill( psi2s[j]->M() ); }
392 
393 }
TVector3 Pos() const
Definition: RhoCandidate.h:186
Int_t GetLength() const
Definition: RhoCandList.h:46
PndAnalysis * theAnalysis
Bool_t FillList(RhoCandList &l, TString listkey="All", TString pidTcaNames="", int trackHypothesis=-1)
CandList piplus
CandList eplus
void Combine(RhoCandList &l1, RhoCandList &l2)
TLorentzVector P4() const
Definition: RhoCandidate.h:195
void Column(const char *label, Bool_t value, Bool_t defval=0, const char *block=0)
Definition: RhoTuple.cxx:56
void SetType(const TParticlePDG *pdt, int start=0)
static RhoFactory * Instance()
Definition: RhoFactory.cxx:34
Double_t M() const
Double_t P() const
void DumpData()
Definition: RhoTuple.cxx:391
static Int_t GetCandidateWatermark()
Definition: RhoFactory.cxx:110
GeV c P
CandList piminus
Bool_t McTruthMatch(RhoCandidate *cand, Int_t level=2, bool verbose=false)
Int_t GetEvent(Int_t n=-1)
double GetPidInfo(int hypo)
CandList eminus
void PndMyAnalysisTask::FillMassHisto ( TH1F *  h,
RhoCandList l 
)
private

Definition at line 396 of file PndMyAnalysisTask.cxx.

References RhoCandList::GetLength(), and i.

397 {
398  Int_t i=0;
399  for (i=0; i<l.GetLength(); ++i) {
400  h->Fill(l[i]->M());
401  }
402 }
Int_t i
Definition: run_full.C:25
Int_t GetLength() const
Definition: RhoCandList.h:46
void PndMyAnalysisTask::Finish ( )
virtual

Definition at line 429 of file PndMyAnalysisTask.cxx.

References RhoTuple::GetInternalTree(), hjpsi_chi2_mf, hjpsi_chi2_vf, hjpsim_4cf, hjpsim_diff, hjpsim_ftm, hjpsim_lpid, hjpsim_mcf, hjpsim_nm, hjpsim_nopid, hjpsim_tpid, hjpsim_vf, hpsi_chi2_4c, hpsim_diff, hpsim_ftm, hpsim_lpid, hpsim_nm, hpsim_nopid, hpsim_tpid, hvpos, ntp, and ntp2.

430 {
431  hjpsim_nopid->Write();
432  hpsim_nopid->Write();
433  hjpsim_lpid->Write();
434  hpsim_lpid->Write();
435  hjpsim_tpid->Write();
436  hpsim_tpid->Write();
437  hjpsim_ftm->Write();
438  hpsim_ftm->Write();
439  hjpsim_nm->Write();
440  hpsim_nm->Write();
441 
442  hpsim_diff->Write();
443  hjpsim_diff->Write();
444 
445  hjpsim_vf->Write();
446  hjpsim_4cf->Write();
447  hjpsim_mcf->Write();
448 
449  hjpsi_chi2_vf->Write();
450  hpsi_chi2_4c->Write();
451  hjpsi_chi2_mf->Write();
452 
453  hvpos->Write();
454 
455  ntp->GetInternalTree()->Write();
456  ntp2->GetInternalTree()->Write();
457  //ntp->WriteToFile("outtask_ntp.root");
458  //ntp2->AddToFile("outtask_ntp.root");
459 
460 // hjpsimass->Write();
461 // hpsimass->Write();
462 
463 }
TTree * GetInternalTree()
Definition: RhoTuple.h:207
InitStatus PndMyAnalysisTask::Init ( )
virtual

Virtual method Init

Definition at line 56 of file PndMyAnalysisTask.cxx.

References emmax, epmax, evcount, hjpsi_chi2_mf, hjpsi_chi2_vf, hjpsim_4cf, hjpsim_diff, hjpsim_ftm, hjpsim_lpid, hjpsim_mcf, hjpsim_nm, hjpsim_nopid, hjpsim_tpid, hjpsim_vf, hpsi_chi2_4c, hpsim_diff, hpsim_ftm, hpsim_lpid, hpsim_nm, hpsim_nopid, hpsim_tpid, hvpos, jpsiMassSel, mcmax, ntp, ntp2, pimmax, pipmax, theAnalysis, and timer.

57 {
58  //cout << " Inside the Init function****" << endl;
59 
60 
61  // initialize analysis object
63 
64  // Create and register output array
65  /* hjpsimass = new TH1F("hjpsimass","jpsi cands",100,0.0,4.5);
66  hpsimass = new TH1F("hpsimass","psi cands",100,0.,4.5);*/
67 
68  hjpsim_nopid = new TH1F("hjpsim_nopid","J/#psi mass (no pid)",200,0,4);
69  hpsim_nopid = new TH1F("hpsim_nopid","#psi(2S) mass (no pid)",200,0,5);
70  hjpsim_lpid = new TH1F("hjpsim_lpid","J/#psi mass (loose pid)",200,0,4);
71  hpsim_lpid = new TH1F("hpsim_lpid","#psi(2S) mass (loose pid)",200,0,5);
72  hjpsim_tpid = new TH1F("hjpsim_tpid","J/#psi mass (true pid)",200,0,4);
73  hpsim_tpid = new TH1F("hpsim_tpid","#psi(2S) mass (true pid)",200,0,5);
74 
75  hjpsim_ftm = new TH1F("hjpsim_ftm","J/#psi mass (full truth match)",200,0,4);
76  hpsim_ftm = new TH1F("hpsim_ftm","#psi(2S) mass ( truth match)",200,0,5);
77  hjpsim_nm = new TH1F("hjpsim_nm","J/#psi mass (no truth match)",200,0,4);
78  hpsim_nm = new TH1F("hpsim_nm","#psi(2S) mass (no truth match)",200,0,5);
79 
80  hjpsim_diff = new TH1F("hjpsim_diff","J/#psi mass diff to truth",100,-2,2);
81  hpsim_diff = new TH1F("hpsim_diff","#psi(2S) mass diff to truth",100,-2,2);
82 
83  hjpsim_vf = new TH1F("hjpsim_vf","J/#psi mass vertex fit",200,0,4);
84  hjpsim_4cf = new TH1F("hjpsim_4cf","J/#psi mass (4C fit)",200,0,4);
85  hjpsim_mcf = new TH1F("hjpsim_mcf","J/#psi mass (mass constraint fit)",200,0,4);
86 
87  hjpsi_chi2_vf = new TH1F("hjpsi_chi2_vf","J/#psi, #chi^{2} vertex fit",100,0,10);
88  hpsi_chi2_4c = new TH1F("hpsi_chi2_4c","#psi, #chi^{2} 4C fit",100,0,250);
89  hjpsi_chi2_mf = new TH1F("hjpsi_chi2_mf","J/#psi, #chi^{2} mass fit",100,0,10);
90 
91  hvpos = new TH2F("hvpos","(x,y) projection of fitted decay vertex",100,-2,2,100,-2,2);
92 
93  ntp=new RhoTuple("ntp","the J/psi ntuple");
94  ntp2=new RhoTuple("ntp2","the psi(2S) ntuple");
95 
96  // **** mass selector and McTruthMatcher
97  //
98  jpsiMassSel = new RhoMassParticleSelector("jpsiSelector" , 3.097, 0.6);
99 
100  evcount=0;
101  epmax=0;
102  emmax=0;
103  pipmax=0;
104  pimmax=0;
105  mcmax=0;
106 
107  cout << "-I- PndMyAnalysisTask: Intialization successfull" << endl;
108 
109  timer=new TStopwatch();
110  timer->Start();
111 
112  return kSUCCESS;
113 }
PndAnalysis * theAnalysis
RhoMassParticleSelector * jpsiMassSel
int PndMyAnalysisTask::SelectPdgCode ( RhoCandList mct,
RhoCandList l 
)
private

Definition at line 406 of file PndMyAnalysisTask.cxx.

References RhoCandList::GetLength(), RhoCandidate::PdgCode(), and RhoCandList::Remove().

407 {
408  int removed = 0;
409  int pdgcode=0;
410  //int nmct = mct.GetLength();
411 
412  //PndMcTruthMatch mcm;
413 
414  if (l.GetLength()>0) { pdgcode = l[0]->PdgCode(); }
415 
416  for (int ii=0; ii<l.GetLength(); ++ii) {
417  RhoCandidate* mccnd = l[ii]->GetMcTruth();
418  if (mccnd)
419  if(mccnd->PdgCode()==pdgcode)
420  continue; // we skip if things are allright and remove if not
421  l.Remove(l[ii]);
422  removed++;
423  }
424  return removed;
425 }
Int_t GetLength() const
Definition: RhoCandList.h:46
Int_t Remove(RhoCandidate *)
void PndMyAnalysisTask::SetParContainers ( )
privatevirtual

Get parameter containers

Definition at line 115 of file PndMyAnalysisTask.cxx.

References run.

116 {
117 
118  // Get run and runtime database
119  FairRun* run = FairRun::Instance();
120  if ( ! run ) { Fatal("SetParContainers", "No analysis run"); }
121 
122  //FairRuntimeDb* db = run->GetRuntimeDb();
123  //if ( ! db ) Fatal("SetParContainers", "No runtime database");
124 
125 
126 }
Int_t run
Definition: autocutx.C:47

Member Data Documentation

int PndMyAnalysisTask::emmax
protected

Definition at line 47 of file PndMyAnalysisTask.h.

Referenced by Exec(), and Init().

int PndMyAnalysisTask::epmax
protected

Definition at line 47 of file PndMyAnalysisTask.h.

Referenced by Exec(), and Init().

int PndMyAnalysisTask::evcount
protected

Definition at line 46 of file PndMyAnalysisTask.h.

Referenced by Exec(), and Init().

TH1F* PndMyAnalysisTask::hjpsi_chi2_mf
private

Definition at line 82 of file PndMyAnalysisTask.h.

Referenced by Exec(), Finish(), and Init().

TH1F* PndMyAnalysisTask::hjpsi_chi2_vf
private

Definition at line 80 of file PndMyAnalysisTask.h.

Referenced by Exec(), Finish(), and Init().

TH1F* PndMyAnalysisTask::hjpsim_4cf
private

Definition at line 77 of file PndMyAnalysisTask.h.

Referenced by Exec(), Finish(), and Init().

TH1F* PndMyAnalysisTask::hjpsim_diff
private

Definition at line 73 of file PndMyAnalysisTask.h.

Referenced by Exec(), Finish(), and Init().

TH1F* PndMyAnalysisTask::hjpsim_ftm
private

Definition at line 68 of file PndMyAnalysisTask.h.

Referenced by Exec(), Finish(), and Init().

TH1F* PndMyAnalysisTask::hjpsim_lpid
private

Definition at line 63 of file PndMyAnalysisTask.h.

Referenced by Exec(), Finish(), and Init().

TH1F* PndMyAnalysisTask::hjpsim_mcf
private

Definition at line 78 of file PndMyAnalysisTask.h.

Referenced by Exec(), Finish(), and Init().

TH1F* PndMyAnalysisTask::hjpsim_nm
private

Definition at line 70 of file PndMyAnalysisTask.h.

Referenced by Exec(), Finish(), and Init().

TH1F* PndMyAnalysisTask::hjpsim_nopid
private

book all the histograms

Definition at line 61 of file PndMyAnalysisTask.h.

Referenced by Exec(), Finish(), and Init().

TH1F* PndMyAnalysisTask::hjpsim_tpid
private

Definition at line 65 of file PndMyAnalysisTask.h.

Referenced by Exec(), Finish(), and Init().

TH1F* PndMyAnalysisTask::hjpsim_vf
private

Definition at line 76 of file PndMyAnalysisTask.h.

Referenced by Exec(), Finish(), and Init().

TH1F* PndMyAnalysisTask::hpsi_chi2_4c
private

Definition at line 81 of file PndMyAnalysisTask.h.

Referenced by Exec(), Finish(), and Init().

TH1F* PndMyAnalysisTask::hpsim_diff
private

Definition at line 74 of file PndMyAnalysisTask.h.

Referenced by Exec(), Finish(), and Init().

TH1F* PndMyAnalysisTask::hpsim_ftm
private

Definition at line 69 of file PndMyAnalysisTask.h.

Referenced by Exec(), Finish(), and Init().

TH1F* PndMyAnalysisTask::hpsim_lpid
private

Definition at line 64 of file PndMyAnalysisTask.h.

Referenced by Exec(), Finish(), and Init().

TH1F* PndMyAnalysisTask::hpsim_nm
private

Definition at line 71 of file PndMyAnalysisTask.h.

Referenced by Exec(), Finish(), and Init().

TH1F* PndMyAnalysisTask::hpsim_nopid
private

Definition at line 62 of file PndMyAnalysisTask.h.

Referenced by Exec(), Finish(), and Init().

TH1F* PndMyAnalysisTask::hpsim_tpid
private

Definition at line 66 of file PndMyAnalysisTask.h.

Referenced by Exec(), Finish(), and Init().

TH2F* PndMyAnalysisTask::hvpos
private

Definition at line 84 of file PndMyAnalysisTask.h.

Referenced by Exec(), Finish(), and Init().

RhoMassParticleSelector* PndMyAnalysisTask::jpsiMassSel
private

Definition at line 58 of file PndMyAnalysisTask.h.

Referenced by Init().

int PndMyAnalysisTask::mcmax
protected

Definition at line 47 of file PndMyAnalysisTask.h.

Referenced by Exec(), and Init().

RhoTuple* PndMyAnalysisTask::ntp
private

Definition at line 86 of file PndMyAnalysisTask.h.

Referenced by Exec(), Finish(), and Init().

RhoTuple* PndMyAnalysisTask::ntp2
private

Definition at line 87 of file PndMyAnalysisTask.h.

Referenced by Exec(), Finish(), and Init().

int PndMyAnalysisTask::pimmax
protected

Definition at line 47 of file PndMyAnalysisTask.h.

Referenced by Exec(), and Init().

int PndMyAnalysisTask::pipmax
protected

Definition at line 47 of file PndMyAnalysisTask.h.

Referenced by Exec(), and Init().

PndAnalysis* PndMyAnalysisTask::theAnalysis
private

Definition at line 92 of file PndMyAnalysisTask.h.

Referenced by Exec(), and Init().

TStopwatch* PndMyAnalysisTask::timer
private

Definition at line 93 of file PndMyAnalysisTask.h.

Referenced by Exec(), and Init().


The documentation for this class was generated from the following files: