AliPhysics  608b256 (608b256)
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 #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 Run();
74 
75  // Configuration
76  void RetrieveAndSetTaskPropertiesFromYAMLConfig();
77  void SetupJetContainersFromYAMLConfig();
78 
79  // QA histograms
80  void SetupQAHists();
81  void QAHists();
82  void FillQAHists();
83  // Cell QA
84  void SetupCellQAHistsWithPrefix(const std::string & prefix);
85  void SetupCellQAHists();
86  void FillCellQAHists(const std::string & prefix, AliVCaloCells * cells);
87  void FillCellQAHists();
88 
89  // Response matrix functions
90  void SetupResponseMatrixHists();
91  void ResponseMatrix();
92  void FillResponseMatrix(AliEmcalJet * jet1, AliEmcalJet * jet2);
93  ResponseMatrixFillWrapper CreateResponseMatrixFillWrapper(AliEmcalJet * jet) const;
94 
95  // Basic configuration
98 
99  // Histograms
102 
103  // Configuration options
106 
107  // QA variables
108  std::string fEmbeddedCellsName;
111 
112  // Response matrix variables
113  // Response matrix fill map
114  // For whatever reason, it appears that CINT can't handle this definition
115  #if !(defined(__CINT__) || defined(__MAKECINT__))
116  // For some reason, root can't handle this typedef
117  //typedef double ResponseMatrixFillWrapper::*MP;
118  //std::map <std::string, std::pair<int, MP>> fResponseMatrixFillMap; //!<!
119  std::map <std::string, std::pair<int, double ResponseMatrixFillWrapper::*>> fResponseMatrixFillMap;
120  #endif
124 
126 };
127 
128 } /* namespace EMCALJetTasks */
129 } /* namespace PWGJE */
130 
131 #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.
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 unumber of embedd...
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 unumber of embedded e...
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.