6 #include <TClonesArray.h>
10 #include <THnSparse.h>
12 #include <TLorentzVector.h>
22 #include "AliVCluster.h"
23 #include "AliVTrack.h"
28 #include "AliAnalysisManager.h"
32 #include "AliAODEvent.h"
38 namespace EmcalHJetMassAnalysis {
41 AliAnalysisTaskEmcalHJetMass::AliAnalysisTaskEmcalHJetMass() :
47 fMinFractionShared(0),
51 fTriggerTrackType(kInclusive),
63 fh3PtJet1VsMassVsHPtAllSel(0),
64 fh3PtJet1VsMassVsHPtAllSelMatch(0),
65 fh3PtJet1VsMassVsHPtTagged(0),
66 fh3PtJet1VsMassVsHPtTaggedMatch(0),
67 fh3PtJet1VsRatVsHPtAllSel(0),
68 fh3PtJet1VsRatVsHPtAllSelMatch(0),
69 fh3PtJet1VsRatVsHPtTagged(0),
70 fh3PtJet1VsRatVsHPtTaggedMatch(0),
124 fDoNSHJetAna(kFALSE),
127 fMinFractionShared(0),
131 fTriggerTrackType(kInclusive),
143 fh3PtJet1VsMassVsHPtAllSel(0),
144 fh3PtJet1VsMassVsHPtAllSelMatch(0),
145 fh3PtJet1VsMassVsHPtTagged(0),
146 fh3PtJet1VsMassVsHPtTaggedMatch(0),
147 fh3PtJet1VsRatVsHPtAllSel(0),
148 fh3PtJet1VsRatVsHPtAllSelMatch(0),
149 fh3PtJet1VsRatVsHPtTagged(0),
150 fh3PtJet1VsRatVsHPtTaggedMatch(0),
217 Bool_t oldStatus = TH1::AddDirectoryStatus();
218 TH1::AddDirectory(kFALSE);
220 const Int_t nBinsPt = 200;
224 const Int_t nBinsM = 90;
228 const Int_t nBinsR = 100;
232 const Int_t nBinsPtH = 100;
236 const Int_t nBinsPhi = 18*4;
237 const Double_t minPhi = -0.5*TMath::Pi();
238 const Double_t maxPhi = 1.5*TMath::Pi();
240 const Int_t nBinsSparse0 = 4;
241 const Int_t nBins0[nBinsSparse0] = {nBinsPt,nBinsM,nBinsPtH,nBinsM};
242 const Double_t xmin0[nBinsSparse0] = { minPt, minM, minPtH, minM};
243 const Double_t xmax0[nBinsSparse0] = { maxPt, maxM, maxPtH, maxM};
248 histName = TString::Format(
"fh1PtHadron_%d",i);
249 histTitle = TString::Format(
"%s;#it{p}_{T,h}",histName.Data());
250 fh1PtHadron[i] =
new TH1F(histName.Data(),histTitle.Data(),200.,0.,200.);
253 histName = TString::Format(
"fh1PtHadronMatch_%d",i);
254 histTitle = TString::Format(
"%s;#it{p}_{T,h}",histName.Data());
255 fh1PtHadronMatch[i] =
new TH1F(histName.Data(),histTitle.Data(),200.,0.,200.);
256 fOutput->Add(fh1PtHadronMatch[i]);
258 histName = TString::Format(
"fh1PhiHadron_%d",i);
259 histTitle = TString::Format(
"%s;#varphi",histName.Data());
260 fh1PhiHadron[i] =
new TH1F(histName.Data(),histTitle.Data(),nBinsPhi,0.,TMath::TwoPi());
263 histName = TString::Format(
"fh3PtHPtJDPhi_%d",i);
264 histTitle = TString::Format(
"%s;#it{p}_{T,h};#it{p}_{T,jet};#Delta#varphi_{h,jet}",histName.Data());
265 fh3PtHPtJDPhi[i] =
new TH3F(histName.Data(),histTitle.Data(),nBinsPtH,minPtH,maxPtH,nBinsPt,minPt,maxPt,nBinsPhi,minPhi,maxPhi);
266 fOutput->Add(fh3PtHPtJDPhi[i]);
269 histName = TString::Format(
"fh3PtJet1VsMassVsHPtAllSel_%d",i);
270 histTitle = TString::Format(
"%s;#it{p}_{T,jet1};#it{M}_{jet1};#it{p}_{T,h}",histName.Data());
271 fh3PtJet1VsMassVsHPtAllSel[i] =
new TH3F(histName.Data(),histTitle.Data(),nBinsPt,minPt,maxPt,nBinsM,minM,maxM,nBinsPtH,minPtH,maxPtH);
272 fOutput->Add(fh3PtJet1VsMassVsHPtAllSel[i]);
274 histName = TString::Format(
"fh3PtJet1VsMassVsHPtAllSelMatch_%d",i);
275 histTitle = TString::Format(
"%s;#it{p}_{T,jet1};#it{M}_{jet1};#it{p}_{T,h}",histName.Data());
276 fh3PtJet1VsMassVsHPtAllSelMatch[i] =
new TH3F(histName.Data(),histTitle.Data(),nBinsPt,minPt,maxPt,nBinsM,minM,maxM,nBinsPtH,minPtH,maxPtH);
277 fOutput->Add(fh3PtJet1VsMassVsHPtAllSelMatch[i]);
279 histName = TString::Format(
"fh3PtJet1VsMassVsHPtTagged_%d",i);
280 histTitle = TString::Format(
"%s;#it{p}_{T,jet1};#it{M}_{jet1};#it{p}_{T,h}",histName.Data());
281 fh3PtJet1VsMassVsHPtTagged[i] =
new TH3F(histName.Data(),histTitle.Data(),nBinsPt,minPt,maxPt,nBinsM,minM,maxM,nBinsPtH,minPtH,maxPtH);
282 fOutput->Add(fh3PtJet1VsMassVsHPtTagged[i]);
284 histName = TString::Format(
"fh3PtJet1VsMassVsHPtTaggedMatch_%d",i);
285 histTitle = TString::Format(
"%s;#it{p}_{T,jet1};#it{M}_{jet1};#it{p}_{T,h}",histName.Data());
286 fh3PtJet1VsMassVsHPtTaggedMatch[i] =
new TH3F(histName.Data(),histTitle.Data(),nBinsPt,minPt,maxPt,nBinsM,minM,maxM,nBinsPtH,minPtH,maxPtH);
287 fOutput->Add(fh3PtJet1VsMassVsHPtTaggedMatch[i]);
290 histName = TString::Format(
"fh3PtJet1VsRatVsHPtAllSel_%d",i);
291 histTitle = TString::Format(
"%s;#it{p}_{T,jet1};#it{M}_{jet1}/#it{p}_{T,jet1};#it{p}_{T,h}",histName.Data());
292 fh3PtJet1VsRatVsHPtAllSel[i] =
new TH3F(histName.Data(),histTitle.Data(),nBinsPt,minPt,maxPt,nBinsR,minR,maxR,nBinsPtH,minPtH,maxPtH);
293 fOutput->Add(fh3PtJet1VsRatVsHPtAllSel[i]);
295 histName = TString::Format(
"fh3PtJet1VsRatVsHPtAllSelMatch_%d",i);
296 histTitle = TString::Format(
"%s;#it{p}_{T,jet1};#it{M}_{jet1}/#it{p}_{T,jet1};#it{p}_{T,h}",histName.Data());
297 fh3PtJet1VsRatVsHPtAllSelMatch[i] =
new TH3F(histName.Data(),histTitle.Data(),nBinsPt,minPt,maxPt,nBinsR,minR,maxR,nBinsPtH,minPtH,maxPtH);
298 fOutput->Add(fh3PtJet1VsRatVsHPtAllSelMatch[i]);
300 histName = TString::Format(
"fh3PtJet1VsRatVsHPtTagged_%d",i);
301 histTitle = TString::Format(
"%s;#it{p}_{T,jet1};#it{M}_{jet1}/#it{p}_{T,jet1};#it{p}_{T,h}",histName.Data());
302 fh3PtJet1VsRatVsHPtTagged[i] =
new TH3F(histName.Data(),histTitle.Data(),nBinsPt,minPt,maxPt,nBinsR,minR,maxR,nBinsPtH,minPtH,maxPtH);
303 fOutput->Add(fh3PtJet1VsRatVsHPtTagged[i]);
305 histName = TString::Format(
"fh3PtJet1VsRatVsHPtTaggedMatch_%d",i);
306 histTitle = TString::Format(
"%s;#it{p}_{T,jet1};#it{M}_{jet1}/#it{p}_{T,jet1};#it{p}_{T,h}",histName.Data());
307 fh3PtJet1VsRatVsHPtTaggedMatch[i] =
new TH3F(histName.Data(),histTitle.Data(),nBinsPt,minPt,maxPt,nBinsR,minR,maxR,nBinsPtH,minPtH,maxPtH);
308 fOutput->Add(fh3PtJet1VsRatVsHPtTaggedMatch[i]);
312 histName = TString::Format(
"fhnAllSel_%d",i);
313 histTitle = Form(
"%s;#it{p}_{T,jet}^{AS};#it{M}_{jet}^{AS};#it{p}_{T,h}^{NS};#it{M}_{jet}^{NS}",histName.Data());
314 fhnAllSel[i] =
new THnSparseF(histName.Data(),histTitle.Data(),nBinsSparse0,nBins0,xmin0,xmax0);
317 histName = TString::Format(
"fhnAllSelMatch_%d",i);
318 histTitle = Form(
"%s;#it{p}_{T,jet}^{AS};#it{M}_{jet}^{AS};#it{p}_{T,h}^{NS};#it{M}_{jet}^{NS}",histName.Data());
319 fhnAllSelMatch[i] =
new THnSparseF(histName.Data(),histTitle.Data(),nBinsSparse0,nBins0,xmin0,xmax0);
320 fOutput->Add(fhnAllSelMatch[i]);
322 histName = TString::Format(
"fhnTagged_%d",i);
323 histTitle = Form(
"%s;#it{p}_{T,jet}^{AS};#it{M}_{jet}^{AS};#it{p}_{T,h}^{NS};#it{M}_{jet}^{NS}",histName.Data());
324 fhnTagged[i] =
new THnSparseF(histName.Data(),histTitle.Data(),nBinsSparse0,nBins0,xmin0,xmax0);
327 histName = TString::Format(
"fhnTaggedMatch_%d",i);
328 histTitle = Form(
"%s;#it{p}_{T,jet}^{AS};#it{M}_{jet}^{AS};#it{p}_{T,h}^{NS};#it{M}_{jet}^{NS}",histName.Data());
329 fhnTaggedMatch[i] =
new THnSparseF(histName.Data(),histTitle.Data(),nBinsSparse0,nBins0,xmin0,xmax0);
330 fOutput->Add(fhnTaggedMatch[i]);
334 TH1::AddDirectory(oldStatus);
348 if(!pCont || !jCont)
return kFALSE;
350 AliVParticle *vp = NULL;
353 pCont->ResetCurrentID();
361 jCont->ResetCurrentID();
380 jCont->ResetCurrentID();
398 pCont->ResetCurrentID();
400 if(vp->Pt()>=ptmin && vp->Pt()<
ptmax ) {
402 arr.SetAt(pCont->GetCurrentID(),counter);
405 if(counter<0)
return NULL;
409 Int_t trigID = arr.At(TMath::FloorNint(rnd));
413 Double_t phiOp = vp->Phi()+TMath::Pi();
414 if(phiOp>TMath::TwoPi()) phiOp-=TMath::TwoPi();
416 if(phiOpMin<0.) phiOpMin+=TMath::TwoPi();
418 if(phiOpMax>TMath::TwoPi()) phiOpMax-=TMath::TwoPi();
433 if(ptJet<0. || ptJet>0.) rat = mJet/ptJet;
435 Double_t var[4] = {ptJet,mJet,pt,-99.};
456 jetUS = jetContUS->
GetJet(i);
459 if(ifound==1) ilab = i;
462 if(ifound>1) AliDebug(2,Form(
"Found %d partners",ifound));
463 if(ifound==0) jetUS = 0x0;
464 else jetUS = jetContUS->
GetJet(ilab);
474 else mcMatch = kFALSE;
511 jCont->ResetCurrentID();
515 for (
Int_t i = 0; i < n; i++) {
518 if(vp->Phi()==vp2->Phi())
return jet;
546 if(dPhi <-0.5*TMath::Pi()) dPhi += TMath::TwoPi();
547 if(dPhi > 1.5*TMath::Pi()) dPhi -= TMath::TwoPi();
TH3F ** fh3PtJet1VsRatVsHPtTagged
all jets after std selection pt vs mass/pt vs track pt matched to MC
virtual AliVParticle * GetNextAcceptParticle()
AliEmcalJet * GetTaggedJet() const
TH3F ** fh3PtJet1VsMassVsHPtAllSel
pt hadron vs pt jet vs delta phi
Bool_t RetrieveEventObjects()
Retrieve common objects from event.
AliJetContainer * GetJetContainer(Int_t i=0) const
Int_t GetTagStatus() const
virtual ~AliAnalysisTaskEmcalHJetMass()
TH3F ** fh3PtJet1VsMassVsHPtTaggedMatch
tagged jets pt vs mass vs track pt
Int_t GetNParticles() const
Double_t GetDeltaPhi(const AliVParticle *vp, const AliEmcalJet *jet) const
void Terminate(Option_t *option)
void AddTriggerTrackPtCuts(Float_t min, Float_t max)
THnSparse ** fhnAllSel
tagged jets pt vs mas/pts vs track pt matched to MC
TH3F ** fh3PtJet1VsMassVsHPtTagged
all jets after std selection pt vs mass vs track pt matched to MC
Int_t fCentBin
!event centrality bin
Bool_t RetrieveEventObjects()
Double_t fMinFractionShared
Container for particles within the EMCAL framework.
Int_t TrackAt(Int_t idx) const
UShort_t GetNumberOfTracks() const
AliParticleContainer * GetParticleContainer(Int_t i=0) const
Get particle container attached to this task.
AliParticleContainer * GetParticleContainer() const
AliAnalysisTaskEmcalHJetMass()
TH1F ** fh1PhiHadron
pt of hadrons matched to MC
AliVParticle * GetSingleInclusiveTT(AliParticleContainer *pCont, Double_t ptmin, Double_t ptmax) const
virtual AliVParticle * GetParticle(Int_t i=-1) const
Int_t fNcentBins
how many centrality bins
THnSparse ** fhnAllSelMatch
all jets after std selection pt vs mass vs track pt vs mass_NS
TH3F ** fh3PtJet1VsRatVsHPtAllSelMatch
all jets after std selection pt vs mass/pt vs track pt
TH3F ** fh3PtJet1VsMassVsHPtAllSelMatch
all jets after std selection pt vs mass vs track pt
Double_t GetSecondOrderSubtracted() const
Double_t GetJetMass(const AliEmcalJet *jet) const
AliEmcalJet * GetNextAcceptJet()
Double_t GetRhoVal(Int_t i=0) const
TH1F ** fh1PtHadronMatch
pt of hadrons
THnSparse ** fhnTagged
all jets after std selection pt vs mass vs track pt vs mass_NS matched to MC
Bool_t Run()
Run function. This is the core function of the analysis and contains the user code. Therefore users have to implement this function.
THnSparse ** fhnTaggedMatch
tagged jets pt vs mass vs track pt vs mass_NS
AliEmcalJet * FindNearSideJet(const AliVParticle *vp)
AliEmcalList * fOutput
!output list
void SetMakeGeneralHistograms(Bool_t g)
Base task in the EMCAL jet framework.
Represent a jet reconstructed using the EMCal jet framework.
void UserCreateOutputObjects()
Double_t GetFractionSharedPt(const AliEmcalJet *jet, AliParticleContainer *cont2=0x0) const
void UserCreateOutputObjects()
Main initialization function on the worker.
TH3F ** fh3PtHPtJDPhi
phi of hadrons
Bool_t FillHJetHistograms(const AliVParticle *vp, const AliEmcalJet *jet)
TriggerTrackType fTriggerTrackType
TH3F ** fh3PtJet1VsRatVsHPtAllSel
tagged jets pt vs mass vs track pt matched to MC
AliEmcalJetShapeProperties * GetShapeProperties() const
TH3F ** fh3PtJet1VsRatVsHPtTaggedMatch
tagged jets pt vs mass/pt vs track pt
Container for jet within the EMCAL jet framework.
AliEmcalJet * GetJet(Int_t i) const