]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGHF/vertexingHF/AliAnalysisTaskSELc2V0bachelor.h
modified SubStave.. to HalfStave
[u/mrichter/AliRoot.git] / PWGHF / vertexingHF / AliAnalysisTaskSELc2V0bachelor.h
CommitLineData
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"
992ba7d8 27#include "AliRDHFCutsLctoV0.h"
28#include "AliNormalizationCounter.h"
29
a578b2da 30class TH1F;
53c91ed7 31class TClonesArray;
32class AliAODRecoCascade;
a578b2da 33
992ba7d8 34class AliAnalysisTaskSELc2V0bachelor : public AliAnalysisTaskSE
35{
36
37 public:
38
39 AliAnalysisTaskSELc2V0bachelor();
43c7bace 40 AliAnalysisTaskSELc2V0bachelor(const Char_t* name, AliRDHFCutsLctoV0* cuts,
41 Bool_t useOnTheFly=kFALSE, Bool_t writeVariableTree=kTRUE, Bool_t additionalChecks=kFALSE);
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,
a578b2da 53 Int_t &nSelectedAnal, AliRDHFCutsLctoV0 *cutsAnal,
54 TClonesArray *mcArray);
992ba7d8 55
43c7bace 56 void MakeAnalysisForLc2prK0S(TClonesArray *arrayLctopK0S,
992ba7d8 57 TClonesArray *mcArray,
992ba7d8 58 Int_t &nSelectedAnal, AliRDHFCutsLctoV0 *cutsAnal);
59
992ba7d8 60 // set MC usage
61 void SetMC(Bool_t theMCon) {fUseMCInfo = theMCon;}
62 Bool_t GetMC() const {return fUseMCInfo;}
63
43c7bace 64 // set flag for additional checks
65 void SetAdditionalChecks(Bool_t additionalChecks) {fAdditionalChecks = additionalChecks;}
66 Bool_t GetAdditionalChecks() const {return fAdditionalChecks;}
67
992ba7d8 68 void FillArmPodDistribution(AliAODv0 *vZero, TString histoTitle, TList *histoList);
69
43c7bace 70 void SetK0SAnalysis(Bool_t a) {fIsK0SAnalysis=a;}
71 Bool_t GetK0SAnalysis() const {return fIsK0SAnalysis;}
992ba7d8 72
0dbd1d4f 73 void SetUseOnTheFlyV0(Bool_t a) { fUseOnTheFlyV0=a; }
74 Bool_t GetUseOnTheFlyV0() { return fUseOnTheFlyV0; }
992ba7d8 75
53c91ed7 76 Int_t MatchToMClabelC(AliAODRecoCascadeHF *candidate,TClonesArray *mcArray);
77
992ba7d8 78 private:
79
43c7bace 80 void CheckEventSelection(AliAODEvent *aodEvent);
81 void CheckEventSelectionWithCandidates(AliAODEvent *aodEvent);
82 void CheckCandidatesAtDifferentLevels(AliAODRecoCascadeHF *part,AliRDHFCutsLctoV0* cutsAnal);
83 void FillTheTree(AliAODRecoCascadeHF *part, AliRDHFCutsLctoV0 *cutsAnal, TClonesArray *mcArray, Int_t isLc);
84 void DefineTreeVariables();
85
ff12b981 86 Int_t MatchToMC(AliAODRecoCascadeHF *lc2bacV0,
87 Int_t *pdgDgLc2bacV0, Int_t *pdgDgV0,
88 TClonesArray *mcArray);
89
90 Int_t SearchLcDaughter(TClonesArray *arrayMC, Int_t iii);
91
43c7bace 92 void DefineGeneralHistograms();
93 void DefineAnalysisHistograms();
ff12b981 94 void DefineK0SHistos();
53c91ed7 95 void FillAnalysisHistograms(AliAODRecoCascadeHF *part, Bool_t isBachelorID, TString appendthis);
ff12b981 96
992ba7d8 97 AliAnalysisTaskSELc2V0bachelor(const AliAnalysisTaskSELc2V0bachelor &source);
98 AliAnalysisTaskSELc2V0bachelor& operator=(const AliAnalysisTaskSELc2V0bachelor& source);
99
43c7bace 100 Double_t Det(Double_t a00,Double_t a01,
101 Double_t a10,Double_t a11) const;
102 Double_t Det(Double_t a00,Double_t a01,Double_t a02,
103 Double_t a10,Double_t a11,Double_t a12,
104 Double_t a20,Double_t a21,Double_t a22) const;
105 Double_t PropagateToDCA(AliAODv0 *v, AliAODTrack *bachelor, Double_t b,
106 Double_t &xVtxLc, Double_t &yVtxLc, Double_t &zVtxLc,
107 Double_t &pxVtxLc, Double_t &pyVtxLc, Double_t &pzVtxLc);
108
109 Double_t GetAlpha(Double_t xyz[3],Double_t pxpypz[3]);
110
992ba7d8 111 Bool_t fUseMCInfo; // Use MC info
43c7bace 112 TList *fOutput; // User output slot 1 // general histos
113 TList *fOutputAll; // User output slot 4 // histos without pid and cut on V0
114 TList *fOutputPIDBach; // User output slot 5 // histos with PID on Bachelor
992ba7d8 115
a578b2da 116 TH1F *fCEvents; // Histogram to check selected events
43c7bace 117 Bool_t fIsK0SAnalysis; // switch between Lpi and K0Sp
118 AliNormalizationCounter *fCounter; // AliNormalizationCounter on output slot 2
119 AliRDHFCutsLctoV0 *fAnalCuts; // Cuts - sent to output slot 3
120 //TList *fListCuts; // list of cuts
0dbd1d4f 121 Bool_t fUseOnTheFlyV0; // flag to analyze also on-the-fly V0 candidates
122 Bool_t fIsEventSelected; // flag for event selected
992ba7d8 123
a578b2da 124 Bool_t fWriteVariableTree; // flag to decide whether to write the candidate variables on a tree variables
43c7bace 125 TTree *fVariablesTree; //! tree of the candidate variables after track selection on output slot 4
a578b2da 126 Float_t *fCandidateVariables; //! variables to be written to the tree
127 AliAODVertex *fVtx1; // primary vertex
128 Float_t fBzkG; // magnetic field value [kG]
43c7bace 129 Bool_t fAdditionalChecks; // flag to fill additional histograms
a578b2da 130
53c91ed7 131 ClassDef(AliAnalysisTaskSELc2V0bachelor,5); // class for Lc->p K0
992ba7d8 132};
133
134#endif
135