AliPhysics  c7b8e89 (c7b8e89)
AliAnalysisTaskEmcalJetPerformance.h
Go to the documentation of this file.
1 #ifndef AliAnalysisTaskEmcalJetPerformance_H
2 #define AliAnalysisTaskEmcalJetPerformance_H
3 
4 /**********************************************************************************
5  * Copyright (C) 2016, Copyright Holders of the ALICE Collaboration *
6  * All rights reserved. *
7  * *
8  * Redistribution and use in source and binary forms, with or without *
9  * modification, are permitted provided that the following conditions are met: *
10  * * Redistributions of source code must retain the above copyright *
11  * notice, this list of conditions and the following disclaimer. *
12  * * Redistributions in binary form must reproduce the above copyright *
13  * notice, this list of conditions and the following disclaimer in the *
14  * documentation and/or other materials provided with the distribution. *
15  * * Neither the name of the <organization> nor the *
16  * names of its contributors may be used to endorse or promote products *
17  * derived from this software without specific prior written permission. *
18  * *
19  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND *
20  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED *
21  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
22  * DISCLAIMED. IN NO EVENT SHALL ALICE COLLABORATION BE LIABLE FOR ANY *
23  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES *
24  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; *
25  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND *
26  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *
27  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS *
28  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
29  * *********************************************************************************/
30 
41 #include "THistManager.h"
42 
43 #include "AliEventCuts.h"
45 #include "AliEmcalEmbeddingQA.h"
46 
48  public:
49 
51  AliAnalysisTaskEmcalJetPerformance(const char *name) ;
53 
54 
56  const char *ntracks = "usedefault",
57  const char *nclusters = "usedefault",
58  const char *nGenLev = "mcparticles",
59  const Double_t minTrPt = 0.15, // Minimum track pT in standard track container
60  const Double_t minClPt = 0.30, // Minimum cluster E in standard cluster container
61  const char *suffix = "");
62 
63  // Truth-level particle types
65  kUndefined = -1,
66  kPhoton = 0,
68  kProton = 2,
71  kK0L = 5,
72  kNeutron = 6,
74  kElectron = 8,
75  kMuon = 9,
76  kOther = 10
77  };
78 
79  // Detector-level particle types, based on PhysicalPrimary contributors
80  enum ParticleType {
81  kNotDefined = -1,
88  kSingleK0L = 6,
94  kMergedPi0 = 12,
99  };
100 
101  enum ClusterType {
102  kNA = -1,
103  kEMCal = 0,
104  kDCal = 1,
105  };
106 
107  void UserCreateOutputObjects() ;
108 
109  // Setters
110  void SetMinPt(Double_t d) { fMinPt = d; }
111  void SetMaxPt(Double_t d) { fMaxPt = d; }
124  void SetPlotDCal(Bool_t b) { fPlotDCal = b; }
135 
136 
137  protected:
138  virtual void ExecOnce() ;
139  virtual Bool_t FillHistograms() ;
140  virtual Bool_t Run() ;
141  virtual Bool_t IsEventSelected() ;
142  virtual void RunChanged(Int_t run) ;
143 
144  // Analysis and plotting functions
145  void GenerateHistoBins() ;
146  void AllocateJetHistograms() ;
153  void FillJetHistograms() ;
154  void FillClusterHistograms() ;
157  void FillParticleCompositionClusterHistograms(const AliMCEvent* mcevent);
158  void FillParticleCompositionJetHistograms(const AliMCEvent* mcevent);
159  void SetParticleTypeLabels(TAxis* axis) ;
160  void ComputeBackground() ;
161  void DoTriggerSimulation() ;
162  void FillTriggerSimHistograms() ;
163  void FillMatchedJetHistograms() ;
164  void ComputeJetMatches(AliJetContainer* jetCont1, AliJetContainer* jetCont2, Bool_t bUseJetCont2Acceptance);
166  const AliEmcalJet* GetMatchedPartLevelJet(const AliEmcalJet* jet, Double_t detJetPt);
167 
168  // Utility functions
169  Double_t GetJetPt(const AliEmcalJet* jet, Double_t rho);
170  Double_t GetDeltaR(const AliTLorentzVector* part, Double_t etaRef, Double_t phiRef);
171  Double_t GetJetType(const AliEmcalJet* jet);
172  ContributorType GetContributorType(const AliVCluster* clus, const AliMCEvent* mcevent, Int_t label);
173  Bool_t IsHadron(const ContributorType contributor);
174  Bool_t IsSignalJetOverlap(Bool_t isTrack, Int_t particleID, const AliJetContainer* jet, Int_t maxJetIds[]);
175  // Analysis parameters
187  // Plotting parameters
200 
201  // Track matching parameters (for cluster histogram plots)
204 
205  // Trigger parameters
211 
212  // Embedding parameters
224 
225  // Event selection
227  AliEventCuts fEventCuts;
230 
231  // MC options
233 
234  // Hist manager
236 
237  private:
240 
244 };
245 #endif
static AliAnalysisTaskEmcalJetPerformance * AddTaskEmcalJetPerformance(const char *ntracks="usedefault", const char *nclusters="usedefault", const char *nGenLev="mcparticles", const Double_t minTrPt=0.15, const Double_t minClPt=0.30, const char *suffix="")
double Double_t
Definition: External.C:58
TList * fEventCutList
! Output list for event cut histograms
Double_t GetJetPt(const AliEmcalJet *jet, Double_t rho)
Bool_t fUseAliEventCuts
Flag to use AliEventCuts (otherwise AliAnalysisTaskEmcal will be used)
void FillParticleCompositionJetHistograms(const AliMCEvent *mcevent)
Bool_t IsSignalJetOverlap(Bool_t isTrack, Int_t particleID, const AliJetContainer *jet, Int_t maxJetIds[])
AliMCParticleContainer * fGeneratorLevel
! generator level container
AliAnalysisTaskEmcalJetPerformance & operator=(const AliAnalysisTaskEmcalJetPerformance &)
QA Class for EMCal Embedding Framework.
Bool_t fPlotClusterHistograms
Set whether to plot cluster histograms.
Double_t GetDeltaR(const AliTLorentzVector *part, Double_t etaRef, Double_t phiRef)
Bool_t fDoJetMatchingGeometrical
Do geometrical matching between det-level and truth-level jet container.
Bool_t fComputeMBDownscaling
Set whether to compute and plot MB downscaling factors.
AliEmcalEmbeddingQA fEmbeddingQA
! QA hists for embedding (will only be added if embedding)
int Int_t
Definition: External.C:63
AliJetContainer * fMCJetContainer
!Pointer to jet container of truth-level jets
Double_t fTrackMatchingDeltaEtaMax
Maximum delta-eta to consider a track to be matched to a cluster.
Double_t fJetMatchingR
Jet matching R threshold.
void ComputeJetMatches(AliJetContainer *jetCont1, AliJetContainer *jetCont2, Bool_t bUseJetCont2Acceptance)
Double_t fTrackMatchingDeltaPhiMax
Maximum delta-phi to consider a track to be matched to a cluster.
Photon+Photon (not from same pi0) are the only contributors.
Bool_t fUseManualEventCuts
Flag to use manual event cuts.
Photon (direct or decay) is the only contributor.
Two particles from merged pi0 are the only contributors.
Bool_t fRequireMatchedJetAccepted
Flag to require matched truth jet to be accepted (aside from geometrical acceptance) ...
Bool_t fPlotJetHistograms
Set whether to enable inclusive jet histograms.
Int_t fNEoverPBins
! number of variable E/p bins
AliEventCuts fEventCuts
event selection utility
Bool_t fDoJetMatchingMCFraction
Do MC-fraction based matching using PbPb det-level, pp det-level, and pp truth-level jet containers...
Bool_t fPlotMatchedJetHistograms
Set whether to plot matched jet histograms.
void SetJetClosestCandidate(AliEmcalJet *jet1, AliEmcalJet *jet2)
Bool_t fkEMCEJE
! flag telling whether the event is "triggered" or not in "simulation"
const AliEmcalJet * GetMatchedPartLevelJet(const AliEmcalJet *jet, Double_t detJetPt)
Photon+Hadron are the only contributors, with Photon leading.
Double_t fMCJetMinMatchingPt
Min jet pT for MC jets being matched, for when container criteria is not applied. ...
Bool_t IsHadron(const ContributorType contributor)
Bool_t fComputeBackground
Set whether to enable study of background.
Double_t fMinSharedMomentumFraction
Minimum shared momentum (pp det-level track pT in combined jet) / (pp det-level track pT) ...
AliJetContainer * fDetJetContainerPPIntermediate
!Pointer to jet container of intermediate pp det-level jets, if MC-fraction matching ...
ContributorType GetContributorType(const AliVCluster *clus, const AliMCEvent *mcevent, Int_t label)
Int_t fNPtHistBins
! number of variable pt bins
Bool_t fFillChargedFluctuations
Set whether to fill also charged component of background fluctuations.
Bool_t fPlotParticleCompositionHistograms
Set whether to plot jet composition histograms.
Bool_t fDoClosureTest
Set whether to do thermal model closure test.
Bool_t fDoTriggerResponse
flag whether to compute max patch response, in case of MC
Base task in the EMCAL jet framework.
Represent a jet reconstructed using the EMCal jet framework.
Definition: AliEmcalJet.h:51
Container class for histograms.
Definition: THistManager.h:99
Int_t fNM02HistBins
! number of variable M02 bins
Double_t fMBUpscaleFactor
! inverse of downscale factor, for MB trigger
AliJetContainer * fDetJetContainer
!Pointer to jet container of det-level jets
Bool_t fPlotCellNonlinearityHistograms
Set whether to plot cell non-linearity histograms for embedding studies.
Bool_t fDoTriggerSimulation
Set whether to perform a simple trigger simulation.
bool Bool_t
Definition: External.C:53
Double_t fMedianDCal
! median patch energy in DCal, per event
Double_t fMedianEMCal
! median patch energy in EMCal, per event
Container for MC-true particles within the EMCAL framework.
Container for jet within the EMCAL jet framework.
Hadron+Photon are the only contributors, with Hadron leading.
void FillParticleCompositionClusterHistograms(const AliMCEvent *mcevent)
Bool_t fPlotDCal
Set whether to enable several DCal-specific histograms.
Double_t fPlotJetMatchCandThresh
Threshold for jet R to count candidates, affects plotting only.