16 #include <TClonesArray.h> 24 #include <TClonesArray.h> 27 #include <THashList.h> 29 #include <TObjArray.h> 30 #include <TParameter.h> 32 #include <AliVCluster.h> 33 #include <AliVParticle.h> 44 #include "AliAnalysisUtils.h" 45 #include "AliESDEvent.h" 46 #include "AliEMCALTriggerPatchInfo.h" 48 #include "AliInputEventHandler.h" 50 #include "AliMultSelection.h" 51 #include "AliMultEstimator.h" 52 #include "AliOADBContainer.h" 68 fUseRecalcPatches(false),
73 fHistJetGammaPatchE(),
75 fHistJetGammaPatchPt(),
123 while ((obj = next())) {
144 while ((clusCont = static_cast<AliClusterContainer*>(next()))) {
145 groupname = clusCont->GetName();
148 histname = TString::Format(
"%s/histClusterEnergy_%d", groupname.Data(), cent);
149 histtitle = TString::Format(
"%s;#it{E}_{cluster} (GeV);counts", histname.Data());
152 histname = TString::Format(
"%s/histClusterEnergyExotic_%d", groupname.Data(), cent);
153 histtitle = TString::Format(
"%s;#it{E}_{cluster}^{exotic} (GeV);counts", histname.Data());
156 histname = TString::Format(
"%s/histClusterNonLinCorrEnergy_%d", groupname.Data(), cent);
157 histtitle = TString::Format(
"%s;#it{E}_{cluster}^{non-lin.corr.} (GeV);counts", histname.Data());
160 histname = TString::Format(
"%s/histClusterHadCorrEnergy_%d", groupname.Data(), cent);
161 histtitle = TString::Format(
"%s;#it{E}_{cluster}^{had.corr.} (GeV);counts", histname.Data());
164 histname = TString::Format(
"%s/histClusterPhi_%d", groupname.Data(), cent);
165 histtitle = TString::Format(
"%s;#it{#phi}_{custer};counts", histname.Data());
168 histname = TString::Format(
"%s/histClusterEta_%d", groupname.Data(), cent);
169 histtitle = TString::Format(
"%s;#it{#eta}_{custer};counts", histname.Data());
172 histname = TString::Format(
"%s/histNClusters_%d", groupname.Data(), cent);
173 histtitle = TString::Format(
"%s;number of clusters;events", histname.Data());
197 histname = TString::Format(
"%s/histCellEnergy_%d", groupname.Data(), cent);
198 histtitle = TString::Format(
"%s;#it{E}_{cell} (GeV);counts", histname.Data());
201 histname = TString::Format(
"%s/histNCells_%d", groupname.Data(), cent);
202 histtitle = TString::Format(
"%s;number of cells;events", histname.Data());
225 while ((partCont = static_cast<AliParticleContainer*>(next()))) {
226 groupname = partCont->GetName();
229 histname = TString::Format(
"%s/histTrackPt_%d", groupname.Data(), cent);
230 histtitle = TString::Format(
"%s;#it{p}_{T,track} (GeV/#it{c});counts", histname.Data());
233 histname = TString::Format(
"%s/histTrackPhi_%d", groupname.Data(), cent);
234 histtitle = TString::Format(
"%s;#it{#phi}_{track};counts", histname.Data());
237 histname = TString::Format(
"%s/histTrackEta_%d", groupname.Data(), cent);
238 histtitle = TString::Format(
"%s;#it{#eta}_{track};counts", histname.Data());
241 if (TClass(partCont->GetClassName()).InheritsFrom(
"AliVTrack")) {
242 histname = TString::Format(
"%s/fHistDeltaEtaPt_%d", groupname.Data(), cent);
243 histtitle = TString::Format(
"%s;#it{p}_{T,track}^{vertex} (GeV/#it{c});#it{#eta}_{track}^{vertex} - #it{#eta}_{track}^{EMCal};counts", histname.Data());
246 histname = TString::Format(
"%s/fHistDeltaPhiPt_%d", groupname.Data(), cent);
247 histtitle = TString::Format(
"%s;#it{p}_{T,track}^{vertex} (GeV/#it{c});#it{#phi}_{track}^{vertex} - #it{#phi}_{track}^{EMCal};counts", histname.Data());
250 histname = TString::Format(
"%s/fHistDeltaPtvsPt_%d", groupname.Data(), cent);
251 histtitle = TString::Format(
"%s;#it{p}_{T,track}^{vertex} (GeV/#it{c});#it{p}_{T,track}^{vertex} - #it{p}_{T,track}^{EMCal} (GeV/#it{c});counts", histname.Data());
254 histname = TString::Format(
"%s/fHistEoverPvsP_%d", groupname.Data(), cent);
255 histtitle = TString::Format(
"%s;#it{P}_{track} (GeV/#it{c});#it{E}_{cluster} / #it{P}_{track} #it{c};counts", histname.Data());
259 histname = TString::Format(
"%s/histNTracks_%d", groupname.Data(), cent);
260 histtitle = TString::Format(
"%s;number of tracks;events", histname.Data());
283 while ((jetCont = static_cast<AliJetContainer*>(next()))) {
284 groupname = jetCont->GetName();
287 histname = TString::Format(
"%s/histJetPt_%d", groupname.Data(), cent);
288 histtitle = TString::Format(
"%s;#it{p}_{T,jet} (GeV/#it{c});counts", histname.Data());
291 histname = TString::Format(
"%s/histJetClusterEnergy_%d", groupname.Data(), cent);
292 histtitle = TString::Format(
"%s;#it{E}_{JetClus} (GeV);counts", histname.Data());
295 histname = TString::Format(
"%s/histJetTrkPt_%d", groupname.Data(), cent);
296 histtitle = TString::Format(
"%s;#it{p}_{T,JetTrk} (GeV/#it{c});counts", histname.Data());
300 histname = TString::Format(
"%s/fHistJetJetPatchE_%d", groupname.Data(), cent);
301 histtitle = TString::Format(
"%s;#it{E}_{JetGammaPatch} (GeV);counts", histname.Data());
304 histname = TString::Format(
"%s/fHistJetGammaPatchE_%d", groupname.Data(), cent);
305 histtitle = TString::Format(
"%s;#it{E}_{JetGammaPatch} (GeV);counts", histname.Data());
308 histname = TString::Format(
"%s/fHistJetJetPatchPt_%d", groupname.Data(), cent);
309 histtitle = TString::Format(
"%s;#it{P}_{t,JetJetPatch} (GeV/#it{c});counts", histname.Data());
312 histname = TString::Format(
"%s/fHistJetGammaPatchPt_%d", groupname.Data(), cent);
313 histtitle = TString::Format(
"%s;#it{E}_{JetGammaPatch} (GeV/#it{c});counts", histname.Data());
316 histname = TString::Format(
"%s/fHistTriggerPatchE_%d", groupname.Data(), cent);
317 histtitle = TString::Format(
"%s;#it{E}_{TriggerPatch} (GeV);counts", histname.Data());
320 histname = TString::Format(
"%s/fHistDeltaEtaDeltaPhiJE_%d", groupname.Data(), cent);
321 histtitle = TString::Format(
"%s;#it{#phi}_{jet} - #it{#phi}_{JE,patch};#it{#eta}_{Jet} - #it{#eta}_{JE,patch};counts", histname.Data());
324 histname = TString::Format(
"%s/fHistDeltaEtaDeltaPhiGA_%d", groupname.Data(), cent);
325 histtitle = TString::Format(
"%s;#it{#phi}_{jet} - #it{#phi}_{GA,patch};#it{#eta}_{Jet} - #it{#eta}_{GA,patch};counts", histname.Data());
328 histname = TString::Format(
"%s/fHistJetEPatchEJE_%d", groupname.Data(), cent);
329 histtitle = TString::Format(
"%s;#it{E_{JE,patch}}#it{E_{Jet,UnCorr}};counts", histname.Data());
332 histname = TString::Format(
"%s/fHistJetEPatchEGA_%d", groupname.Data(), cent);
333 histtitle = TString::Format(
"%s;#it{E_{GA,patch}};#it{E_{Jet,UnCorr}};counts", histname.Data());
337 histname = TString::Format(
"%s/histJetArea_%d", groupname.Data(), cent);
338 histtitle = TString::Format(
"%s;#it{A}_{jet};counts", histname.Data());
341 histname = TString::Format(
"%s/histJetPhi_%d", groupname.Data(), cent);
342 histtitle = TString::Format(
"%s;#it{#phi}_{jet};counts", histname.Data());
345 histname = TString::Format(
"%s/histJetEta_%d", groupname.Data(), cent);
346 histtitle = TString::Format(
"%s;#it{#eta}_{jet};counts", histname.Data());
349 histname = TString::Format(
"%s/histJetClusterPhi_%d", groupname.Data(), cent);
350 histtitle = TString::Format(
"%s;#it{#phi}_{JetClus};counts", histname.Data());
353 histname = TString::Format(
"%s/histJetClusterEta_%d", groupname.Data(), cent);
354 histtitle = TString::Format(
"%s;#it{#eta}_{JetClus};counts", histname.Data());
357 histname = TString::Format(
"%s/histNJets_%d", groupname.Data(), cent);
358 histtitle = TString::Format(
"%s;number of jets;events", histname.Data());
367 histname = TString::Format(
"%s/histJetCorrPt_%d", groupname.Data(), cent);
368 histtitle = TString::Format(
"%s;#it{p}_{T,jet}^{corr} (GeV/#it{c});counts", histname.Data());
406 while ((jetCont = static_cast<AliJetContainer*>(next()))) {
407 groupname = jetCont->GetName();
409 for(
auto jet : jetCont->
accepted()) {
413 histname = TString::Format(
"%s/histJetPt_%d", groupname.Data(),
fCentBin);
416 histname = TString::Format(
"%s/histJetClusterEnergy_%d", groupname.Data(),
fCentBin);
419 histname = TString::Format(
"%s/histJetArea_%d", groupname.Data(),
fCentBin);
422 histname = TString::Format(
"%s/histJetPhi_%d", groupname.Data(),
fCentBin);
425 histname = TString::Format(
"%s/histJetEta_%d", groupname.Data(),
fCentBin);
428 Double_t MatchedEta = 0.04, MatchedPhi = 0.04;
435 if (!cls.InheritsFrom(
"AliEMCALTriggerPatchInfo")) {
436 AliError(Form(
"%s: Objects of type %s in %s are not inherited from AliEMCALTriggerPatchInfo!",GetName(), cls.GetName(),
"EmcalTriggers"));
442 AliError(Form(
"%s: Unable to get trigger patch container with name %s. Aborting", GetName(),
"EmcalTriggers"));
446 AliEMCALTriggerPatchInfo *currentpatch(
nullptr);
448 AliEMCALTriggerPatchInfo *currentpatch =
static_cast<AliEMCALTriggerPatchInfo *
>(p);
451 if(currentpatch->IsGammaLowRecalc() || currentpatch->IsGammaLowSimple()){
452 histname = TString::Format(
"%s/fHistDeltaEtaDeltaPhiGA_%d", groupname.Data(),
fCentBin);
453 fHistManager.
FillTH2(histname, jet->Phi() - currentpatch->GetPhiGeo(), jet->Eta() - currentpatch->GetEtaGeo());
454 histname = TString::Format(
"%s/fHistJetEPatchEGA_%d", groupname.Data(),
fCentBin);
457 if(jet->Phi() - currentpatch->GetPhiGeo() <= MatchedPhi && jet->Eta() - currentpatch->GetEtaGeo() <= MatchedEta){
458 histname = TString::Format(
"%s/fHistJetGammaPatchE_%d", groupname.Data(),
fCentBin);
460 histname = TString::Format(
"%s/fHistJetGammaPatchPt_%d", groupname.Data(),
fCentBin);
467 if(currentpatch->IsJetLowRecalc() || currentpatch->IsJetLowSimple()){
468 histname = TString::Format(
"%s/fHistDeltaEtaDeltaPhiJE_%d", groupname.Data(),
fCentBin);
469 fHistManager.
FillTH2(histname, jet->Phi() - currentpatch->GetPhiGeo(), jet->Eta() - currentpatch->GetEtaGeo());
470 histname = TString::Format(
"%s/fHistJetEPatchEJE_%d", groupname.Data(),
fCentBin);
473 if(jet->Phi() - currentpatch->GetPhiGeo() <= MatchedPhi && jet->Eta() - currentpatch->GetEtaGeo() <= MatchedEta){
474 histname = TString::Format(
"%s/fHistJetJetPatchE_%d", groupname.Data(),
fCentBin);
476 histname = TString::Format(
"%s/fHistJetJetPatchPt_%d", groupname.Data(),
fCentBin);
487 for (
Int_t it = 0; it < jet->GetNumberOfTracks(); it++) {
488 AliVParticle *JetTrk = jet->TrackAt(it, tracks->GetArray());
491 histname = TString::Format(
"%s/histJetTrkPt_%d", groupname.Data(),
fCentBin);
500 for(
auto cluster : JetCluster->
accepted()) {
502 cluster->GetMomentum(nPart,
fVertex);
503 histname = TString::Format(
"%s/histJetClusterEnergy_%d", groupname.Data(),
fCentBin);
505 histname = TString::Format(
"%s/histJetClusterPhi_%d", groupname.Data(),
fCentBin);
507 histname = TString::Format(
"%s/histJetClusterEta_%d", groupname.Data(),
fCentBin);
514 histname = TString::Format(
"%s/histJetCorrPt_%d", groupname.Data(),
fCentBin);
518 histname = TString::Format(
"%s/histNJets_%d", groupname.Data(),
fCentBin);
535 while ((partCont = static_cast<AliParticleContainer*>(next()))) {
536 groupname = partCont->GetName();
542 histname = TString::Format(
"%s/histTrackPt_%d", groupname.Data(),
fCentBin);
545 histname = TString::Format(
"%s/histTrackPhi_%d", groupname.Data(),
fCentBin);
548 histname = TString::Format(
"%s/histTrackEta_%d", groupname.Data(),
fCentBin);
551 if (partCont->GetLoadedClass()->InheritsFrom(
"AliVTrack")) {
552 const AliVTrack* track =
static_cast<const AliVTrack*
>(
part);
554 histname = TString::Format(
"%s/fHistDeltaEtaPt_%d", groupname.Data(),
fCentBin);
557 histname = TString::Format(
"%s/fHistDeltaPhiPt_%d", groupname.Data(),
fCentBin);
560 histname = TString::Format(
"%s/fHistDeltaPtvsPt_%d", groupname.Data(),
fCentBin);
564 Int_t iCluster = track->GetEMCALcluster();
568 histname = TString::Format(
"%s/fHistEoverPvsP_%d", groupname.Data(),
fCentBin);
576 histname = TString::Format(
"%s/histNTracks_%d", groupname.Data(),
fCentBin);
591 while ((clusCont = static_cast<AliClusterContainer*>(next()))) {
592 groupname = clusCont->GetName();
594 for(
auto cluster : clusCont->
all()) {
595 if (!cluster)
continue;
597 if (cluster->GetIsExotic()) {
598 histname = TString::Format(
"%s/histClusterEnergyExotic_%d", groupname.Data(),
fCentBin);
604 for(
auto cluster : clusCont->
accepted()) {
605 if (!cluster)
continue;
609 cluster->GetMomentum(nPart,
fVertex);
611 histname = TString::Format(
"%s/histClusterEnergy_%d", groupname.Data(),
fCentBin);
614 histname = TString::Format(
"%s/histClusterNonLinCorrEnergy_%d", groupname.Data(),
fCentBin);
617 histname = TString::Format(
"%s/histClusterHadCorrEnergy_%d", groupname.Data(),
fCentBin);
620 histname = TString::Format(
"%s/histClusterPhi_%d", groupname.Data(),
fCentBin);
623 histname = TString::Format(
"%s/histClusterEta_%d", groupname.Data(),
fCentBin);
627 histname = TString::Format(
"%s/histNClusters_%d", groupname.Data(),
fCentBin);
648 for (
Short_t pos = 0; pos < ncells; pos++) {
680 if (!cls.InheritsFrom(
"AliEMCALTriggerPatchInfo")) {
681 AliError(Form(
"%s: Objects of type %s in %s are not inherited from AliEMCALTriggerPatchInfo!",GetName(), cls.GetName(),
"EmcalTriggers"));
687 AliError(Form(
"%s: Unable to get trigger patch container with name %s. Aborting", GetName(),
"EmcalTriggers"));
691 AliEMCALTriggerPatchInfo *recpatch =
static_cast<AliEMCALTriggerPatchInfo *
>(p);
757 cout<<
"*****************************"<<endl;
758 cout<<
"******* Task Finished *******"<<endl;
759 cout<<
"*****************************"<<endl;
THashList * CreateHistoGroup(const char *groupname)
Create a new group of histograms within a parent group.
TObjArray fClusterCollArray
cluster collection array
void AllocateCellHistograms()
Double_t GetRhoVal() const
const TString & GetRhoName() const
virtual ~AliAnalysisTaskEmcalJetSpectra8TeVTriggerQA()
void FillTH2(const char *hname, double x, double y, double weight=1., Option_t *opt="")
Fill a 2D histogram within the container.
Declaration of class AliTLorentzVector.
void Terminate(Option_t *option)
Double_t fMinBinPt
min pt in histograms
AliClusterContainer * GetClusterContainer() const
THistManager fHistManager
Histogram manager.
Int_t fCentBin
!event centrality bin
Declaration of class AliAnalysisTaskEmcalJetSpectra8TeVTriggerQA.
void AllocateClusterHistograms()
void AllocateJetHistograms()
TString part
use mixed event to constrain combinatorial background
Container for particles within the EMCAL framework.
void SetCaloTriggerPatchInfoName(const char *n)
AliAnalysisTaskEmcalJetSpectra8TeVTriggerQA()
TObjArray fParticleCollArray
particle/track collection array
const AliClusterIterableContainer all() const
AliParticleContainer * GetParticleContainer() const
TH2 * CreateTH2(const char *name, const char *title, int nbinsx, double xmin, double xmax, int nbinsy, double ymin, double ymax, Option_t *opt="")
Create a new TH2 within the container.
Bool_t fUseRecalcPatches
Switch between offline (FEE) and recalc (L1) patches.
TH1F * fHistJetPt
Numb Jets Per Event.
THashList * GetListOfHistograms() const
Get the list of histograms.
void AllocateTrackHistograms()
Double_t Phi_0_2pi() const
Implementation of a EMCal spectra task and QA for EMCal triggers.
TH1 * CreateTH1(const char *name, const char *title, int nbins, double xmin, double xmax, Option_t *opt="")
Create a new TH1 within the container.
BeamType fForceBeamType
forced beam type
Int_t fNcentBins
how many centrality bins
AliClusterContainer * GetClusterContainer(Int_t i=0) const
Get cluster container attached to this task.
AliVCluster * GetAcceptCluster(Int_t i) const
TH1F * fHistJetJetPatchPt
Jet-Gamma Trigger Patch E.
const AliClusterIterableContainer accepted() const
TString fCaloCellsName
name of calo cell collection
void FillTH1(const char *hname, double x, double weight=1., Option_t *opt="")
Fill a 1D histogram within the container.
TObjArray fJetCollArray
jet collection array
AliVCaloCells * fCaloCells
!cells
AliRhoParameter * GetRhoParameter()
TH1F * fHistTriggerPatchE
Jet-Gamma Trigger Patch Pt.
AliEmcalList * fOutput
!output list
TH1F * fHistJetGammaPatchE
Jet-Jet Trigger Patch E.
Double_t fMaxBinPt
max pt in histograms
TH1F * fHistJetGammaPatchPt
Jet-Jet Trigger Patch Pt.
void UserCreateOutputObjects()
Double_t fVertex[3]
!event vertex
void SetMakeGeneralHistograms(Bool_t g)
TClonesArray * fTriggerPatchInfo
!trigger patch info array
Base task in the EMCAL jet framework.
const AliParticleIterableContainer accepted() const
void UserCreateOutputObjects()
Main initialization function on the worker.
const AliJetIterableContainer accepted() const
Container structure for EMCAL clusters.
Container for jet within the EMCAL jet framework.
Int_t fNbins
no. of pt bins
TH1F * fHistJetJetPatchE
Jet Pt Dist.