AliPhysics  master (3d17d9d)
AliAnalysisTaskEmcalJetHPerformance.h
Go to the documentation of this file.
1 #ifndef ALIANALYSISTASKEMCALJETHPERFORMANCE_H
2 #define ALIANALYSISTASKEMCALJETHPERFORMANCE_H
3 
12 #include <string>
13 
14 class AliJetContainer;
15 class AliEmcalJet;
16 class AliVCaloCells;
17 class AliQnCorrectionsManager;
18 #include "THistManager.h"
19 #include "AliYAMLConfiguration.h"
21 #include "AliEmcalEmbeddingQA.h"
23 
24 // operator<< has to be forward declared carefully to stay in the global namespace so that it works with CINT.
25 // For generally how to keep the operator in the global namespace, See: https://stackoverflow.com/a/38801633
26 namespace PWGJE { namespace EMCALJetTasks { class AliAnalysisTaskEmcalJetHPerformance; } }
27 std::ostream & operator<< (std::ostream &in, const PWGJE::EMCALJetTasks::AliAnalysisTaskEmcalJetHPerformance &myTask);
29 
30 namespace PWGJE {
31 namespace EMCALJetTasks {
32 
34  public:
39  double fPt;
40  double fArea;
41  double fPhi;
44  double fDistance;
45  double fCentrality;
46  };
47 
49  AliAnalysisTaskEmcalJetHPerformance(const char * name);
50  // Additional constructors
54  // Avoid implementing move since c++11 is not allowed in the header
55 
56  void UserCreateOutputObjects();
57 
58  // Initialize the task
59  // Configuration is handled via the YAML configuration file
60  bool Initialize();
61  void AddConfigurationFile(const std::string & configurationPath, const std::string & configName = "") { fYAMLConfig.AddConfiguration(configurationPath, configName); }
62 
63  // Utility functions
64  // AddTask
65  static AliAnalysisTaskEmcalJetHPerformance * AddTaskEmcalJetHPerformance(const char * suffix = "");
66  // Printing
67  std::string toString() const;
68  friend std::ostream & ::operator<<(std::ostream &in, const AliAnalysisTaskEmcalJetHPerformance &myTask);
69  void Print(Option_t* opt = "") const;
70  std::ostream & Print(std::ostream &in) const;
71 
72  private:
73 
74  Bool_t Run();
75 
76  // Helper functions
77  double DetermineTrackingEfficiency(double trackPt, double trackEta);
78 
79  // Configuration
80  void RetrieveAndSetTaskPropertiesFromYAMLConfig();
81  void SetupJetContainersFromYAMLConfig();
82  void SetupParticleContainersFromYAMLConfig();
83  void SetupClusterContainersFromYAMLConfig();
84 
85  // QA histograms
86  void SetupQAHists();
87  void QAHists();
88  void FillQAHists();
89  // Cell QA
90  void SetupCellQAHistsWithPrefix(const std::string & prefix);
91  void SetupCellQAHists();
92  void FillCellQAHists(const std::string & prefix, AliVCaloCells * cells);
93  void FillCellQAHists();
94 
95  // Jet matching
96  void SetupJetMatchingQA();
97  void ResetMatching(const AliJetContainer & jetCont) const;
98  bool PerformGeometricalJetMatching(AliJetContainer& contBase, AliJetContainer& contTag, double maxDist) const;
99  void FillJetMatchingQA(AliJetContainer& contBase, AliJetContainer& contTag, const std::string& prefix);
100 
101  // Response matrix functions
102  void SetupResponseMatrixHists();
103  void ResponseMatrix();
104  void FillResponseMatrix(AliEmcalJet* jet1, AliEmcalJet* jet2, const double jet1Rho);
105  ResponseMatrixFillWrapper CreateResponseMatrixFillWrapper(AliEmcalJet * jet, const double rho) const;
106 
107  // Basic configuration
110 
111  // Histograms
114 
115  // Configuration options
120 
121  // QA variables
122  std::string fEmbeddedCellsName;
126  AliQnCorrectionsManager *fFlowQnVectorManager;
127 
128  // Jet matching
130 
131  // Response matrix variables
132  // Response matrix fill map
133  // For whatever reason, it appears that CINT can't handle this definition
134  #if !(defined(__CINT__) || defined(__MAKECINT__))
135  // For some reason, root can't handle this typedef
136  //typedef double ResponseMatrixFillWrapper::*MP;
137  //std::map <std::string, std::pair<int, MP>> fResponseMatrixFillMap; //!<!
138  std::map <std::string, std::pair<int, double ResponseMatrixFillWrapper::*>> fResponseMatrixFillMap;
139  #endif
143 
145 };
146 
147 } /* namespace EMCALJetTasks */
148 } /* namespace PWGJE */
149 
150 #endif /* AliAnalysisTaskEmcalJetHPerformance.h */
Jet-hadron correlations task dedicated to performance of the analysis.
void Print(std::ostream &o, const char *name, Double_t dT, Double_t dVM, Double_t alldT, Double_t alldVM)
Definition: PlotSysInfo.C:121
void AddConfigurationFile(const std::string &configurationPath, const std::string &configName="")
bool fResponseFromThreeJetCollections
If true, the det level jets in collection 2 are only an intermediate step. They are used to get part ...
std::map< std::string, std::pair< int, double ResponseMatrixFillWrapper::* > > fResponseMatrixFillMap
! Map from axis title to pair of (jet number, function to retrieve fill value)
double fCentrality
! Centrality of the given jet (an event level property, but useful to here available here) ...
AliAnalysisTaskEmcalJetHUtils::EEfficiencyPeriodIdentifier_t fEfficiencyPeriodIdentifier
Identifies the period for determining the efficiency correction to apply.
AliEmcalEmbeddingQA fEmbeddingQA
! Embedding QA hists (will only be added if embedding).
PWG::Tools::AliYAMLConfiguration fYAMLConfig
YAML configuration file.
bool fCreateResponseMatrix
If true, create a response matrix with the available jet collections.
void swap(PWGJE::EMCALJetTasks::AliAnalysisTaskEmcalJetHPerformance &first, PWGJE::EMCALJetTasks::AliAnalysisTaskEmcalJetHPerformance &second)
QA Class for EMCal Embedding Framework.
std::string fEmbeddedCellsName
Set the embedded cells collection name.
AliAnalysisTaskEmcalJetHUtils::ELeadingHadronBiasType_t fLeadingHadronBiasType
Leading hadron in jet bias type (either charged, neutral, or both)
bool fConfigurationInitialized
True if the task configuration has been successfully initialized.
unsigned int UInt_t
Definition: External.C:33
ELeadingHadronBiasType_t
Determine the jet leading hadron bias type.
UInt_t fPreviousEventTrigger
Physics selection (offline trigger) of the previous event for determine why a small number of embedde...
bool fCreateCellQAHists
If true, create the Cell QA histograms. It doesn&#39;t gracefully turn off when not configured like the c...
std::ostream & operator<<(std::ostream &in, const PWGJE::EMCALJetTasks::AliAnalysisTaskEmcalJetHPerformance &myTask)
bool fPreviousEmbeddedEventSelected
True if the previous embedded event was selected. Used to determine why a small number of embedded ev...
AliQnCorrectionsManager * fFlowQnVectorManager
! Qn corrections framework manager.
YAML configuration class for AliPhysics.
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
const char Option_t
Definition: External.C:48
bool Bool_t
Definition: External.C:53
EEfficiencyPeriodIdentifier_t
Identify the beam type and period that is being analyzed.
double fMinFractionShared
Minimum fraction of shared jet pt required for matching a hybrid jet to detector level.
Container for jet within the EMCAL jet framework.