]>
Commit | Line | Data |
---|---|---|
240ed454 | 1 | // Analysis task for creating a reduced tree containing event, track and resonance candidate information |
2 | // Author: Ionut-Cristian Arsene (i.c.arsene@gsi.de,i.c.arsene@cern.ch) | |
3 | // 2012/06/21 | |
4 | ||
5 | #ifndef ALIANALYSISTASKREDUCEDTREE_H | |
6 | #define ALIANALYSISTASKREDUCEDTREE_H | |
7 | ||
8 | #include "TList.h" | |
9 | ||
10 | #include "AliAnalysisTaskSE.h" | |
11 | ||
12 | class AliAnalysisCuts; | |
13 | class TTree; | |
14 | class TFile; | |
15 | class AliESDv0Cuts; | |
f6e67fe7 | 16 | class AliESDv0KineCuts; |
240ed454 | 17 | class AliKFVertex; |
18 | class AliReducedEvent; | |
19 | class AliReducedEventFriend; | |
20 | class AliReducedPair; | |
21 | class AliDielectron; | |
22 | ||
23 | //_________________________________________________________________________ | |
24 | class AliAnalysisTaskReducedTree : public AliAnalysisTaskSE { | |
25 | ||
26 | public: | |
27 | AliAnalysisTaskReducedTree(); | |
28 | AliAnalysisTaskReducedTree(const char *name); | |
29 | virtual ~AliAnalysisTaskReducedTree(){ } | |
30 | ||
31 | virtual void UserExec(Option_t *option); | |
32 | virtual void UserCreateOutputObjects(); | |
33 | virtual void FinishTaskOutput(); | |
34 | ||
35 | void UsePhysicsSelection(Bool_t phy=kTRUE) {fSelectPhysics=phy;} | |
36 | void SetTriggerMask(UInt_t mask) {fTriggerMask=mask;} | |
37 | UInt_t GetTriggerMask() const { return fTriggerMask; } | |
38 | void SetRejectPileup(Bool_t pileup=kTRUE) { fRejectPileup=pileup; } | |
39 | ||
40 | // Cuts for selection of event to be written to tree | |
41 | void SetEventFilter(AliAnalysisCuts * const filter) {fEventFilter=filter;} | |
42 | // Cuts for selecting tracks included in the tree | |
43 | void SetTrackFilter(AliAnalysisCuts * const filter) {fTrackFilter=filter;} | |
44 | // Cuts for selecting tracks to be used for Q vector calculation | |
45 | void SetFlowTrackFilter(AliAnalysisCuts * const filter) {fFlowTrackFilter = filter;} | |
46 | ||
47 | // Cuts for selecting V0s | |
48 | void SetK0sPionCuts(AliAnalysisCuts * const filter) {fK0sPionCuts=filter;} | |
49 | void SetLambdaProtonCuts(AliAnalysisCuts * const filter) {fLambdaProtonCuts=filter;} | |
50 | void SetLambdaPionCuts(AliAnalysisCuts * const filter) {fLambdaPionCuts=filter;} | |
f6e67fe7 | 51 | void SetGammaElectronCuts(AliAnalysisCuts* const filter) {fGammaElectronCuts=filter;} |
240ed454 | 52 | void SetK0sCuts(AliESDv0Cuts* const cuts) {fK0sCuts = cuts;} |
0c09cae4 | 53 | void SetK0sStrongCuts(AliESDv0Cuts* const cuts) {fK0sStrongCuts = cuts;} |
240ed454 | 54 | void SetLambdaCuts(AliESDv0Cuts* const cuts) {fLambdaCuts = cuts;} |
0c09cae4 | 55 | void SetLambdaStrongCuts(AliESDv0Cuts* const cuts) {fLambdaStrongCuts = cuts;} |
f6e67fe7 | 56 | void SetGammaConvCuts(AliESDv0KineCuts* const cuts) {fGammaConvCuts = cuts;} |
0c09cae4 | 57 | void SetGammaConvStrongCuts(AliESDv0KineCuts* const cuts) {fGammaConvStrongCuts = cuts;} |
240ed454 | 58 | void SetK0sMassRange(Double_t min=0.4, Double_t max=0.6) {fK0sMassRange[0]=min; fK0sMassRange[1]=max;} |
59 | void SetLambdaMassRange(Double_t min=1.08, Double_t max=1.15) {fLambdaMassRange[0]=min; fLambdaMassRange[1]=max;} | |
f6e67fe7 | 60 | void SetGammaConvMassRange(Double_t min=0.0, Double_t max=0.1) {fGammaMassRange[0]=min; fGammaMassRange[1]=max;} |
240ed454 | 61 | void SetV0Histograms(AliDielectronHistos * const histos) {fV0Histos=histos;} |
62 | ||
63 | // Toggle on/off information branches | |
f6e67fe7 | 64 | void SetFillTrackInfo(Bool_t flag=kTRUE) {fFillTrackInfo = flag;} |
65 | void SetFillDielectronInfo(Bool_t flag=kTRUE) {fFillDielectronInfo = flag;} | |
66 | void SetFillV0Info(Bool_t flag=kTRUE) {fFillV0Info = flag;} | |
67 | void SetFillGammaConversions(Bool_t flag=kTRUE) {fFillGammaConversions = flag;} | |
68 | void SetFillK0s(Bool_t flag=kTRUE) {fFillK0s = flag;} | |
69 | void SetFillLambda(Bool_t flag=kTRUE) {fFillLambda = flag;} | |
70 | void SetFillALambda(Bool_t flag=kTRUE) {fFillALambda = flag;} | |
71 | void SetFillCaloClusterInfo(Bool_t flag=kTRUE) {fFillCaloClusterInfo = flag;} | |
72 | void SetFillFriendInfo(Bool_t flag=kTRUE) {fFillFriendInfo = flag;} | |
240ed454 | 73 | |
74 | // Add dielectron objects to the list. These contain cuts and histogram definitions | |
75 | void AddDielectron(AliDielectron * const die) { fListDielectron.Add(die); } | |
76 | ||
77 | private: | |
78 | ||
79 | TList fListDielectron; // List of dielectron framework instances | |
80 | TList fListHistos; //! List of histogram managers in the dielectron framework classes | |
81 | ||
82 | Bool_t fSelectPhysics; // Whether to use physics selection | |
83 | UInt_t fTriggerMask; // Event trigger mask | |
84 | Bool_t fRejectPileup; // pileup rejection wanted | |
85 | ||
86 | Bool_t fFillTrackInfo; // fill track information | |
87 | Bool_t fFillDielectronInfo; // fill dielectrons | |
88 | Bool_t fFillV0Info; // fill the V0 information | |
f6e67fe7 | 89 | Bool_t fFillGammaConversions; // fill gamma conversions |
90 | Bool_t fFillK0s; // fill the K0s V0s | |
91 | Bool_t fFillLambda; // fill the lambda V0s | |
92 | Bool_t fFillALambda; // fill the anti-lambda V0s | |
240ed454 | 93 | Bool_t fFillCaloClusterInfo; // fill the calorimeter clusters |
94 | Bool_t fFillFriendInfo; // fill friend tree information | |
95 | ||
96 | AliAnalysisCuts *fEventFilter; // event filter | |
97 | AliAnalysisCuts *fTrackFilter; // filter for the hadrons to be correlated with the dielectrons | |
98 | AliAnalysisCuts *fFlowTrackFilter; // filter for the barrel tracks to be used for the Q-vector | |
99 | ||
100 | AliESDv0Cuts *fK0sCuts; // v0 standard filter for K0s->pi+pi- | |
101 | AliESDv0Cuts *fLambdaCuts; // v0 standard filter for Lambda0->p + pi | |
f6e67fe7 | 102 | AliESDv0KineCuts *fGammaConvCuts; // v0 standard filter for gamma conversions |
240ed454 | 103 | AliAnalysisCuts *fK0sPionCuts; // filter for pions from K0s |
104 | AliAnalysisCuts *fLambdaProtonCuts;// filter for protons from Lambda | |
105 | AliAnalysisCuts *fLambdaPionCuts; // filter for pions from Lambda | |
f6e67fe7 | 106 | AliAnalysisCuts *fGammaElectronCuts; // filter for electrons from gamma conversions |
0c09cae4 | 107 | AliESDv0Cuts *fK0sStrongCuts; // v0 strong filter for K0s->pi+pi- |
108 | AliESDv0Cuts *fLambdaStrongCuts; // v0 strong filter for Lambda0->p + pi | |
109 | AliESDv0KineCuts *fGammaConvStrongCuts; // v0 strong filter for gamma conversions | |
110 | ||
f6e67fe7 | 111 | Double_t fK0sMassRange[2]; // mass range for allowed K0s pairs |
112 | Double_t fLambdaMassRange[2]; // mass range for allowed Lambda pairs | |
113 | Double_t fGammaMassRange[2]; // mass range for allowed Gamma conversion pairs | |
240ed454 | 114 | AliDielectronHistos* fV0Histos; // histogram manager for V0s |
115 | ||
32cd78f7 | 116 | TFile *fTreeFile; //! output file containing the tree |
240ed454 | 117 | TTree *fTree; //! Reduced event tree |
f6e67fe7 | 118 | TFile *fFriendTreeFile; //! output file containing the friend tree |
240ed454 | 119 | TTree *fFriendTree; //! Reduced event tree with friend info (event plane, etc.) |
32cd78f7 | 120 | AliReducedEvent *fReducedEvent; //! reduced event wise information |
121 | AliReducedEventFriend *fReducedEventFriend; //! friend reduced event wise information | |
240ed454 | 122 | |
123 | void FillEventInfo(); // fill reduced event information | |
124 | void FillFriendEventInfo(); // fill reduced event friend information | |
125 | void FillTrackInfo(); // fill reduced track information | |
126 | void FillDielectronPairInfo(AliDielectron* die, Short_t iDie); // fill dielectron reduced pair information | |
127 | void FillV0PairInfo(); // fill V0 reduced pair information | |
128 | AliReducedPair* FillV0PairInfo(AliESDv0* v0, Int_t id, AliESDtrack* legPos, AliESDtrack* legNeg, AliKFVertex* vtxKF, Bool_t chargesAreCorrect); | |
129 | UChar_t EncodeTPCClusterMap(AliESDtrack* track); | |
130 | void FillCaloClusters(); | |
131 | ||
132 | AliAnalysisTaskReducedTree(const AliAnalysisTaskReducedTree &c); | |
133 | AliAnalysisTaskReducedTree& operator= (const AliAnalysisTaskReducedTree &c); | |
134 | ||
f6e67fe7 | 135 | ClassDef(AliAnalysisTaskReducedTree, 2); //Analysis Task for creating a reduced event information tree |
240ed454 | 136 | }; |
137 | #endif |