8 #include "TClonesArray.h"
10 #include "FairRootManager.h"
11 #include "FairRunAna.h"
12 #include "FairRuntimeDb.h"
18 #include "../../hypGe/PndHypGePoint.h"
27 #include "FairRuntimeDb.h"
33 #include "LSLTrackRep.h"
50 FairTask(
"Panda HypFullAna Task") {
70 FairRootManager* ioman = FairRootManager::Instance();
72 cout <<
"-E- PndEmcHitProducer::Init: "
73 <<
"RootManager not instantiated!" << endl;
79 fMcTr = (TClonesArray*) ioman->GetObject(
"MCTrack");
81 fMc = (TClonesArray*) ioman->GetObject(
"HypPoint");
82 fGe = (TClonesArray*) ioman->GetObject(
"HypGePoint");
84 fChargedArray = (TClonesArray*) ioman->GetObject(
"PndChargedCandidates");
85 fMicroArray = (TClonesArray*) ioman->GetObject(
"PndMicroIdealCandidates");
88 cout <<
"-W- PndHypFullAna ::Init: "
89 <<
"No PndChargedCandidates && PndNeutralCandidates array!" << endl;
94 cout <<
"-I- PndHypFullAna : Intialization successfull" << endl;
96 ppi2mass =
new TH1F(
"ppimass",
"p pi cands",200,0.05,0.3);
97 ppi2 =
new TH1F(
"ppion",
"p pion cands",200,0.05,1.7);
98 e =
new TH1F(
"evenet",
"p event",200,10000,50000);
100 pid =
new TH2F(
"pid",
"cands",200,0,16,200,0,16);
101 pidh =
new TH2F(
"pidh",
"candsh",200,0,16,200,0,16);
102 ximass =
new TH1F(
"ximass",
"xi cands",200,0.05,2);
103 Lamb =
new TH1F(
"lamb mass",
"lamb cands",200,0.05,2);
106 spectra[0] =
new TH1F(
"spectra01",
"cluster 1",200,0.0,0.01);
107 spectra[1] =
new TH1F(
"spectra02",
"cluster 2",200,0.0,0.01);
108 spectra[2] =
new TH1F(
"spectra03",
"cluster 3",200,0.0,0.01);
109 spectra[3] =
new TH1F(
"spectra04",
"cluster 4",200,0.0,0.01);
110 spectra[4] =
new TH1F(
"spectra05",
"cluster 5",200,0.0,0.01);
111 spectra[5] =
new TH1F(
"spectra06",
"cluster 6",200,0.0,0.01);
112 spectra[6] =
new TH1F(
"spectra07",
"cluster 7",200,0.0,0.01);
113 spectra[7] =
new TH1F(
"spectra08",
"cluster 8",200,0.0,0.01);
114 spectra[8] =
new TH1F(
"spectra09",
"cluster 9",200,0.0,0.01);
115 spectra[9] =
new TH1F(
"spectra10",
"cluster 9",200,0.0,0.01);
119 hvtx2[0]=
new TH2F(
"hvtx201",
"vertex positions (x,z)",100,0.03,0.15,100,0.03,0.15);
120 hvtx2[1]=
new TH2F(
"hvtx202",
"vertex positions (x,z)",100,0.03,0.15,100,0.03,0.15);
121 hvtx2[2]=
new TH2F(
"hvtx203",
"vertex positions (x,z)",100,0.03,0.15,100,0.03,0.15);
122 hvtx2[3]=
new TH2F(
"hvtx204",
"vertex positions (x,z)",100,0.03,0.15,100,0.03,0.15);
123 hvtx2[4]=
new TH2F(
"hvtx205",
"vertex positions (x,z)",100,0.03,0.15,100,0.03,0.15);
124 hvtx2[5]=
new TH2F(
"hvtx206",
"vertex positions (x,z)",100,0.03,0.15,100,0.03,0.15);
125 hvtx2[6]=
new TH2F(
"hvtx207",
"vertex positions (x,z)",100,0.03,0.15,100,0.03,0.15);
126 hvtx2[7]=
new TH2F(
"hvtx208",
"vertex positions (x,z)",100,0.03,0.15,100,0.03,0.15);
127 hvtx2[8]=
new TH2F(
"hvtx209",
"vertex positions (x,z)",100,0.03,0.15,100,0.03,0.15);
128 hvtx2[9]=
new TH2F(
"hvtx210",
"vertex positions (x,z)",100,0.03,0.15,100,0.03,0.15);
158 FairRunAna*
run = FairRunAna::Instance();
159 if ( ! run ) Fatal(
"SetParContainers",
"No analysis run");
180 RhoCandList neutralCands,chargedCands, plusCands,minusCands;
184 RhoCandList xiCands,nonOvCands,dsCands,ds0Cands,ppCands;
185 std::map<Int_t,Float_t > mapp;
195 for (Int_t i1=0; i1<
fMicroArray->GetEntriesFast(); i1++){
198 TLorentzVector l=tc.
P4();
202 chargedCands.
Add(tc);
223 ppiCands.
Combine(minusCands,plusCands);
227 for (
int la=0;la<ppiCands.
GetLength();la++)
229 Lamb->Fill((ppiCands[la].P4()).M());
233 xiCands.
Combine(ppiCands,minusCands);
237 while (t4=itX.
Next())
244 bool notinlist =
true;
247 if(chargedCands[
c].Overlaps(xiCands[
d]))notinlist =
false;
248 if(notinlist)nonOvCands.
Append(chargedCands[
c]);
254 cout <<
"charg non Overlap:"<<nonOvCands.
GetLength()<<endl;
266 while (t2=iterP.
Next())
270 TLorentzVector l=t2->
P4();
272 TVector3 pim = l.Vect();
292 for (
int k=0;k<
npi;k++)
311 while (t3=itP.
Next())
315 TLorentzVector v4=t3->
P4();
317 TVector3 v3 = v4.Vect();
320 ppi2->Fill(v3.Mag());
375 TLorentzVector vpim=pi.
P4();
376 TVector3 pi3v = vpim.Vect();
379 if(pi3v.Mag()<0.2)
hvtx2[0]->Fill(pi3v.Mag(),0.);
386 for (ii=0;ii<dsi-1;ii++)
392 TLorentzVector vpim=pi.
P4();
393 TVector3 pi3v = vpim.Vect();
395 for (jj=ii+1;jj<dsi;jj++)
400 TLorentzVector vpp=pp.
P4();
401 TVector3 pp3v = vpp.Vect();
412 if (MotherId==-1)Motherpdg = mc->
GetPdgCode();
429 cout<<
" Motherpdg "<<Motherpdg<<
" "<<mc->
GetPdgCode()<<endl;
443 if(pi3v.Mag()>pp3v.Mag())
446 hvtx2[0]->Fill(pi3v.Mag(),pp3v.Mag());
448 if((pi3v.Mag()>0.12&&pi3v.Mag()<0.14)&&(pp3v.Mag()>0.065&&pp3v.Mag()<0.08)) {
453 hvtx2[1]->Fill(pi3v.Mag(),pp3v.Mag());
465 if(Motherpdg==1020040110||Motherpdg==1010050110){
469 if(Motherpdg==1020030090||(Motherpdg==1010040090 && MotherId!=-1)){
480 if((pi3v.Mag()>0.112&&pi3v.Mag()<0.126)&&(pp3v.Mag()>0.09&&pp3v.Mag()<0.103)){
481 hvtx2[2]->Fill(pi3v.Mag(),pp3v.Mag());
489 if((pi3v.Mag()>0.128&&pi3v.Mag()<0.147)&&(pp3v.Mag()>0.0898&&pp3v.Mag()<0.109)){
490 hvtx2[9]->Fill(pi3v.Mag(),pp3v.Mag());
504 if(Motherpdg==1020040100||Motherpdg==1010050100){
511 if((pi3v.Mag()>0.097&&pi3v.Mag()<0.106)&&(pp3v.Mag()>0.094&&pp3v.Mag()<0.103)) {
515 hvtx2[3]->Fill(pi3v.Mag(),pp3v.Mag());
529 if(Motherpdg==1020040120||Motherpdg==1010050120){
537 if((pi3v.Mag()>0.128&&pi3v.Mag()<0.147)&&(pp3v.Mag()>0.110&&pp3v.Mag()<0.124)) {
542 hvtx2[4]->Fill(pi3v.Mag(),pp3v.Mag());
553 if(Motherpdg==1020020060||Motherpdg==1010030060){
561 if((pi3v.Mag()>0.128&&pi3v.Mag()<0.147)&&(pp3v.Mag()>0.124&&pp3v.Mag()<0.143)) {
566 hvtx2[5]->Fill(pi3v.Mag(),pp3v.Mag());
585 if(pi3v.Mag()<pp3v.Mag()) {
588 hvtx2[0]->Fill(pp3v.Mag(),pi3v.Mag());
591 if(Motherpdg==1020040110||Motherpdg==1010050110){
597 if((pp3v.Mag()>0.12&&pp3v.Mag()<0.14)&&(pi3v.Mag()>0.065&&pi3v.Mag()<0.08)) {
600 hvtx2[1]->Fill(pp3v.Mag(),pi3v.Mag());
611 if(Motherpdg==1020030090||(Motherpdg==1010040090&& MotherId!=-1)){
616 if((pp3v.Mag()>0.112&&pp3v.Mag()<0.126)&&(pi3v.Mag()>0.09&&pi3v.Mag()<0.103))
620 hvtx2[2]->Fill(pp3v.Mag(),pi3v.Mag());
631 if((pp3v.Mag()>0.128&&pp3v.Mag()<0.147)&&(pi3v.Mag()>0.0898&&pi3v.Mag()<0.109))
633 hvtx2[9]->Fill(pp3v.Mag(),pi3v.Mag());
644 if(Motherpdg==1020040100||Motherpdg==1010050100){
650 if((pp3v.Mag()>0.097&&pp3v.Mag()<0.106)&&(pi3v.Mag()>0.094&&pi3v.Mag()<0.103)) {
653 hvtx2[3]->Fill(pp3v.Mag(),pi3v.Mag());
663 if(Motherpdg==1020040120||Motherpdg==1010050120){
669 if((pp3v.Mag()>0.128&&pp3v.Mag()<0.147)&&(pi3v.Mag()>0.110&&pi3v.Mag()<0.124)) {
672 hvtx2[4]->Fill(pp3v.Mag(),pi3v.Mag());
684 if(Motherpdg==1020020060||Motherpdg==1010030060){
692 if((pp3v.Mag()>0.128&&pp3v.Mag()<0.147)&&(pi3v.Mag()>0.124&&pi3v.Mag()<0.143)) {
697 hvtx2[5]->Fill(pp3v.Mag(),pi3v.Mag());
737 if(
fGe->GetEntriesFast()!=0)
744 cout<<
" event "<<
event<<
" is correlated "<<evCheck->
GetEventID()<<endl;
746 for(
int entries=0;entries<
fGe->GetEntriesFast();entries++)
758 if(E>0.&&E<0.010)
spectra[cluster]->Fill(E);
765 if(
fGe->GetEntriesFast()!=0)
768 for(
int entries=0;entries<
fGe->GetEntriesFast();entries++)
780 if(E>0.&&E<0.010)
spectra[clus]->Fill(E);
786 if(ion>1000000000&&(ion<1010000000))
798 if((ion>1010000000||ion>1020000000))
815 TFile*
file = FairRootManager::Instance()->GetOutFile();
847 for(
int i=0;
i<10;
i++){
void SetTotESpectra(int clus)
void Add(const RhoCandidate *c)
RhoPlusParticleSelector * plusSel
void Append(const RhoCandidate *c)
void SetEnergySpectra(int event, int cluster)
RhoNeutralParticleSelector * neutralSel
virtual void SetParContainers()
PndPidCandidate * GetRecoCandidate() const
virtual void Exec(Option_t *opt)
RhoSimplePionSelector * piSel
RhoSimpleProtonSelector * pSel
RhoMinusParticleSelector * minusSel
virtual InitStatus Init()
void Combine(RhoCandList &l1, RhoCandList &l2)
void Select(RhoParticleSelectorBase *pidmgr)
TClonesArray * fMicroArray
TLorentzVector P4() const
static RhoFactory * Instance()
virtual void SetCriterion(const char *crit)
TClonesArray * fChargedArray
RhoMassParticleSelector * LambMSel
Int_t GetIonCharge(Int_t Z, Int_t &mass, Int_t &str)
TVector3 GetStartVertex() const
Int_t GetMotherID() const
Double_t GetEnergyLoss() const