AliPhysics  35e5fca (35e5fca)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 
33 
35 {
36  public:
37 
43  public:
46 
47  virtual void Reset() = 0;
48  virtual void SetReconstructed(const AliDmesonJetInfo& reco) = 0;
49  virtual void SetGenerated(const AliDmesonJetInfo& truth) = 0;
51  virtual AliDmesonInfoSummary* GetGenerated() = 0;
52 
54  ClassDef(AliDmesonMatchInfoSummary, 1);
56  };
57 
64  public:
66 
67  virtual void Reset();
68  virtual void SetReconstructed(const AliDmesonJetInfo& reco);
69  virtual void SetGenerated(const AliDmesonJetInfo& truth);
70 
72  virtual AliDmesonInfoSummary* GetGenerated() { return &fGenerated ; }
73 
74  AliD0InfoSummary fReconstructed ;
75  AliDmesonMCInfoSummary fGenerated ;
76 
78  ClassDef(AliD0MatchInfoSummary, 2);
80  };
81 
88  public:
90 
91  virtual void Reset();
92  virtual void SetReconstructed(const AliDmesonJetInfo& reco);
93  virtual void SetGenerated(const AliDmesonJetInfo& truth);
94 
96  virtual AliDmesonInfoSummary* GetGenerated() { return &fGenerated ; }
97 
100 
102  ClassDef(AliDStarMatchInfoSummary, 1);
104  };
105 
110  class ResponseEngine : public TObject {
111  public:
112  ResponseEngine();
114  ResponseEngine(const ResponseEngine &source);
115  ResponseEngine& operator=(const ResponseEngine& source);
116  virtual ~ResponseEngine() {;}
117 
119 
120  void SetReconstructedAnalysisEngine(AnalysisEngine* reco) { fRecontructed = reco; }
121  void SetGeneratedAnalysisEngine(AnalysisEngine* truth) { fGenerated = truth; }
122 
123  Bool_t CheckInit();
124  Bool_t IsInhibit() const { return fInhibit; }
125 
126  const char* GetName() const { return fName.Data(); }
127 
128  void RunAnalysis();
129 
130  TTree* BuildTree(const char* taskName);
131  TTree* GetTree() const { return fTree; }
132  Bool_t FillTree(Bool_t applyKinCuts, Bool_t findNoDMesonRecoJets);
133 
136 
137  friend bool operator==(const ResponseEngine& lhs, const ResponseEngine& rhs) { return (lhs.fCandidateType == rhs.fCandidateType);}
138  friend inline bool operator!=(const ResponseEngine& lhs, const ResponseEngine& rhs) { return !(lhs == rhs); }
139 
140  protected:
141 
145 
149  AliJetInfoSummary **fCurrentJetInfoReco ;
150  AliJetInfoSummary **fCurrentJetInfoTruth ;
152 
153  AnalysisEngine *fRecontructed ;
154  AnalysisEngine *fGenerated ;
155 
157 
158  private:
159 
161  ClassDef(ResponseEngine, 2);
163  };
164 
166  AliAnalysisTaskDmesonJetsDetectorResponse(const char* name, Int_t nOutputTrees=2);
168 
170 
171  virtual void UserCreateOutputObjects();
172  virtual void ExecOnce();
173  virtual Bool_t Run();
174  virtual Bool_t FillHistograms();
175 
177 
178  protected:
179 
180  virtual void SetOutputTypeInternal(EOutputType_t b);
181 
182  Int_t PostDataFromResponseEngine(const ResponseEngine& eng);
183 
185  std::map<ECandidateType_t, ResponseEngine> fResponseEngines ;
186 
187  private:
188 
191 
195 };
196 
197 #endif
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.
std::map< ECandidateType_t, ResponseEngine > fResponseEngines
! Response engines
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...
friend bool operator==(const ResponseEngine &lhs, const ResponseEngine &rhs)
Bool_t fFindRecoJetsForLostDMesons
If switched on, looks for reconstructed jets even when the D meson was lost.
int Int_t
Definition: External.C:63
friend bool operator!=(const ResponseEngine &lhs, const ResponseEngine &rhs)
Double_t fMaxJetDmesonDistance
Maximum distance between a generated D meson and a reconstructed jet, used for geometrical matching (...
Lightweight class that encapsulates D*.
virtual void SetReconstructed(const AliDmesonJetInfo &reco)=0
Lightweight class that encapsulates matching between reconstructed and generated D* mesons...
bool Bool_t
Definition: External.C:53
void RunAnalysis()
Run the requested analysis for the current event.