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"
39 fDoMatchFullCharged(kTRUE),
40 fhnDiJetResponseCharged(0),
41 fhnDiJetResponseFullCharged(0),
42 fh1TriggersLostCharged(0),
43 fh1TriggersLostFull(0),
44 fh3AssocLostPtDeltaPhiCharged(0),
45 fh3AssocLostPtDeltaPhiFull(0),
46 fhnMatchingCharged(0),
52 SetMakeGeneralHistograms(kTRUE);
54 for(
Int_t i = 0; i<2; i++) {
55 fh1TriggersCharged[i] = 0;
56 fh1TriggersFull[i] = 0;
64 fDoMatchFullCharged(kTRUE),
65 fhnDiJetResponseCharged(0),
66 fhnDiJetResponseFullCharged(0),
67 fh1TriggersLostCharged(0),
68 fh1TriggersLostFull(0),
69 fh3AssocLostPtDeltaPhiCharged(0),
70 fh3AssocLostPtDeltaPhiFull(0),
71 fhnMatchingCharged(0),
79 for(
Int_t i = 0; i<2; i++) {
100 Bool_t oldStatus = TH1::AddDirectoryStatus();
101 TH1::AddDirectory(kFALSE);
104 const Int_t nBinsSparse0 = 10;
105 const Int_t nBinsPt = 250;
106 const Int_t nBinsDPhi = 36;
107 const Int_t nBinsKt = 25;
108 const Int_t nBinsDiJetEta = 40;
109 const Int_t nBinsAj = 50;
110 const Int_t nBinsVar[2] = {nBinsKt,nBinsDiJetEta};
116 const Double_t minVar[2] = { 0.,-1.};
117 const Double_t maxVar[2] = { 100., 1.};
122 fhnDiJetResponseCharged =
new THnSparseF(
"fhnDiJetResponseCharged",
"fhnDiJetResponseCharged;p_{T,trig}^{part};p_{T,trig}^{det};p_{T,ass}^{part};p_{T,ass}^{det};#Delta#varphi_{part};#Delta#varphi_{det};k_{T}^{part},k_{T}^{det};A_{j}^{part}A_{j}^{det}",nBinsSparse0,nBins0,xmin0,xmax0);
124 fhnDiJetResponseFullCharged =
new THnSparseF(
"fhnDiJetResponseFullCharged",
"fhnDiJetResponseFullCharged;p_{T,trig}^{part};p_{T,trig}^{det};p_{T,ass}^{part};p_{T,ass}^{det};#Delta#varphi_{part};#Delta#varphi_{det};k_{T}^{part},k_{T}^{det};A_{j}^{part}A_{j}^{det}",nBinsSparse0,nBins0,xmin0,xmax0);
140 for(
Int_t i = 0; i<2; i++) {
141 if(i==0) strType=
"Part";
142 else if(i==1) strType=
"Det";
143 fh1TriggersCharged[i] =
new TH1F(Form(
"fh1TriggersCharged%s",strType.Data()),Form(
"fh1TriggersCharged%s;p_{T,trig}^{ch}",strType.Data()),nBinsPt,minPt,maxPt);
146 fh1TriggersFull[i] =
new TH1F(Form(
"fh1TriggersFull%s",strType.Data()),Form(
"fh1TriggersFull%s;p_{T,trig}^{ch}",strType.Data()),nBinsPt,minPt,maxPt);
150 fh1TriggersLostCharged =
new TH1F(
"fh1TriggersLostCharged",
"fh1TriggersLostCharged;p_{T,trig}^{ch}",nBinsPt,minPt,maxPt);
153 fh1TriggersLostFull =
new TH1F(
"fh1TriggersLostFull",
"fh1TriggersLostFull;p_{T,trig}^{ch}",nBinsPt,minPt,maxPt);
156 fh3AssocLostPtDeltaPhiCharged =
new TH3F(
"fh3AssocLostPtDeltaPhiCharged",
"fh3AssocLostPtDeltaPhiCharged;p_{T,trig}^{ch};p_{T,assoc}^{ch};#Delta#varphi",nBinsPt,minPt,maxPt,nBinsPt,minPt,maxPt,nBinsDPhi,-0.5*TMath::Pi(),1.5*TMath::Pi());
159 fh3AssocLostPtDeltaPhiFull =
new TH3F(
"fh3AssocLostPtDeltaPhiFull",
"fh3AssocLostPtDeltaPhiFull;p_{T,trig}^{ch};p_{T,assoc}^{ch};#Delta#varphi",nBinsPt,minPt,maxPt,nBinsPt,minPt,maxPt,nBinsDPhi,-0.5*TMath::Pi(),1.5*TMath::Pi());
162 const Int_t nBinsSparseMatch = 6;
163 const Int_t nBinsDPhiMatch = 80;
164 const Int_t nBinsDEtaMatch = 80;
165 const Int_t nBinsDR = 20;
166 const Int_t nBinsType = 3;
167 const Int_t nBinsMatch[nBinsSparseMatch] = {nBinsPt,nBinsPt,nBinsDPhiMatch,nBinsDEtaMatch,nBinsDR,nBinsType};
169 const Double_t xminMatch[nBinsSparseMatch] = { minPt, minPt, -0.5,-0.5, 0., 0};
170 const Double_t xmaxMatch[nBinsSparseMatch] = { maxPt, maxPt, 0.5, 0.5, 0.5,3};
171 fhnMatchingCharged =
new THnSparseF(
"fhnMatchingCharged",
"fhnMatchingCharged;#it{p}_{T,part} (GeV/#it{c});#it{p}_{T,det} (GeV/#it{c});#Delta#varphi;#Delta#eta;#Delta R;type",
172 nBinsSparseMatch,nBinsMatch,xminMatch,xmaxMatch);
175 fhnMatchingFull =
new THnSparseF(
"fhnMatchingFull",
"fhnMatchingFull;#it{p}_{T,part} (GeV/#it{c});#it{p}_{T,det} (GeV/#it{c});#Delta#varphi;#Delta#eta;#Delta R;type",
176 nBinsSparseMatch,nBinsMatch,xminMatch,xmaxMatch);
187 THnSparse *hn =
dynamic_cast<THnSparse*
>(
fOutput->At(i));
191 TH1::AddDirectory(oldStatus);
242 AliWarning(Form(
"%s: leading-subleading correlation not implemented for response!",GetName()));
274 AliWarning(Form(
"%s: type %d of dijet correlation not defined!",GetName(),type));
279 Int_t nJetsAssoc = 0;
282 nJetsAssoc = nJetsTrig;
286 nJetsAssoc = nJetsTrig;
294 for(
Int_t ijt=0; ijt<nJetsTrig; ijt++) {
297 if(!jetTrigMC)
continue;
325 for(
Int_t ija=0; ija<nJetsAssoc; ija++) {
326 if(
IsSameJet(ijt,ija,type,kTRUE))
continue;
329 if(!jetAssocMC)
continue;
380 AliWarning(Form(
"%s: type %d of dijet correlation not defined!",GetName(),type));
395 for(
Int_t ijt=0; ijt<nJetsTrig; ijt++) {
398 if(!jetTrigMC)
continue;
427 if(!jetAssocMC)
continue;
443 if(type==0 || type==1) {
484 AliWarning(Form(
"%s: type %d of dijet correlation not defined!",GetName(),type));
492 Double_t varPart[2] = {TMath::Abs(jetTrigPtMC*TMath::Sin(
GetDeltaPhi(jetTrigMC,jetAssocMC))),(jetTrigMC->
Eta()+jetAssocMC->
Eta())/2.};
495 Double_t ajPart = (jetTrigPtMC-jetAssocPtMC)/(jetTrigPtMC+jetAssocPtMC);
527 if(!jetDet)
continue;
530 if(!jetPart)
continue;
536 jetPart->
Eta()-jetDet->
Eta(),
546 if(!jetDet)
continue;
549 if(!jetPart)
continue;
555 jetPart->
Eta()-jetDet->
Eta(),
AliAnalysisTaskEmcalDiJetResponse()
Int_t fnUsedResponseVar
sparse comparing matched particle and detector level charged jets
TH1F * fh1TriggersFull[2]
charged jet triggers
AliEmcalJet * ClosestJet() const
Bool_t IsSameJet(Int_t jt, Int_t ja, Int_t type, Bool_t isMC=kFALSE)
Int_t GetNJets(Int_t i=0) const
Double_t fPtMinTriggerJet
Double_t GetJetPt(const AliEmcalJet *jet, Int_t type)
TH3F * fh3AssocLostPtDeltaPhiCharged
lost full jet triggers
virtual ~AliAnalysisTaskEmcalDiJetResponse()
void MatchJetsGeo(Int_t cFull, Int_t cCharged, Int_t iDebug=0, Float_t maxDist=0.3, Int_t type=0)
void Terminate(Option_t *option)
TH1F * fh1TriggersLostCharged
full jet triggers
Double_t GetDeltaR(const AliEmcalJet *jet1, const AliEmcalJet *jet2) const
THnSparse * fhnDiJetResponseFullCharged
sparse with di-jet properties (full-full)
void CorrelateJets(const Int_t type)
ClassImp(AliAnalysisTaskEmcalDiJetResponse) AliAnalysisTaskEmcalDiJetResponse
virtual Bool_t RetrieveEventObjects()
void CorrelateTwoJets(const Int_t type)
TH1F * fh1TriggersCharged[2]
sparse with di-jet properties (full-full)
void UserCreateOutputObjects()
void UserCreateOutputObjects()
JetCorrelationType fJetCorrelationType
THnSparse * fhnMatchingFull
sparse comparing matched particle and detector level charged jets
TH1F * fh1TriggersLostFull
lost charged jet triggers
AliEmcalJet * GetAcceptJetFromArray(Int_t j, Int_t c=0) const
Double_t GetRhoVal(Int_t i=0) const
AliEmcalList * fOutput
!output list
Int_t fContainerChargedMC
void CorrelateAllJets(const Int_t type)
void SetMakeGeneralHistograms(Bool_t g)
Represent a jet reconstructed using the EMCal jet framework.
THnSparse * fhnMatchingCharged
lost full associated jet
void FillDiJetResponse(const AliEmcalJet *jetTrigMC=0, const AliEmcalJet *jetAssocMC=0, const AliEmcalJet *jetTrigDet=0, const AliEmcalJet *jetAssocDet=0, Int_t type=0)
THnSparse * fhnDiJetResponseCharged
void SetChargedFractionIndexMC()
AliEmcalJet * GetLeadingJetOppositeHemisphere(Int_t type, Int_t typea, const AliEmcalJet *jetTrig)
TH3F * fh3AssocLostPtDeltaPhiFull
lost charged associated jet
Bool_t RetrieveEventObjects()
Double_t GetDeltaPhi(const AliEmcalJet *jet1, const AliEmcalJet *jet2)