Change Mult binning scheme
[u/mrichter/AliRoot.git] / PWGDQ / dielectron / AliAnalysisTaskReducedTree.h
CommitLineData
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
12class AliAnalysisCuts;
13class TTree;
14class TFile;
15class AliESDv0Cuts;
f6e67fe7 16class AliESDv0KineCuts;
240ed454 17class AliKFVertex;
18class AliReducedEvent;
19class AliReducedEventFriend;
20class AliReducedPair;
21class AliDielectron;
22
23//_________________________________________________________________________
24class AliAnalysisTaskReducedTree : public AliAnalysisTaskSE {
25
26public:
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;}
53 void SetLambdaCuts(AliESDv0Cuts* const cuts) {fLambdaCuts = cuts;}
f6e67fe7 54 void SetGammaConvCuts(AliESDv0KineCuts* const cuts) {fGammaConvCuts = cuts;}
99345a64 55 void SetV0OpenCuts(AliESDv0KineCuts* const cuts) {fV0OpenCuts = cuts;}
56 void SetV0StrongCuts(AliESDv0KineCuts* const cuts) {fV0StrongCuts = cuts;}
240ed454 57 void SetK0sMassRange(Double_t min=0.4, Double_t max=0.6) {fK0sMassRange[0]=min; fK0sMassRange[1]=max;}
58 void SetLambdaMassRange(Double_t min=1.08, Double_t max=1.15) {fLambdaMassRange[0]=min; fLambdaMassRange[1]=max;}
f6e67fe7 59 void SetGammaConvMassRange(Double_t min=0.0, Double_t max=0.1) {fGammaMassRange[0]=min; fGammaMassRange[1]=max;}
240ed454 60 void SetV0Histograms(AliDielectronHistos * const histos) {fV0Histos=histos;}
61
62 // Toggle on/off information branches
f6e67fe7 63 void SetFillTrackInfo(Bool_t flag=kTRUE) {fFillTrackInfo = flag;}
64 void SetFillDielectronInfo(Bool_t flag=kTRUE) {fFillDielectronInfo = flag;}
65 void SetFillV0Info(Bool_t flag=kTRUE) {fFillV0Info = flag;}
66 void SetFillGammaConversions(Bool_t flag=kTRUE) {fFillGammaConversions = flag;}
67 void SetFillK0s(Bool_t flag=kTRUE) {fFillK0s = flag;}
68 void SetFillLambda(Bool_t flag=kTRUE) {fFillLambda = flag;}
69 void SetFillALambda(Bool_t flag=kTRUE) {fFillALambda = flag;}
70 void SetFillCaloClusterInfo(Bool_t flag=kTRUE) {fFillCaloClusterInfo = flag;}
6ab32c51 71 void SetFillFMDSectorInfo(Bool_t flag=kFALSE) {fFillFMDSectorInfo = flag;}
72 void SetFillFMDChannelInfo(Bool_t flag=kFALSE) {fFillFMDChannelInfo = flag;}
f6e67fe7 73 void SetFillFriendInfo(Bool_t flag=kTRUE) {fFillFriendInfo = flag;}
240ed454 74
75 // Add dielectron objects to the list. These contain cuts and histogram definitions
76 void AddDielectron(AliDielectron * const die) { fListDielectron.Add(die); }
77
78 private:
79
80 TList fListDielectron; // List of dielectron framework instances
81 TList fListHistos; //! List of histogram managers in the dielectron framework classes
82
83 Bool_t fSelectPhysics; // Whether to use physics selection
84 UInt_t fTriggerMask; // Event trigger mask
85 Bool_t fRejectPileup; // pileup rejection wanted
86
87 Bool_t fFillTrackInfo; // fill track information
88 Bool_t fFillDielectronInfo; // fill dielectrons
89 Bool_t fFillV0Info; // fill the V0 information
f6e67fe7 90 Bool_t fFillGammaConversions; // fill gamma conversions
91 Bool_t fFillK0s; // fill the K0s V0s
92 Bool_t fFillLambda; // fill the lambda V0s
93 Bool_t fFillALambda; // fill the anti-lambda V0s
240ed454 94 Bool_t fFillCaloClusterInfo; // fill the calorimeter clusters
6ab32c51 95 Bool_t fFillFMDSectorInfo; // fill the FMD info for every sector
96 Bool_t fFillFMDChannelInfo; // fill the FMD info for every channel
240ed454 97 Bool_t fFillFriendInfo; // fill friend tree information
98
99 AliAnalysisCuts *fEventFilter; // event filter
100 AliAnalysisCuts *fTrackFilter; // filter for the hadrons to be correlated with the dielectrons
101 AliAnalysisCuts *fFlowTrackFilter; // filter for the barrel tracks to be used for the Q-vector
102
103 AliESDv0Cuts *fK0sCuts; // v0 standard filter for K0s->pi+pi-
104 AliESDv0Cuts *fLambdaCuts; // v0 standard filter for Lambda0->p + pi
f6e67fe7 105 AliESDv0KineCuts *fGammaConvCuts; // v0 standard filter for gamma conversions
240ed454 106 AliAnalysisCuts *fK0sPionCuts; // filter for pions from K0s
2ed1b6ff 107 AliAnalysisCuts *fLambdaProtonCuts; // filter for protons from Lambda
108 AliAnalysisCuts *fLambdaPionCuts; // filter for pions from Lambda
f6e67fe7 109 AliAnalysisCuts *fGammaElectronCuts; // filter for electrons from gamma conversions
99345a64 110 AliESDv0KineCuts *fV0OpenCuts; // v0 strong filter for tagged V0s
111 AliESDv0KineCuts *fV0StrongCuts; // v0 strong filter for tagged V0s
112
0c09cae4 113
f6e67fe7 114 Double_t fK0sMassRange[2]; // mass range for allowed K0s pairs
115 Double_t fLambdaMassRange[2]; // mass range for allowed Lambda pairs
116 Double_t fGammaMassRange[2]; // mass range for allowed Gamma conversion pairs
240ed454 117 AliDielectronHistos* fV0Histos; // histogram manager for V0s
118
32cd78f7 119 TFile *fTreeFile; //! output file containing the tree
240ed454 120 TTree *fTree; //! Reduced event tree
f6e67fe7 121 TFile *fFriendTreeFile; //! output file containing the friend tree
240ed454 122 TTree *fFriendTree; //! Reduced event tree with friend info (event plane, etc.)
32cd78f7 123 AliReducedEvent *fReducedEvent; //! reduced event wise information
124 AliReducedEventFriend *fReducedEventFriend; //! friend reduced event wise information
240ed454 125
126 void FillEventInfo(); // fill reduced event information
127 void FillFriendEventInfo(); // fill reduced event friend information
128 void FillTrackInfo(); // fill reduced track information
129 void FillDielectronPairInfo(AliDielectron* die, Short_t iDie); // fill dielectron reduced pair information
130 void FillV0PairInfo(); // fill V0 reduced pair information
131 AliReducedPair* FillV0PairInfo(AliESDv0* v0, Int_t id, AliESDtrack* legPos, AliESDtrack* legNeg, AliKFVertex* vtxKF, Bool_t chargesAreCorrect);
2ed1b6ff 132 UChar_t EncodeTPCClusterMap(AliVParticle* track, Bool_t isAOD);
240ed454 133 void FillCaloClusters();
6ab32c51 134 void FillFMDInfo();
2ed1b6ff 135 Int_t GetSPDTrackletMultiplicity(AliVEvent* event, Float_t lowEta, Float_t highEta);
240ed454 136
137 AliAnalysisTaskReducedTree(const AliAnalysisTaskReducedTree &c);
138 AliAnalysisTaskReducedTree& operator= (const AliAnalysisTaskReducedTree &c);
139
6ab32c51 140 ClassDef(AliAnalysisTaskReducedTree, 3); //Analysis Task for creating a reduced event information tree
240ed454 141};
142#endif