AliPhysics  c7b8e89 (c7b8e89)
AliAnalysisTaskDmesonJets.h
Go to the documentation of this file.
1 
13 #ifndef ALIANALYSISTASKDMESONJETS_H
14 #define ALIANALYSISTASKDMESONJETS_H
15 
16 /**************************************************************************
17 * Copyright(c) 1998-2016, ALICE Experiment at CERN, All rights reserved. *
18 * *
19 * Author: The ALICE Off-line Project. *
20 * Contributors are mentioned in the code where appropriate. *
21 * *
22 * Permission to use, copy, modify and distribute this software and its *
23 * documentation strictly for non-commercial purposes is hereby granted *
24 * without fee, provided that the above copyright notice appears in all *
25 * copies and that both the copyright notice and this permission notice *
26 * appear in the supporting documentation. The authors make no claims *
27 * about the suitability of this software for any purpose. It is *
28 * provided "as is" without express or implied warranty. *
29 **************************************************************************/
30 
31 class TClonesArray;
32 class AliRDHFCuts;
33 class AliAODEvent;
34 class AliAODRecoDecay;
37 class AliVParticle;
38 class AliAODMCParticle;
43 class THnSparse;
44 class AliFJWrapper;
45 class THashList;
46 class TTree;
47 class AliEMCALGeometry;
48 class TRandom;
49 class AliRhoParameter;
50 
51 //C++
52 #include <exception>
53 #include <list>
54 #include <vector>
55 #include <map>
56 
57 #include "AliTLorentzVector.h"
58 #include "THistManager.h"
59 
61 #include "AliJetContainer.h"
62 
64 {
65  public:
66 
67  class AliEventNotFound : public std::exception
68  {
69  public:
70  AliEventNotFound(const std::string& class_name, const std::string& method_name);
71 #if !(defined(__CINT__) || defined(__MAKECINT__))
72  const char* what() const noexcept;
73 #endif
74 
75 
76  private:
77  std::string fClassName ;
78  std::string fAccessMethodName ;
79  std::string fWhat ;
80  };
81 
85 
90  kUnknownQuark = BIT(0),
91  kFromDown = BIT(1),
92  kFromUp = BIT(2),
93  kFromStrange = BIT(3),
94  kFromCharm = BIT(4),
95  kFromBottom = BIT(5),
96  kFromTop = BIT(6),
97  kFromGluon = BIT(7),
99  };
100 
103  kUnknownDecay = BIT(0),
104  kDecayD0toKpi = BIT(1),
106  };
107 
108  enum EAxis_t {
109  kPositionD = BIT(0) , // Add the D meson eta/phi axis in the THnSparse
110  kInvMass = BIT(1) , // Add the invariant mass axis in the THnSparse
111  k2ProngInvMass = BIT(2) , // Add the 2 prong invariant mass axis in the THnSparse (for D* this is the inv mass of the D0)
112  kSoftPionPt = BIT(3) , // Add the soft pion pt axis in the THnSparse (for D*)
113  kDeltaR = BIT(4) , // Add the delta R axis in the THnSparse
114  kDeltaEta = BIT(5) , // Add the delta eta axis in the THnSparse
115  kDeltaPhi = BIT(6) , // Add the delta phi axis in the THnSparse
116  kPositionJet = BIT(7) , // Add the jet eta/phi axis in the THnSparse
117  kJetConstituents = BIT(8) // Add the jet constituent axis in the THnSparse
118  };
119 
124  class EventInfo {
125  public:
126  EventInfo() : fCent(-1), fEP(-1), fWeight(1), fPtHard(0) {}
127  EventInfo(double cent, double ep, double w, double pt) : fCent(cent), fEP(ep), fWeight(w), fPtHard(pt) {}
128 
129  double fCent;
130  double fEP;
131  double fWeight;
132  double fPtHard;
133  };
134 
143  public:
144  AliEventInfoSummary() : fWeight(1), fPtHard(0) {;}
146 
147  virtual ~AliEventInfoSummary() {;}
148 
149  void Reset();
150  void Set(EventInfo event);
151 
153  Double32_t fWeight ; //[0,0,12]
154  Double32_t fPtHard ; //[0,512,10]
155 
157  ClassDef(AliEventInfoSummary, 1);
159  };
160 
166  class AliJetInfo {
167  public:
168  AliJetInfo() : fMomentum(), fNConstituents(0), fNEF(0), fMaxChargedPt(0), fMaxNeutralPt(0), fArea(0), fCorrPt(0) {}
169  AliJetInfo(Double_t px, Double_t py, Double_t pz, Double_t E, Int_t nconst, Double_t nef, Double_t cpt, Double_t npt) :
170  fMomentum(px, py, pz, E), fNConstituents(nconst), fNEF(nef), fMaxChargedPt(cpt), fMaxNeutralPt(npt), fArea(0), fCorrPt(0) {}
171 
172  virtual ~AliJetInfo() {;}
173 
174  Double_t Pt() const { return fMomentum.Pt() ; }
175  Double_t Eta() const { return fMomentum.Eta() ; }
176  Double_t Phi() const { return fMomentum.Phi() ; }
177  Double_t Phi_0_2pi() const { return fMomentum.Phi_0_2pi(); }
178  Double_t CorrPt() const { return fCorrPt ; }
179  Int_t GetNConstituents() const { return fNConstituents; }
180  Double_t GetDistance(const AliJetInfo& jet, Double_t& deta, Double_t& dphi) const;
181  Double_t GetDistance(const AliJetInfo& jet) const;
182 
190 
192  ClassDef(AliJetInfo, 2);
194  };
195 
202  public:
204  AliDmesonJetInfo(const AliDmesonJetInfo &source);
206  virtual ~AliDmesonJetInfo() {;}
207 
208  AliVParticle *fDmesonParticle ;
212  std::map<std::string, AliJetInfo>
213  fJets ;
216  AliAODMCParticle *fParton ;
218  AliAODMCParticle *fAncestor ;
220  Byte_t fSelectionType ;
221  const AliVEvent *fEvent ;
222 
223  Byte_t GetSelectionTypeSummary() const { return fD0D0bar && fSelectionType ? 3 : fSelectionType; }
224 
225  const AliJetInfo* GetJet(std::string n) const;
226  AliJetInfo* GetJet(std::string n);
227  void Reset();
228  Double_t GetZ(std::string n) const;
229  Double_t GetCorrZ(std::string n) const;
230  Double_t GetDistance(std::string n, Double_t& deta, Double_t& dphi) const;
231  Double_t GetDistance(std::string n) const;
232  Double_t GetDistance(const AliJetInfo& jet, Double_t& deta, Double_t& dphi) const;
233  Double_t GetDistance(const AliJetInfo& jet) const;
234  void Print() const;
235 
237  ClassDef(AliDmesonJetInfo, 2);
239  };
240 
247  public:
248  AliJetInfoSummary() : fPt(0), fEta(0), fPhi(0), fR(0), fZ(0), fN(0) {;}
249  AliJetInfoSummary(const AliDmesonJetInfo& source, std::string n);
250  virtual ~AliJetInfoSummary() {}
251 
252  virtual void Reset();
253  virtual void Set(const AliDmesonJetInfo& source, std::string n);
254  virtual void Set(const AliJetInfo& source);
255 
257  Double32_t fPt ; //[0,409.6,13]
259  Double32_t fEta ; //[-2.048,2.048,10]
261  Double32_t fPhi ; //[0,2*pi,10]
263  Double32_t fR ; //[0,2.56,7]
265  Double32_t fZ ; //[0,1.024,10]
267  Double32_t fN ; //[0, 64, 6]
268 
270  ClassDef(AliJetInfoSummary, 4);
272  };
273 
280  public:
281  AliJetInfoPbPbSummary() : AliJetInfoSummary(), fCorrPt(0), fCorrZ(0), fArea(0) {;}
282  AliJetInfoPbPbSummary(const AliDmesonJetInfo& source, std::string n);
284 
285  virtual void Reset();
286  virtual void Set(const AliDmesonJetInfo& source, std::string n);
287  virtual void Set(const AliJetInfo& source);
288 
290  Double32_t fCorrPt ; //[-409.6,409.6,14]
291 
293  Double32_t fCorrZ ; //[0,1.024,10]
294 
296  Double32_t fArea ; //[0,2.048,8]
297 
299  ClassDef(AliJetInfoPbPbSummary, 2);
301  };
302 
309  public:
310  AliDmesonInfoSummary() : fPt(0), fEta(0), fPhi(0) {;}
311  AliDmesonInfoSummary(const AliDmesonJetInfo& source);
313 
314  virtual void Reset();
315  virtual void Set(const AliDmesonJetInfo& source);
316 
318  Double32_t fPt ; //[0,204.8,12]
320  Double32_t fEta ; //[-2.048,2.048,10]
322  Double32_t fPhi ; //[0,2*pi,10]
323 
325  ClassDef(AliDmesonInfoSummary, 2);
327  };
328 
335  public:
336  AliDmesonMCInfoSummary() : AliDmesonInfoSummary(), fPartonType(0), fPartonPt(0), fAncestorPDG(0) {;}
339 
340  virtual void Reset();
341  virtual void Set(const AliDmesonJetInfo& source);
342 
344  Double32_t fPartonType ; //[0, 16, 4]
346  Double32_t fPartonPt ; //[0,819.2,14]
347 
349 
351  ClassDef(AliDmesonMCInfoSummary, 3);
353  };
354 
361  public:
362  AliD0InfoSummary() : AliDmesonInfoSummary(), fInvMass(0), fSelectionType(0) {}
363  AliD0InfoSummary(const AliDmesonJetInfo& source);
364  virtual ~AliD0InfoSummary() {}
365 
366  virtual void Reset();
367  virtual void Set(const AliDmesonJetInfo& source);
368 
370  Double32_t fInvMass ; //[0,6.5536,16]
372  Double32_t fSelectionType ; //[0,4,2]
373 
375  ClassDef(AliD0InfoSummary, 3);
377  };
378 
387  public:
388  AliD0ExtendedInfoSummary() : AliD0InfoSummary(), fDCA(0), fCosThetaStar(0), fPtK(0), fPtPi(0), fd0K(0), fd0Pi(0), fd0d0(0), fCosPointing(0), fMaxNormd0(0) {}
391 
392  virtual void Reset();
393  virtual void Set(const AliDmesonJetInfo& source);
394 
396  Double32_t fDCA ; //[0,2.56,9]
398  Double32_t fCosThetaStar ; //[-1.28,1.28,8]
400  Double32_t fPtK ; //[0,102.4,11]
402  Double32_t fPtPi ; //[0,102.4,11]
404  Double32_t fd0K ; //[-2.56,2.56,8]
406  Double32_t fd0Pi ; //[-2.56,2.56,8]
408  Double32_t fd0d0 ; //[-0.000524288,0.000524288,20]
410  Double32_t fCosPointing ; //[0,1.28,7]
412  Double32_t fMaxNormd0 ; //[-102.4,102.4,11]
413 
415  ClassDef(AliD0ExtendedInfoSummary, 4);
417  };
418 
425  public:
426  AliDStarInfoSummary() : AliDmesonInfoSummary(), f2ProngInvMass(0), fDeltaInvMass(0) {}
427  AliDStarInfoSummary(const AliDmesonJetInfo& source);
428  virtual ~AliDStarInfoSummary() {}
429 
430  virtual void Reset();
431  virtual void Set(const AliDmesonJetInfo& source);
432 
434  Double32_t f2ProngInvMass ; //[0,8.192,14]
436  Double32_t fDeltaInvMass ; //[0,0.8192,16]
437 
439  ClassDef(AliDStarInfoSummary, 2);
441  };
442 
447  class AliHFJetDefinition : public TObject {
448  public:
450  AliHFJetDefinition(EJetType_t type, Double_t r, EJetAlgo_t algo, ERecoScheme_t reco);
451  AliHFJetDefinition(EJetType_t type, Double_t r, EJetAlgo_t algo, ERecoScheme_t reco, TString rhoName);
452  AliHFJetDefinition(const AliHFJetDefinition &source);
453 
455 
456  const char* GetName() const;
457 
458  void SetJetPhiRange(Double_t min, Double_t max) { fMinJetPhi = min; fMaxJetPhi = max; }
459  void SetJetEtaRange(Double_t min, Double_t max) { fMinJetEta = min; fMaxJetEta = max; }
460  void SetJetPtRange(Double_t min, Double_t max) { fMinJetPt = min; fMaxJetPt = max; }
461  void SetChargedPtRange(Double_t min, Double_t max) { fMinChargedPt = min; fMaxChargedPt = max; }
462  void SetNeutralPtRange(Double_t min, Double_t max) { fMinNeutralPt = min; fMaxNeutralPt = max; }
463  void SetRhoName(TString n) { fRhoName = n ; }
464  void SetRecombinationScheme(ERecoScheme_t reco) { fRecoScheme = reco;}
465  Double_t GetRadius() const { return fRadius; }
466  TString GetRhoName() const { return fRhoName; }
467 
468  Bool_t IsJetInAcceptance(const AliJetInfo& jet) const;
469  Bool_t IsJetInAcceptance(const AliDmesonJetInfo& dMesonJet, std::string n) const;
470 
471  friend bool operator< (const AliHFJetDefinition& lhs, const AliHFJetDefinition& rhs);
472  friend inline bool operator> (const AliHFJetDefinition& lhs, const AliHFJetDefinition& rhs){ return rhs < lhs ; }
473  friend inline bool operator<=(const AliHFJetDefinition& lhs, const AliHFJetDefinition& rhs){ return !(lhs > rhs) ; }
474  friend inline bool operator>=(const AliHFJetDefinition& lhs, const AliHFJetDefinition& rhs){ return !(lhs < rhs) ; }
475 
476  friend bool operator==(const AliHFJetDefinition& lhs, const AliHFJetDefinition& rhs);
477  friend inline bool operator!=(const AliHFJetDefinition& lhs, const AliHFJetDefinition& rhs){ return !(lhs == rhs); }
478 
479  EJetType_t fJetType ;
481  EJetAlgo_t fJetAlgo ;
482  ERecoScheme_t fRecoScheme ;
495  std::vector<AliJetInfo> fJets ;
496 
497  private:
499  ClassDef(AliHFJetDefinition, 5);
501  };
502 
503  class AnalysisEngine;
504 
511  public:
512  OutputHandler();
514 
515  virtual ~OutputHandler() {;}
516 
517  virtual Bool_t FillOutput(Bool_t applyKinCuts);
518 
519  virtual void BuildOutputObject(const char* taskName) {;}
520 
521  virtual TObject* GetOutputObject() const { return 0 ; }
522  virtual Int_t GetDataSlotNumber() const { return -1; }
523 
524  protected:
530  std::vector<AliHFJetDefinition> *fJetDefinitions ;
535  std::map<int, AliDmesonJetInfo> *fDmesonJets ;
538 
539  private:
540  OutputHandler(const OutputHandler &source); // not implemented
541  OutputHandler& operator=(const OutputHandler& source); // not implemented
542  };
543 
550  public:
553 
555 
556  virtual Bool_t FillOutput(Bool_t applyKinCuts);
557 
558  virtual void BuildOutputObject(const char* taskName);
559 
560  Bool_t FillHnSparse(THnSparse* h, const AliDmesonJetInfo& DmesonJet, std::string n);
561 
562  Bool_t IsAnyJetInAcceptance(const AliDmesonJetInfo& dMesonJet) const;
563  void SetEnabledAxis(UInt_t axis) { fEnabledAxis = axis; }
564 
565  protected:
567 
568  private:
569  OutputHandlerTHnSparse(const OutputHandlerTHnSparse &source); // not implemented
570  OutputHandlerTHnSparse& operator=(const OutputHandlerTHnSparse& source); // not implemented
571  };
572 
580  public:
583 
584  virtual ~OutputHandlerTTree() {;}
585 
586  virtual Bool_t FillOutput(Bool_t applyKinCuts);
587 
588  virtual void BuildOutputObject(const char* taskName);
589  virtual TObject* GetOutputObject() const { return fTree; }
590  virtual Int_t GetDataSlotNumber() const { return fDataSlotNumber ; }
591 
592  TTree* GetTree() const { return fTree; }
593  void AssignDataSlot(Int_t n) { fDataSlotNumber = n; }
594 
595  protected:
600 
601  private:
602  OutputHandlerTTree(const OutputHandlerTTree &source); // not implemented
603  OutputHandlerTTree& operator=(const OutputHandlerTTree& source); // not implemented
604  };
605 
615  public:
618 
620 
621  virtual TObject* GetOutputObject() const { return fTree; }
622  virtual Int_t GetDataSlotNumber() const { return fDataSlotNumber ; }
623 
624  TTree* GetTree() const { return fTree; }
625  void AssignDataSlot(Int_t n) { fDataSlotNumber = n; }
626 
627  static OutputHandlerTTreeExtendedBase* GenerateOutputHandler(AnalysisEngine* eng);
628 
629  protected:
635 
636  private:
637  OutputHandlerTTreeExtendedBase(const OutputHandlerTTreeExtendedBase &source); // not implemented
639  };
640 
652  template<class EVENTTYPE, class DMESONTYPE, class JETTYPE>
654  public:
657 
659 
660  virtual Bool_t FillOutput(Bool_t applyKinCuts);
661  virtual void BuildOutputObject(const char* taskName);
662 
663  protected:
664  EVENTTYPE fCurrentEventInfo ;
665  std::vector<DMESONTYPE> fCurrentDmesonInfo ;
666  std::map<std::string, std::vector<JETTYPE> > fCurrentJetInfo ;
667 
668  private:
669  OutputHandlerTTreeExtended(const OutputHandlerTTreeExtended &source); // not implemented
670  OutputHandlerTTreeExtended& operator=(const OutputHandlerTTreeExtended& source); // not implemented
671  };
672 
678  class AnalysisEngine : public TObject {
679  public:
680  typedef std::pair<AliJetInfo*, Double_t> jet_distance_pair;
681 
684  kFindLast
685  };
686 
687  static AliAODMCParticle* FindParticleOrigin(const AliAODMCParticle* part, TClonesArray* mcArray, EFindParticleOriginMode_t mode, const std::set<UInt_t>& pdgSet);
688  static AliAODMCParticle* FindParticleOrigin(const AliAODMCParticle* part, TClonesArray* mcArray, EFindParticleOriginMode_t mode);
689  static std::pair<AliAnalysisTaskDmesonJets::EMesonOrigin_t, AliAODMCParticle*> IsPromptCharm(const AliAODMCParticle* part, TClonesArray* mcArray);
690  static EMesonDecayChannel_t CheckDecayChannel(const AliAODMCParticle* part, TClonesArray* mcArray);
691 
692  AnalysisEngine();
693  AnalysisEngine(ECandidateType_t type, EMCMode_t MCmode, AliRDHFCuts* cuts = 0, Int_t nBins=80, Double_t range = 0.50);
694  AnalysisEngine(const AnalysisEngine &source);
695  AnalysisEngine& operator=(const AnalysisEngine& source);
696 
697  virtual ~AnalysisEngine();
698 
699  void SetCandidateType(ECandidateType_t t) { fCandidateType = t ; }
700  void SetMCMode(EMCMode_t m) { fMCMode = m ; }
701  void SetNMassBins(Int_t n) { fNMassBins = n ; }
702  void SetMassRange(Double_t min, Double_t max) { fMinMass = min ; fMaxMass = max ; }
703  void AdoptRDHFCuts(AliRDHFCuts* cuts);
704  void SetRDHFCuts(AliRDHFCuts* cuts);
705  void SetRejectedOriginMap(UInt_t m) { fRejectedOrigin = m ; }
706  void SetAcceptedDecayMap(UInt_t m) { fAcceptedDecay = m ; }
707  void SetRejectISR(Bool_t b) { fRejectISR = b ; }
708 
709  void SetD0Extended(Bool_t b) { fD0Extended = b ; }
710 
711  const char* GetCandidateName() const { return fCandidateName.Data(); }
712  const char* GetName() const;
713  const char* GetName(const AliHFJetDefinition& jetDef) const;
714 
715  EMCMode_t GetMCMode() const { return fMCMode ; }
716  ECandidateType_t GetCandidateType() const { return fCandidateType ; }
717 
718  OutputHandler* GetOutputHandler() const { return fOutputHandler; }
719 
720  AliHFJetDefinition* AddJetDefinition(EJetType_t type, Double_t r, EJetAlgo_t algo, ERecoScheme_t reco);
721  AliHFJetDefinition* AddJetDefinition(const AliHFJetDefinition& def);
722  std::vector<AliHFJetDefinition>::iterator FindJetDefinition(const AliHFJetDefinition& eng);
723  std::vector<AliAnalysisTaskDmesonJets::AliHFJetDefinition>& GetJetDefinitions() { return fJetDefinitions; }
724 
725  void SetJetPhiRange(Double_t min, Double_t max);
726  void SetJetEtaRange(Double_t min, Double_t max);
727  void SetJetPtRange(Double_t min, Double_t max);
728  void SetChargedPtRange(Double_t min, Double_t max);
729  void SetNeutralPtRange(Double_t min, Double_t max);
730 
731 #if !(defined(__CINT__) || defined(__MAKECINT__))
732  std::map<int, AliDmesonJetInfo>& GetDmesons() { return fDmesonJets; }
733 #endif
734 
735  void Init(const AliEMCALGeometry* const geom, Int_t runNumber);
736 
738 
739  Bool_t IsInhibit() const { return fInhibit; }
740 
741  Bool_t IsD0Extended() const { return fD0Extended; }
742 
743  friend bool operator< (const AnalysisEngine& lhs, const AnalysisEngine& rhs);
744  friend inline bool operator> (const AnalysisEngine& lhs, const AnalysisEngine& rhs){ return rhs < lhs ; }
745  friend inline bool operator<=(const AnalysisEngine& lhs, const AnalysisEngine& rhs){ return !(lhs > rhs) ; }
746  friend inline bool operator>=(const AnalysisEngine& lhs, const AnalysisEngine& rhs){ return !(lhs < rhs) ; }
747 
748  friend bool operator==(const AnalysisEngine& lhs, const AnalysisEngine& rhs);
749  friend inline bool operator!=(const AnalysisEngine& lhs, const AnalysisEngine& rhs){ return !(lhs == rhs); }
750 
751  protected:
752  void RunAnalysis();
753 
757  UChar_t fNDaughters ;
768  std::vector<AliHFJetDefinition> fJetDefinitions ;
773  TRandom *fRandomGen ;
776  std::map<int, AliDmesonJetInfo> fDmesonJets ;
777  TClonesArray *fCandidateArray ;
779  std::vector<AliTrackContainer*> fTrackContainers ;
780  std::vector<AliClusterContainer*> fClusterContainers ;
785  mutable TString fName ;
786 
788  friend class OutputHandler;
789 
790  private:
791 
792  void AddInputVectors(AliEmcalContainer* cont, Int_t offset, TH2* rejectHist=0, Double_t eff=0.);
793  void SetCandidateProperties(Double_t range);
794  AliAODMCParticle* MatchToMC() const;
795  void RunDetectorLevelAnalysis();
796  void RunParticleLevelAnalysis();
797 
798  Bool_t ExtractRecoDecayAttributes(const AliAODRecoDecayHF2Prong* Dcand, AliDmesonJetInfo& DmesonJet, UInt_t i);
799  Bool_t ExtractD0Attributes(const AliAODRecoDecayHF2Prong* Dcand, AliDmesonJetInfo& DmesonJet, UInt_t i);
800  Bool_t ExtractDstarAttributes(const AliAODRecoCascadeHF* DstarCand, AliDmesonJetInfo& DmesonJet, UInt_t i);
801  Bool_t FindJet(AliAODRecoDecayHF2Prong* Dcand, AliDmesonJetInfo& DmesonJet, AliHFJetDefinition& jetDef);
802 
804  ClassDef(AnalysisEngine, 3);
806  };
807 
809  AliAnalysisTaskDmesonJets(const char* name, Int_t nOutputTrees=2);
810  virtual ~AliAnalysisTaskDmesonJets();
811 
812  AnalysisEngine* AddAnalysisEngine(ECandidateType_t type, TString cutfname, TString cuttype, EMCMode_t bkgMode, EJetType_t jettype, Double_t jetradius, TString rhoName = "");
813  AnalysisEngine* AddAnalysisEngine(ECandidateType_t type, TString cutfname, TString cuttype, EMCMode_t bkgMode, const AliHFJetDefinition& jetDef, TString rhoName = "");
814  std::list<AnalysisEngine>::iterator FindAnalysisEngine(const AnalysisEngine& eng);
815 
825 
826  UInt_t GetEnabledAxis() const { return fEnabledAxis; }
827 
831  void SetRejectISR(Bool_t b) { fRejectISR = b ; }
832  void SetJetArea(Int_t type,
833  Double_t garea = 0.005) { fJetAreaType = type; fJetGhostArea = garea; }
834 
835  virtual void UserCreateOutputObjects();
836  virtual void ExecOnce();
837  virtual Bool_t Run();
838  virtual Bool_t FillHistograms();
839 
840  static AliAnalysisTaskDmesonJets* AddTaskDmesonJets(TString ntracks = "usedefault", TString nclusters = "usedefault", TString nMCpart = "", Int_t nMaxTrees = 2, TString suffix = "");
841 
842  protected:
843 
845 
846  AliRDHFCuts* LoadDMesonCutsFromFile(TString cutfname, TString cutsname);
847 
848  static const char* GetHFEventRejectionReasonLabel(UInt_t& bitmap);
850 
852 
854 
855  std::list<AnalysisEngine>
869 
870  private:
871 
874 
876  ClassDef(AliAnalysisTaskDmesonJets, 10);
878 };
879 
880 #endif
friend bool operator<=(const AnalysisEngine &lhs, const AnalysisEngine &rhs)
Double32_t fCorrZ
Z of the D meson after subtracting average background.
Lightweight class that encapsulates D meson jets.
Int_t pdg
Double_t fMaxMass
! Max mass in histogram axis
AliAODMCParticle * fParton
! pointer to the parton in the shower tree of the D meson (only for particle level D mesons) ...
std::list< AnalysisEngine > fAnalysisEngines
Array of analysis parameters.
std::string fClassName
Class name where the event was not found.
void Print(std::ostream &o, const char *name, Double_t dT, Double_t dVM, Double_t alldT, Double_t alldVM)
Definition: PlotSysInfo.C:121
AliJetContainer::EJetType_t EJetType_t
Analysis task for D meson jets.
UInt_t fRejectedOrigin
Bit mask with D meson origins that are rejected (used for MC analysis, i.e. signal-only, background-only and particle-level)
Bool_t fInhibit
!inhibit execution of the task
double Double_t
Definition: External.C:58
AliJetInfo(Double_t px, Double_t py, Double_t pz, Double_t E, Int_t nconst, Double_t nef, Double_t cpt, Double_t npt)
Double_t fSoftPionPt
! Transverse momentum of the soft pion of the D* candidate
Int_t fDataSlotNumber
! Data slot where the tree output is posted
AliRDHFCuts * fRDHFCuts
D meson candidates cuts.
TString fRhoName
Name of the object that holds the average background value.
Lightweight class that encapsulates D meson jets.
std::vector< AliTrackContainer * > fTrackContainers
! Track containers
AnalysisEngine * AddAnalysisEngine(ECandidateType_t type, TString cutfname, TString cuttype, EMCMode_t bkgMode, EJetType_t jettype, Double_t jetradius, TString rhoName="")
AliJetInfoSummary ** fCurrentJetInfo
! Current jet info
Double_t fTrackEfficiency
Artificial tracking inefficiency (0...1)
std::vector< AliClusterContainer * > fClusterContainers
! Cluster containers
EMCMode_t fMCMode
! MC mode: No MC (data and MC detector level), background-only (MC), signal-only (MC), MC truth (particle level)
AliHFAODMCParticleContainer * fMCContainer
! MC particle container
ERecoScheme_t fRecoScheme
Jet recombination scheme (pt scheme, E scheme, ...)
Double32_t fWeight
Centrality of the collision.
virtual void SetOutputTypeInternal(EOutputType_t b)
Double_t fMaxNeutralPt
Transverse momentum of the leading neutral particle (or cluster)
Class that encapsulates event properties in a very compact structure (useful for pp simulation analys...
Double32_t fPartonPt
Transverse momentum of the parton.
Declaration of class AliTLorentzVector.
virtual void UserCreateOutputObjects()
Creates the output containers.
void FillPartonLevelHistograms()
Fill histograms with parton-level information.
Double32_t fInvMass
Invariant mass of the D0 meson candidate in GeV/c2.
Lightweight class that encapsulates D meson jets.
Double_t fMinMass
! Min mass in histogram axis
Double_t fInvMass2Prong
! 2-prong mass of the D* candidate (w/o the soft pion)
Double_t fMinChargedPt
Minimum pt of the leading charged particle (or track)
UInt_t fEnabledAxis
! Use bit defined in EAxis_t to enable axis in the THnSparse
static void CalculateMassLimits(Double_t range, Int_t pdg, Int_t nbins, Double_t &minMass, Double_t &maxMass)
AliAODEvent * fAodEvent
! AOD event
AliJetContainer::EJetAlgo_t EJetAlgo_t
UInt_t fEnabledAxis
Use bit defined in EAxis_t to enable axis in the THnSparse.
Double32_t fPtK
Transverse momentum of the kaon.
TRandom * fRandomGen
! Random number generator
std::vector< AliAnalysisTaskDmesonJets::AliHFJetDefinition > & GetJetDefinitions()
Double32_t fCosPointing
Cosine of the pointing angle.
AliRhoParameter * fRho
Object that holds the average background value.
EMCMode_t fMCMode
MC mode: No MC (data and MC detector level), background-only (MC), signal-only (MC), MC truth (particle level)
Double_t fJetGhostArea
Area of the ghost particles.
Output handler for D meson jet analysis.
Int_t PostDataFromAnalysisEngine(OutputHandler const *handler)
Double32_t fPtPi
Transverse momentum of the pion.
Int_t fDataSlotNumber
! Data slot where the tree output is posted
std::vector< AliHFJetDefinition > * fJetDefinitions
! Jet definitions
AliVParticle * fDmesonParticle
! pointer to the particle object
Container for particles within the EMCAL framework.
std::vector< DMESONTYPE > fCurrentDmesonInfo
! Current D meson jet info
Double32_t fN
Number of jet constituents.
Select tracks based on specific prescriptions of HF analysis.
Double32_t fPt
Transverse momentum of the jet in GeV/c.
ECandidateType_t fCandidateType
Candidate type.
Int_t fMCLabel
! MC label, i.e. index of the generator level D meson (only for detector level D meson candidates) ...
friend bool operator!=(const AliHFJetDefinition &lhs, const AliHFJetDefinition &rhs)
Double32_t fR
Distance between D meson and jet axis.
EventInfo * fEventInfo
! Object conatining the event information (centrality, pt hard, weight, etc.)
EJetType_t fJetType
Jet type (charged, full, neutral)
std::pair< AliJetInfo *, Double_t > jet_distance_pair
Double32_t fPt
Transverse momentum of the D meson in GeV/c.
AliTLorentzVector fD
! 4-momentum of the D meson candidate
int Int_t
Definition: External.C:63
unsigned int UInt_t
Definition: External.C:33
float Float_t
Definition: External.C:68
AliAnalysisTaskDmesonJets()
This is the default constructor, used for ROOT I/O purposes.
Output handler for D meson jet analysis.
Lightweight class that encapsulates D meson jets for PbPb analysis.
Struct that encapsulates analysis parameters.
Base task in the EMCAL framework (lighter version of AliAnalysisTaskEmcal)
Double_t fMinNeutralPt
Minimum pt of the leading neutral particle (or cluster)
void SetShowSoftPionPt(Bool_t b=kTRUE)
Bool_t fD0D0bar
! kTRUE if selected both as D0 and D0bar
Bool_t fD0Extended
! Store extended information in the tree (only for D0 mesons)
Bool_t fD0Extended
Store extended information in the tree (only for D0 mesons)
std::string fAccessMethodName
Access method name used to retrieve the event.
AliRDHFCuts * LoadDMesonCutsFromFile(TString cutfname, TString cutsname)
bool operator<(const AliAnalysisTaskDmesonJets::AliHFJetDefinition &lhs, const AliAnalysisTaskDmesonJets::AliHFJetDefinition &rhs)
std::list< AnalysisEngine >::iterator FindAnalysisEngine(const AnalysisEngine &eng)
std::vector< AliHFJetDefinition > fJetDefinitions
Jet definitions.
Double_t fMaxNeutralPt
Maximum pt of the leading neutral particle (or cluster)
Double_t fMaxMass
Max mass in histogram axis.
EJetAlgo_t fJetAlgo
Jet algorithm (kt, anti-kt,...)
static const char * GetHFEventRejectionReasonLabel(UInt_t &bitmap)
Lightweight class that encapsulates D*.
friend bool operator!=(const AnalysisEngine &lhs, const AnalysisEngine &rhs)
AliAnalysisTaskDmesonJets & operator=(const AliAnalysisTaskDmesonJets &source)
Int_t mode
Definition: anaM.C:41
Short_t fPartonType
! type of the parton in the shower tree (only for particle level D mesons)
Double_t fNEF
Neutral Energy Fraction of the jet.
TClonesArray * fCandidateArray
! D meson candidate array
short Short_t
Definition: External.C:23
virtual ~AliAnalysisTaskDmesonJets()
This is the standard destructor.
Byte_t fSelectionType
! for D0: 0=not selected, 1=D0, 2=D0bar
std::vector< AliJetInfo > fJets
! Inclusive jets reconstructed in the current event (includes D meson candidate daughters, if any)
EventInfo(double cent, double ep, double w, double pt)
void SetShow2ProngInvMass(Bool_t b=kTRUE)
Select MC particles based on specific prescriptions of HF analysis.
std::map< int, AliDmesonJetInfo > * fDmesonJets
! Array containing the D meson jets
Double_t fMaxChargedPt
Transverse momentum of the leading charged particle (or track)
friend bool operator>=(const AliHFJetDefinition &lhs, const AliHFJetDefinition &rhs)
Double32_t fCorrPt
Transverse momentum of the jet in GeV/c after subtracting average background.
EventInfo fEventInfo
! Event info (centrality, weight, pt hard etc.)
friend bool operator>=(const AnalysisEngine &lhs, const AnalysisEngine &rhs)
Double_t fMaxChargedPt
Maximum pt of the leading charged particle (or track)
ECandidateType_t fCandidateType
! Candidate type
std::map< std::string, AliJetInfo > fJets
! list of jets
AliAODMCParticle * fAncestor
! pointer to the ancestor particle in the shower tree of the D meson (only for particle level D meson...
Double32_t fDeltaInvMass
< Difference between the Kpipi and the Kpi invariant masses in GeV/c2
OutputHandler * fOutputHandler
! Output handler
Definition: External.C:220
Double_t minMass
Bool_t fRejectISR
! Reject initial state radiation
std::map< int, AliDmesonJetInfo > & GetDmesons()
std::map< int, AliDmesonJetInfo > fDmesonJets
! Array containing the D meson jets
Double_t fTrackEfficiency
! Artificial tracking inefficiency (0...1) -> set automatically at ExecOnce by AliAnalysisTaskDmesonJ...
Bool_t fApplyKinematicCuts
Apply jet kinematic cuts.
Double32_t fSelectionType
Selection type: D0, D0bar, both.
AliEventNotFound(const std::string &class_name, const std::string &method_name)
Container class for histograms.
Definition: THistManager.h:99
UInt_t fAcceptedDecay
Bit mask with D meson decays that are accepted (only used for particle-level analysis) ...
unsigned short UShort_t
Definition: External.C:28
Bool_t fReconstructed
! Whether this D meson was reconstructed (only for particle level D mesons)
Int_t fNConstituents
Number of constituents of the jet.
Bool_t fRejectISR
Reject initial state radiation.
AliDmesonInfoSummary * fCurrentDmesonJetInfo
! Current D meson jet info
EOutputType_t fOutputType
Output type: none, TTree or THnSparse.
bool operator==(const AliAnalysisTaskDmesonJets::AliHFJetDefinition &lhs, const AliAnalysisTaskDmesonJets::AliHFJetDefinition &rhs)
std::map< std::string, std::vector< JETTYPE > > fCurrentJetInfo
! Current jet info
void SetShowJetConstituents(Bool_t b=kTRUE)
const AliVEvent * fEvent
! pointer to the ESD/AOD event
TArrayI fPDGdaughters
List of the PDG code of the daughters.
friend bool operator<=(const AliHFJetDefinition &lhs, const AliHFJetDefinition &rhs)
const Int_t nbins
Double_t maxMass
AliJetContainer::ERecoScheme_t ERecoScheme_t
TString fBranchName
AOD branch where the D meson candidate are found.
bool Bool_t
Definition: External.C:53
Int_t fNOutputTrees
Maximum number of output trees.
AliTLorentzVector fMomentum
4-momentum of the jet
Double_t fCorrPt
Transverse momentum of the jet after subtracting the average background.
AliHFAODMCParticleContainer * fMCContainer
! MC particle container
AliFJWrapper * fFastJetWrapper
! Fastjet wrapper
Float_t fPtBinWidth
! Histogram pt bin width
void SetJetArea(Int_t type, Double_t garea=0.005)
Container structure for EMCAL clusters.
Lightweight class that encapsulates D0.
void SetShowPositionJet(Bool_t b=kTRUE)
Double_t fCent
!event centrality
virtual void BuildOutputObject(const char *taskName)
AliFJWrapper * fFastJetWrapper
! Fastjet wrapper
THistManager fHistManager
Histogram manager.
static AliAnalysisTaskDmesonJets * AddTaskDmesonJets(TString ntracks="usedefault", TString nclusters="usedefault", TString nMCpart="", Int_t nMaxTrees=2, TString suffix="")
Double_t fMinMass
Min mass in histogram axis.