]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGDQ/dielectron/AliAnalysisTaskReducedTree.h
New macros for the kaon train
[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;}
240ed454 55 void SetK0sMassRange(Double_t min=0.4, Double_t max=0.6) {fK0sMassRange[0]=min; fK0sMassRange[1]=max;}
56 void SetLambdaMassRange(Double_t min=1.08, Double_t max=1.15) {fLambdaMassRange[0]=min; fLambdaMassRange[1]=max;}
f6e67fe7 57 void SetGammaConvMassRange(Double_t min=0.0, Double_t max=0.1) {fGammaMassRange[0]=min; fGammaMassRange[1]=max;}
240ed454 58 void SetV0Histograms(AliDielectronHistos * const histos) {fV0Histos=histos;}
59
60 // Toggle on/off information branches
f6e67fe7 61 void SetFillTrackInfo(Bool_t flag=kTRUE) {fFillTrackInfo = flag;}
62 void SetFillDielectronInfo(Bool_t flag=kTRUE) {fFillDielectronInfo = flag;}
63 void SetFillV0Info(Bool_t flag=kTRUE) {fFillV0Info = flag;}
64 void SetFillGammaConversions(Bool_t flag=kTRUE) {fFillGammaConversions = flag;}
65 void SetFillK0s(Bool_t flag=kTRUE) {fFillK0s = flag;}
66 void SetFillLambda(Bool_t flag=kTRUE) {fFillLambda = flag;}
67 void SetFillALambda(Bool_t flag=kTRUE) {fFillALambda = flag;}
68 void SetFillCaloClusterInfo(Bool_t flag=kTRUE) {fFillCaloClusterInfo = flag;}
69 void SetFillFriendInfo(Bool_t flag=kTRUE) {fFillFriendInfo = flag;}
240ed454 70
71 // Add dielectron objects to the list. These contain cuts and histogram definitions
72 void AddDielectron(AliDielectron * const die) { fListDielectron.Add(die); }
73
74 private:
75
76 TList fListDielectron; // List of dielectron framework instances
77 TList fListHistos; //! List of histogram managers in the dielectron framework classes
78
79 Bool_t fSelectPhysics; // Whether to use physics selection
80 UInt_t fTriggerMask; // Event trigger mask
81 Bool_t fRejectPileup; // pileup rejection wanted
82
83 Bool_t fFillTrackInfo; // fill track information
84 Bool_t fFillDielectronInfo; // fill dielectrons
85 Bool_t fFillV0Info; // fill the V0 information
f6e67fe7 86 Bool_t fFillGammaConversions; // fill gamma conversions
87 Bool_t fFillK0s; // fill the K0s V0s
88 Bool_t fFillLambda; // fill the lambda V0s
89 Bool_t fFillALambda; // fill the anti-lambda V0s
240ed454 90 Bool_t fFillCaloClusterInfo; // fill the calorimeter clusters
91 Bool_t fFillFriendInfo; // fill friend tree information
92
93 AliAnalysisCuts *fEventFilter; // event filter
94 AliAnalysisCuts *fTrackFilter; // filter for the hadrons to be correlated with the dielectrons
95 AliAnalysisCuts *fFlowTrackFilter; // filter for the barrel tracks to be used for the Q-vector
96
97 AliESDv0Cuts *fK0sCuts; // v0 standard filter for K0s->pi+pi-
98 AliESDv0Cuts *fLambdaCuts; // v0 standard filter for Lambda0->p + pi
f6e67fe7 99 AliESDv0KineCuts *fGammaConvCuts; // v0 standard filter for gamma conversions
240ed454 100 AliAnalysisCuts *fK0sPionCuts; // filter for pions from K0s
101 AliAnalysisCuts *fLambdaProtonCuts;// filter for protons from Lambda
102 AliAnalysisCuts *fLambdaPionCuts; // filter for pions from Lambda
f6e67fe7 103 AliAnalysisCuts *fGammaElectronCuts; // filter for electrons from gamma conversions
104 Double_t fK0sMassRange[2]; // mass range for allowed K0s pairs
105 Double_t fLambdaMassRange[2]; // mass range for allowed Lambda pairs
106 Double_t fGammaMassRange[2]; // mass range for allowed Gamma conversion pairs
240ed454 107 AliDielectronHistos* fV0Histos; // histogram manager for V0s
108
32cd78f7 109 TFile *fTreeFile; //! output file containing the tree
240ed454 110 TTree *fTree; //! Reduced event tree
f6e67fe7 111 TFile *fFriendTreeFile; //! output file containing the friend tree
240ed454 112 TTree *fFriendTree; //! Reduced event tree with friend info (event plane, etc.)
32cd78f7 113 AliReducedEvent *fReducedEvent; //! reduced event wise information
114 AliReducedEventFriend *fReducedEventFriend; //! friend reduced event wise information
240ed454 115
116 void FillEventInfo(); // fill reduced event information
117 void FillFriendEventInfo(); // fill reduced event friend information
118 void FillTrackInfo(); // fill reduced track information
119 void FillDielectronPairInfo(AliDielectron* die, Short_t iDie); // fill dielectron reduced pair information
120 void FillV0PairInfo(); // fill V0 reduced pair information
121 AliReducedPair* FillV0PairInfo(AliESDv0* v0, Int_t id, AliESDtrack* legPos, AliESDtrack* legNeg, AliKFVertex* vtxKF, Bool_t chargesAreCorrect);
122 UChar_t EncodeTPCClusterMap(AliESDtrack* track);
123 void FillCaloClusters();
124
125 AliAnalysisTaskReducedTree(const AliAnalysisTaskReducedTree &c);
126 AliAnalysisTaskReducedTree& operator= (const AliAnalysisTaskReducedTree &c);
127
f6e67fe7 128 ClassDef(AliAnalysisTaskReducedTree, 2); //Analysis Task for creating a reduced event information tree
240ed454 129};
130#endif