6 #include <TClonesArray.h>
10 #include <THnSparse.h>
12 #include <TLorentzVector.h>
19 #include "AliVCluster.h"
20 #include "AliVTrack.h"
25 #include "AliMCEvent.h"
26 #include "AliGenPythiaEventHeader.h"
27 #include "AliAODMCHeader.h"
28 #include "AliMCEvent.h"
29 #include "AliAnalysisManager.h"
31 #include "AliCentrality.h"
40 fDoMatchFullCharged(kTRUE),
46 fh3PtEtaPhiJetFull(0),
47 fh3PtEtaPhiJetCharged(0),
50 fhnDiJetVarsFullCharged(0),
51 fhnMatchingFullCharged(0),
53 fh3PtTrigKt1Kt2FuCh(0),
54 fh3PtTrigDPhi1DPhi2Ch(0),
55 fh3PtTrigDPhi1DPhi2FuCh(0)
59 for(
Int_t i=0; i<4; i++) {
60 fh3DiJetKtNEFPtAssoc[i] = 0;
61 fCentCorrPtAssocCh[i] = 0;
62 fCentCorrPtAssocFuCh[i] = 0;
63 fAjPtAssocCentCh[i] = 0;
64 fAjPtAssocCentFuCh[i] = 0;
65 fh3PtAssoc1PtAssoc2DPhi23Ch[i] = 0;
66 fh3PtAssoc1PtAssoc2DPhi23FuCh[i] = 0;
69 SetMakeGeneralHistograms(kTRUE);
75 fDoMatchFullCharged(kTRUE),
81 fh3PtEtaPhiJetFull(0),
82 fh3PtEtaPhiJetCharged(0),
85 fhnDiJetVarsFullCharged(0),
86 fhnMatchingFullCharged(0),
88 fh3PtTrigKt1Kt2FuCh(0),
89 fh3PtTrigDPhi1DPhi2Ch(0),
90 fh3PtTrigDPhi1DPhi2FuCh(0)
94 for(
Int_t i=0; i<4; i++) {
132 Bool_t oldStatus = TH1::AddDirectoryStatus();
133 TH1::AddDirectory(kFALSE);
135 const Int_t nBinsCent = 100;
139 const Int_t nBinsRho = 200;
142 fh2CentRhoCh =
new TH2F(
"fh2CentRhoCh",
"fh2CentRhoCh;centrality;#rho_{ch}",nBinsCent,minCent,maxCent,nBinsRho,minRho,maxRho);
144 fh2CentRhoScaled =
new TH2F(
"fh2CentRhoScaled",
"fh2CentRhoScaled;centrality;s_{EMC}#rho_{ch}",nBinsCent,minCent,maxCent,nBinsRho,minRho,maxRho);
147 const Int_t nBinsPt = 150;
150 const Int_t nBinsEta = 40;
153 const Int_t nBinsPhi = 18*6;
157 fh3PtEtaPhiJetFull =
new TH3F(
"fh3PtEtaPhiJetFull",
"fh3PtEtaPhiJetFull;#it{p}_{T}^{jet};#eta;#varphi",nBinsPt,minPt,maxPt,nBinsEta,minEta,maxEta,nBinsPhi,minPhi,maxPhi);
160 fh3PtEtaPhiJetCharged =
new TH3F(
"fh3PtEtaPhiJetCharged",
"fh3PtEtaPhiJetCharged;#it{p}_{T}^{jet};#eta;#varphi",nBinsPt,minPt,maxPt,nBinsEta,minEta,maxEta,nBinsPhi,minPhi,maxPhi);
163 const Int_t nBinsSparse0 = 7;
164 const Int_t nBinsPtW = 30;
165 const Int_t nBinsDPhi = 72;
170 const Int_t nBins0[nBinsSparse0] = {nBinsPtW,nBinsPtW,nBinsDPhi,nBinsKt,nBinsDiJetEta,nBinsCentr,nBinsAj};
172 const Double_t xmin0[nBinsSparse0] = { minPt, minPt, -0.5*TMath::Pi(), 0.,-1.,0. , 0.};
173 const Double_t xmax0[nBinsSparse0] = { maxPt, maxPt, 1.5*TMath::Pi(), 120., 1.,100., 1.};
174 const Double_t centArrayBins[8] = {0.,2.,5.,10.,20.,40.,60.,100.};
178 "fhnDiJetVarsCh;#it{p}_{T,1} (GeV/#it{c});#it{p}_{T,2} (GeV/#it{c});#Delta#varphi;#it{k}_{T} = #it{p}_{T,1}sin(#Delta#varphi) (GeV/#it{c});(#eta_{1}+#eta_{2})/2);centrality;#it{A}_{j}",
179 nBinsSparse0,nBins0,xmin0,xmax0);
186 "fhnDiJetVarsFullCharged;#it{p}_{T,1} (GeV/#it{c});#it{p}_{T,2} (GeV/#it{c});#Delta#varphi;#it{k}_{T} = #it{p}_{T,1}sin(#Delta#varphi) (GeV/#it{c});(#eta_{1}+#eta_{2})/2);centrality;#it{A}_{j}",
187 nBinsSparse0,nBins0,xmin0,xmax0);
194 "fhnDiJetVarsFull;#it{p}_{T,1} (GeV/#it{c});#it{p}_{T,2} (GeV/#it{c});#Delta#varphi;#it{k}_{T} = #it{p}_{T,1}sin(#Delta#varphi) (GeV/#it{c});(#eta_{1}+#eta_{2})/2);centrality;#it{A}_{j}",
195 nBinsSparse0,nBins0,xmin0,xmax0);
199 fh3PtTrigKt1Kt2Ch =
new TH3F(
"fh3PtTrigKt1Kt2Ch",
"fh3PtTrigKt1Kt2Ch;#it{p}_{T,1} (GeV/#it{c});#it{k}_{T,1};#it{k}_{T,2}",nBinsPt,minPt,maxPt,nBinsKt,0.,120.,nBinsKt,0.,120.);
202 fh3PtTrigKt1Kt2FuCh =
new TH3F(
"fh3PtTrigKt1Kt2FuCh",
"fh3PtTrigKt1Kt2FuCh;#it{p}_{T,1} (GeV/#it{c});#it{k}_{T,1};#it{k}_{T,2}",nBinsPt,minPt,maxPt,nBinsKt,0.,120.,nBinsKt,0.,120.);
205 fh3PtTrigDPhi1DPhi2Ch =
new TH3F(
"fh3PtTrigDPhi1DPhi2Ch",
"fh3PtTrigDPhi1DPhi2Ch;#it{p}_{T,1} (GeV/#it{c});#it{k}_{T,1};#it{k}_{T,2}",nBinsPt,minPt,maxPt,36,-0.5*TMath::Pi(),1.5*TMath::Pi(),36,-0.5*TMath::Pi(),1.5*TMath::Pi());
208 fh3PtTrigDPhi1DPhi2FuCh =
new TH3F(
"fh3PtTrigDPhi1DPhi2FuCh",
"fh3PtTrigDPhi1DPhi2FuCh;#it{p}_{T,1} (GeV/#it{c});#it{k}_{T,1};#it{k}_{T,2}",nBinsPt,minPt,maxPt,36,-0.5*TMath::Pi(),1.5*TMath::Pi(),36,-0.5*TMath::Pi(),1.5*TMath::Pi());
212 for(
Int_t i=0; i<4; i++) {
213 TString histoName = Form(
"fh3DiJetKtNEFPtAssoc_TrigBin%d",i);
214 fh3DiJetKtNEFPtAssoc[i] =
new TH3F(histoName.Data(),histoName.Data(),nBinsKt,0.,120.,50,0.,1.,nBinsPt,minPt,maxPt);
217 histoName = Form(
"fCentCorrPtAssocCh_TrigBin%d",i);
218 fCentCorrPtAssocCh[i] =
new TH3F(histoName.Data(),histoName.Data(),10,0.,100.,10,0.,100.,nBinsPt,minPt,maxPt);
221 histoName = Form(
"fCentCorrPtAssocFuCh_TrigBin%d",i);
222 fCentCorrPtAssocFuCh[i] =
new TH3F(histoName.Data(),histoName.Data(),10,0.,100.,10,0.,100.,nBinsPt,minPt,maxPt);
225 histoName = Form(
"fAjPtAssocCentCh_TrigBin%d",i);
226 fAjPtAssocCentCh[i] =
new TH3F(histoName.Data(),histoName.Data(),50,0.,1.,nBinsPt,minPt,maxPt,20,0.,100.);
229 histoName = Form(
"fAjPtAssocCentFuCh_TrigBin%d",i);
230 fAjPtAssocCentFuCh[i] =
new TH3F(histoName.Data(),histoName.Data(),50,0.,1.,nBinsPt,minPt,maxPt,20,0.,100.);
233 histoName = Form(
"fh3PtAssoc1PtAssoc2DPhi23Ch_TrigBin%d",i);
234 fh3PtAssoc1PtAssoc2DPhi23Ch[i] =
new TH3F(histoName.Data(),histoName.Data(),nBinsPt,minPt,maxPt,nBinsPt,minPt,maxPt,nBinsDPhi,-0.5*TMath::Pi(),1.5*TMath::Pi());
237 histoName = Form(
"fh3PtAssoc1PtAssoc2DPhi23FuCh_TrigBin%d",i);
238 fh3PtAssoc1PtAssoc2DPhi23FuCh[i] =
new TH3F(histoName.Data(),histoName.Data(),nBinsPt,minPt,maxPt,nBinsPt,minPt,maxPt,nBinsDPhi,-0.5*TMath::Pi(),1.5*TMath::Pi());
242 const Int_t nBinsSparseMatch = 7;
243 const Int_t nBinsDPhiMatch = 80;
244 const Int_t nBinsDEtaMatch = 80;
245 const Int_t nBinsDR = 20;
246 const Int_t nBinsFraction = 21;
247 const Int_t nBinsType = 3;
248 const Int_t nBinsMatch[nBinsSparseMatch] = {nBinsPt,nBinsPt,nBinsDPhiMatch,nBinsDEtaMatch,nBinsDR,nBinsFraction,nBinsType};
250 const Double_t xminMatch[nBinsSparseMatch] = { minPt, minPt, -0.5,-0.5, 0. ,0. ,0};
251 const Double_t xmaxMatch[nBinsSparseMatch] = { maxPt, maxPt, 0.5, 0.5, 0.5,1.05,3};
253 fhnMatchingFullCharged =
new THnSparseF(
"fhnMatchingFullCharged",
"fhnMatchingFullCharged;#it{p}_{T,full} (GeV/#it{c});#it{p}_{T,ch} (GeV/#it{c});#Delta#varphi;#Delta#eta;#Delta R;f_{ch};type",
254 nBinsSparseMatch,nBinsMatch,xminMatch,xmaxMatch);
265 THnSparse *hn =
dynamic_cast<THnSparse*
>(
fOutput->At(i));
272 TH1::AddDirectory(oldStatus);
286 for(
Int_t ij=0; ij<nJetsFull; ij++) {
295 for(
Int_t ij=0; ij<nJetsCh; ij++) {
378 AliWarning(Form(
"%s: type %d of dijet correlation not defined!",GetName(),type));
383 for(
Int_t ijt=0; ijt<nJetsTrig; ijt++) {
388 if(TMath::Abs(jetTrig->
Eta())>0.5)
407 if(type==0 || type==1) {
408 if(
GetJetPt(jetAssoc,typea)>jetTrigPt)
439 for(
Int_t ij=0; ij<nJets; ij++) {
443 if(TMath::Abs(jet->
Eta())>0.5)
498 return jetAssocLead2;
522 AliWarning(Form(
"%s: type %d of dijet correlation not defined!",GetName(),type));
529 for(
Int_t ijt=0; ijt<nJetsTrig; ijt++) {
533 if(TMath::Abs(jetTrig->
Eta())>0.5)
547 for(
Int_t ija=0; ija<nJetsAssoc; ija++) {
553 if(TMath::Abs(jetAssoc->
Eta())>0.5)
564 if(jetTrigPt>jetAssocPt)
593 AliWarning(Form(
"%s: type %d of dijet correlation not defined!",GetName(),type));
637 AliWarning(Form(
"%s: mode %d of dijet correlation not defined!",GetName(),mode));
646 Double_t kT = TMath::Abs(jetTrigPt*TMath::Sin(deltaPhi));
651 if((jetTrigPt+jetAssocPt)>0.) aj = (jetTrigPt-jetAssocPt)/(jetTrigPt+jetAssocPt);
653 Double_t diJetVars[7] = {jetTrigPt,jetAssocPt,deltaPhi,kT,dijetEta,
fCent,aj};
662 Double_t dPhiMin = TMath::Pi() - 1./3.*TMath::Pi();
663 Double_t dPhiMax = TMath::Pi() + 1./3.*TMath::Pi();
666 if(trigBin>-1 && trigBin<4) {
667 if(deltaPhi>dPhiMin && deltaPhi<dPhiMax)
674 AliCentrality *aliCent = InputEvent()->GetCentrality();
676 centZNA = aliCent->GetCentralityPercentile(
"ZNA");
677 if(trigBin>-1 && trigBin<4) {
678 if(deltaPhi>dPhiMin && deltaPhi<dPhiMax) {
717 AliWarning(Form(
"%s: mode %d of dijet correlation not defined!",GetName(),mode));
729 Double_t kT12 = TMath::Abs(jetTrigPt*TMath::Sin(deltaPhi12));
730 Double_t kT13 = TMath::Abs(jetTrigPt*TMath::Sin(deltaPhi13));
732 Double_t dPhiMin = TMath::Pi() - 1./3.*TMath::Pi();
733 Double_t dPhiMax = TMath::Pi() + 1./3.*TMath::Pi();
737 if(jetAssoc2Pt>20. && jetAssoc3Pt>20.) {
747 if(deltaPhi12>dPhiMin && deltaPhi12<dPhiMax) {
763 else if(pt>=40 && pt<60)
765 else if(pt>=60 && pt<80)
767 else if(pt>=80 && pt<100)
781 AliDebug(11,Form(
"%s: matching failed",GetName()));
785 for(
int ig = 0;ig <
GetNJets(cFull);++ig){
787 if(!jetFull)
continue;
797 jetFull->
Eta()-jetCh->
Eta(),
799 shFraction,TMath::Min((
Float_t)ig+0.5,2.5)
815 AliDebug(2,Form(
"%s: no full jets: %d", GetName(),
GetNJets(cFull)));
820 AliDebug(2,Form(
"%s: no charged jets: %d", GetName(),
GetNJets(cCharged)));
825 TClonesArray *cJetsCharged =
GetJetArray(cCharged);
828 AliDebug(2,Form(
"%s: no full jet array",GetName()));
833 AliDebug(2,Form(
"%s: no charged jet array",GetName()));
841 AliDebug(11,Form(
"%s: Matching already done before",GetName()));
TH3F * fh3PtEtaPhiJetFull
cent vs rho scaled
void UserCreateOutputObjects()
TH3F * fh3PtAssoc1PtAssoc2DPhi23FuCh[4]
ptAssoc1 vs ptAssoc2 vs DPhi23 for 3-jet events
void CorrelateAllJets(const Int_t type)
Double_t GetFractionSharedPt(const AliEmcalJet *jetFull, const AliEmcalJet *jetCharged) const
AliEmcalJet * GetJetFromArray(Int_t j, Int_t c=0) const
AliEmcalJet * ClosestJet() const
virtual ~AliAnalysisTaskEmcalDiJetAna()
Bool_t IsSameJet(Int_t jt, Int_t ja, Int_t type, Bool_t isMC=kFALSE)
THnSparse * fhnMatchingFullCharged
sparse with di-jet properties (full-charged)
Int_t GetNJets(Int_t i=0) const
Double_t fPtMinTriggerJet
Double_t GetJetPt(const AliEmcalJet *jet, Int_t type)
THnSparse * fhnDiJetVarsFull
pt,eta,phi of charged jets
void MatchJetsGeo(Int_t cFull, Int_t cCharged, Int_t iDebug=0, Float_t maxDist=0.3, Int_t type=0)
void FillDiJetHistos(const AliEmcalJet *jet1=0, const AliEmcalJet *jet2=0, const Int_t mode=0)
AliEmcalJet * GetLeadingAssociatedJet(const Int_t type, AliEmcalJet *jetTrig)
Int_t MatchFullAndChargedJets(Int_t cFull, Int_t cCharged)
void CorrelateLeadingSubleadingJets(const Int_t type)
TClonesArray * GetJetArray(Int_t i=0) const
Double_t GetDeltaR(const AliEmcalJet *jet1, const AliEmcalJet *jet2) const
virtual Bool_t RetrieveEventObjects()
void UserCreateOutputObjects()
TH3F * fh3PtEtaPhiJetCharged
pt,eta,phi of full jets
Bool_t fDoMatchFullCharged
JetCorrelationType fJetCorrelationType
Int_t fNcentBins
how many centrality bins
TH3F * fAjPtAssocCentFuCh[4]
Aj vs pT trigger assoc vs centrality.
void FillMatchFullChargedHistos(Int_t cFull, Int_t cCharged)
Double_t fCent
!event centrality
Int_t GetPtTriggerBin(Double_t pt)
AliEmcalJet * GetAcceptJetFromArray(Int_t j, Int_t c=0) const
TH3F * fAjPtAssocCentCh[4]
default(V0A) vs ZNA centrality vs pT trigger assoc
TH3F * fh3PtTrigKt1Kt2FuCh
ptTrig vs kT1 vs kT2 for 3-jet events
void SetChargedFractionIndex()
AliEmcalJet * GetLeadingJet(const Int_t type)
THnSparse * fhnDiJetVarsCh
sparse with di-jet properties (full-full)
AliEmcalJet * GetSecondLeadingAssociatedJet(const Int_t type, AliEmcalJet *jetTrig)
TH3F * fh3PtAssoc1PtAssoc2DPhi23Ch[4]
ptTrig vs DPhi12 vs DPhi13 for 3-jet events
TH3F * fCentCorrPtAssocFuCh[4]
default(V0A) vs ZNA centrality vs pT trigger assoc
Double_t GetRhoVal(Int_t i=0) const
THnSparse * fhnDiJetVarsFullCharged
sparse with di-jet properties (charged-charged)
void CorrelateTwoJets(const Int_t type)
AliEmcalList * fOutput
!output list
void Terminate(Option_t *option)
Bool_t RetrieveEventObjects()
ClassImp(AliAnalysisTaskEmcalDiJetAna) AliAnalysisTaskEmcalDiJetAna
AliAnalysisTaskEmcalDiJetAna()
TH3F * fh3PtTrigKt1Kt2Ch
Aj vs pT trigger assoc vs centrality.
void SetMakeGeneralHistograms(Bool_t g)
void FillThreeJetHistos(const AliEmcalJet *jet1=0, const AliEmcalJet *jet2=0, const AliEmcalJet *jet3=0, const Int_t mode=0)
TH3F * fh3DiJetKtNEFPtAssoc[4]
sparse comparing full with matched charged jet
Represent a jet reconstructed using the EMCal jet framework.
TH3F * fCentCorrPtAssocCh[4]
dijet kt vs NEF vs pTassoc for 4 trigger intervals
TH3F * fh3PtTrigDPhi1DPhi2Ch
ptTrig vs kT1 vs kT2 for 3-jet events
TH2F * fh2CentRhoScaled
cent vs rho charged
AliEmcalJet * GetSecondLeadingJetOppositeHemisphere(Int_t type, Int_t typea, const AliEmcalJet *jetTrig)
AliEmcalJet * GetLeadingJetOppositeHemisphere(Int_t type, Int_t typea, const AliEmcalJet *jetTrig)
TH3F * fh3PtTrigDPhi1DPhi2FuCh
ptTrig vs DPhi12 vs DPhi13 for 3-jet events
void CorrelateJets(const Int_t type)
Double_t GetDeltaPhi(const AliEmcalJet *jet1, const AliEmcalJet *jet2)