]>
Commit | Line | Data |
---|---|---|
992ba7d8 | 1 | #ifndef ALIANALYSISTASKSELC2V0BACHELOR_H |
2 | #define ALIANALYSISTASKSELC2V0BACHELOR_H | |
3 | /************************************************************************** | |
4 | * Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. * | |
5 | * * | |
6 | * Author: The ALICE Off-line Project. * | |
7 | * Contributors are mentioned in the code where appropriate. * | |
8 | * * | |
9 | * Permission to use, copy, modify and distribute this software and its * | |
10 | * documentation strictly for non-commercial purposes is hereby granted * | |
11 | * without fee, provided that the above copyright notice appears in all * | |
12 | * copies and that both the copyright notice and this permission notice * | |
13 | * appear in the supporting documentation. The authors make no claims * | |
14 | * about the suitability of this software for any purpose. It is * | |
15 | * provided "as is" without express or implied warranty. * | |
16 | **************************************************************************/ | |
17 | ||
18 | /* $Id$ */ | |
19 | ||
992ba7d8 | 20 | #include "TROOT.h" |
21 | #include "TSystem.h" | |
22 | ||
23 | #include "AliAnalysisTaskSE.h" | |
24 | #include "AliAODEvent.h" | |
25 | #include "AliPID.h" | |
26 | #include "AliAODTrack.h" | |
27 | #include "AliPIDResponse.h" | |
28 | #include "AliTPCPIDResponse.h" | |
29 | #include "AliRDHFCutsLctoV0.h" | |
30 | #include "AliNormalizationCounter.h" | |
31 | ||
a578b2da | 32 | class TH1F; |
33 | ||
992ba7d8 | 34 | class AliAnalysisTaskSELc2V0bachelor : public AliAnalysisTaskSE |
35 | { | |
36 | ||
37 | public: | |
38 | ||
39 | AliAnalysisTaskSELc2V0bachelor(); | |
0dbd1d4f | 40 | AliAnalysisTaskSELc2V0bachelor(const Char_t* name, AliRDHFCutsLctoV0* cutsA, AliRDHFCutsLctoV0* cutsB, |
a578b2da | 41 | Bool_t useOnTheFly=kFALSE, Bool_t writeVariableTree=kTRUE); |
992ba7d8 | 42 | virtual ~AliAnalysisTaskSELc2V0bachelor(); |
43 | ||
44 | // Implementation of interface methods | |
45 | virtual void UserCreateOutputObjects(); | |
46 | virtual void Init(); | |
47 | virtual void LocalInit() {Init();} | |
48 | virtual void UserExec(Option_t *option); | |
49 | virtual void Terminate(Option_t *option); | |
50 | ||
51 | // histos | |
52 | void FillLc2pK0Sspectrum(AliAODRecoCascadeHF *part, Int_t isLc, | |
53 | Int_t &nSelectedProd, AliRDHFCutsLctoV0 *cutsProd, | |
a578b2da | 54 | Int_t &nSelectedAnal, AliRDHFCutsLctoV0 *cutsAnal, |
55 | TClonesArray *mcArray); | |
992ba7d8 | 56 | |
57 | void DefineHistograms(); | |
a578b2da | 58 | Int_t CheckOrigin(TClonesArray *arrayMC, AliAODMCParticle *mcPartCandidate) const; |
992ba7d8 | 59 | |
a578b2da | 60 | void MakeAnalysisForLc2prK0S(TClonesArray *arrayLctopK0s, |
992ba7d8 | 61 | TClonesArray *mcArray, |
62 | Int_t &nSelectedProd, AliRDHFCutsLctoV0 *cutsProd, | |
63 | Int_t &nSelectedAnal, AliRDHFCutsLctoV0 *cutsAnal); | |
64 | ||
65 | Int_t MatchToMC(AliAODRecoCascadeHF *lc2bacV0, | |
66 | Int_t *pdgDgLc2bacV0, Int_t *pdgDgV0, | |
67 | TClonesArray *mcArray); | |
68 | ||
69 | void SearchLcDaughter(TClonesArray *arrayMC); | |
70 | ||
71 | void DefineK0SHistos(); | |
72 | ||
73 | // set MC usage | |
74 | void SetMC(Bool_t theMCon) {fUseMCInfo = theMCon;} | |
75 | Bool_t GetMC() const {return fUseMCInfo;} | |
76 | ||
77 | void FillArmPodDistribution(AliAODv0 *vZero, TString histoTitle, TList *histoList); | |
78 | ||
79 | void SetK0sAnalysis(Bool_t a) {fIsK0sAnalysis=a;} | |
80 | Bool_t GetK0sAnalysis() const {return fIsK0sAnalysis;} | |
81 | ||
0dbd1d4f | 82 | void SetUseOnTheFlyV0(Bool_t a) { fUseOnTheFlyV0=a; } |
83 | Bool_t GetUseOnTheFlyV0() { return fUseOnTheFlyV0; } | |
992ba7d8 | 84 | |
85 | private: | |
86 | ||
87 | AliAnalysisTaskSELc2V0bachelor(const AliAnalysisTaskSELc2V0bachelor &source); | |
88 | AliAnalysisTaskSELc2V0bachelor& operator=(const AliAnalysisTaskSELc2V0bachelor& source); | |
89 | ||
90 | Bool_t fUseMCInfo; // Use MC info | |
91 | TList *fOutput; // User output1 // general histos | |
92 | TList *fOutputAll; // User output2 // histos without pid and cut on V0 | |
a578b2da | 93 | TList *fOutputPIDBach; // User output3 // histos with PID on Bachelor |
992ba7d8 | 94 | |
95 | // define the histograms | |
a578b2da | 96 | TH1F *fCEvents; // Histogram to check selected events |
0dbd1d4f | 97 | AliPIDResponse *fPIDResponse; //! PID response object |
98 | Bool_t fIsK0sAnalysis; // switch between Lpi and K0sp | |
992ba7d8 | 99 | AliNormalizationCounter *fCounter; // AliNormalizationCounter on output slot 4 |
100 | AliRDHFCutsLctoV0 *fProdCuts; // Cuts - sent to output slot 5 | |
101 | AliRDHFCutsLctoV0 *fAnalCuts; // Cuts - sent to output slot 5 | |
102 | TList *fListCuts; // list of cuts | |
0dbd1d4f | 103 | Bool_t fUseOnTheFlyV0; // flag to analyze also on-the-fly V0 candidates |
104 | Bool_t fIsEventSelected; // flag for event selected | |
992ba7d8 | 105 | |
a578b2da | 106 | Bool_t fWriteVariableTree; // flag to decide whether to write the candidate variables on a tree variables |
107 | TTree *fVariablesTree; //! tree of the candidate variables after track selection on output slot 6 | |
108 | Float_t *fCandidateVariables; //! variables to be written to the tree | |
109 | AliAODVertex *fVtx1; // primary vertex | |
110 | Float_t fBzkG; // magnetic field value [kG] | |
111 | ||
112 | ClassDef(AliAnalysisTaskSELc2V0bachelor,3); // class for Lc->p K0 | |
992ba7d8 | 113 | }; |
114 | ||
115 | #endif | |
116 |