AliPhysics  608b256 (608b256)
AliAnalysisTaskSEHFSystPID.h
Go to the documentation of this file.
1 #ifndef ALIANALYSISTASKSEHFSYSTNSIGMAPID_H
2 #define ALIANALYSISTASKSEHFSYSTNSIGMAPID_H
3 
4 /* Copyright(c) 1998-2008, ALICE Experiment at CERN, All rights reserved. */
5 
7 // \class AliAnalysisTaskSEHFSystPID //
8 // \brief analysis task for the study of PID systematic uncertainties of HF particles //
9 // \author: A. M. Barbano, anastasia.maria.barbano@cern.ch //
10 // \author: F. Grosa, fabrizio.grosa@cern.ch //
12 
13 #include <vector>
14 #include <TH1.h>
15 #include <TH2.h>
16 #include <TList.h>
17 
18 #include "AliAnalysisTaskSE.h"
19 #include "AliAODv0KineCuts.h"
20 #include "AliAODTrack.h"
21 #include "AliAODEvent.h"
22 #include "AliESDtrackCuts.h"
23 #include "AliPIDResponse.h"
24 
25 using namespace std;
26 
28 
29 public:
30 
31  enum tagflags {
32  kIsPionFromK0s = BIT(0),
33  kIsPionFromL = BIT(1),
34  kIsProtonFromL = BIT(2),
35  kIsElectronFromGamma = BIT(3),
36  kIsKaonFromKinks = BIT(4),
37  kIsKaonFromTOF = BIT(5),
38  kIsKaonFromTPC = BIT(6)
39  };
40 
41  enum centest {
47  kCentCL1
48  };
49 
51  AliAnalysisTaskSEHFSystPID(const char *name, int system=0);
52  virtual ~AliAnalysisTaskSEHFSystPID();
53 
54  virtual void UserCreateOutputObjects();
55  virtual void UserExec(Option_t *option);
56 
57  void SetReadMC(bool flag = true) {fIsMC = flag;}
58  void SetCentralityLimits(int mincent, int maxcent) {fCentMin = mincent; fCentMax = maxcent;}
59  void SetCentralityEstimator(int centest=kCentV0M) {fCentEstimator=centest;}
60  void SetESDtrackCuts(AliESDtrackCuts * trackCuts) {fESDtrackCuts = trackCuts;}
61  void SetTriggerInfo(TString trigClass, unsigned long long mask=0) {fTriggerClass = trigClass; fTriggerMask = mask;}
62  void SetNsigmaKaonForTagging(float nsigmamax = 0.02) {fNsigmaMaxForTag=nsigmamax;}
63  void SetKinksSelections(float qtmin=0.15, float Rmin=120, float Rmax=210) {fQtMinKinks=qtmin; fRMinKinks=Rmin; fRMaxKinks=Rmax;}
64  void SetfFillTreeWithNsigmaPIDOnly(bool fillonlyNsigma=true) {fFillTreeWithNsigmaPIDOnly=fillonlyNsigma;}
65  void EnableDownSampling(double fractokeep=0.1, double ptmax=1.5) {fEnabledDownSampling=true; fFracToKeepDownSampling=fractokeep; fPtMaxDownSampling=ptmax;}
66 
67 private:
68 
69  bool IsVertexAccepted();
70  bool IsCentralitySelected();
71  void GetTaggedV0s(vector<short> &idPionFromK0s, vector<short> &idPionFromL, vector<short> &idProtonFromL, vector<short> &idElectronFromGamma);
72  short GetPDGcodeFromMC(AliAODTrack* track, TClonesArray* arrayMC);
73  AliAODTrack* IsKinkDaughter(AliAODTrack* track);
74  void GetTaggedKaonsFromKinks(vector<short> &idKaonFromKinks);
75  float MaxOpeningAngleKnu(float p);
76  float GetTOFmomentum(AliAODTrack* track);
77  short ConvertFloatToShort(float num);
78  unsigned short ConvertFloatToUnsignedShort(float num);
79 
81  static const int kNHypo = 3;
82  const TString hyponames[kNHypo] = {"Pion","Kaon","Proton"};
83 
84  const float kCSPEED = 2.99792457999999984e-02; // cm / ps
85 
87 
88  TH1F *fHistNEvents;
89  TH2F *fHistArmenteroPlot[5];
95  TH2F *fHistNsigmaTPCvsPt[kNHypo];
96  TH2F *fHistNsigmaTOFvsPt[kNHypo];
98 
99  short fPIDNsigma[6];
100  unsigned short fPTPC;
101  unsigned short fPTOF;
102  unsigned short fdEdxTPC;
103  unsigned short fToF;
104  unsigned short fPt;
105  unsigned char fTPCNcls;
106  unsigned char fTPCNclsPID;
107  unsigned short fTrackLength;
108  unsigned short fStartTimeRes;
109  short fPDGcode;
110  unsigned char fTag;
112  float fQtMinKinks;
113  float fRMinKinks;
114  float fRMaxKinks;
115 
116  float fCentMin;
117  float fCentMax;
120  unsigned long long fTriggerMask;
121  bool fIsMC;
122  int fSystem;
123 
124  AliESDtrackCuts * fESDtrackCuts;
126  AliPIDResponse *fPIDresp;
127  AliAODv0KineCuts *fV0cuts;
128 
133 
134  ClassDef(AliAnalysisTaskSEHFSystPID, 1);
135 };
136 
137 #endif
void SetCentralityLimits(int mincent, int maxcent)
void SetKinksSelections(float qtmin=0.15, float Rmin=120, float Rmax=210)
Definition: External.C:236
AliPIDResponse * fPIDresp
AOD object.
void SetTriggerInfo(TString trigClass, unsigned long long mask=0)
TH1F * fHistNEvents
! histo with number of events
unsigned short fPt
ToF signal to fill the tree.
unsigned short fPTOF
TPC momentum to fill the tree.
unsigned short fTrackLength
number of PID clusters in TPC to fill the tree
void SetCentralityEstimator(int centest=kCentV0M)
double fFracToKeepDownSampling
flag to enable/disable downsampling
void EnableDownSampling(double fractokeep=0.1, double ptmax=1.5)
unsigned char fTPCNcls
transverse momentum to fill the tree
TH2F * fHistOpeningAngleVsPMotherKink
! histo for opening angle vs. pT mother kink
float fQtMinKinks
max nSigma value to tag kaons
TH2F * fHistNTPCclsVsRadius
! histo for nTPC clusters vs. R mother kink
TH2F * fHistQtVsMassKinks
! histo for mother-kink qt vs. mass distribution
unsigned char fTPCNclsPID
number of clusters in TPC to fill the tree
unsigned short fStartTimeRes
track length for TOF PID
void SetESDtrackCuts(AliESDtrackCuts *trackCuts)
unsigned short fdEdxTPC
TOF momentum to fill the tree.
unsigned short fToF
TPC dEdX to fill the tree.
double fPtMaxDownSampling
fraction to keep when downsampling activated
float fCentMin
max radius in XY for kinks
float fRMaxKinks
min radius in XY for kinks
const Double_t ptmax
AliAODEvent * fAOD
single-track cut set
unsigned short fPTPC
Nsigma PID to fill the tree.
void SetNsigmaKaonForTagging(float nsigmamax=0.02)
TH2F * fHistdEdxVsPMotherKink
! histo for mother kink TPC dEdx vs. p
TH2F * fHistPDaughterVsMotherKink
! histo for pT daughter vs. pT mother kink
AliESDtrackCuts * fESDtrackCuts
system: 0->pp,pPb 1->PbPb
short fPDGcode
start time resolution for TOF PID
unsigned char fTag
PDG code in case of MC to fill the tree.
TList * fOutputList
! output list for histograms
TTree * fPIDtree
! tree with PID info
AliAODv0KineCuts * fV0cuts
basic pid object
unsigned long long fTriggerMask
trigger class
int fSystem
flag to switch on the MC analysis for the efficiency estimation
const char Option_t
Definition: External.C:48
float fNsigmaMaxForTag
bit map for tag (see enum above)
TString fTriggerClass
centrality estimator
bool fEnabledDownSampling
flag to enable filling of the tree with only Nsigma variables for the PID
void SetfFillTreeWithNsigmaPIDOnly(bool fillonlyNsigma=true)