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

#include <PndHypSimpleAna.h>

Inheritance diagram for PndHypSimpleAna:

Public Types

typedef std::map< Int_t, Float_t > mapper
 

Public Member Functions

 PndHypSimpleAna ()
 
 ~PndHypSimpleAna ()
 
virtual InitStatus Init ()
 
virtual void Exec (Option_t *opt)
 
void Finish (TString cat)
 
Int_t GetIonCharge (Int_t Z, Int_t &mass, Int_t &str)
 

Protected Attributes

int evcount
 
RhoNeutralParticleSelectorneutralSel
 
RhoPlusParticleSelectorplusSel
 
RhoMinusParticleSelectorminusSel
 
RhoMassParticleSelectorphiMSel
 
RhoMassParticleSelectorpi0MSel
 
RhoMassParticleSelectordsMSel
 
RhoMassParticleSelectorLambMSel
 
RhoSimpleKaonSelectorkSel
 
RhoSimplePionSelectorpiSel
 
RhoSimpleProtonSelectorpSel
 
TH2F * hvtx2 [10]
 
TH1F * ds0mass
 
TH1F * ximass
 
TH1F * Lamb
 
TH1F * ppi2mass
 
TH1F * ppi2
 
TH1F * e
 
TH2F * pid
 
TH2F * pidh
 
TH1F * nmult
 

Private Member Functions

virtual void SetParContainers ()
 
 ClassDef (PndHypSimpleAna, 1)
 

Private Attributes

TClonesArray * fChargedArray
 
TClonesArray * fMcTr
 
TClonesArray * fMicroArray
 
TClonesArray * fMcCands
 
TClonesArray * fMc
 

Detailed Description

Definition at line 27 of file PndHypSimpleAna.h.

Member Typedef Documentation

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

Definition at line 31 of file PndHypSimpleAna.h.

Constructor & Destructor Documentation

PndHypSimpleAna::PndHypSimpleAna ( )

Default constructor

Definition at line 57 of file PndHypSimpleAna.cxx.

57  :
58  FairTask("Panda HypSimpleAna Task") {
59 }
PndHypSimpleAna::~PndHypSimpleAna ( )

Destructor

Definition at line 63 of file PndHypSimpleAna.cxx.

63 { }

Member Function Documentation

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

Virtual method Exec

hvtx2[1]->Fill(pi3v.Mag(),pp3v.Mag());

Definition at line 178 of file PndHypSimpleAna.cxx.

References RhoCandList::Add(), RhoCandList::Cleanup(), evcount, fMc, fMcCands, fMcTr, fMicroArray, RhoCandList::Get(), PndHypPoint::GetEventID(), RhoCandList::GetLength(), PndMCTrack::GetMotherID(), PndPidCandidate::GetMvdHits(), PndMCTrack::GetPdgCode(), RhoCandidate::GetRecoCandidate(), PndMCTrack::GetStartVertex(), hit(), hvtx2, RhoFactory::Instance(), jj, minusSel, MotherId, Motherpdg, RhoCandListIterator::Next(), npi, p, RhoCandidate::P4(), pi, piSel, plusSel, RhoCandidate::Pos(), ppi2, ppi2mass, RhoFactory::Reset(), RhoCandList::Select(), t2, and t3.

178  {
179 
181 
182  if (!(++evcount%100)) cout <<"evt "<<evcount<<endl;
183  //cout <<"evt "<<evcount<<endl;++evcount;
184 
185 
186  // **** create all the particle lists we'll need for rebuilding the decay tree
187  //
188  RhoCandList neutralCands,chargedCands, plusCands,minusCands;
189 
190  RhoCandList kpCands,kmCands,piCands,ppiCands;
191 
192  RhoCandList xiCands,nonOvCands,dsCands,ds0Cands,ppCands;
193  std::map<Int_t,Float_t > mapp;
194 
195  //RhoCandidate *tc;
196 
197 
198  // **** loop over all Candidates and add them to the list allCands
199  //
200  chargedCands.Cleanup();
201  //neutralCands.Cleanup();
202 
203  for (Int_t i1=0; i1<fMicroArray->GetEntriesFast(); i1++){
204  PndPidCandidate *mic = (PndPidCandidate *)fMicroArray->At(i1);
205  RhoCandidate tc(*mic,i1);
206  TLorentzVector l=tc.P4();
207  TVector3 p=tc.Pos();
208  //cout<<" micro to tcaaand "<<tc.GetCharge()<<endl;
209 
210  chargedCands.Add(&tc);
211  }
212 
213 
214 
215  //cout <<"c:"<<chargedCands.GetLength()<<" n:"<<neutralCands.GetLength()<<endl;
216 
217 
218  // **** select all the basic lists
219  //
220 
221 
222  plusCands.Select(chargedCands ,plusSel);
223  minusCands.Select(chargedCands ,minusSel);
224 
225  // **** pid selection
226  //
227 
228  piCands.Select(minusCands ,piSel);
229  // ppCands.Select(plusCands ,pSel);
230 
231 
232  //cout <<"pi-:"<<piCands.GetLength()<<endl;
233 
234 
235  // **** now start combining all composits; inbetween plot masses
236  // before using the mass selectors
237  //
238 
239  RhoCandidate *t2;
240 
241  RhoCandListIterator iterP(piCands);
242  while (t2=iterP.Next())
243  {
244  //ppimass->Fill(l.P());//tc->Mass());
245 
246  TLorentzVector l=t2->P4();
247  // ppimass->Fill(l.M());//tc->Mass());
248  TVector3 pim = l.Vect();
249 
250  //cout <<"fitted = "<<pim.Mag()<<" charge "<<t2->GetCharge()<<endl;
251  ppi2mass->Fill(pim.Mag());
252 
253 
254  }
255 
256  int ii,jj;
257 
258  int npi=piCands.GetLength();
259 
260  //int np=pplusCands.GetLength();
261  PndHypHit *hit;
262  PndHypPoint *po;
263  int Motherpdg,MotherId;
264 
265  //Calculate total energy SPectra
266  // SetTotESpectra(9);
267 
268  for (int k=0;k<npi;k++)
269  {
270  RhoCandidate* pion=piCands.Get(k);
271  PndPidCandidate *pionpid =(PndPidCandidate *) pion->GetRecoCandidate();
272 
273  PndHypHit* hp=(PndHypHit*)fMcCands->At((pionpid->GetMvdHits())-1);
274  if(hp==0)continue;
275  PndHypPoint* pop=(PndHypPoint*)fMc->At(hp->GetRefIndex());
276  if(pop==0)continue;
277 
278  PndMCTrack* moc=(PndMCTrack*)fMcTr->At(pop->GetTrackID());
279  if(moc==0)continue;
280  if( moc->GetPdgCode()==-211)dsCands.Add(pion);
281  //cout<<" number real "<<pop->GetEventID()<<" pion number real "<<dsCands.GetLength()<<endl;
282 
283  }
284  //cout<<" dsCands.GetLength() "<<dsCands.GetLength()<<endl;
285 
286  int dsi=dsCands.GetLength();
287  RhoCandidate *t3;
288  RhoCandListIterator itP(dsCands);
289  while (t3=itP.Next())
290  {
291  //ppimass->Fill(l.P());//tc->Mass());
292 
293  TLorentzVector v4=t3->P4();
294  // ppimass->Fill(l.M());//tc->Mass());
295  TVector3 v3 = v4.Vect();
296 
297  //cout <<"fitted = "<<pim.Mag()<<" charge "<<t2->GetCharge()<<endl;
298  ppi2->Fill(v3.Mag());
299 
300 
301  }
302 
303 
304  if(dsi==1){
305  //if(npi==1){
306  //RhoCandidate pi=piCands[0];
307  RhoCandidate* pi=dsCands.Get(0);
308  //RhoCandidate pp=piminusCands[jj];
309  TLorentzVector vpim=pi->P4();
310  TVector3 pi3v = vpim.Vect();
311  //cout<<ii<<" "<<pi3v.Mag()<<endl;
312 
313  if(pi3v.Mag()<0.09){
314  // hvtx2[0]->Fill(0.,pi3v.Mag());
315  hvtx2[2]->Fill(0.,pi3v.Mag());}
316  if(pi3v.Mag()>0.09){
317  // hvtx2[0]->Fill(pi3v.Mag(),0.);
318  hvtx2[3]->Fill(pi3v.Mag(),0.);
319  }
320  }
321 
322 
323  if(dsi>1)
324  {
325  for (ii=0;ii<dsi-1;ii++)
326  {
327  //RhoCandidate pi=piCands[ii];
328  RhoCandidate *pi=dsCands.Get(ii);
329  //cout<<" charge pion "<<pi.GetCharge()<<endl;
331  TLorentzVector vpim=pi->P4();
332  TVector3 pi3v = vpim.Vect();
333 
334  for (jj=ii+1;jj<dsi;jj++)
335  {
336  //RhoCandidate pp=piCands[jj];
337  RhoCandidate *pp=dsCands.Get(jj);
338 
339  TLorentzVector vpp=pp->P4();
340  TVector3 pp3v = vpp.Vect();
341  //VAbsMicroCandidate cm;
342  //cm = pi.GetMicroCandidate();
343 
344  hit=(PndHypHit*)fMcCands->At((pipid->GetMvdHits())-1);
345  po=(PndHypPoint*)fMc->At(hit->GetRefIndex());
346  if(po==0)continue;
347 
348  PndMCTrack* mc=(PndMCTrack*)fMcTr->At(po->GetTrackID());
349  if(mc==0)continue;
350  MotherId= mc->GetMotherID();
351  if (MotherId==-1)Motherpdg = mc->GetPdgCode();
352  else {
353  PndMCTrack *mother =(PndMCTrack*)fMcTr->At(MotherId);
354  Motherpdg = mother->GetPdgCode();
355  }
356  //****cut on PCA to primary vertex has to be added ****
357  TVector3 vertex=mc->GetStartVertex();
358 
359  //if(mc->GetPdgCode()==3112) cout<<" Motherpdg mala "<<Motherpdg<<endl;
360  // cout<<" event "<<po->GetEventID()<<" "<<endl;
361  //****PID has to be added ****
362  //if(mc->GetPdgCode()!=-211)continue;
363 
364  //if(Motherpdg==-211||Motherpdg==310||
365  //if(Motherpdg==3312)continue;
366 
367  //if(vertex.x()==0&&vertex.y()==0&&vertex.z()==-76.5)continue;
368  cout<<" Motherpdg "<<Motherpdg<<" "<<mc->GetPdgCode()<<endl;
369  //if(pi3v.Mag()<0.2&&pp3v.Mag()<0.2)continue;
370 
371  // cout<<" pion selected for clu0 "<<mc->GetPdgCode()<<" mother "<<Motherpdg<<endl;
372  // cout<<" hits on hyp track "<<pi.GetMicroCandidate().GetMvdHits()<<" ev "<<po->GetEventID()<<endl;
373  //cout<<ii<<" "<<pi3v.Mag()<<" "<<jj<<" "<<pp3v.Mag()<<endl;
374 
375  //if(pi3v.Mag()>pp3v.Mag())cout<<" pi3v >pp3v "<<endl;
376  //if(pi3v.Mag()<pp3v.Mag())cout<<" pi3v <pp3v "<<endl;
377 
378  //if( pp.Overlaps(pim)) continue;
379 
380  //TMatrixD pcov=pp.Cov7();
381  //TMatrixD picov=pim.Cov7();
382  if(pi3v.Mag()>pp3v.Mag())
383  {
384 
385  hvtx2[0]->Fill(pi3v.Mag(),pp3v.Mag());
386 
387  if((pi3v.Mag()>0.12&&pi3v.Mag()<0.14)&&(pp3v.Mag()>0.065&&pp3v.Mag()<0.08)) {
388  //if(Motherpdg==1020040110||Motherpdg==1010050110){
389 
390  //cout<<" Be11LL "<<Motherpdg<<" "<<mc->GetPdgCode()<<endl;
391  //cout<<" pi3v >pp3v "<<po->GetEventID()<<endl;
392  hvtx2[1]->Fill(pi3v.Mag(),pp3v.Mag());
393  //if((pi3v.Mag()>0.12&&pi3v.Mag()<0.14)&&(pp3v.Mag()>0.065&&pp3v.Mag()<0.08)) {
394 
395  if(mapp[po->GetEventID()]==0) {
396  mapp[po->GetEventID()]=Motherpdg;
397  //cout<<" Motherpdg "<<Motherpdg<<endl;
398 
399  //
400  // SetEnergySpectra(po->GetEventID(),0);
401  }
402 
403  }
404  if(Motherpdg==1020040110||Motherpdg==1010050110){
406  }
407 
408  if(Motherpdg==1020030090||(Motherpdg==1010040090 && MotherId!=-1)){
409 
410  //cout<<" pi3v >pp3v "<<po->GetEventID()<<endl;
411  //hvtx2[2]->Fill(pi3v.Mag(),pp3v.Mag());
412  //if((pi3v.Mag()>0.12&&pi3v.Mag()<0.14)&&(pp3v.Mag()>0.065&&pp3v.Mag()<0.08)) {
413  }
414 
415 
416  //cout<<" Motherpdg Li9LL "<<Motherpdg<<endl;
417 
418  //
419  if((pi3v.Mag()>0.112&&pi3v.Mag()<0.126)&&(pp3v.Mag()>0.09&&pp3v.Mag()<0.103)){
420  // hvtx2[2]->Fill(pi3v.Mag(),pp3v.Mag());
421  if(mapp[po->GetEventID()]==0) {
422  mapp[po->GetEventID()]=Motherpdg;
423  // SetEnergySpectra(po->GetEventID(),1);//cout<<" Motherpdg Li9LL cl1 "<<Motherpdg<<endl;
424  }
425  }
426 
427 
428  if((pi3v.Mag()>0.128&&pi3v.Mag()<0.147)&&(pp3v.Mag()>0.0898&&pp3v.Mag()<0.109)){
429  // hvtx2[9]->Fill(pi3v.Mag(),pp3v.Mag());
430 
431  //cout<<" Motherpdg Li9LL cl2 "<<Motherpdg<<" "<<mc->GetPdgCode()<<endl;
432  if(mapp[po->GetEventID()]==0) {
433  mapp[po->GetEventID()]=Motherpdg;
434  //SetEnergySpectra(po->GetEventID(),4);
435  //cout<<" Motherpdg Li9LL cl2 "<<Motherpdg<<endl;
436  }
437 
438  }
439 
440  //}
441 
442 
443  if(Motherpdg==1020040100||Motherpdg==1010050100){
444 
445  //cout<<" pi3v >pp3v "<<po->GetEventID()<<endl;
446  //hvtx2[3]->Fill(pi3v.Mag(),pp3v.Mag());
447  }
448 
449 
450  if((pi3v.Mag()>0.097&&pi3v.Mag()<0.106)&&(pp3v.Mag()>0.094&&pp3v.Mag()<0.103)) {
451  // if(Motherpdg==1020040100||Motherpdg==1010050100){
452 
453  //cout<<" pi3v >pp3v "<<po->GetEventID()<<endl;
454  // hvtx2[3]->Fill(pi3v.Mag(),pp3v.Mag());
455  //if((pi3v.Mag()>0.12&&pi3v.Mag()<0.14)&&(pp3v.Mag()>0.065&&pp3v.Mag()<0.08)) {
456  //cout<<" Be10LL "<<Motherpdg<<" "<<mc->GetPdgCode()<<endl;
457 
458  if(mapp[po->GetEventID()]==0) {
459  mapp[po->GetEventID()]=Motherpdg;
460  // cout<<" Motherpdg "<<Motherpdg<<endl;
461 
462  //
463  // SetEnergySpectra(po->GetEventID(),2);
464  }
465  }
466 
467 
468  if(Motherpdg==1020040120||Motherpdg==1010050120){
469 
470  //cout<<" pi3v >pp3v "<<po->GetEventID()<<endl;
471 
472  //hvtx2[4]->Fill(pi3v.Mag(),pp3v.Mag());
473  }
474 
475 
476  if((pi3v.Mag()>0.128&&pi3v.Mag()<0.147)&&(pp3v.Mag()>0.110&&pp3v.Mag()<0.124)) {
477  //if(Motherpdg==1020040120||Motherpdg==1010050120){
478 
479  //cout<<" pi3v >pp3v "<<po->GetEventID()<<endl;
480 
481  // hvtx2[4]->Fill(pi3v.Mag(),pp3v.Mag());
482  // cout<<" Middle "<<Motherpdg<<" "<<mc->GetPdgCode()<<endl;
483  if(mapp[po->GetEventID()]==0) {
484  mapp[po->GetEventID()]=Motherpdg;
485  //cout<<" Mot be12LL "<<Motherpdg<<endl;
486 
487  //
488  //SetEnergySpectra(po->GetEventID(),3);
489  }
490  }
491 
492  if(Motherpdg==1020020060||Motherpdg==1010030060){
493 
494  //cout<<" pi3v >pp3v "<<po->GetEventID()<<endl;
495 
496  //hvtx2[5]->Fill(pi3v.Mag(),pp3v.Mag());
497  }
498 
499 
500  if((pi3v.Mag()>0.128&&pi3v.Mag()<0.147)&&(pp3v.Mag()>0.124&&pp3v.Mag()<0.143)) {
501  //if(Motherpdg==1020020060||Motherpdg==1010030060){
502 
503  //cout<<" pi3v >pp3v "<<po->GetEventID()<<endl;
504 
505  // hvtx2[5]->Fill(pi3v.Mag(),pp3v.Mag());
506 
507  //cout<<" Top "<<Motherpdg<<" "<<mc->GetPdgCode()<<endl;
508  if(mapp[po->GetEventID()]==0) {
509  mapp[po->GetEventID()]=Motherpdg;
510  // cout<<" Mot He6LL "<<Motherpdg<<endl;
511 
512  //
513  //SetEnergySpectra(po->GetEventID(),5);
514  }
515  }
516 
517 
518 
519  }
520 
521  if(pi3v.Mag()<pp3v.Mag()) {
522  //cout<<" pi3v <pp3v "<<po->GetEventID()<<endl;
523 
524  hvtx2[0]->Fill(pp3v.Mag(),pi3v.Mag());
525 
526 
527  if(Motherpdg==1020040110||Motherpdg==1010050110){
528 
529  //hvtx2[1]->Fill(pp3v.Mag(),pi3v.Mag());
530  }
531 
532 
533  if((pp3v.Mag()>0.12&&pp3v.Mag()<0.14)&&(pi3v.Mag()>0.065&&pi3v.Mag()<0.08)) {
534  //if(Motherpdg==1020040110||Motherpdg==1010050110){
535 
536  hvtx2[1]->Fill(pp3v.Mag(),pi3v.Mag());
537  //
538  if(mapp[po->GetEventID()]==0) {
539  mapp[po->GetEventID()]=Motherpdg;
540  //cout<<" Motherpdg "<<Motherpdg<<endl;
541  //
542  //SetEnergySpectra(po->GetEventID(),0);
543  }
544 
545  }
546 
547  if(Motherpdg==1020030090||(Motherpdg==1010040090&& MotherId!=-1)){
548 
549  //hvtx2[2]->Fill(pp3v.Mag(),pi3v.Mag());
550  }
551 
552  if((pp3v.Mag()>0.112&&pp3v.Mag()<0.126)&&(pi3v.Mag()>0.09&&pi3v.Mag()<0.103))
553  {
554  //if(Motherpdg==1020030090||(Motherpdg==1010040090&& MotherId!=-1)){
555 
556  // hvtx2[2]->Fill(pp3v.Mag(),pi3v.Mag());
557  //if((pp3v.Mag()>0.12&&pp3v.Mag()<0.14)&&(pi3v.Mag()>0.065&&pi3v.Mag()<0.08)) {
558  if(mapp[po->GetEventID()]==0) {
559  mapp[po->GetEventID()]=Motherpdg;
560  //cout<<" Motherpdg "<<Motherpdg<<endl;
561  // SetEnergySpectra(po->GetEventID(),1);//cout<<" Motherpdg Li9LL cl1 "<<Motherpdg<<endl;
562  }
563  }
564 
565 
566 
567  if((pp3v.Mag()>0.128&&pp3v.Mag()<0.147)&&(pi3v.Mag()>0.0898&&pi3v.Mag()<0.109))
568  {
569  hvtx2[9]->Fill(pp3v.Mag(),pi3v.Mag());
570  //cout<<" Motherpdg Li9LL cl2 "<<Motherpdg<<" "<<mc->GetPdgCode()<<endl;
571  if(mapp[po->GetEventID()]==0) {
572  mapp[po->GetEventID()]=Motherpdg;
573  // SetEnergySpectra(po->GetEventID(),4);//
574  }
575 
576  }
577 
578  //}
579 
580  if(Motherpdg==1020040100||Motherpdg==1010050100){
581 
582  //hvtx2[3]->Fill(pp3v.Mag(),pi3v.Mag());
583  }
584 
585 
586  if((pp3v.Mag()>0.097&&pp3v.Mag()<0.106)&&(pi3v.Mag()>0.094&&pi3v.Mag()<0.103)) {
587  // if(Motherpdg==1020040100||Motherpdg==1010050100){
588 
589  // hvtx2[3]->Fill(pp3v.Mag(),pi3v.Mag());
590  //
591  if(mapp[po->GetEventID()]==0) {
592  mapp[po->GetEventID()]=Motherpdg;
593  //cout<<" Motherpdg "<<Motherpdg<<endl;
594  //
595  // SetEnergySpectra(po->GetEventID(),2);
596  }
597  }
598 
599  if(Motherpdg==1020040120||Motherpdg==1010050120){
600 
601  //hvtx2[4]->Fill(pp3v.Mag(),pi3v.Mag());
602  }
603 
604 
605  if((pp3v.Mag()>0.128&&pp3v.Mag()<0.147)&&(pi3v.Mag()>0.110&&pi3v.Mag()<0.124)) {
606  //if(Motherpdg==1020040120||Motherpdg==1010050120){
607 
608  // hvtx2[4]->Fill(pp3v.Mag(),pi3v.Mag());
609  //cout<<" Middle "<<Motherpdg<<" "<<mc->GetPdgCode()<<endl;
610  //
611  if(mapp[po->GetEventID()]==0) {
612  mapp[po->GetEventID()]=Motherpdg;
613  //cout<<" Motherpdg "<<Motherpdg<<endl;
614  //
615  //SetEnergySpectra(po->GetEventID(),3);
616  }
617  }
618 
619 
620  if(Motherpdg==1020020060||Motherpdg==1010030060){
621 
622  //cout<<" pi3v >pp3v "<<po->GetEventID()<<endl;
623 
624  //hvtx2[5]->Fill(pp3v.Mag(),pi3v.Mag());
625  }
626 
627 
628  if((pp3v.Mag()>0.128&&pp3v.Mag()<0.147)&&(pi3v.Mag()>0.124&&pi3v.Mag()<0.143)) {
629  // if(Motherpdg==1020020060||Motherpdg==1010030060){
630 
631  //cout<<" pi3v >pp3v "<<po->GetEventID()<<endl;
632 
633  // hvtx2[5]->Fill(pp3v.Mag(),pi3v.Mag());
634  //cout<<" top "<<Motherpdg<<" "<<mc->GetPdgCode()<<endl;
635  //SetEnergySpectra(po->GetEventID(),5);
636  if(mapp[po->GetEventID()]==0) {
637  mapp[po->GetEventID()]=Motherpdg;
638  // // cout<<" Mot He6LL "<<Motherpdg<<endl;
639 
640  // SetEnergySpectra(po->GetEventID(),5);
641  }
642  }
643 
644 
645  }
646 
647  //ppimass->Fill(compo->Mass());
648 
649  }
650  }
651  }
652 
653  // cout<<" pdg mother "<<mapp.size()<<endl;
654 
655  // for( std::map<Int_t, TH1F >::const_iterator ci=mapp.begin();
656  // ci != mapp.end();ci++){
657  // TH1F *h = itTop = ci->second;
658  // cout<<" pdg mother "<<ci->first<<" length "<<itTop.size()<<endl;
659 
660  // }
661 
662 
663 }
void Add(const RhoCandidate *c)
Definition: RhoCandList.h:49
Int_t Motherpdg
void Cleanup()
Definition: RhoCandList.cxx:62
TClonesArray * fMcCands
RhoMinusParticleSelector * minusSel
Int_t GetPdgCode() const
Definition: PndMCTrack.h:73
Int_t GetLength() const
Definition: RhoCandList.h:46
static void Reset()
Definition: RhoFactory.cxx:28
PndPidCandidate * GetRecoCandidate() const
Definition: RhoCandidate.h:376
#define pi
Definition: createSTT.C:60
Double_t p
Definition: anasim.C:58
TClonesArray * fMicroArray
void Select(RhoParticleSelectorBase *pidmgr)
TLorentzVector P4() const
Definition: RhoCandidate.h:195
Int_t t3
Definition: hist-t7.C:106
static RhoFactory * Instance()
Definition: RhoFactory.cxx:34
TClonesArray * fMc
Int_t GetMvdHits() const
int hit(Int_t nEvents=0, TString inFile="sim.root", TString parFile="par.root", TString inDigi="digi.root", TString outFile="hit.root", Int_t timeBased=0)
Definition: hit.C:1
Int_t t2
Definition: hist-t7.C:106
Int_t GetEventID() const
Definition: PndHypPoint.h:90
RhoSimplePionSelector * piSel
TVector3 GetStartVertex() const
Definition: PndMCTrack.h:76
Int_t GetMotherID() const
Definition: PndMCTrack.h:74
TClonesArray * fMcTr
TH2F * hvtx2[10]
Int_t MotherId
RhoPlusParticleSelector * plusSel
RhoCandidate * Get(Int_t)
Definition: RhoCandList.cxx:94
int npi
Definition: toy_core.C:124
void PndHypSimpleAna::Finish ( TString  cat)

Definition at line 698 of file PndHypSimpleAna.cxx.

References e, file, hvtx2, i, Lamb, pid, pidh, ppi2, ppi2mass, and ximass.

Referenced by run_HypSimpleAna(), and run_HypSimpleAna_Geo2().

699 {
700  TFile* file = FairRootManager::Instance()->GetOutFile();
701  file->cd();
702  //file->mkdir(cat.Data());//"HypHitAnaF");
703  //file->cd(cat.Data());//"HypHitAnaF");
704 
705  ppi2mass->Write();
706  delete ppi2mass;
707  ppi2mass=NULL;
708 
709  ximass->Write();
710  delete ximass;
711  ximass=NULL;
712 
713  Lamb->Write();
714  delete Lamb;
715  Lamb=NULL;
716 
717  ppi2->Write();
718  delete ppi2;
719  ppi2=NULL;
720 
721  e->Write();
722  delete e;
723  e=NULL;
724 
725  pid->Write();
726  delete pid;
727  pid=NULL;
728  pidh->Write();
729  delete pidh;
730  pidh=NULL;
731 
732  for(int i=0;i<10;i++){
733  hvtx2[i]->Write();
734  delete hvtx2[i];
735  hvtx2[i] =NULL;
736 
737  /* spectra[i]->Write();
738  delete spectra[i];
739  spectra[i]=NULL;
740  */
741  }
742 
743  /*
744  hvtx2[0]->Write();
745  hvtx2[1]->Write();
746  hvtx2[2]->Write();
747  hvtx2[3]->Write();
748  hvtx2[4]->Write();
749  hvtx2[5]->Write(); hvtx2[6]->Write(); hvtx2[7]->Write();hvtx2[8]->Write();
750  // hvtx2[9]->Write();
751 
752  ppi2mass->Write();
753  spectra[0]->Write();
754  spectra[1]->Write();
755  spectra[2]->Write();
756  spectra[3]->Write();
757  spectra[4]->Write();
758  spectra[5]->Write();spectra[6]->Write();spectra[7]->Write();
759  spectra[8]->Write(); //spectra[9]->Write();
760  */
761 
762 
763 
764 
765 
766 }
Int_t i
Definition: run_full.C:25
TFile * file
TH2F * hvtx2[10]
Int_t PndHypSimpleAna::GetIonCharge ( Int_t  Z,
Int_t &  mass,
Int_t &  str 
)

Definition at line 667 of file PndHypSimpleAna.cxx.

References L, and Z.

668 {
669  Int_t A,Z,L;
670 
671  if(ion>1000000000&&(ion<1010000000))
672  { ion -= 1000000000;
673  Z = ion/10000;
674  ion -= 10000*Z;
675  A = ion/10;
676  //cout<<" ion charge "<<Z<<endl;
677  mass = A;
678  str =0;
679 
680  return Z;
681 
682  }
683 if((ion>1010000000||ion>1020000000))
684  {
685  ion -= 1000000000;
686  L = ion/10000000;
687  ion -= 10000000*L;
688  Z = ion/10000;
689  ion -= 10000*Z;
690  A = ion/10;
691  //cout<<L<<" hypernuclei charge "<<Z<<endl;
692  mass = A;
693  str =L;
694  return Z;
695 
696  }
697 }
double Z
Definition: anaLmdDigi.C:68
InitStatus PndHypSimpleAna::Init ( )
virtual

Virtual method Init

Definition at line 69 of file PndHypSimpleAna.cxx.

References e, evcount, fMc, fMcCands, fMcTr, fMicroArray, hvtx2, Lamb, LambMSel, minusSel, pid, pidh, piSel, plusSel, ppi2, ppi2mass, RhoParticleSelectorBase::SetCriterion(), and ximass.

69  {
70 
71  //cout << " Inside the Init function****" << endl;
72 
73  //FairDetector::Initialize();
74  //FairRun* sim = FairRun::Instance();
75  //FairRuntimeDb* rtdb=sim->GetRuntimeDb();
76 
77  // Get RootManager
78  FairRootManager* ioman = FairRootManager::Instance();
79  if ( ! ioman ) {
80  cout << "-E- PndEmcHitProducer::Init: "
81  << "RootManager not instantiated!" << endl;
82  return kFATAL;
83  }
84 
85  // Get input array
86 
87  fMcTr = (TClonesArray*) ioman->GetObject("MCTrack");
88  fMcCands = (TClonesArray*) ioman->GetObject("HypHit");
89  fMc = (TClonesArray*) ioman->GetObject("HypPoint");
90  //fGe = (TClonesArray*) ioman->GetObject("HypGePoint");
91 
92  //fChargedArray = (TClonesArray*) ioman->GetObject("PndChargedCandidates");
93  fMicroArray = (TClonesArray*) ioman->GetObject("PndPidCandidates");
94 
95  if ( !fMicroArray) {
96  cout << "-W- PndHypSimpleAna ::Init: "
97  << "No PndChargedCandidates && PndNeutralCandidates array!" << endl;
98  return kERROR;
99  }
100 
101  // Create and register output array
102  cout << "-I- PndHypSimpleAna : Intialization successfull" << endl;
103 
104  ppi2mass = new TH1F("ppimass","p pi cands",200,0.05,0.3);
105  ppi2 = new TH1F("ppion","p pion cands",200,0.05,1.7);
106  e = new TH1F("evenet","p event",200,10000,50000);
107 
108  pid = new TH2F("pid","cands",200,0,16,200,0,16);
109  pidh = new TH2F("pidh","candsh",200,0,16,200,0,16);
110  ximass = new TH1F("ximass","xi cands",200,0.05,2);
111  Lamb = new TH1F("lamb mass","lamb cands",200,0.05,2);
112 
113  //itTop = new TH1F("p","cands",10000000,1010000000,1020000000);
114  /* spectra[0] = new TH1F("spectra01","cluster 1",200,0.0,0.01);
115  spectra[1] = new TH1F("spectra02","cluster 2",200,0.0,0.01);
116  spectra[2] = new TH1F("spectra03","cluster 3",200,0.0,0.01);
117  spectra[3] = new TH1F("spectra04","cluster 4",200,0.0,0.01);
118  spectra[4] = new TH1F("spectra05","cluster 5",200,0.0,0.01);
119  spectra[5] = new TH1F("spectra06","cluster 6",200,0.0,0.01);
120  spectra[6] = new TH1F("spectra07","cluster 7",200,0.0,0.01);
121  spectra[7] = new TH1F("spectra08","cluster 8",200,0.0,0.01);
122  spectra[8] = new TH1F("spectra09","cluster 9",200,0.0,0.01);
123  spectra[9] = new TH1F("spectra10","cluster 9",200,0.0,0.01);
124 
125  */
126  //hvtx2[0]=new TH2F("hvtx201","vertex positions (x,z)",200,0.03,1.,200,0.03,1.);
127  hvtx2[0]=new TH2F("hvtx201","vertex positions (x,z)",100,0.0,0.15,100,0.0,0.15);
128  hvtx2[1]=new TH2F("hvtx202","vertex positions (x,z)",100,0.0,0.15,100,0.0,0.15);
129  hvtx2[2]=new TH2F("hvtx203","vertex positions (x,z)",100,0.0,0.15,100,0.0,0.15);
130  hvtx2[3]=new TH2F("hvtx204","vertex positions (x,z)",100,0.0,0.15,100,0.0,0.15);
131  hvtx2[4]=new TH2F("hvtx205","vertex positions (x,z)",100,0.03,0.15,100,0.03,0.15);
132  hvtx2[5]=new TH2F("hvtx206","vertex positions (x,z)",100,0.03,0.15,100,0.03,0.15);
133  hvtx2[6]=new TH2F("hvtx207","vertex positions (x,z)",100,0.03,0.15,100,0.03,0.15);
134  hvtx2[7]=new TH2F("hvtx208","vertex positions (x,z)",100,0.03,0.15,100,0.03,0.15);
135  hvtx2[8]=new TH2F("hvtx209","vertex positions (x,z)",100,0.03,0.15,100,0.03,0.15);
136  hvtx2[9]=new TH2F("hvtx210","vertex positions (x,z)",100,0.03,0.15,100,0.03,0.15);
137 
138 
139  // **** create and configure the selectors/filters we'd like to use later
140  //
141  //chargedSel = new RhoChargedParticleSelector;
142  //neutralSel = new RhoNeutralParticleSelector;
145 
146  // **** mass selectors for the resonances/composites
147  //
148 
150  piSel->SetCriterion("veryLoose");
151  /* pSel = new RhoSimpleProtonSelector();
152  pSel->SetCriterion("veryLoose");*/
153 
154  LambMSel = new RhoMassParticleSelector("LambSelector" , 1.115 , 0.04);
155 
156 
157  evcount=0;
158 
159  return kSUCCESS;
160 
161 }
TClonesArray * fMcCands
RhoMinusParticleSelector * minusSel
RhoMassParticleSelector * LambMSel
TClonesArray * fMicroArray
TClonesArray * fMc
virtual void SetCriterion(const char *crit)
RhoSimplePionSelector * piSel
TClonesArray * fMcTr
TH2F * hvtx2[10]
RhoPlusParticleSelector * plusSel
void PndHypSimpleAna::SetParContainers ( )
privatevirtual

Geo file to use Get parameter containers

Definition at line 163 of file PndHypSimpleAna.cxx.

References run.

163  {
164 
165  // Get run and runtime database
166  FairRunAna* run = FairRunAna::Instance();
167  if ( ! run ) Fatal("SetParContainers", "No analysis run");
168 
169  //FairRuntimeDb* db = run->GetRuntimeDb();
170  //if ( ! db ) Fatal("SetParContainers", "No runtime database");
171 
172 
173 }
Int_t run
Definition: autocutx.C:47

Member Data Documentation

TH1F* PndHypSimpleAna::ds0mass
protected

Definition at line 83 of file PndHypSimpleAna.h.

RhoMassParticleSelector* PndHypSimpleAna::dsMSel
protected

Definition at line 73 of file PndHypSimpleAna.h.

TH1F* PndHypSimpleAna::e
protected

Definition at line 86 of file PndHypSimpleAna.h.

Referenced by Finish(), and Init().

int PndHypSimpleAna::evcount
protected

Definition at line 58 of file PndHypSimpleAna.h.

Referenced by Exec(), and Init().

TClonesArray* PndHypSimpleAna::fChargedArray
private

Input array of TpcLheTrack

Definition at line 95 of file PndHypSimpleAna.h.

TClonesArray* PndHypSimpleAna::fMc
private

Definition at line 99 of file PndHypSimpleAna.h.

Referenced by Exec(), and Init().

TClonesArray* PndHypSimpleAna::fMcCands
private

Definition at line 98 of file PndHypSimpleAna.h.

Referenced by Exec(), and Init().

TClonesArray* PndHypSimpleAna::fMcTr
private

Definition at line 96 of file PndHypSimpleAna.h.

Referenced by Exec(), and Init().

TClonesArray* PndHypSimpleAna::fMicroArray
private

Definition at line 97 of file PndHypSimpleAna.h.

Referenced by Exec(), and Init().

TH2F* PndHypSimpleAna::hvtx2[10]
protected

book all the histograms

Definition at line 80 of file PndHypSimpleAna.h.

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

RhoSimpleKaonSelector* PndHypSimpleAna::kSel
protected

Definition at line 75 of file PndHypSimpleAna.h.

TH1F* PndHypSimpleAna::Lamb
protected

Definition at line 84 of file PndHypSimpleAna.h.

Referenced by Finish(), and Init().

RhoMassParticleSelector* PndHypSimpleAna::LambMSel
protected

Definition at line 74 of file PndHypSimpleAna.h.

Referenced by Init().

RhoMinusParticleSelector* PndHypSimpleAna::minusSel
protected

Definition at line 67 of file PndHypSimpleAna.h.

Referenced by Exec(), and Init().

RhoNeutralParticleSelector* PndHypSimpleAna::neutralSel
protected

Definition at line 65 of file PndHypSimpleAna.h.

TH1F* PndHypSimpleAna::nmult
protected

Definition at line 89 of file PndHypSimpleAna.h.

RhoMassParticleSelector* PndHypSimpleAna::phiMSel
protected

Definition at line 71 of file PndHypSimpleAna.h.

RhoMassParticleSelector* PndHypSimpleAna::pi0MSel
protected

Definition at line 72 of file PndHypSimpleAna.h.

TH2F* PndHypSimpleAna::pid
protected

Definition at line 87 of file PndHypSimpleAna.h.

Referenced by Finish(), and Init().

TH2F* PndHypSimpleAna::pidh
protected

Definition at line 87 of file PndHypSimpleAna.h.

Referenced by Finish(), and Init().

RhoSimplePionSelector* PndHypSimpleAna::piSel
protected

Definition at line 76 of file PndHypSimpleAna.h.

Referenced by Exec(), and Init().

RhoPlusParticleSelector* PndHypSimpleAna::plusSel
protected

Definition at line 66 of file PndHypSimpleAna.h.

Referenced by Exec(), and Init().

TH1F* PndHypSimpleAna::ppi2
protected

Definition at line 86 of file PndHypSimpleAna.h.

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

TH1F* PndHypSimpleAna::ppi2mass
protected

Definition at line 85 of file PndHypSimpleAna.h.

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

RhoSimpleProtonSelector* PndHypSimpleAna::pSel
protected

Definition at line 77 of file PndHypSimpleAna.h.

TH1F* PndHypSimpleAna::ximass
protected

Definition at line 84 of file PndHypSimpleAna.h.

Referenced by Finish(), and Init().


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