AliPhysics  764b6ea (764b6ea)
AliAnalysisTaskDmesonJetsDetectorResponse.h
Go to the documentation of this file.
1 
14 #ifndef ALIANALYSISTASKDMESONJETSDETECTORRESPONSE_H
15 #define ALIANALYSISTASKDMESONJETSDETECTORRESPONSE_H
16 
17 /**************************************************************************
18 * Copyright(c) 1998-2016, ALICE Experiment at CERN, All rights reserved. *
19 * *
20 * Author: The ALICE Off-line Project. *
21 * Contributors are mentioned in the code where appropriate. *
22 * *
23 * Permission to use, copy, modify and distribute this software and its *
24 * documentation strictly for non-commercial purposes is hereby granted *
25 * without fee, provided that the above copyright notice appears in all *
26 * copies and that both the copyright notice and this permission notice *
27 * appear in the supporting documentation. The authors make no claims *
28 * about the suitability of this software for any purpose. It is *
29 * provided "as is" without express or implied warranty. *
30 **************************************************************************/
31 
32 #include <vector>
33 #include "THistManager.h"
35 
37 {
38  public:
39 
45  public:
48 
49  virtual void Reset() = 0;
50  virtual void SetReconstructed(const AliDmesonJetInfo& reco) = 0;
51  virtual void SetGenerated(const AliDmesonJetInfo& truth) = 0;
53  virtual AliDmesonInfoSummary* GetGenerated() = 0;
54 
56  ClassDef(AliDmesonMatchInfoSummary, 1);
58  };
59 
66  public:
67  AliD0MatchInfoSummary() : AliDmesonMatchInfoSummary(), fReconstructed(), fGenerated() {}
68 
69  virtual void Reset();
70  virtual void SetReconstructed(const AliDmesonJetInfo& reco);
71  virtual void SetGenerated(const AliDmesonJetInfo& truth);
72 
73  virtual AliDmesonInfoSummary* GetReconstructed() { return &fReconstructed; }
74  virtual AliDmesonInfoSummary* GetGenerated() { return &fGenerated ; }
75 
78 
80  ClassDef(AliD0MatchInfoSummary, 2);
82  };
83 
90  public:
91  AliDStarMatchInfoSummary() : AliDmesonMatchInfoSummary(), fReconstructed(), fGenerated() {}
92 
93  virtual void Reset();
94  virtual void SetReconstructed(const AliDmesonJetInfo& reco);
95  virtual void SetGenerated(const AliDmesonJetInfo& truth);
96 
97  virtual AliDmesonInfoSummary* GetReconstructed() { return &fReconstructed; }
98  virtual AliDmesonInfoSummary* GetGenerated() { return &fGenerated ; }
99 
102 
104  ClassDef(AliDStarMatchInfoSummary, 1);
106  };
107 
112  class ResponseEngine : public TObject {
113  public:
114  ResponseEngine();
116  ResponseEngine(const ResponseEngine &source);
117  ResponseEngine& operator=(const ResponseEngine& source);
118  virtual ~ResponseEngine() {;}
119 
120  void SetMaxJetDmesonDistance(Double_t d) { fMaxJetDmesonDistance = d; }
121 
122  void SetReconstructedAnalysisEngine(AnalysisEngine* reco) { fRecontructed = reco; }
123  void SetGeneratedAnalysisEngine(AnalysisEngine* truth) { fGenerated = truth; }
124 
125  Bool_t CheckInit();
126  Bool_t IsInhibit() const { return fInhibit; }
127 
128  const char* GetName() const { return fName.Data(); }
129 
130  void RunAnalysis();
131 
132  TTree* BuildTree(const char* taskName);
133  TTree* GetTree() const { return fTree; }
134  Bool_t FillTree(Bool_t applyKinCuts);
135 
136  void AssignDataSlot(Int_t n) { fDataSlotNumber = n; }
137  Int_t GetDataSlotNumber() const { return fDataSlotNumber; }
138 
139  friend bool operator< (const ResponseEngine& lhs, const ResponseEngine& rhs);
140  friend inline bool operator> (const ResponseEngine& lhs, const ResponseEngine& rhs){ return rhs < lhs ; }
141  friend inline bool operator<=(const ResponseEngine& lhs, const ResponseEngine& rhs){ return !(lhs > rhs) ; }
142  friend inline bool operator>=(const ResponseEngine& lhs, const ResponseEngine& rhs){ return !(lhs < rhs) ; }
143 
144  friend bool operator==(const ResponseEngine& lhs, const ResponseEngine& rhs);
145  friend inline bool operator!=(const ResponseEngine& lhs, const ResponseEngine& rhs) { return !(lhs == rhs); }
146 
147  protected:
148 
152 
159 
162 
164 
166 
167  private:
168 
170  ClassDef(ResponseEngine, 2);
172  };
173 
175  AliAnalysisTaskDmesonJetsDetectorResponse(const char* name, Int_t nOutputTrees=2);
177 
178  virtual void UserCreateOutputObjects();
179  virtual void ExecOnce();
180  virtual Bool_t Run();
181  virtual Bool_t FillHistograms();
182 
184 
185  protected:
186 
187  virtual void SetOutputTypeInternal(EOutputType_t b);
188 
190 
192  std::vector<ResponseEngine> fResponseEngines ;
193 
194  private:
195 
198 
202 };
203 
204 #endif
Lightweight class that encapsulates D meson jets.
static AliAnalysisTaskDmesonJetsDetectorResponse * AddTaskDmesonJetsDetectorResponse(TString trackName, TString clusName, TString mcPartName, Int_t nMaxTrees, TString suffix)
Analysis task for D meson jets.
Lightweight class that encapsulates matching between reconstructed and generated D0 mesons...
double Double_t
Definition: External.C:58
virtual void SetGenerated(const AliDmesonJetInfo &truth)=0
Analysis task used to build a detector response for D meson jets.
Lightweight class that encapsulates D meson jets.
Analysis engine to produce detector response matrix in the D meson jet analysis.
Lightweight class that encapsulates D meson jets.
AliAnalysisTaskDmesonJetsDetectorResponse & operator=(const AliAnalysisTaskDmesonJetsDetectorResponse &source)
virtual void UserCreateOutputObjects()
Creates the output containers.
AliAnalysisTaskDmesonJetsDetectorResponse()
This is the default constructor, used for ROOT I/O purposes.
AnalysisEngine * fRecontructed
! Reconstructed level analysis engine
Lightweight class that encapsulates matching between reconstructed and generated D mesons...
int Int_t
Definition: External.C:63
Struct that encapsulates analysis parameters.
friend bool operator!=(const ResponseEngine &lhs, const ResponseEngine &rhs)
bool operator<(const AliAnalysisTaskDmesonJets::AliHFJetDefinition &lhs, const AliAnalysisTaskDmesonJets::AliHFJetDefinition &rhs)
Double_t fMaxJetDmesonDistance
Maximum distance between a generated D meson and a reconstructed jet, used for geometrical matching (...
Lightweight class that encapsulates D*.
THistManager fHistManagerResponse
Histogram manager for response.
virtual void SetReconstructed(const AliDmesonJetInfo &reco)=0
Lightweight class that encapsulates matching between reconstructed and generated D* mesons...
friend bool operator<=(const ResponseEngine &lhs, const ResponseEngine &rhs)
Container class for histograms.
Definition: THistManager.h:99
std::vector< ResponseEngine > fResponseEngines
! Response engines
friend bool operator>=(const ResponseEngine &lhs, const ResponseEngine &rhs)
bool operator==(const AliAnalysisTaskDmesonJets::AliHFJetDefinition &lhs, const AliAnalysisTaskDmesonJets::AliHFJetDefinition &rhs)
bool Bool_t
Definition: External.C:53
Lightweight class that encapsulates D0.
void FillTree(TTree *tree, TList &parList)
Definition: MakeTrend.C:331