AliPhysics  master (3d17d9d)
AliAnalysisTaskDmesonJetsSub.h
Go to the documentation of this file.
1 // \author adapted for Substructure measurements by Leticia Cunqueiro
13 
14 #ifndef ALIANALYSISTASKDMESONJETSSUB_H
15 #define ALIANALYSISTASKDMESONJETSSUB_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 class TClonesArray;
33 class AliRDHFCuts;
34 class AliAODEvent;
35 class AliAODRecoDecay;
38 class AliVParticle;
39 class AliAODMCParticle;
44 class THnSparse;
45 class AliFJWrapper;
46 class THashList;
47 class TTree;
48 class AliEMCALGeometry;
49 class TRandom;
50 class AliRhoParameter;
51 
52 //C++
53 #include <exception>
54 #include <list>
55 #include <vector>
56 #include <map>
57 
58 #include "AliTLorentzVector.h"
59 #include "THistManager.h"
60 
62 #include "AliJetContainer.h"
63 
65 {
66  public:
67 
68  class AliEventNotFound : public std::exception
69  {
70  public:
71  AliEventNotFound(const std::string& class_name, const std::string& method_name);
72 #if !(defined(__CINT__) || defined(__MAKECINT__))
73  const char* what() const noexcept;
74 #endif
75 
76 
77  private:
78  std::string fClassName ;
79  std::string fAccessMethodName ;
80  std::string fWhat ;
81  };
82 
86 
91  kUnknownQuark = BIT(0),
92  kFromDown = BIT(1),
93  kFromUp = BIT(2),
94  kFromStrange = BIT(3),
95  kFromCharm = BIT(4),
96  kFromBottom = BIT(5),
97  kFromTop = BIT(6),
98  kFromGluon = BIT(7),
100  };
101 
104  kUnknownDecay = BIT(0),
105  kDecayD0toKpi = BIT(1),
107  };
108 
109  enum EAxis_t {
110  kPositionD = BIT(0) , // Add the D meson eta/phi axis in the THnSparse
111  kInvMass = BIT(1) , // Add the invariant mass axis in the THnSparse
112  k2ProngInvMass = BIT(2) , // Add the 2 prong invariant mass axis in the THnSparse (for D* this is the inv mass of the D0)
113  kSoftPionPt = BIT(3) , // Add the soft pion pt axis in the THnSparse (for D*)
114  kDeltaR = BIT(4) , // Add the delta R axis in the THnSparse
115  kDeltaEta = BIT(5) , // Add the delta eta axis in the THnSparse
116  kDeltaPhi = BIT(6) , // Add the delta phi axis in the THnSparse
117  kPositionJet = BIT(7) , // Add the jet eta/phi axis in the THnSparse
118  kJetConstituents = BIT(8) // Add the jet constituent axis in the THnSparse
119  };
120 
125  class EventInfo {
126  public:
127  EventInfo() : fCent(-1), fEP(-1), fWeight(1), fPtHard(0) {}
128  EventInfo(double cent, double ep, double w, double pt) : fCent(cent), fEP(ep), fWeight(w), fPtHard(pt) {}
129 
130  double fCent;
131  double fEP;
132  double fWeight;
133  double fPtHard;
134  };
135 
144  public:
145  AliEventInfoSummary() : fWeight(1), fPtHard(0) {;}
147 
148  virtual ~AliEventInfoSummary() {;}
149 
150  void Reset();
151  void Set(EventInfo event);
152 
154  Double32_t fWeight ; //[0,0,12]
155  Double32_t fPtHard ; //[0,512,10]
156 
158  ClassDef(AliEventInfoSummary, 1);
160  };
161 
167  class AliJetInfo {
168  public:
169  AliJetInfo() : fMomentum(), fNConstituents(0), fNEF(0), fMaxChargedPt(0), fMaxNeutralPt(0), fArea(0), fCorrPt(0) {}
170  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) :
171  fMomentum(px, py, pz, E), fNConstituents(nconst), fNEF(nef), fMaxChargedPt(cpt), fMaxNeutralPt(npt), fArea(0), fCorrPt(0) {}
172 
173  virtual ~AliJetInfo() {;}
174 
175  Double_t Pt() const { return fMomentum.Pt() ; }
176  Double_t Eta() const { return fMomentum.Eta() ; }
177  Double_t Phi() const { return fMomentum.Phi() ; }
178  Double_t Phi_0_2pi() const { return fMomentum.Phi_0_2pi(); }
179  Double_t CorrPt() const { return fCorrPt ; }
180  Int_t GetNConstituents() const { return fNConstituents; }
181  Double_t GetDistance(const AliJetInfo& jet, Double_t& deta, Double_t& dphi) const;
182  Double_t GetDistance(const AliJetInfo& jet) const;
183 
191 
193  ClassDef(AliJetInfo, 2);
195  };
196 
203  public:
205  AliDmesonJetInfo(const AliDmesonJetInfo &source);
207  virtual ~AliDmesonJetInfo() {;}
208 
209  AliVParticle *fDmesonParticle ;
213  std::map<std::string, AliJetInfo>
214  fJets ;
217  AliAODMCParticle *fParton ;
219  AliAODMCParticle *fAncestor ;
221  Byte_t fSelectionType ;
222  const AliVEvent *fEvent ;
223 
224  Byte_t GetSelectionTypeSummary() const { return fD0D0bar && fSelectionType ? 3 : fSelectionType; }
225 
226  const AliJetInfo* GetJet(std::string n) const;
227  AliJetInfo* GetJet(std::string n);
228  void Reset();
229  Double_t GetZ(std::string n) const;
230  Double_t GetCorrZ(std::string n) const;
231  Double_t GetDistance(std::string n, Double_t& deta, Double_t& dphi) const;
232  Double_t GetDistance(std::string n) const;
233  Double_t GetDistance(const AliJetInfo& jet, Double_t& deta, Double_t& dphi) const;
234  Double_t GetDistance(const AliJetInfo& jet) const;
235  void Print() const;
236 
238  ClassDef(AliDmesonJetInfo, 2);
240  };
241 
248  public:
249  AliJetInfoSummary() : fPt(0), fEta(0), fPhi(0), fR(0), fZ(0), fN(0) {;}
250  AliJetInfoSummary(const AliDmesonJetInfo& source, std::string n);
251  virtual ~AliJetInfoSummary() {}
252 
253  virtual void Reset();
254  virtual void Set(const AliDmesonJetInfo& source, std::string n);
255  virtual void Set(const AliJetInfo& source);
256 
258  Double32_t fPt ; //[0,409.6,13]
260  Double32_t fEta ; //[-2.048,2.048,10]
262  Double32_t fPhi ; //[0,2*pi,10]
264  Double32_t fR ; //[0,2.56,7]
266  Double32_t fZ ; //[0,1.024,10]
268  Double32_t fN ; //[0, 64, 6]
269 
271  ClassDef(AliJetInfoSummary, 4);
273  };
274 
281  public:
282  AliJetInfoPbPbSummary() : AliJetInfoSummary(), fCorrPt(0), fCorrZ(0), fArea(0) {;}
283  AliJetInfoPbPbSummary(const AliDmesonJetInfo& source, std::string n);
285 
286  virtual void Reset();
287  virtual void Set(const AliDmesonJetInfo& source, std::string n);
288  virtual void Set(const AliJetInfo& source);
289 
291  Double32_t fCorrPt ; //[-409.6,409.6,14]
292 
294  Double32_t fCorrZ ; //[0,1.024,10]
295 
297  Double32_t fArea ; //[0,2.048,8]
298 
300  ClassDef(AliJetInfoPbPbSummary, 2);
302  };
303 
310  public:
311  AliDmesonInfoSummary() : fPt(0), fEta(0), fPhi(0) {;}
312  AliDmesonInfoSummary(const AliDmesonJetInfo& source);
314 
315  virtual void Reset();
316  virtual void Set(const AliDmesonJetInfo& source);
317 
319  Double32_t fPt ; //[0,204.8,12]
321  Double32_t fEta ; //[-2.048,2.048,10]
323  Double32_t fPhi ; //[0,2*pi,10]
324 
326  ClassDef(AliDmesonInfoSummary, 2);
328  };
329 
336  public:
337  AliDmesonMCInfoSummary() : AliDmesonInfoSummary(), fPartonType(0), fPartonPt(0), fAncestorPDG(0) {;}
340 
341  virtual void Reset();
342  virtual void Set(const AliDmesonJetInfo& source);
343 
345  Double32_t fPartonType ; //[0, 16, 4]
347  Double32_t fPartonPt ; //[0,819.2,14]
348 
350 
352  ClassDef(AliDmesonMCInfoSummary, 3);
354  };
355 
362  public:
363  AliD0InfoSummary() : AliDmesonInfoSummary(), fInvMass(0), fSelectionType(0) {}
364  AliD0InfoSummary(const AliDmesonJetInfo& source);
365  virtual ~AliD0InfoSummary() {}
366 
367  virtual void Reset();
368  virtual void Set(const AliDmesonJetInfo& source);
369 
371  Double32_t fInvMass ; //[0,6.5536,16]
373  Double32_t fSelectionType ; //[0,4,2]
374 
376  ClassDef(AliD0InfoSummary, 3);
378  };
379 
388  public:
389  AliD0ExtendedInfoSummary() : AliD0InfoSummary(), fDCA(0), fCosThetaStar(0), fPtK(0), fPtPi(0), fd0K(0), fd0Pi(0), fd0d0(0), fCosPointing(0), fMaxNormd0(0) {}
392 
393  virtual void Reset();
394  virtual void Set(const AliDmesonJetInfo& source);
395 
397  Double32_t fDCA ; //[0,2.56,9]
399  Double32_t fCosThetaStar ; //[-1.28,1.28,8]
401  Double32_t fPtK ; //[0,102.4,11]
403  Double32_t fPtPi ; //[0,102.4,11]
405  Double32_t fd0K ; //[-2.56,2.56,8]
407  Double32_t fd0Pi ; //[-2.56,2.56,8]
409  Double32_t fd0d0 ; //[-0.000524288,0.000524288,20]
411  Double32_t fCosPointing ; //[0,1.28,7]
413  Double32_t fMaxNormd0 ; //[-102.4,102.4,11]
414 
416  ClassDef(AliD0ExtendedInfoSummary, 4);
418  };
419 
426  public:
427  AliDStarInfoSummary() : AliDmesonInfoSummary(), f2ProngInvMass(0), fDeltaInvMass(0) {}
428  AliDStarInfoSummary(const AliDmesonJetInfo& source);
429  virtual ~AliDStarInfoSummary() {}
430 
431  virtual void Reset();
432  virtual void Set(const AliDmesonJetInfo& source);
433 
435  Double32_t f2ProngInvMass ; //[0,8.192,14]
437  Double32_t fDeltaInvMass ; //[0,0.8192,16]
438 
440  ClassDef(AliDStarInfoSummary, 2);
442  };
443 
448  class AliHFJetDefinition : public TObject {
449  public:
451  AliHFJetDefinition(EJetType_t type, Double_t r, EJetAlgo_t algo, ERecoScheme_t reco);
452  AliHFJetDefinition(EJetType_t type, Double_t r, EJetAlgo_t algo, ERecoScheme_t reco, TString rhoName);
453  AliHFJetDefinition(const AliHFJetDefinition &source);
454 
456 
457  const char* GetName() const;
458 
459  void SetJetPhiRange(Double_t min, Double_t max) { fMinJetPhi = min; fMaxJetPhi = max; }
460  void SetJetEtaRange(Double_t min, Double_t max) { fMinJetEta = min; fMaxJetEta = max; }
461  void SetJetPtRange(Double_t min, Double_t max) { fMinJetPt = min; fMaxJetPt = max; }
462  void SetChargedPtRange(Double_t min, Double_t max) { fMinChargedPt = min; fMaxChargedPt = max; }
463  void SetNeutralPtRange(Double_t min, Double_t max) { fMinNeutralPt = min; fMaxNeutralPt = max; }
464  void SetRhoName(TString n) { fRhoName = n ; }
465  void SetRecombinationScheme(ERecoScheme_t reco) { fRecoScheme = reco;}
466  Double_t GetRadius() const { return fRadius; }
467  TString GetRhoName() const { return fRhoName; }
468 
469  Bool_t IsJetInAcceptance(const AliJetInfo& jet) const;
470  Bool_t IsJetInAcceptance(const AliDmesonJetInfo& dMesonJet, std::string n) const;
471 
472  friend bool operator< (const AliHFJetDefinition& lhs, const AliHFJetDefinition& rhs);
473  friend inline bool operator> (const AliHFJetDefinition& lhs, const AliHFJetDefinition& rhs){ return rhs < lhs ; }
474  friend inline bool operator<=(const AliHFJetDefinition& lhs, const AliHFJetDefinition& rhs){ return !(lhs > rhs) ; }
475  friend inline bool operator>=(const AliHFJetDefinition& lhs, const AliHFJetDefinition& rhs){ return !(lhs < rhs) ; }
476 
477  friend bool operator==(const AliHFJetDefinition& lhs, const AliHFJetDefinition& rhs);
478  friend inline bool operator!=(const AliHFJetDefinition& lhs, const AliHFJetDefinition& rhs){ return !(lhs == rhs); }
479 
480  EJetType_t fJetType ;
482  EJetAlgo_t fJetAlgo ;
483  ERecoScheme_t fRecoScheme ;
496  std::vector<AliJetInfo> fJets ;
497 
498  private:
500  ClassDef(AliHFJetDefinition, 5);
502  };
503 
504  class AnalysisEngine;
505 
512  public:
513  OutputHandler();
515 
516  virtual ~OutputHandler() {;}
517 
518  virtual Bool_t FillOutput(Bool_t applyKinCuts);
519 
520  virtual void BuildOutputObject(const char* taskName) {;}
521 
522  virtual TObject* GetOutputObject() const { return 0 ; }
523  virtual Int_t GetDataSlotNumber() const { return -1; }
524 
525  protected:
531  std::vector<AliHFJetDefinition> *fJetDefinitions ;
536  std::map<int, AliDmesonJetInfo> *fDmesonJets ;
539 
540  private:
541  OutputHandler(const OutputHandler &source); // not implemented
542  OutputHandler& operator=(const OutputHandler& source); // not implemented
543  };
544 
551  public:
554 
556 
557  virtual Bool_t FillOutput(Bool_t applyKinCuts);
558 
559  virtual void BuildOutputObject(const char* taskName);
560 
561  Bool_t FillHnSparse(THnSparse* h, const AliDmesonJetInfo& DmesonJet, std::string n);
562 
563  Bool_t IsAnyJetInAcceptance(const AliDmesonJetInfo& dMesonJet) const;
564  void SetEnabledAxis(UInt_t axis) { fEnabledAxis = axis; }
565 
566  protected:
568 
569  private:
570  OutputHandlerTHnSparse(const OutputHandlerTHnSparse &source); // not implemented
571  OutputHandlerTHnSparse& operator=(const OutputHandlerTHnSparse& source); // not implemented
572  };
573 
581  public:
584 
585  virtual ~OutputHandlerTTree() {;}
586 
587  virtual Bool_t FillOutput(Bool_t applyKinCuts);
588 
589  virtual void BuildOutputObject(const char* taskName);
590  virtual TObject* GetOutputObject() const { return fTree; }
591  virtual Int_t GetDataSlotNumber() const { return fDataSlotNumber ; }
592 
593  TTree* GetTree() const { return fTree; }
594  void AssignDataSlot(Int_t n) { fDataSlotNumber = n; }
595 
596  protected:
601 
602  private:
603  OutputHandlerTTree(const OutputHandlerTTree &source); // not implemented
604  OutputHandlerTTree& operator=(const OutputHandlerTTree& source); // not implemented
605  };
606 
616  public:
619 
621 
622  virtual TObject* GetOutputObject() const { return fTree; }
623  virtual Int_t GetDataSlotNumber() const { return fDataSlotNumber ; }
624 
625  TTree* GetTree() const { return fTree; }
626  void AssignDataSlot(Int_t n) { fDataSlotNumber = n; }
627 
628  static OutputHandlerTTreeExtendedBase* GenerateOutputHandler(AnalysisEngine* eng);
629 
630  protected:
636 
637  private:
638  OutputHandlerTTreeExtendedBase(const OutputHandlerTTreeExtendedBase &source); // not implemented
640  };
641 
653  template<class EVENTTYPE, class DMESONTYPE, class JETTYPE>
655  public:
658 
660 
661  virtual Bool_t FillOutput(Bool_t applyKinCuts);
662  virtual void BuildOutputObject(const char* taskName);
663 
664  protected:
665  EVENTTYPE fCurrentEventInfo ;
666  std::vector<DMESONTYPE> fCurrentDmesonInfo ;
667  std::map<std::string, std::vector<JETTYPE> > fCurrentJetInfo ;
668 
669  private:
670  OutputHandlerTTreeExtended(const OutputHandlerTTreeExtended &source); // not implemented
671  OutputHandlerTTreeExtended& operator=(const OutputHandlerTTreeExtended& source); // not implemented
672  };
673 
679  class AnalysisEngine : public TObject {
680  public:
681  typedef std::pair<AliJetInfo*, Double_t> jet_distance_pair;
682 
685  kFindLast
686  };
687 
688  static AliAODMCParticle* FindParticleOrigin(const AliAODMCParticle* part, TClonesArray* mcArray, EFindParticleOriginMode_t mode, const std::set<UInt_t>& pdgSet);
689  static AliAODMCParticle* FindParticleOrigin(const AliAODMCParticle* part, TClonesArray* mcArray, EFindParticleOriginMode_t mode);
690  static std::pair<AliAnalysisTaskDmesonJetsSub::EMesonOrigin_t, AliAODMCParticle*> IsPromptCharm(const AliAODMCParticle* part, TClonesArray* mcArray);
691  static EMesonDecayChannel_t CheckDecayChannel(const AliAODMCParticle* part, TClonesArray* mcArray);
692 
693  AnalysisEngine();
694  AnalysisEngine(ECandidateType_t type, EMCMode_t MCmode, AliRDHFCuts* cuts = 0, Int_t nBins=80, Double_t range = 0.50);
695  AnalysisEngine(const AnalysisEngine &source);
696  AnalysisEngine& operator=(const AnalysisEngine& source);
697 
698  virtual ~AnalysisEngine();
699 
700  void SetCandidateType(ECandidateType_t t) { fCandidateType = t ; }
701  void SetMCMode(EMCMode_t m) { fMCMode = m ; }
702  void SetNMassBins(Int_t n) { fNMassBins = n ; }
703  void SetMassRange(Double_t min, Double_t max) { fMinMass = min ; fMaxMass = max ; }
704  void AdoptRDHFCuts(AliRDHFCuts* cuts);
705  void SetRDHFCuts(AliRDHFCuts* cuts);
706  void SetRejectedOriginMap(UInt_t m) { fRejectedOrigin = m ; }
707  void SetAcceptedDecayMap(UInt_t m) { fAcceptedDecay = m ; }
708  void SetRejectISR(Bool_t b) { fRejectISR = b ; }
709 
710  void SetD0Extended(Bool_t b) { fD0Extended = b ; }
711 
712  const char* GetCandidateName() const { return fCandidateName.Data(); }
713  const char* GetName() const;
714  const char* GetName(const AliHFJetDefinition& jetDef) const;
715 
716  EMCMode_t GetMCMode() const { return fMCMode ; }
717  ECandidateType_t GetCandidateType() const { return fCandidateType ; }
718 
719  OutputHandler* GetOutputHandler() const { return fOutputHandler; }
720 
721  AliHFJetDefinition* AddJetDefinition(EJetType_t type, Double_t r, EJetAlgo_t algo, ERecoScheme_t reco);
722  AliHFJetDefinition* AddJetDefinition(const AliHFJetDefinition& def);
723  std::vector<AliAnalysisTaskDmesonJetsSub::AliHFJetDefinition>::iterator FindJetDefinition(const AliHFJetDefinition& eng);
724  std::vector<AliAnalysisTaskDmesonJetsSub::AliHFJetDefinition>& GetJetDefinitions() { return fJetDefinitions; }
725 
726  void SetJetPhiRange(Double_t min, Double_t max);
727  void SetJetEtaRange(Double_t min, Double_t max);
728  void SetJetPtRange(Double_t min, Double_t max);
729  void SetChargedPtRange(Double_t min, Double_t max);
730  void SetNeutralPtRange(Double_t min, Double_t max);
731 
732 #if !(defined(__CINT__) || defined(__MAKECINT__))
733  std::map<int, AliDmesonJetInfo>& GetDmesons() { return fDmesonJets; }
734 #endif
735 
736  void Init(const AliEMCALGeometry* const geom, Int_t runNumber);
737 
739 
740  Bool_t IsInhibit() const { return fInhibit; }
741 
742  Bool_t IsD0Extended() const { return fD0Extended; }
743 
744  friend bool operator< (const AnalysisEngine& lhs, const AnalysisEngine& rhs);
745  friend inline bool operator> (const AnalysisEngine& lhs, const AnalysisEngine& rhs){ return rhs < lhs ; }
746  friend inline bool operator<=(const AnalysisEngine& lhs, const AnalysisEngine& rhs){ return !(lhs > rhs) ; }
747  friend inline bool operator>=(const AnalysisEngine& lhs, const AnalysisEngine& rhs){ return !(lhs < rhs) ; }
748 
749  friend bool operator==(const AnalysisEngine& lhs, const AnalysisEngine& rhs);
750  friend inline bool operator!=(const AnalysisEngine& lhs, const AnalysisEngine& rhs){ return !(lhs == rhs); }
751 
752  protected:
753  void RunAnalysis();
754 
758  UChar_t fNDaughters ;
769  std::vector<AliHFJetDefinition> fJetDefinitions ;
774  TRandom *fRandomGen ;
777  std::map<int, AliDmesonJetInfo> fDmesonJets ;
778  TClonesArray *fCandidateArray ;
780  std::vector<AliTrackContainer*> fTrackContainers ;
781  std::vector<AliClusterContainer*> fClusterContainers ;
786  mutable TString fName ;
787 
789  friend class OutputHandler;
790 
791  private:
792 
793  void AddInputVectors(AliEmcalContainer* cont, Int_t offset, TH2* rejectHist=0, Double_t eff=0.);
794  void SetCandidateProperties(Double_t range);
795  AliAODMCParticle* MatchToMC() const;
796  void RunDetectorLevelAnalysis();
797  void RunParticleLevelAnalysis();
798 
799  Bool_t ExtractRecoDecayAttributes(const AliAODRecoDecayHF2Prong* Dcand, AliDmesonJetInfo& DmesonJet, UInt_t i);
800  Bool_t ExtractD0Attributes(const AliAODRecoDecayHF2Prong* Dcand, AliDmesonJetInfo& DmesonJet, UInt_t i);
801  Bool_t ExtractEfficiencies(const AliAODRecoDecayHF2Prong* Dcand, AliDmesonJetInfo& DmesonJet, AliHFJetDefinition& jetDef,UInt_t i);
802  Bool_t GetEfficiencyDenominator(AliHFJetDefinition& jetDef);
803  Bool_t GetEfficiencyDenominatorOneByOne(AliHFJetDefinition& jetDef);
804  Bool_t ExtractD0Efficiencies(const AliAODRecoDecayHF2Prong* Dcand, AliDmesonJetInfo& DmesonJet, AliHFJetDefinition& jetDef,UInt_t i);
805  Bool_t ExtractDstarAttributes(const AliAODRecoCascadeHF* DstarCand, AliDmesonJetInfo& DmesonJet, UInt_t i);
806  Bool_t FindJet(AliAODRecoDecayHF2Prong* Dcand, AliDmesonJetInfo& DmesonJet, AliHFJetDefinition& jetDef, Int_t numcand);
807  void IterativeDeclustering(Int_t jetnum,Double_t type, AliHFJetDefinition& jetDef,Double_t invm);
809  ClassDef(AnalysisEngine, 3);
811  };
812 
814  AliAnalysisTaskDmesonJetsSub(const char* name, Int_t nOutputTrees=2);
816 
817  AnalysisEngine* AddAnalysisEngine(ECandidateType_t type, TString cutfname, TString cuttype, EMCMode_t bkgMode, EJetType_t jettype, Double_t jetradius, TString rhoName = "");
818  AnalysisEngine* AddAnalysisEngine(ECandidateType_t type, TString cutfname, TString cuttype, EMCMode_t bkgMode, const AliHFJetDefinition& jetDef, TString rhoName = "");
819  std::list<AliAnalysisTaskDmesonJetsSub::AnalysisEngine>::iterator FindAnalysisEngine(const AnalysisEngine& eng);
820 
830 
831  UInt_t GetEnabledAxis() const { return fEnabledAxis; }
832 
836  void SetRejectISR(Bool_t b) { fRejectISR = b ; }
837  void SetJetArea(Int_t type,
838  Double_t garea = 0.005) { fJetAreaType = type; fJetGhostArea = garea; }
839 
840  virtual void UserCreateOutputObjects();
841  virtual void ExecOnce();
842  virtual Bool_t Run();
843  virtual Bool_t FillHistograms();
844 
845  static AliAnalysisTaskDmesonJetsSub* AddTaskDmesonJetsSub(TString ntracks = "usedefault", TString nclusters = "usedefault", TString nMCpart = "", Int_t nMaxTrees = 2, TString suffix = "");
846 
847  protected:
848 
850 
851  AliRDHFCuts* LoadDMesonCutsFromFile(TString cutfname, TString cutsname);
852 
853  static const char* GetHFEventRejectionReasonLabel(UInt_t& bitmap);
855 
857 
859 
860  std::list<AnalysisEngine>
874 
875  private:
876 
879 
881  ClassDef(AliAnalysisTaskDmesonJetsSub, 10);
883 };
884 
885 #endif
Double_t fSoftPionPt
! Transverse momentum of the soft pion of the D* candidate
TString fBranchName
AOD branch where the D meson candidate are found.
Class that encapsulates event properties in a very compact structure (useful for pp simulation analys...
Int_t fDataSlotNumber
! Data slot where the tree output is posted
Int_t pdg
Double32_t fDeltaInvMass
< Difference between the Kpipi and the Kpi invariant masses in GeV/c2
void Print(std::ostream &o, const char *name, Double_t dT, Double_t dVM, Double_t alldT, Double_t alldVM)
Definition: PlotSysInfo.C:121
Bool_t fInhibit
!inhibit execution of the task
Double32_t fCorrZ
Z of the D meson after subtracting average background.
double Double_t
Definition: External.C:58
EventInfo * fEventInfo
! Object conatining the event information (centrality, pt hard, weight, etc.)
UInt_t fEnabledAxis
Use bit defined in EAxis_t to enable axis in the THnSparse.
virtual ~AliAnalysisTaskDmesonJetsSub()
This is the standard destructor.
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...
std::map< int, AliDmesonJetInfo > fDmesonJets
! Array containing the D meson jets
AliTLorentzVector fD
! 4-momentum of the D meson candidate
std::list< AnalysisEngine > fAnalysisEngines
Array of analysis parameters.
Double_t fMinMass
! Min mass in histogram axis
Double_t fNEF
Neutral Energy Fraction of the jet.
Double_t fJetGhostArea
Area of the ghost particles.
TArrayI fPDGdaughters
List of the PDG code of the daughters.
EventInfo fEventInfo
! Event info (centrality, weight, pt hard etc.)
AliAODMCParticle * fParton
! pointer to the parton in the shower tree of the D meson (only for particle level D mesons) ...
Declaration of class AliTLorentzVector.
EventInfo(double cent, double ep, double w, double pt)
friend bool operator!=(const AnalysisEngine &lhs, const AnalysisEngine &rhs)
virtual void UserCreateOutputObjects()
Creates the output containers.
Lightweight class that encapsulates D meson jets.
std::string fAccessMethodName
Access method name used to retrieve the event.
Double_t fTrackEfficiency
Artificial tracking inefficiency (0...1)
Int_t fDataSlotNumber
! Data slot where the tree output is posted
Double_t fMinNeutralPt
Minimum pt of the leading neutral particle (or cluster)
AliAnalysisTaskDmesonJetsSub()
This is the default constructor, used for ROOT I/O purposes.
Int_t fNOutputTrees
Maximum number of output trees.
static AliAnalysisTaskDmesonJetsSub * AddTaskDmesonJetsSub(TString ntracks="usedefault", TString nclusters="usedefault", TString nMCpart="", Int_t nMaxTrees=2, TString suffix="")
Bool_t fRejectISR
Reject initial state radiation.
const AliVEvent * fEvent
! pointer to the ESD/AOD event
Double_t fInvMass2Prong
! 2-prong mass of the D* candidate (w/o the soft pion)
Bool_t fD0D0bar
! kTRUE if selected both as D0 and D0bar
static void CalculateMassLimits(Double_t range, Int_t pdg, Int_t nbins, Double_t &minMass, Double_t &maxMass)
Double32_t fSelectionType
Selection type: D0, D0bar, both.
std::map< int, AliDmesonJetInfo > & GetDmesons()
Container for particles within the EMCAL framework.
AliJetContainer::ERecoScheme_t ERecoScheme_t
AliEventNotFound(const std::string &class_name, const std::string &method_name)
AliRDHFCuts * fRDHFCuts
D meson candidates cuts.
ERecoScheme_t fRecoScheme
Jet recombination scheme (pt scheme, E scheme, ...)
Select tracks based on specific prescriptions of HF analysis.
Output handler for D meson jet analysis.
Lightweight class that encapsulates D meson jets.
friend bool operator>=(const AliHFJetDefinition &lhs, const AliHFJetDefinition &rhs)
std::pair< AliJetInfo *, Double_t > jet_distance_pair
UInt_t fAcceptedDecay
Bit mask with D meson decays that are accepted (only used for particle-level analysis) ...
AliHFAODMCParticleContainer * fMCContainer
! MC particle container
std::vector< AliTrackContainer * > fTrackContainers
! Track containers
AliDmesonInfoSummary * fCurrentDmesonJetInfo
! Current D meson jet info
int Int_t
Definition: External.C:63
unsigned int UInt_t
Definition: External.C:33
float Float_t
Definition: External.C:68
AliAODMCParticle * fAncestor
! pointer to the ancestor particle in the shower tree of the D meson (only for particle level D meson...
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)
std::vector< DMESONTYPE > fCurrentDmesonInfo
! Current D meson jet info
Int_t fMCLabel
! MC label, i.e. index of the generator level D meson (only for detector level D meson candidates) ...
Double32_t fPt
Transverse momentum of the jet in GeV/c.
AnalysisEngine * AddAnalysisEngine(ECandidateType_t type, TString cutfname, TString cuttype, EMCMode_t bkgMode, EJetType_t jettype, Double_t jetradius, TString rhoName="")
Base task in the EMCAL framework (lighter version of AliAnalysisTaskEmcal)
UInt_t fEnabledAxis
! Use bit defined in EAxis_t to enable axis in the THnSparse
Bool_t fApplyKinematicCuts
Apply jet kinematic cuts.
Bool_t fRejectISR
! Reject initial state radiation
AliRDHFCuts * LoadDMesonCutsFromFile(TString cutfname, TString cutsname)
Base class for container structures within the EMCAL framework.
TClonesArray * fCandidateArray
! D meson candidate array
Bool_t fD0Extended
Store extended information in the tree (only for D0 mesons)
std::vector< AliClusterContainer * > fClusterContainers
! Cluster containers
EJetType_t fJetType
Jet type (charged, full, neutral)
AliTLorentzVector fMomentum
4-momentum of the jet
Bool_t fD0Extended
! Store extended information in the tree (only for D0 mesons)
bool operator<(const AliAnalysisTaskDmesonJets::AliHFJetDefinition &lhs, const AliAnalysisTaskDmesonJets::AliHFJetDefinition &rhs)
AliJetContainer::EJetAlgo_t EJetAlgo_t
TString fRhoName
Name of the object that holds the average background value.
AliFJWrapper * fFastJetWrapper
! Fastjet wrapper
void FillPartonLevelHistograms()
Fill histograms with parton-level information.
std::string fClassName
Class name where the event was not found.
Double_t fMaxChargedPt
Transverse momentum of the leading charged particle (or track)
Int_t mode
Definition: anaM.C:41
std::vector< AliHFJetDefinition > fJetDefinitions
Jet definitions.
AliJetInfoSummary ** fCurrentJetInfo
! Current jet info
std::map< std::string, std::vector< JETTYPE > > fCurrentJetInfo
! Current jet info
Double32_t fR
Distance between D meson and jet axis.
short Short_t
Definition: External.C:23
friend bool operator<=(const AnalysisEngine &lhs, const AnalysisEngine &rhs)
Select MC particles based on specific prescriptions of HF analysis.
friend bool operator!=(const AliHFJetDefinition &lhs, const AliHFJetDefinition &rhs)
virtual void BuildOutputObject(const char *taskName)
virtual void SetOutputTypeInternal(EOutputType_t b)
static const char * GetHFEventRejectionReasonLabel(UInt_t &bitmap)
Double_t fMaxChargedPt
Maximum pt of the leading charged particle (or track)
void SetJetArea(Int_t type, Double_t garea=0.005)
friend bool operator<=(const AliHFJetDefinition &lhs, const AliHFJetDefinition &rhs)
std::map< std::string, AliJetInfo > fJets
! list of jets
std::vector< AliJetInfo > fJets
! Inclusive jets reconstructed in the current event (includes D meson candidate daughters, if any)
AliVParticle * fDmesonParticle
! pointer to the particle object
Double_t fMaxMass
! Max mass in histogram axis
friend bool operator>=(const AnalysisEngine &lhs, const AnalysisEngine &rhs)
Double_t fCorrPt
Transverse momentum of the jet after subtracting the average background.
Definition: External.C:220
Double_t minMass
Lightweight class that encapsulates D meson jets for PbPb analysis.
Double_t fMinChargedPt
Minimum pt of the leading charged particle (or track)
Short_t fPartonType
! type of the parton in the shower tree (only for particle level D mesons)
AliHFAODMCParticleContainer * fMCContainer
! MC particle container
Double32_t fCorrPt
Transverse momentum of the jet in GeV/c after subtracting average background.
Container class for histograms.
Definition: THistManager.h:99
unsigned short UShort_t
Definition: External.C:28
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)
Int_t PostDataFromAnalysisEngine(OutputHandler const *handler)
bool operator==(const AliAnalysisTaskDmesonJets::AliHFJetDefinition &lhs, const AliAnalysisTaskDmesonJets::AliHFJetDefinition &rhs)
Struct that encapsulates analysis parameters.
AliAnalysisTaskDmesonJetsSub & operator=(const AliAnalysisTaskDmesonJetsSub &source)
Bool_t fReconstructed
! Whether this D meson was reconstructed (only for particle level D mesons)
const Int_t nbins
Double_t maxMass
EOutputType_t fOutputType
Output type: none, TTree or THnSparse.
bool Bool_t
Definition: External.C:53
Byte_t fSelectionType
! for D0: 0=not selected, 1=D0, 2=D0bar
Double_t fMaxNeutralPt
Maximum pt of the leading neutral particle (or cluster)
std::vector< AliAnalysisTaskDmesonJetsSub::AliHFJetDefinition > & GetJetDefinitions()
Double32_t fInvMass
Invariant mass of the D0 meson candidate in GeV/c2.
std::vector< AliHFJetDefinition > * fJetDefinitions
! Jet definitions
Int_t fNConstituents
Number of constituents of the jet.
EMCMode_t fMCMode
! MC mode: No MC (data and MC detector level), background-only (MC), signal-only (MC), MC truth (particle level)
Container structure for EMCAL clusters.
EJetAlgo_t fJetAlgo
Jet algorithm (kt, anti-kt,...)
Lightweight class that encapsulates D meson jets.
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)
std::list< AliAnalysisTaskDmesonJetsSub::AnalysisEngine >::iterator FindAnalysisEngine(const AnalysisEngine &eng)
Double_t fMaxNeutralPt
Transverse momentum of the leading neutral particle (or cluster)
Double32_t fPt
Transverse momentum of the D meson in GeV/c.
Double32_t fPartonPt
Transverse momentum of the parton.
Double_t fCent
!event centrality
THistManager fHistManager
Histogram manager.
AliJetContainer::EJetType_t EJetType_t