7 #include <TClonesArray.h> 12 #include <TLorentzVector.h> 15 #include "AliVCluster.h" 16 #include "AliVParticle.h" 17 #include "AliVTrack.h" 39 fConeMaxPhi(TMath::Pi()*2),
45 fEmbCaloClustersCont(0),
47 fRandCaloClustersCont(0),
52 fHistRCPtExPartialLJ(0),
55 fHistDeltaPtRCvsEP(0),
56 fHistDeltaPtRCExLJ(0),
57 fHistDeltaPtRCExPartialLJ(0),
58 fHistDeltaPtRCRand(0),
59 fHistEmbJetsPtArea(0),
60 fHistEmbJetsCorrPtArea(0),
61 fHistEmbPartPtvsJetPt(0),
62 fHistEmbPartPtvsJetCorrPt(0),
63 fHistJetPtvsJetCorrPt(0),
64 fHistDistLeadPart2JetAxis(0),
67 fHistDeltaPtEmbArea(0),
68 fHistDeltaPtEmbvsEP(0),
69 fHistRCPtExLJVSDPhiLJ(0),
70 fHistRCPtExPartialLJVSDPhiLJ(0),
71 fHistEmbJetsPhiEta(0),
72 fHistLeadPartPhiEta(0)
78 fHistRCPtExPartialLJ = 0;
81 fHistDeltaPtRCvsEP = 0;
82 fHistDeltaPtRCExLJ = 0;
83 fHistDeltaPtRCExPartialLJ = 0;
84 fHistDeltaPtRCRand = 0;
85 fHistEmbJetsPtArea = 0;
86 fHistEmbJetsCorrPtArea = 0;
87 fHistEmbPartPtvsJetPt = 0;
88 fHistEmbPartPtvsJetCorrPt = 0;
89 fHistJetPtvsJetCorrPt = 0;
90 fHistDistLeadPart2JetAxis = 0;
93 fHistDeltaPtEmbArea = 0;
94 fHistDeltaPtEmbvsEP = 0;
96 SetMakeGeneralHistograms(kTRUE);
102 fMCJetPtThreshold(1),
109 fConeMaxPhi(TMath::Pi()*2),
112 fCaloClustersCont(0),
115 fEmbCaloClustersCont(0),
117 fRandCaloClustersCont(0),
122 fHistRCPtExPartialLJ(0),
125 fHistDeltaPtRCvsEP(0),
126 fHistDeltaPtRCExLJ(0),
127 fHistDeltaPtRCExPartialLJ(0),
128 fHistDeltaPtRCRand(0),
129 fHistEmbJetsPtArea(0),
130 fHistEmbJetsCorrPtArea(0),
131 fHistEmbPartPtvsJetPt(0),
132 fHistEmbPartPtvsJetCorrPt(0),
133 fHistJetPtvsJetCorrPt(0),
134 fHistDistLeadPart2JetAxis(0),
137 fHistDeltaPtEmbArea(0),
138 fHistDeltaPtEmbvsEP(0),
139 fHistRCPtExLJVSDPhiLJ(0),
140 fHistRCPtExPartialLJVSDPhiLJ(0),
141 fHistEmbJetsPhiEta(0),
142 fHistLeadPartPhiEta(0)
239 fHistRCPhiEta =
new TH2F(
"fHistRCPhiEta",
"fHistRCPhiEta", 100, -1, 1, 201, 0, TMath::Pi() * 2.01);
258 fHistEmbJetsPhiEta =
new TH2F(
"fHistEmbJetsPhiEta",
"fHistEmbJetsPhiEta", 100, -1, 1, 201, 0, TMath::Pi() * 2.01);
263 fHistLeadPartPhiEta =
new TH2F(
"fHistLeadPartPhiEta",
"fHistLeadPartPhiEta", 100, -1, 1, 201, 0, TMath::Pi() * 2.01);
271 const Int_t nbinsZ = 12;
272 Double_t binsZ[nbinsZ+1] = {0,1,2,3,4,5,6,7,8,9,10,20,1000};
280 histname =
"fHistRCPt_";
283 fHistRCPt[i]->GetXaxis()->SetTitle(
"#it{p}_{T} (GeV/#it{c})");
284 fHistRCPt[i]->GetYaxis()->SetTitle(
"counts");
287 histname =
"fHistRhoVSRCPt_";
291 fHistRhoVSRCPt[i]->GetYaxis()->SetTitle(
"#it{p}_{T} (GeV/#it{c})");
294 histname =
"fHistDeltaPtRCvsEP_";
303 histname =
"fHistRCPtExLJ_";
306 fHistRCPtExLJ[i]->GetXaxis()->SetTitle(
"#it{p}_{T}^{RC} (GeV/#it{c})");
310 histname =
"fHistDeltaPtRCExLJ_";
317 histname =
"fHistRCPtExPartialLJ_";
324 histname =
"fHistDeltaPtRCExPartialLJ_";
334 histname =
"fHistRCPtRand_";
337 fHistRCPtRand[i]->GetXaxis()->SetTitle(
"#it{p}_{T}^{RC} (GeV/#it{c})");
341 histname =
"fHistDeltaPtRCRand_";
350 histname =
"fHistEmbJetsPtArea_";
357 histname =
"fHistEmbJetsCorrPtArea_";
364 histname =
"fHistEmbPartPtvsJetPt_";
372 histname =
"fHistEmbPartPtvsJetCorrPt_";
381 histname =
"fHistJetPtvsJetCorrPt_";
390 histname =
"fHistDistLeadPart2JetAxis_";
397 histname =
"fHistEmbBkgArea_";
401 fHistEmbBkgArea[i]->GetYaxis()->SetTitle(
"#it{p}_{T,jet}^{emb} - #sum#it{p}_{T,const}^{emb} (GeV/#it{c})");
404 histname =
"fHistRhoVSEmbBkg_";
408 fHistRhoVSEmbBkg[i]->GetYaxis()->SetTitle(
"#it{p}_{T,jet}^{emb} - #sum#it{p}_{T,const}^{emb} (GeV/#it{c})");
411 histname =
"fHistDeltaPtEmbArea_";
420 histname =
"fHistDeltaPtEmbvsEP_";
468 while (ep < 0) ep += TMath::Pi();
469 while (ep >= TMath::Pi()) ep -= TMath::Pi();
486 if (dphi > 4.8) dphi -= TMath::Pi() * 2;
487 if (dphi < -1.6) dphi += TMath::Pi() * 2;
505 if (dphi > 4.8) dphi -= TMath::Pi() * 2;
506 if (dphi < -1.6) dphi += TMath::Pi() * 2;
537 while (embJet != 0) {
541 Double_t distLeading2Jet = TMath::Sqrt((embJet->
Eta() - mom.Eta()) * (embJet->
Eta() - mom.Eta()) + (embJet->
Phi() - mom.Phi()) * (embJet->
Phi() - mom.Phi()));
558 while (ep < 0) ep += TMath::Pi();
559 while (ep >= TMath::Pi()) ep -= TMath::Pi();
595 if (!tracks && !clusters)
611 if (maxPhi > TMath::Pi() * 2) maxPhi = TMath::Pi() * 2;
612 if (minPhi < 0) minPhi = 0;
618 eta =
gRandom->Rndm() * (maxEta - minEta) + minEta;
619 phi =
gRandom->Rndm() * (maxPhi - minPhi) + minPhi;
620 dLJ = TMath::Sqrt((LJeta - eta) * (LJeta - eta) + (LJphi - phi) * (LJphi - phi));
622 if(bPartialExclusion) {
634 if(rnd.Rndm()<=prob) reject = kTRUE;
638 }
while (dLJ <
fMinRC2LJ && repeats < 999 && reject);
640 if (repeats == 999) {
641 AliWarning(Form(
"%s: Could not get random cone!", GetName()));
646 clusters->ResetCurrentID();
649 TLorentzVector nPart;
650 cluster->GetMomentum(nPart, const_cast<Double_t*>(
fVertex));
655 if (TMath::Abs(clusphi - phi) > TMath::Abs(clusphi - phi + 2 * TMath::Pi()))
656 clusphi += 2 * TMath::Pi();
657 if (TMath::Abs(clusphi - phi) > TMath::Abs(clusphi - phi - 2 * TMath::Pi()))
658 clusphi -= 2 * TMath::Pi();
660 Float_t d = TMath::Sqrt((cluseta - eta) * (cluseta - eta) + (clusphi - phi) * (clusphi - phi));
669 tracks->ResetCurrentID();
672 Float_t tracketa = track->Eta();
673 Float_t trackphi = track->Phi();
675 if (TMath::Abs(trackphi - phi) > TMath::Abs(trackphi - phi + 2 * TMath::Pi()))
676 trackphi += 2 * TMath::Pi();
677 if (TMath::Abs(trackphi - phi) > TMath::Abs(trackphi - phi - 2 * TMath::Pi()))
678 trackphi -= 2 * TMath::Pi();
680 Float_t d = TMath::Sqrt((tracketa - eta) * (tracketa - eta) + (trackphi - phi) * (trackphi - phi));
726 fRCperEvent = TMath::FloorNint(area / rcArea - 0.5);
736 AliWarning(Form(
"The parameter fMinRC2LJ = %f is too large for the considered acceptance. " 737 "Will use fMinRC2LJ = %f",
fMinRC2LJ, maxDist));
750 const Int_t nNCollBins = 7;
755 Double_t nColl[nNCollBins] = {14.7,13.,11.7,9.38,6.49,3.96,1.52};
757 for(
Int_t i = 0; i<nNCollBins; i++) {
765 AliWarning(Form(
"%s: Only works for pA analysis. Returning -1",GetName()));
AliParticleContainer * fRandTracksCont
Embedded clusters.
AliParticleContainer * fEmbTracksCont
Embedded jets.
TH2 ** fHistEmbPartPtvsJetPt
Pt-rho*A vs. area of embedded jets.
virtual AliVParticle * GetNextAcceptParticle()
TH1 ** fHistDistLeadPart2JetAxis
Pt vs jet pt - rho*A.
Double_t GetRhoVal() const
AliClusterContainer * fCaloClustersCont
Tracks.
TH1 ** fHistDeltaPtRCRand
deltaPt = Pt(RC) - A * rho, imposing min distance from leading jet with 1/ncoll probability ...
AliJetContainer * GetJetContainer(Int_t i=0) const
TH2 ** fHistEmbBkgArea
Distance between leading particle and jet axis.
Double_t fMCJetPtThreshold
TH2 * fHistRCPtExPartialLJVSDPhiLJ
Random cone pt, imposing min distance from leading jet, vs. deltaPhi leading jet. ...
TH1 ** fHistRCPt
Phi-Eta distribution of random cones.
TH2 * fHistRCPtExLJVSDPhiLJ
deltaPt = Pt(embjet) - Area(embjet) * rho - Pt(embtrack) vs. event plane
TH1 ** fHistDeltaPtRCExPartialLJ
deltaPt = Pt(RC) - A * rho, imposing min distance from leading jet
TH2 * fHistEmbJetsPhiEta
Random cone pt, imposing min distance from leading jet, vs. deltaPhi leading jet with 1/ncoll probabi...
Double_t fMinBinPt
min pt in histograms
Double_t fEPV0
!event plane V0
Int_t fCentBin
!event centrality bin
AliClusterContainer * fRandCaloClustersCont
Randomized tracks.
TH2 ** fHistDeltaPtEmbvsEP
deltaPt = Pt(embjet) - Area(embjet) * rho - Pt(embtrack) vs. Area(embjet)
void UserCreateOutputObjects()
Container for particles within the EMCAL framework.
TH1 ** fHistRCPtRand
Random cone pt, imposing min distance from leading jet with 1/ncoll probability.
void SetConeEtaPhiEMCAL()
AliParticleContainer * GetParticleContainer(Int_t i=0) const
Get particle container attached to this task.
TH3 ** fHistEmbJetsPtArea
deltaPt = Pt(RC) - A * rho, randomzied particles
AliEmcalJet * GetLeadingJet(const char *opt="")
void GetLeadingHadronMomentum(TLorentzVector &mom, const AliEmcalJet *jet) const
TH2 ** fHistDeltaPtRCvsEP
Area(RC) * rho vs. Pt(RC)
TH1 ** fHistRCPtExLJ
Random cone pt.
AliEmcalJet * NextEmbeddedJet(Bool_t reset=kFALSE)
TH3 ** fHistEmbJetsCorrPtArea
Pt vs. area of embedded jets.
TH2 ** fHistRhoVSEmbBkg
Pt(embjet) - Pt(embtrack) vs. area of embedded jets.
TH1 ** fHistDeltaPtRCExLJ
deltaPt = Pt(RC) - A * rho vs. event plane
TH1 ** fHistRCPtExPartialLJ
Random cone pt, imposing min distance from leading jet.
Int_t fNcentBins
how many centrality bins
AliClusterContainer * GetClusterContainer(Int_t i=0) const
Get cluster container attached to this task.
AliClusterContainer * fEmbCaloClustersCont
Embedded tracks.
BeamType fBeamType
!event beam type
Double_t fCent
!event centrality
TH2 ** fHistDeltaPtEmbArea
Area(embjet) * rho vs. Pt(embjet) - Pt(embtrack)
TH2 * fHistRCPhiEta
Rho vs. centrality.
TH2 ** fHistJetPtvsJetCorrPt
MC jet pt total jet pt - rho*A.
Double_t GetNColl() const
AliEmcalJet * GetNextAcceptJet()
void SetConePhiLimits(Float_t min, Float_t max)
void AllocateHistogramArrays()
AliParticleContainer * fTracksCont
Jets.
void GetRandomCone(Float_t &pt, Float_t &eta, Float_t &phi, AliParticleContainer *tracks, AliClusterContainer *clusters, AliEmcalJet *jet=0, Bool_t bPartialExclusion=0) const
Bool_t FillHistograms()
Function filling histograms.
TH2 * fHistRhovsCent
Randomized clusters.
void SetConeEtaLimits(Float_t min, Float_t max)
static Double_t * GenerateFixedBinArray(Int_t n, Double_t min, Double_t max)
AliEmcalList * fOutput
!output list
Double_t fMaxBinPt
max pt in histograms
Double_t fVertex[3]
!event vertex
void SetMakeGeneralHistograms(Bool_t g)
AliJetContainer * fEmbJetsCont
Clusters.
Base task in the EMCAL jet framework.
Represent a jet reconstructed using the EMCal jet framework.
void ExecOnce()
Perform steps needed to initialize the analysis.
void UserCreateOutputObjects()
Main initialization function on the worker.
TH2 ** fHistEmbPartPtvsJetCorrPt
MC jet pt total jet pt.
Container structure for EMCAL clusters.
AliVCluster * GetNextAcceptCluster()
AliJetContainer * fJetsCont
TH2 * fHistLeadPartPhiEta
Phi-Eta distribution of embedded jets.
Int_t fNbins
no. of pt bins
TH2 ** fHistRhoVSRCPt
Random cone pt, randomized particles.