AliPhysics  9b6b435 (9b6b435)
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 "THistManager.h"
17 #include "AliYAMLConfiguration.h"
19 #include "AliEmcalEmbeddingQA.h"
21 
22 // operator<< has to be forward declared carefully to stay in the global namespace so that it works with CINT.
23 // For generally how to keep the operator in the global namespace, See: https://stackoverflow.com/a/38801633
24 namespace PWGJE { namespace EMCALJetTasks { class AliAnalysisTaskEmcalJetHPerformance; } }
25 std::ostream & operator<< (std::ostream &in, const PWGJE::EMCALJetTasks::AliAnalysisTaskEmcalJetHPerformance &myTask);
27 
28 namespace PWGJE {
29 namespace EMCALJetTasks {
30 
32  public:
37  double fPt;
38  double fArea;
39  double fPhi;
42  double fDistance;
43  double fCentrality;
44  };
45 
47  AliAnalysisTaskEmcalJetHPerformance(const char * name);
48  // Additional constructors
52  // Avoid implementing move since c++11 is not allowed in the header
53 
54  void UserCreateOutputObjects();
55 
56  // Initialize the task
57  // Configuration is handled via the YAML configuration file
58  bool Initialize();
59  void AddConfigurationFile(const std::string & configurationPath, const std::string & configName = "") { fYAMLConfig.AddConfiguration(configurationPath, configName); }
60 
61  // Utility functions
62  // AddTask
63  static AliAnalysisTaskEmcalJetHPerformance * AddTaskEmcalJetHPerformance(const char * suffix = "");
64  // Printing
65  std::string toString() const;
66  friend std::ostream & ::operator<<(std::ostream &in, const AliAnalysisTaskEmcalJetHPerformance &myTask);
67  void Print(Option_t* opt = "") const;
68  std::ostream & Print(std::ostream &in) const;
69 
70  private:
71 
72  Bool_t Run();
73 
74  // Configuration
75  void RetrieveAndSetTaskPropertiesFromYAMLConfig();
76  void SetupJetContainersFromYAMLConfig();
77 
78  // QA histograms
79  void SetupQAHists();
80  void QAHists();
81  void FillQAHists();
82 
83  // Response matrix functions
84  void SetupResponseMatrixHists();
85  void ResponseMatrix();
86  void FillResponseMatrix(AliEmcalJet * jet1, AliEmcalJet * jet2);
87  ResponseMatrixFillWrapper CreateResponseMatrixFillWrapper(AliEmcalJet * jet) const;
88 
89  // Basic configuration
92 
93  // Histograms
96 
97  // Configuration options
100 
101  // QA variables
102  std::string fEmbeddedCellsName;
103 
104  // Response matrix variables
105  // Response matrix fill map
106  // For whatever reason, it appears that CINT can't handle this definition
107  #if !(defined(__CINT__) || defined(__MAKECINT__))
108  // For some reason, root can't handle this typedef
109  //typedef double ResponseMatrixFillWrapper::*MP;
110  //std::map <std::string, std::pair<int, MP>> fResponseMatrixFillMap; //!<!
111  std::map <std::string, std::pair<int, double ResponseMatrixFillWrapper::*>> fResponseMatrixFillMap;
112  #endif
116 
118 };
119 
120 } /* namespace EMCALJetTasks */
121 } /* namespace PWGJE */
122 
123 #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.
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.
Container for jet within the EMCAL jet framework.