18 #include "TParticle.h"
19 #include "TDatabasePDG.h"
24 #include "AliGenPythiaEventHeader.h"
25 #include "AliAODMCParticle.h"
36 fTriggerDetector(), fTriggerDetectorString(),
38 fMinChargedPt(0), fMinNeutralPt(0),
39 fStack(0), fAODMCparticles(0),
41 fParton6(), fParton7(),
42 fParton6PDG(0), fParton7PDG(0),
45 fNPrimaries(0), fPtHard(0),
46 fhPtHard(0), fhPtParton(0), fhPtJet(0),
47 fhPtPartonPtHard(0), fhPtJetPtHard(0), fhPtJetPtParton(0),
48 fhPtOtherDecayMesonId(0),
49 fhPtPi0Status(0), fhPtEtaStatus(0),
50 fhPtPi0DecayStatus(0), fhPtEtaDecayStatus(0), fhPtOtherDecayStatus(0),
51 fhPtPi0Not2Gamma(0), fhPtEtaNot2Gamma(0)
67 for(Int_t i = 0; i <
fgkNIso; i++)
72 for(Int_t j = 0; j < 2; j++)
102 Bool_t leading [fgkNIso],
103 Bool_t isolated[fgkNIso],
110 AliDebug(1,Form(
"End, not enough partons, n primaries %d",
fNPrimaries));
119 iparton = (
fStack->Particle(indexTrig))->GetFirstMother();
120 TParticle * mother =
fStack->Particle(iparton);
123 iparton = mother->GetFirstMother();
126 AliDebug(1,
"Negative index, skip ESD event");
129 mother =
fStack->Particle(iparton);
134 iparton = ((AliAODMCParticle*)
fAODMCparticles->At(indexTrig))->GetMother();
135 AliAODMCParticle * mother = (AliAODMCParticle*)
fAODMCparticles->At(iparton);
138 iparton = mother->GetMother();
141 AliDebug(1,
"Negative index, skip AOD event");
152 AliDebug(1,Form(
"This particle is not from hard process - pdg %d, parton index %d\n",partType, iparton));
163 AliDebug(1,Form(
"Trigger pdg %d pT %2.2f, phi %2.2f, eta %2.2f", partType,ptTrig,phiTrig*TMath::RadToDeg(),etaTrig));
165 Float_t jetPt =
fJet6.Pt();
166 Float_t jetPhi =
fJet6.Phi();
167 Float_t jetEta =
fJet6.Eta();
169 AliDebug(1,Form(
"Jet 6 pT %2.2f, phi %2.2f, eta %2.2f",jetPt,jetPhi*TMath::RadToDeg(),jetEta));
171 Float_t awayJetPt =
fJet7.Pt();
172 Float_t awayJetEta =
fJet7.Eta();
173 Float_t awayJetPhi =
fJet7.Phi();
175 AliDebug(1,Form(
"Jet 7 pT %2.2f, phi %2.2f, eta %2.2f",awayJetPt,awayJetPhi*TMath::RadToDeg(),awayJetEta));
190 jetPhi =
fJet7.Phi();
191 jetEta =
fJet7.Eta();
193 awayJetPt =
fJet6.Pt();
194 awayJetEta =
fJet6.Eta();
195 awayJetPhi =
fJet6.Phi();
201 Float_t deltaPhi = TMath::Abs(phiTrig-awayJetPhi) *TMath::RadToDeg();
202 AliDebug(1,Form(
"Trigger Away jet phi %2.2f\n",deltaPhi));
209 if (nearPDG == 22) near = 0;
210 else if(nearPDG == 21) near = 1;
213 if (awayPDG == 22) away = 0;
214 else if(awayPDG == 21) away = 1;
224 if( partonPt > 0 ) zPart = ptTrig / partonPt;
225 if( jetPt > 0 ) zJet = ptTrig / jetPt ;
232 for( Int_t i = 0; i <
fgkNIso ; i++ )
251 if(partType ==
kmcPrimPhoton && deltaPhi < 220 && deltaPhi > 140 && TMath::Abs(awayJetEta) < 0.6)
260 AliDebug(1,
"End TRUE");
270 TList * outputContainer =
new TList() ;
271 outputContainer->SetName(
"GenKineHistos") ;
281 fhPtHard =
new TH1F(
"hPtHard",
" pt hard for selected triggers",nptbins,ptmin,ptmax);
282 fhPtHard->SetXTitle(
"#it{p}_{T}^{hard} (GeV/#it{c})");
285 fhPtParton =
new TH1F(
"hPtParton",
" pt parton for selected triggers",nptbins,ptmin,ptmax);
286 fhPtParton->SetXTitle(
"#it{p}_{T}^{parton} (GeV/#it{c})");
289 fhPtJet =
new TH1F(
"hPtJet",
" pt jet for selected triggers",nptbins,ptmin,ptmax);
290 fhPtJet->SetXTitle(
"#it{p}_{T}^{jet} (GeV/#it{c})");
293 fhPtPartonPtHard =
new TH2F(
"hPtPartonPtHard",
"parton pt / pt hard for selected triggers",nptbins,ptmin,ptmax,200,0,2);
298 fhPtJetPtHard =
new TH2F(
"hPtJetPtHard",
"jet pt / pt hard for selected triggers",nptbins,ptmin,ptmax,200,0,2);
300 fhPtJetPtHard->SetYTitle(
"#it{p}_{T}^{jet}/#it{p}_{T}^{hard}");
303 fhPtJetPtParton =
new TH2F(
"hPtJetPtParton",
"parton pt / pt hard for selected triggers",nptbins,ptmin,ptmax,200,0,2);
308 fhPtPi0Not2Gamma =
new TH1F(
"hPtPi0Not2Gamma",
"#pi^{0} decay other than 2 #gamma",nptbins,ptmin,ptmax);
312 fhPtEtaNot2Gamma =
new TH1F(
"hPtEtaNot2Gamma",
"#eta decay other than 2 #gamma",nptbins,ptmin,ptmax);
316 fhPtGammaFromPi0Not2Gamma =
new TH1F(
"hPtGammaFromPi0Not2Gamma",
"#gamma from #pi^{0} decay other than 2 #gamma",nptbins,ptmin,ptmax);
320 fhPtGammaFromEtaNot2Gamma =
new TH1F(
"hPtGammaFromEtaNot2Gamma",
"#gamma from #eta decay other than 2 #gamma",nptbins,ptmin,ptmax);
324 fhPtPi0Status =
new TH2F(
"hPtPi0Status",
"#pi^{0} status",nptbins,ptmin,ptmax,101,-50,50);
329 fhPtEtaStatus =
new TH2F(
"hPtEtaStatus",
"#eta status",nptbins,ptmin,ptmax,101,-50,50);
334 fhPtPi0DecayStatus =
new TH2F(
"hPtPi0DecayStatus",
"#gamma from #pi^{0}, mother status",nptbins,ptmin,ptmax,101,-50,50);
339 fhPtEtaDecayStatus =
new TH2F(
"hPtEtaStatus",
"#gamma from #eta, mother status",nptbins,ptmin,ptmax,101,-50,50);
344 fhPtOtherDecayStatus =
new TH2F(
"hPtOtherDecayStatus",
"#gamma from other decay particle, mother status",nptbins,ptmin,ptmax,101,-50,50);
349 fhPtOtherDecayMesonId =
new TH2F(
"hPtOtherDecayMesonId",
"Particle decaying into #gamma, Id",nptbins,ptmin,ptmax,8,0,8) ;
361 TString name [] = {
"",
"_EMC",
"_Photon",
"_EMC_Photon"};
362 TString
title [] = {
"",
", neutral in EMCal",
", neutral only #gamma-like",
", neutral in EMCal and only #gamma-like"};
363 TString leading[] = {
"NotLeading",
"Leading"};
365 TString partTitl[] = {
"#gamma_{direct}",
"#gamma_{decay}^{#pi}",
"#gamma_{decay}^{#eta}",
"#gamma_{decay}^{other}",
"#pi^{0}",
"#eta"};
366 TString particle[] = {
"DirectPhoton" ,
"Pi0DecayPhoton" ,
"EtaDecayPhoton" ,
"OtherDecayPhoton" ,
"Pi0" ,
"Eta"};
370 fhPt[p] =
new TH1F(Form(
"h%sPt",particle[p].
Data()),Form(
"Input %s p_{T}",partTitl[p].
Data()),nptbins,ptmin,ptmax);
371 fhPt[p]->SetXTitle(
"#it{p}_{T} (GeV/#it{c})");
372 outputContainer->Add(
fhPt[p]);
374 fhPhi[p] =
new TH1F(Form(
"h%sPhi",particle[p].
Data()),Form(
"Input %s #phi with #it{p}_{T} > %f GeV/c",partTitl[p].
Data(),
GetMinPt()),180,0,TMath::TwoPi());
375 fhPhi[p]->SetXTitle(
"#phi (rad)");
376 outputContainer->Add(
fhPhi[p]);
378 fhEta[p] =
new TH1F(Form(
"h%sEta",particle[p].
Data()),Form(
"Input %s #eta with #it{p}_{T} > %f GeV/c",partTitl[p].
Data(),
GetMinPt()),200,-2,2);
379 fhEta[p]->SetXTitle(
"#eta");
380 outputContainer->Add(
fhEta[p]);
382 fhEtaPhi[p] =
new TH2F(Form(
"h%sEtaPhi",particle[p].
Data()),
383 Form(
"Input %s #eta vs #phi with #it{p}_{T} > %f GeV/c",partTitl[p].
Data(),
GetMinPt()),
384 200,-2,2,180,0,TMath::TwoPi());
386 fhEtaPhi[p]->SetYTitle(
"#phi (rad)");
390 Form(
"Input %s #phi vs status code with #it{p}_{T} > %f GeV/c",partTitl[p].
Data(),
GetMinPt()),
391 180,0,TMath::TwoPi(),101,-50,50);
397 Form(
"Input %s #eta vs status code with #it{p}_{T} > %f GeV/c",partTitl[p].
Data(),
GetMinPt()),
398 200,-2,2,101,-50,50);
404 fhPtOrigin[p] =
new TH2F(Form(
"h%sPtOrigin",particle[p].
Data()),Form(
"Input %s p_{T} vs origin",partTitl[p].
Data()),nptbins,ptmin,ptmax,11,0,11) ;
405 fhPtOrigin[p]->SetXTitle(
"#it{p}_{T} (GeV/#it{c})");
407 fhPtOrigin[p]->GetYaxis()->SetBinLabel(1 ,
"Status 21");
408 fhPtOrigin[p]->GetYaxis()->SetBinLabel(2 ,
"Quark");
409 fhPtOrigin[p]->GetYaxis()->SetBinLabel(3 ,
"qq Resonances ");
410 fhPtOrigin[p]->GetYaxis()->SetBinLabel(4 ,
"Resonances");
411 fhPtOrigin[p]->GetYaxis()->SetBinLabel(5 ,
"#rho");
412 fhPtOrigin[p]->GetYaxis()->SetBinLabel(6 ,
"#omega");
413 fhPtOrigin[p]->GetYaxis()->SetBinLabel(7 ,
"K");
414 fhPtOrigin[p]->GetYaxis()->SetBinLabel(8 ,
"Other");
415 fhPtOrigin[p]->GetYaxis()->SetBinLabel(9 ,
"#eta");
416 fhPtOrigin[p]->GetYaxis()->SetBinLabel(10 ,
"#eta prime");
419 fhPtOriginNotFinal[p] =
new TH2F(Form(
"h%sPtOriginNotFinal",particle[p].
Data()),Form(
"Input %s p_{T} vs origin, status 0",partTitl[p].
Data()),nptbins,ptmin,ptmax,11,0,11) ;
434 for(Int_t i = 0; i <
fgkNIso; i++)
439 Form(
"%s: Leading of all particles%s",partTitl[p].
Data(),title[i].
Data()),
440 nptbins,ptmin,ptmax);
441 fhPtLeading[p][i]->SetXTitle(
"#it{p}_{T} (GeV/#it{c})");
445 Form(
"%s: Leading of all particles%s, isolated",partTitl[p].
Data(),title[i].
Data()),
446 nptbins,ptmin,ptmax);
451 Form(
"%s: Leading of all particles%s",partTitl[p].
Data(),title[i].
Data()),
452 nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax);
464 Form(
"#gamma-jet: %s of all particles%s", leading[j].
Data(), title[i].
Data()),
465 nptbins,ptmin,ptmax,3,0,3);
476 Form(
"%s: %s of all particles%s", partTitl[p].
Data(), leading[j].
Data(), title[i].
Data()),
477 nptbins,ptmin,ptmax,3,0,3);
486 Form(
"%s: %s of all particles%s, isolated", partTitl[p].
Data(), leading[j].
Data(), title[i].
Data()),
487 nptbins,ptmin,ptmax,3,0,3);
499 Form(
"%s: %s of all particles%s", partTitl[p].
Data(), leading[j].
Data(), title[i].
Data()),
500 nptbins,ptmin,ptmax,3,0,3);
509 Form(
"%s: %s of all particles%s, isolated", partTitl[p].
Data(), leading[j].
Data(), title[i].
Data()),
510 nptbins,ptmin,ptmax,3,0,3);
520 fhZHard[p][j][i] =
new TH2F(Form(
"h%sZHard%s%s", particle[p].
Data(), leading[j].
Data(), name[i].
Data()),
521 Form(
"#it{z}_{Hard} of %s: %s of all particles%s", partTitl[p].
Data(), leading[j].
Data(), title[i].
Data()),
522 nptbins,ptmin,ptmax,200,0,2);
523 fhZHard[p][j][i]->SetYTitle(
"#it{p}_{T}^{particle}/#it{p}_{T}^{hard}");
524 fhZHard[p][j][i]->SetXTitle(
"#it{p}_{T}^{particle} (GeV/#it{c})");
525 outputContainer->Add(
fhZHard[p][j][i]);
528 Form(
"#it{z}_{Hard} of %s: %s of all particles%s, isolated", partTitl[p].
Data(), leading[j].
Data(), title[i].
Data()),
529 nptbins,ptmin,ptmax,200,0,2);
530 fhZHardIsolated[p][j][i]->SetYTitle(
"#it{p}_{T}^{particle}/#it{p}_{T}^{hard}");
531 fhZHardIsolated[p][j][i]->SetXTitle(
"#it{p}_{T}^{particle} (GeV/#it{c})");
536 fhZParton[p][j][i] =
new TH2F(Form(
"h%sZParton%s%s", particle[p].
Data(), leading[j].
Data(), name[i].
Data()),
537 Form(
"#it{z}_{Parton} of %s: %s of all particles%s", partTitl[p].
Data(), leading[j].
Data(), title[i].
Data()),
538 nptbins,ptmin,ptmax,200,0,2);
539 fhZParton[p][j][i]->SetYTitle(
"#it{p}_{T}^{particle}/#it{p}_{T}^{hard}");
540 fhZParton[p][j][i]->SetXTitle(
"#it{p}_{T}^{particle} (GeV/#it{c})");
541 outputContainer->Add(
fhZParton[p][j][i]);
544 Form(
"#it{z}_{Parton} of %s: %s of all particles%s, isolated", partTitl[p].
Data(), leading[j].
Data(), title[i].
Data()),
545 nptbins,ptmin,ptmax,200,0,2);
546 fhZPartonIsolated[p][j][i]->SetYTitle(
"#it{p}_{T}^{particle}/#it{p}_{T}^{hard}");
553 fhZJet[p][j][i] =
new TH2F(Form(
"h%sZJet%s%s", particle[p].
Data(), leading[j].
Data(), name[i].
Data()),
554 Form(
"#it{z}_{Jet} of %s: %s of all particles%s", partTitl[p].
Data(), leading[j].
Data(), title[i].
Data()),
555 nptbins,ptmin,ptmax,200,0,2);
556 fhZJet[p][j][i]->SetYTitle(
"#it{p}_{T}^{particle}/#it{p}_{T}^{hard}");
557 fhZJet[p][j][i]->SetXTitle(
"#it{p}_{T}^{particle} (GeV/#it{c})");
558 outputContainer->Add(
fhZJet[p][j][i]);
561 Form(
"#it{z}_{Jet} of %s: %s of all particles%s, isolated", partTitl[p].
Data(), leading[j].
Data(), title[i].
Data()),
562 nptbins,ptmin,ptmax,200,0,2);
563 fhZJetIsolated[p][j][i]->SetYTitle(
"#it{p}_{T}^{particle}/#it{p}_{T}^{hard}");
564 fhZJetIsolated[p][j][i]->SetXTitle(
"#it{p}_{T}^{particle} (GeV/#it{c})");
570 fhXE[p][j][i] =
new TH2F(Form(
"h%sXE%s%s", particle[p].
Data(), leading[j].
Data(), name[i].
Data()),
571 Form(
"#it{z}_{Jet} of %s: %s of all particles%s", partTitl[p].
Data(), leading[j].
Data(), title[i].
Data()),
572 nptbins,ptmin,ptmax,200,0,2);
573 fhXE[p][j][i]->SetYTitle(
"#it{p}_{T}^{particle}/#it{p}_{T}^{hard}");
574 fhXE[p][j][i]->SetXTitle(
"#it{p}_{T}^{particle} (GeV/#it{c})");
575 outputContainer->Add(
fhXE[p][j][i]);
578 Form(
"#it{z}_{Jet} of %s: %s of all particles%s, isolated", partTitl[p].
Data(), leading[j].
Data(), title[i].
Data()),
579 nptbins,ptmin,ptmax,200,0,2);
580 fhXEIsolated[p][j][i]->SetYTitle(
"#it{p}_{T}^{particle}/#it{p}_{T}^{hard}");
581 fhXEIsolated[p][j][i]->SetXTitle(
"#it{p}_{T}^{particle} (GeV/#it{c})");
587 fhXEUE[p][j][i] =
new TH2F(Form(
"h%sXEUE%s%s", particle[p].
Data(), leading[j].
Data(), name[i].
Data()),
588 Form(
"#it{z}_{Jet} of %s: %s of all particles%s", partTitl[p].
Data(), leading[j].
Data(), title[i].
Data()),
589 nptbins,ptmin,ptmax,200,0,2);
590 fhXEUE[p][j][i]->SetYTitle(
"#it{p}_{T}^{particle}/#it{p}_{T}^{hard}");
591 fhXEUE[p][j][i]->SetXTitle(
"#it{p}_{T}^{particle} (GeV/#it{c})");
592 outputContainer->Add(
fhXEUE[p][j][i]);
595 Form(
"#it{z}_{Jet} of %s: %s of all particles%s, isolated", partTitl[p].
Data(), leading[j].
Data(), title[i].
Data()),
596 nptbins,ptmin,ptmax,200,0,2);
597 fhXEUEIsolated[p][j][i]->SetYTitle(
"#it{p}_{T}^{particle}/#it{p}_{T}^{hard}");
598 fhXEUEIsolated[p][j][i]->SetXTitle(
"#it{p}_{T}^{particle} (GeV/#it{c})");
604 return outputContainer;
626 if(p6phi < 0) p6phi +=TMath::TwoPi();
638 if(p7phi < 0) p7phi +=TMath::TwoPi();
645 if(!strcmp(
GetReader()->GetGenEventHeader()->ClassName(),
"AliGenPythiaEventHeader"))
653 const Int_t nTriggerJets = pygeh->NTriggerJets();
655 Float_t tmpjet[]={0,0,0,0};
661 for(Int_t ijet = 0; ijet< nTriggerJets; ijet++)
663 pygeh->TriggerJet(ijet, tmpjet);
665 fLVTmp.SetPxPyPzE(tmpjet[0],tmpjet[1],tmpjet[2],tmpjet[3]);
666 Float_t jphi =
fLVTmp.Phi();
667 if(jphi < 0) jphi +=TMath::TwoPi();
717 Bool_t leading [fgkNIso],
718 Bool_t isolated[fgkNIso],
725 if(phiTrig < 0 ) phiTrig += TMath::TwoPi();
729 Int_t ipartonAway = 0;
734 if(ipr==indexTrig)
continue;
739 TParticle * particle =
fStack->Particle(ipr) ;
741 pdg = particle->GetPdgCode();
742 status = particle->GetStatusCode();
745 if( status != 1) continue ;
747 particle->Momentum(
fLVTmp);
749 charge = (Int_t) TDatabasePDG::Instance()->GetParticle(pdg)->Charge();
753 AliAODMCParticle * particle = (AliAODMCParticle*)
fAODMCparticles->At(ipr) ;
755 pdg = particle->GetPdgCode();
756 status = particle->GetStatus();
759 if( status != 1) continue ;
761 fLVTmp.SetPxPyPzE(particle->Px(),particle->Py(),particle->Pz(),particle->E());
763 charge = particle->Charge();
767 if( charge == 0 )
continue;
770 Float_t phi =
fLVTmp.Phi();
771 if(phi < 0 ) phi += TMath::TwoPi();
784 ipartonAway =
fStack->Particle(ipr)->GetFirstMother();
787 AliDebug(1,
"End, no mother index");
791 TParticle * mother =
fStack->Particle(ipartonAway);
792 while (ipartonAway > 7)
794 ipartonAway = mother->GetFirstMother();
795 if(ipartonAway < 0)
break;
796 mother =
fStack->Particle(ipartonAway);
801 ipartonAway = ((AliAODMCParticle*)
fAODMCparticles->At(ipr))->GetMother();
804 AliDebug(1,
"End, no mother index");
808 AliAODMCParticle * mother = (AliAODMCParticle*)
fAODMCparticles->At(ipartonAway);
809 while (ipartonAway > 7)
811 ipartonAway = mother->GetMother();
812 if(ipartonAway < 0)
break;
821 Float_t xe = -pt/ptTrig*TMath::Cos(phi-phiTrig);
823 if((ipartonAway==6 || ipartonAway==7) && iparton!=ipartonAway)
825 for( Int_t i = 0; i <
fgkNIso; i++ )
838 if(ipartonAway!=6 && ipartonAway!=7)
840 for( Int_t i = 0; i <
fgkNIso; i++ )
875 Bool_t leading[fgkNIso],
876 Bool_t isolated[fgkNIso])
880 Float_t ptMaxCharged = 0;
881 Float_t ptMaxNeutral = 0;
882 Float_t ptMaxNeutEMCAL = 0;
883 Float_t ptMaxNeutPhot = 0;
884 Float_t ptMaxNeutEMCALPhot = 0;
899 if(phiTrig < 0 ) phiTrig += TMath::TwoPi();
911 Int_t nICNeutral = 0;
912 Int_t nICNeutEMCAL = 0;
913 Int_t nICNeutPhot = 0;
914 Int_t nICNeutEMCALPhot = 0;
918 Float_t sumNePtPhot = 0;
919 Float_t sumNePtEMC = 0;
920 Float_t sumNePtEMCPhot = 0;
931 if(ipr == indexTrig)
continue;
935 TParticle * particle =
fStack->Particle(ipr) ;
937 imother = particle->GetFirstMother();
938 pdg = particle->GetPdgCode();
939 status = particle->GetStatusCode();
942 if( status != 1) continue ;
944 charge = (Int_t) TDatabasePDG::Instance()->GetParticle(pdg)->Charge();
945 particle->Momentum(
fLVTmp);
949 AliAODMCParticle * particle = (AliAODMCParticle*)
fAODMCparticles->At(ipr) ;
951 imother = particle->GetMother();
952 pdg = particle->GetPdgCode();
953 status = particle->GetStatus();
956 if( status != 1) continue ;
958 charge = particle->Charge();
959 fLVTmp.SetPxPyPzE(particle->Px(),particle->Py(),particle->Pz(),particle->E());
964 if( imother == indexTrig) continue ;
967 Float_t eta =
fLVTmp.Eta();
968 Float_t phi =
fLVTmp.Phi();
969 if(phi < 0 ) phi += TMath::TwoPi();
982 if( ptMaxNeutral < pt ) ptMaxNeutral = pt;
984 if( radius < rThresIC )
986 if( pt > ptThresIC ) nICNeutral++ ;
990 Bool_t phPDG = kFALSE;
991 if(pdg==22 || pdg==111) phPDG = kTRUE;
996 if( ptMaxNeutPhot < pt) ptMaxNeutPhot = pt;
998 if( radius < rThresIC )
1000 if(pt > ptThresIC) nICNeutPhot++ ;
1007 if(!inCalo)
continue;
1009 if( ptMaxNeutEMCAL < pt ) ptMaxNeutEMCAL = pt;
1010 if( radius < rThresIC )
1012 if( pt > ptThresIC ) nICNeutEMCAL++ ;
1018 if( ptMaxNeutEMCALPhot < pt ) ptMaxNeutEMCALPhot = pt;
1019 if( radius < rThresIC )
1021 if (pt > ptThresIC) nICNeutEMCALPhot++ ;
1022 sumNePtEMCPhot += pt;
1030 if( ptMaxCharged < pt ) ptMaxCharged = pt;
1032 if( radius < rThresIC )
1036 if( pt > ptThresIC ) nICTrack++ ;
1043 if(ptTrig > ptMaxCharged)
1047 if(ptTrig > ptMaxNeutral ) leading[0] = kTRUE ;
1048 if(ptTrig > ptMaxNeutEMCAL ) leading[1] = kTRUE ;
1049 if(ptTrig > ptMaxNeutPhot ) leading[2] = kTRUE ;
1050 if(ptTrig > ptMaxNeutEMCALPhot) leading[3] = kTRUE ;
1062 if(nICNeutral == 0 ) isolated[0] = kTRUE ;
1063 if(nICNeutEMCAL == 0 ) isolated[1] = kTRUE ;
1064 if(nICNeutPhot == 0 ) isolated[2] = kTRUE ;
1065 if(nICNeutEMCALPhot == 0 ) isolated[3] = kTRUE ;
1070 if(sumChPt + sumNePt < sumThresIC ) isolated[0] = kTRUE ;
1071 if(sumChPt + sumNePtEMC < sumThresIC ) isolated[1] = kTRUE ;
1072 if(sumChPt + sumNePtPhot < sumThresIC ) isolated[2] = kTRUE ;
1073 if(sumChPt + sumNePtEMCPhot < sumThresIC ) isolated[3] = kTRUE ;
1078 for( Int_t i = 0; i <
fgkNIso; i++ )
1101 AliDebug(1,
"Start");
1116 AliFatal(
"Stack not available, is the MC handler called? STOP");
1142 AliFatal(
"Standard MCParticles not available!");
1147 AliAODMCParticle * primAOD = 0;
1151 fParton6.SetPxPyPzE(primAOD->Px(),primAOD->Py(),primAOD->Pz(),primAOD->E());
1159 fParton7.SetPxPyPzE(primAOD->Px(),primAOD->Py(),primAOD->Pz(),primAOD->E());
1169 Int_t statusTrig = 0;
1172 Int_t momStatus = 0;
1174 Int_t momNDaugh = 0;
1180 Int_t nDaughters = 0;
1186 TParticle * particle =
fStack->Particle(ipr) ;
1188 pdgTrig = particle->GetPdgCode();
1189 statusTrig = particle->GetStatusCode();
1190 imother = particle->GetFirstMother();
1191 ptTrig = particle->Pt();
1192 nDaughters = particle->GetNDaughters();
1193 id0 = particle->GetDaughter(0);
1194 id1 = particle->GetDaughter(1);
1200 AliAODMCParticle* particle = (AliAODMCParticle*)
fAODMCparticles->At(ipr) ;
1202 pdgTrig = particle->GetPdgCode();
1203 statusTrig = particle->GetStatus();
1204 imother = particle->GetMother();
1205 nDaughters = particle->GetNDaughters();
1206 id0 = particle->GetDaughter(0);
1207 id1 = particle->GetDaughter(1);
1209 fTrigger.SetPxPyPzE(particle->Px(),particle->Py(),particle->Pz(),particle->E());
1221 if( pdgTrig == 22 && statusTrig != 1 ) continue ;
1223 if( pdgTrig != 111 && pdgTrig != 22 && pdgTrig !=221 ) continue ;
1230 if( ptTrig <
GetMinPt() ) continue ;
1236 Int_t partType = -1;
1244 momStatus = (
fStack->Particle(imother))->GetStatusCode();
1245 momPdg = (
fStack->Particle(imother))->GetPdgCode();
1246 momNDaugh = (
fStack->Particle(imother))->GetNDaughters();
1247 momImom = (
fStack->Particle(imother))->GetFirstMother();
1251 momStatus = ((AliAODMCParticle*)
fAODMCparticles->At(imother))->GetStatus();
1252 momPdg = ((AliAODMCParticle*)
fAODMCparticles->At(imother))->GetPdgCode();
1253 momNDaugh = ((AliAODMCParticle*)
fAODMCparticles->At(imother))->GetNDaughters();
1254 momImom = ((AliAODMCParticle*)
fAODMCparticles->At(imother))->GetMother();
1257 if (imother < 8 && statusTrig == 1)
1261 else if(momPdg == 111 )
1265 else if(momPdg == 221 )
1269 else if(TMath::Abs(momStatus) > 0 )
1275 else if( (pdgTrig==111 || pdgTrig==221) && nDaughters == 2 )
1279 pdg0 =
fStack->Particle(id0)->GetPdgCode();
1280 pdg1 =
fStack->Particle(id1)->GetPdgCode();
1288 if( pdg0 == 22 && pdg1== 22 )
1291 else if( pdgTrig==221 ) partType =
kmcPrimEta;
1294 else if( (pdgTrig==111 || pdgTrig==221) )
1298 if(! in ) continue ;
1304 if(partType < 0 ) continue ;
1311 if(phi < 0) phi+=TMath::TwoPi();
1317 if(partType < 4 && partType!=0)
1332 if(! in ) continue ;
1335 AliDebug(1,Form(
"Select trigger particle %d: pdg %d, type %d, status %d, mother index %d, pT %2.2f, eta %2.2f, phi %2.2f",
1336 ipr, pdgTrig, partType, statusTrig, imother, ptTrig,
fTrigger.Eta(),
fTrigger.Phi()*TMath::RadToDeg()));
1369 if (momPdg > 2100 && momPdg < 2210)
1375 else if(momPdg >= 310 && momPdg <= 323)
1385 Int_t momOrgPdg = -1;
1386 Int_t momOrgStatus = -1;
1389 if(momImom >=0 || imother >=0)
1391 TParticle* mother = 0;
1392 if(partType < 4 && partType!=0 )
1393 mother =
fStack->Particle(momImom);
1395 mother =
fStack->Particle(imother);
1397 momOrgPdg = TMath::Abs(mother->GetPdgCode());
1398 momOrgStatus = mother->GetStatusCode();
1403 if(momImom >=0 || imother >=0)
1405 AliAODMCParticle* mother = 0;
1406 if(partType < 4 && partType!=0 )
1411 momOrgPdg = TMath::Abs(mother->GetPdgCode());
1412 momOrgStatus = mother->GetStatus();
1418 else if(momOrgPdg > 2100 && momOrgPdg < 2210)
1424 else if(momOrgPdg >= 310 && momOrgPdg <= 323)
1427 else if(momOrgStatus == 11 || momOrgStatus == 12 )
1437 else if(momOrgPdg > 2100 && momOrgPdg < 2210)
1443 else if(momOrgPdg >= 310 && momOrgPdg <= 323)
1446 else if(momOrgStatus == 11 || momOrgStatus == 12 )
1469 GetXE(ipr,partType,leading,isolated,iparton) ;
1473 AliDebug(1,
"End fill histograms");
1488 else AliFatal(Form(
"Detector < %s > not known!", det.Data()));
1503 else AliFatal(Form(
"Detector < %d > not known!", det));
Float_t GetHistoPtMax() const
TH1F * fhPtHard
! pt of parton
TH2F * fhPtEtaDecayStatus
! Input eta decay meson status
Float_t GetHistoPtMin() const
Int_t GetICMethod() const
TLorentzVector fParton6
! Final state Parton
virtual Int_t GetCalorimeter() const
virtual void AddToHistogramsName(TString add)
TH1F * fhPtJet
! pt of jet
TH2F * fhXEIsolated[fgkNmcPrimTypes][fgkNLead][fgkNIso]
! xE away side
virtual AliStack * GetMCStack() const
Bool_t ReadAODMCParticles() const
TH2F * fhPtPi0DecayStatus
! Input pi0 decay meson status
Float_t fPtHard
! Generated pT hard
TH2F * fhPtPi0Status
! Input pi0 status
virtual AliIsolationCut * GetIsolationCut()
TH2F * fhPtOriginNotFinal[fgkNmcPrimTypes]
! Input particle pt vs particle type originating it (if meson decay, its mother) if trigger is not fi...
TH2F * fhEtaPhi[fgkNmcPrimTypes]
! Input particle eta vs phi
TH2F * fhPtPartonPtHard
! pt of parton divided to pt hard, trigger is photon
TH2F * fhZJet[fgkNmcPrimTypes][fgkNLead][fgkNIso]
! zHard
TH1F * fhPhi[fgkNmcPrimTypes]
! Input particle phi
TH1F * fhPtPi0Not2Gamma
! Input pi0 not 2 gamma decay
TH1F * fhPtGammaFromPi0Not2Gamma
! Input gamma from pi0 not 2 gamma decay
Get trigger particles/partons/jets and correlations at generator level.
virtual AliGenEventHeader * GetGenEventHeader() const
Int_t fParton7PDG
! Final state Parton PDG
TH2F * fhZPartonIsolated[fgkNmcPrimTypes][fgkNLead][fgkNIso]
! isolated, zHard
TH2F * fhZHardIsolated[fgkNmcPrimTypes][fgkNLead][fgkNIso]
! isolated, zHard
TH2F * fhPtPartonTypeAway[fgkNmcPrimTypes][fgkNLead][fgkNIso]
! pt versus away side parton type
TH1F * fhPt[fgkNmcPrimTypes]
! Input particle pt
static const Int_t fgkNmcPrimTypes
Number of MC indeces for histograms arrays.
TLorentzVector fJet7
! Pythia jet close to parton in position 7
TLorentzVector fParton7
! Final state Parton
Float_t GetPtThreshold() const
TLorentzVector fJet6
! Pythia jet close to parton in position 6
Base class for CaloTrackCorr analysis algorithms.
TString fTriggerDetectorString
Detector : EMCAL, PHOS, CTS.
virtual AliFiducialCut * GetFiducialCut()
virtual TClonesArray * GetAODMCParticles() const
virtual AliHistogramRanges * GetHistogramRanges()
TH2F * fhPtPartonTypeNearIsolated[fgkNmcPrimTypes][fgkNLead][fgkNIso]
! pt versus originating parton type
Float_t fMinChargedPt
! Minimum energy for charged particles in correlation
void GetPartonsAndJets()
Fill data members with partons,jets and generated pt hard.
TH2F * fhXEUEIsolated[fgkNmcPrimTypes][fgkNLead][fgkNIso]
! xE away side
TH2F * fhXE[fgkNmcPrimTypes][fgkNLead][fgkNIso]
! xE away side
TList * GetCreateOutputObjects()
Create histograms to be saved in output file.
AliStack * fStack
! access ESD stack
TH1F * fhPtLeadingIsolated[fgkNmcPrimTypes][fgkNIso]
! isolated
Bool_t IsInFiducialCut(Float_t eta, Float_t phi, Int_t det) const
TH2F * fhZHard[fgkNmcPrimTypes][fgkNLead][fgkNIso]
! zHard
TH2F * fhPtLeadingSumPt[fgkNmcPrimTypes][fgkNIso]
! pT vs sum in cone
TH2F * fhPhiStatus[fgkNmcPrimTypes]
! Input particle phi vs status
Int_t GetHistoNPtSumBins() const
static const Int_t fgkNIso
Number of isolation cases.
virtual Double_t GetEventWeight() const
AliAnaGeneratorKine()
Default Constructor. Initialize parameters with default values.
Int_t fTriggerDetector
Detector : EMCAL, PHOS, CTS.
AliFiducialCut * GetFiducialCutForTrigger()
TH2F * fhZParton[fgkNmcPrimTypes][fgkNLead][fgkNIso]
! zHard
Int_t fNPrimaries
! N primaries
Bool_t Data(TH1F *h, Double_t *rangefit, Bool_t writefit, Double_t &sgn, Double_t &errsgn, Double_t &bkg, Double_t &errbkg, Double_t &sgnf, Double_t &errsgnf, Double_t &sigmafit, Int_t &status)
Float_t GetHistoPtSumMin() const
TH2F * fhXEUE[fgkNmcPrimTypes][fgkNLead][fgkNIso]
! xE away side
void MakeAnalysisFillHistograms()
Particle-Parton/Jet/Hadron Correlation Analysis, main method.
TH2F * fhEtaStatus[fgkNmcPrimTypes]
! Input particle eta vs status
TLorentzVector fTrigger
! Trigger momentum, avoid generating TLorentzVectors per event
Int_t GetHistoPtBins() const
TH2F * fhPtOrigin[fgkNmcPrimTypes]
! Input particle pt vs particle type originating it (if meson decay, its mother)
TH1F * fhPtEtaNot2Gamma
! Input eta not 2 gamma decay
TH2F * fhPtJetPtHard
! pt of jet divided to pt hard, trigger is photon
ClassImp(AliAnalysisTaskCRC) AliAnalysisTaskCRC
TH2F * fhPtPartonTypeAwayIsolated[fgkNmcPrimTypes][fgkNLead][fgkNIso]
! isolated, particle pt versus away side parton type
TH2F * fhPtAcceptedGammaJet[fgkNLead][fgkNIso]
! gamma-jet pair in acceptance (jet in good eta window)
TClonesArray * fAODMCparticles
! access AOD stack
void SetTriggerDetector(TString &det)
Set the calorimeter for the analysis.
TH2F * fhPtJetPtParton
! pt of parton divided to pt parton, trigger is photon
Int_t fParton6PDG
! Final state Parton PDG
virtual Float_t GetMinPt() const
Bool_t CorrelateWithPartonOrJet(Int_t indexTrig, Int_t pdgTrig, Bool_t leading[fgkNIso], Bool_t isolated[fgkNIso], Int_t &iparton)
Correlate trigger with partons or jets, get z.
virtual AliCaloTrackReader * GetReader() const
TH1F * fhPtParton
! pt of parton
TH1F * fhEta[fgkNmcPrimTypes]
! Input particle eta
Float_t Radius(Float_t etaCandidate, Float_t phiCandidate, Float_t eta, Float_t phi) const
TH2F * fhPtOtherDecayMesonId
! Decay photons, not originating from pi0 or eta, ID of the particle
DCal, not used so far, just in case.
void IsLeadingAndIsolated(Int_t indexTrig, Int_t pdgTrig, Bool_t leading[fgkNIso], Bool_t isolated[fgkNIso])
TH1F * fhPtGammaFromEtaNot2Gamma
! Input gamma from eta not 2 gamma decay
void InitParameters()
Initialize the parameters of the analysis.
Float_t GetHistoPtSumMax() const
void GetXE(Int_t indexTrig, Int_t pdgTrig, Bool_t leading[fgkNIso], Bool_t isolated[fgkNIso], Int_t iparton)
Calculate the real XE and the UE XE.
TH1F * fhPtLeading[fgkNmcPrimTypes][fgkNIso]
! pT
static const Int_t fgkNLead
Number of leadingness cases.
TH2F * fhPtPartonTypeNear[fgkNmcPrimTypes][fgkNLead][fgkNIso]
! particle pt versus originating parton type
Float_t fMinNeutralPt
! Minimum energy for neutral particles in correlation
Float_t GetConeSize() const
TH2F * fhPtEtaStatus
! Input eta status
TLorentzVector fLVTmp
! Momentum, avoid generating TLorentzVectors per event
TH2F * fhPtOtherDecayStatus
! Input other decay particle status
TH2F * fhZJetIsolated[fgkNmcPrimTypes][fgkNLead][fgkNIso]
! isolated, zHard