AliPhysics  ff07904 (ff07904)
AliHFCutOptTreeHandler.h
Go to the documentation of this file.
1 #ifndef ALIHFCUTOPTTREEHANDLER_H
2 #define ALIHFCUTOPTTREEHANDLER_H
3 
4 /* Copyright(c) 1998-2008, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice */
6 
7 /* $Id$ */
8 
9 //*************************************************************************
10 // Class AliHFCutOptTreeHandler
11 // helper class to handle a tree for cut optimisation and MVA analyses
12 // Authors:
13 // F. Catalano, fabio.catalano@cern.ch
14 // A. Festanti, andrea.festanti@cern.ch
15 // F. Grosa, fabrizio.grosa@cern.ch
16 // G. Innocenti, gian.michele.innocenti@cern.ch
17 // F. Prino, prino@to.infn.it
18 // L. Vermunt, luuk.vermunt@cern.ch
20 
21 #include <TTree.h>
22 #include <TClonesArray.h>
23 #include "AliAODRecoDecayHF.h"
24 #include "AliAODPidHF.h"
25 
27 {
28  public:
29  enum decaychannel {
33  };
34 
35  enum candtype {
41  };
42 
43  enum optpid {
47  kNsigmaPIDfloatandchar, //--> to test
51  };
52 
54  AliHFCutOptTreeHandler(int decay, int PIDopt, bool isMC);
55  virtual ~AliHFCutOptTreeHandler();
56 
57  bool SetVariables(AliAODRecoDecayHF* d, int masshypo, AliAODPidHF* pidHF=0x0, TClonesArray* arrayMC=0x0);
58  TTree* BuildTree(TString name="tree", TString title="tree");
59  bool FillTree() {
60  if(!fTreeTopolVar) return false;
61  if(!(fCandType==kBkg && fFillOnlySignal)) fTreeTopolVar->Fill();
62  return true;
63  }
64 
66  void SetOptPID(int PIDopt) {fPidOpt=PIDopt;}
68  void SetUseCentrality(bool usecent=true) {fUseCentrality=usecent;}
69  void SetIsSelectedStd(bool isselected=true) {fIsSelStd=isselected;}
70  void SetUseSelectedStdFlag(bool useselflag=true) {fUseSelFlag=useselflag;}
71  void SetFillOnlySignal(bool fillopt=true) {fFillOnlySignal=fillopt;}
72  void SetIsMC(bool isMC=true) {fIsMC=isMC;}
73  void SetCandidateType(bool issignal, bool isprompt, bool isreflected) {
74  if(issignal) fIsSignal=1;
75  else fIsSignal=0;
76  if(isprompt) fIsPrompt=1;
77  else fIsPrompt=0;
79  if(isreflected) fIsRefl=1;
80  else fIsRefl=0;
81  }
82  else fIsRefl=0; //D+ -> Kpipi signal never reflected
83  }
84 
85  private:
86  void SetPidVars(AliAODRecoDecayHF* d, AliAODPidHF* pidHF);
87  void SetPdgCodes();
88 
90 
93  int fPdgCode;
98  int fPidOpt;
99  char fCandType;
101  char fCentrality;
103  bool fIsMC;
104  int fIsSignal;
105  int fIsPrompt;
106  int fIsRefl;
107  char fIsSelStd;
108  bool fUseSelFlag;
109 
111  ClassDef(AliHFCutOptTreeHandler,1);
112 };
114 
115 #endif
void SetFillOnlySignal(bool fillopt=true)
int fDecayChannel
tree for cut optimisation
const char * title
Definition: MakeQAPdf.C:27
bool SetVariables(AliAODRecoDecayHF *d, int masshypo, AliAODPidHF *pidHF=0x0, TClonesArray *arrayMC=0x0)
centrality
int fPidOpt
array with nSigma PID (char)
bool fIsMC
flag to enable only signal filling
int fIsPrompt
flag for signal=1 (including prompt, FD, reflected), bkg=0
void SetUseSelectedStdFlag(bool useselflag=true)
char fIsSelStd
flag for reflected signal=1, non-reflected signal=0
bool fUseSelFlag
flag to tag selected candidates by "standard" cuts
void SetPidVars(AliAODRecoDecayHF *d, AliAODPidHF *pidHF)
int fIsSignal
flag to enable checks on MC truth
void SetIsSelectedStd(bool isselected=true)
void SetDecayChannel(int decay=kD0toKpi)
void SetIsMC(bool isMC=true)
float fTopolVarVector[knTopolVars]
absolute values of pdg codes of the daughters
int fIsRefl
flag for prompt=1 (inluding reflected), FD=0
void SetCentrality(char centrality)
Bool_t isMC
decay
Definition: HFPtSpectrum.C:41
void SetUseCentrality(bool usecent=true)
char fCentrality
flag to enable centrality
bool fFillOnlySignal
centrality in case of p-Pb or Pb-Pb
float fPIDnSigmaCharVector[knPidVars]
array with nSigma PID
char fCandType
option for PID variables
float fPIDnSigmaVector[knPidVars]
array with topological variables
bool fUseCentrality
flag for candidate type (bkg, prompt signal, FD signal, prompt refl, FD refl)
void SetCandidateType(bool issignal, bool isprompt, bool isreflected)
TTree * BuildTree(TString name="tree", TString title="tree")
int fPdgCodeProngs[knMaxProngs]
absolute value of pdg code of the particle of interest