AliPhysics  abafffd (abafffd)
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 #include "AliEventCuts.h"
17 #include "THistManager.h"
18 #include "AliYAMLConfiguration.h"
20 #include "AliEmcalEmbeddingQA.h"
22 
23 // operator<< has to be forward declared carefully to stay in the global namespace so that it works with CINT.
24 // For generally how to keep the operator in the global namespace, See: https://stackoverflow.com/a/38801633
25 namespace PWGJE { namespace EMCALJetTasks { class AliAnalysisTaskEmcalJetHPerformance; } }
26 std::ostream & operator<< (std::ostream &in, const PWGJE::EMCALJetTasks::AliAnalysisTaskEmcalJetHPerformance &myTask);
28 
29 namespace PWGJE {
30 namespace EMCALJetTasks {
31 
33  public:
38  double fPt;
39  double fArea;
40  double fPhi;
43  double fDistance;
44  double fCentrality;
45  };
46 
48  AliAnalysisTaskEmcalJetHPerformance(const char * name);
49  // Additional constructors
53  // Avoid implementing move since c++11 is not allowed in the header
54 
55  void UserCreateOutputObjects();
56 
57  // Initialize the task
58  // Configuration is handled via the YAML configuration file
59  bool Initialize();
60  void AddConfigurationFile(const std::string & configurationPath, const std::string & configName = "") { fYAMLConfig.AddConfiguration(configurationPath, configName); }
61 
62  // Utility functions
63  // AddTask
64  static AliAnalysisTaskEmcalJetHPerformance * AddTaskEmcalJetHPerformance(const char * suffix = "");
65  // Printing
66  std::string toString() const;
67  friend std::ostream & ::operator<<(std::ostream &in, const AliAnalysisTaskEmcalJetHPerformance &myTask);
68  void Print(Option_t* opt = "") const;
69  std::ostream & Print(std::ostream &in) const;
70 
71  private:
72 
73  Bool_t IsEventSelected();
74  Bool_t Run();
75 
76  // Configuration
77  void RetrieveAndSetTaskPropertiesFromYAMLConfig();
78  void SetupJetContainersFromYAMLConfig();
79 
80  // QA histograms
81  void SetupQAHists();
82  void QAHists();
83  void FillQAHists();
84 
85  // Response matrix functions
86  void SetupResponseMatrixHists();
87  void ResponseMatrix();
88  void FillResponseMatrix(AliEmcalJet * jet1, AliEmcalJet * jet2);
89  ResponseMatrixFillWrapper CreateResponseMatrixFillWrapper(AliEmcalJet * jet) const;
90 
91  // Basic configuration
94  AliEventCuts fEventCuts;
95 
96  // Histograms
99 
100  // Configuration options
104 
105  // QA variables
106  std::string fEmbeddedCellsName;
107 
108  // Response matrix variables
109  // Response matrix fill map
110  // For whatever reason, it appears that CINT can't handle this definition
111  #if !(defined(__CINT__) || defined(__MAKECINT__))
112  // For some reason, root can't handle this typedef
113  //typedef double ResponseMatrixFillWrapper::*MP;
114  //std::map <std::string, std::pair<int, MP>> fResponseMatrixFillMap; //!<!
115  std::map <std::string, std::pair<int, double ResponseMatrixFillWrapper::*>> fResponseMatrixFillMap;
116  #endif
120 
122 };
123 
124 } /* namespace EMCALJetTasks */
125 } /* namespace PWGJE */
126 
127 #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) ...
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.
ELeadingHadronBiasType_t
Determine the jet leading hadron bias type.
AliEventCuts fEventCuts
AliEventCuts to handle event selection.
std::ostream & operator<<(std::ostream &in, const PWGJE::EMCALJetTasks::AliAnalysisTaskEmcalJetHPerformance &myTask)
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
double fMinFractionShared
Minimum fraction of shared jet pt required for matching a hybrid jet to detector level.
bool fUseAliEventCuts
If true, use AliEventCuts for event selection instead of IsEventSelected.
Container for jet within the EMCAL jet framework.