AliPhysics  d497547 (d497547)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnalysisTaskSELc2V0bachelor.h
Go to the documentation of this file.
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 
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 "AliRDHFCutsLctoV0.h"
29 
31 
32 class TH1F;
33 class TClonesArray;
34 class AliAODRecoCascade;
35 
37 {
38 
39  public:
40 
43  Bool_t useOnTheFly=kFALSE, Bool_t writeVariableTree=kTRUE, Bool_t additionalChecks=kFALSE, Bool_t trackRotation=kFALSE, Bool_t useTPCpid=kFALSE, Char_t sign=2, Bool_t checkOrigin=kFALSE);
45 
47  virtual void UserCreateOutputObjects();
48  virtual void Init();
49  virtual void LocalInit() {Init();}
50  virtual void UserExec(Option_t *option);
51  virtual void Terminate(Option_t *option);
52 
55  Int_t &nSelectedAnal, AliRDHFCutsLctoV0 *cutsAnal,
56  TClonesArray *mcArray, Int_t originLc);
57 
58  void MakeAnalysisForLc2prK0S(AliAODEvent* aodEvent,TClonesArray *arrayLctopK0S,
59  TClonesArray *mcArray,
60  Int_t &nSelectedAnal, AliRDHFCutsLctoV0 *cutsAnal);
61 
62  void MakeSingleAnalysisForSystK0SP(AliAODEvent* aodEvent,TClonesArray *mcArray,
63  AliRDHFCutsLctoV0 *cutsAnal);
64 
66  void SetMC(Bool_t theMCon) {fUseMCInfo = theMCon;}
67  Bool_t GetMC() const {return fUseMCInfo;}
68 
70  void SetAdditionalChecks(Bool_t additionalChecks) {fAdditionalChecks = additionalChecks;}
72 
73  void FillArmPodDistribution(AliAODRecoDecay *vZero,TString histoTitle, Bool_t isCandidateSelectedCuts, Bool_t isBachelorID);
74 
77 
78  Int_t MatchToMClabelC(AliAODRecoCascadeHF *candidate,TClonesArray *mcArray);
79 
80 
81  void SetNRotations(Int_t nRot=9) { fNRotations=nRot; }
83 
88 
89  void SetMinAngleForRot(Double_t min=5.*TMath::Pi()/6.) { fMinAngleForRot=min; }
90  void SetMaxAngleForRot(Double_t max=7.*TMath::Pi()/6.) { fMaxAngleForRot=max; }
93 
96 
98  void SetSign(Char_t sign) {fSign = sign;}
99  Char_t GetSign() const {return fSign;}
100 
101  void SetCheckOrigin(Bool_t origin) {fCheckOrigin = origin;}
103 
104 
105  void ReconstructSecVtx(Bool_t dummy=kTRUE) {fReconstructSecVtx=dummy;}
107 
110 
112 
113  private:
114 
115  void CheckEventSelection(AliAODEvent *aodEvent);
118  void FillTheTree(AliAODRecoCascadeHF *part, AliRDHFCutsLctoV0 *cutsAnal, TClonesArray *mcArray, Int_t isLc, Int_t originLc);
119  void DefineTreeVariables();
120 
122  Int_t *pdgDgLc2bacV0, Int_t *pdgDgV0,
123  TClonesArray *mcArray);
124 
125  Int_t SearchLcDaughter(TClonesArray *arrayMC, Int_t iii);
126 
128  void DefineK0SHistos();
130  void FillAnalysisHistograms(AliAODRecoCascadeHF *part, AliRDHFCutsLctoV0 *cutsAnal, TString appendthis);
131  void TrackRotation(AliRDHFCutsLctoV0 *cutsAnal, AliAODRecoCascadeHF *part, TString appendthis);
132 
135 
136  Double_t Det(Double_t a00,Double_t a01,
137  Double_t a10,Double_t a11) const;
138  Double_t Det(Double_t a00,Double_t a01,Double_t a02,
139  Double_t a10,Double_t a11,Double_t a12,
140  Double_t a20,Double_t a21,Double_t a22) const;
141  Double_t PropagateToDCA(AliAODv0 *v, AliAODTrack *bachelor, Double_t b,
142  Double_t &xVtxLc, Double_t &yVtxLc, Double_t &zVtxLc,
143  Double_t &pxVtxLc, Double_t &pyVtxLc, Double_t &pzVtxLc);
144 
145  Double_t GetAlpha(Double_t xyz[3],Double_t pxpypz[3]);
146 
147  Int_t SearchForCommonMother(TClonesArray *mcArray,
148  Int_t dgLabels[10],Int_t ndg,
149  Int_t &ndgCk, Int_t *pdgDg, Int_t &labelMother, Int_t &nDauCand) const;
150 
155 
156  TH1F *fCEvents;
162 
166  AliAODVertex *fVtx1;
169 
172 
184 
186 
188  ClassDef(AliAnalysisTaskSELc2V0bachelor,12);
189 };
191 
192 #endif
193 
void FillTheTree(AliAODRecoCascadeHF *part, AliRDHFCutsLctoV0 *cutsAnal, TClonesArray *mcArray, Int_t isLc, Int_t originLc)
Bool_t fIsEventSelected
flag to activate protection against AOD-dAOD mismatch.
AliAnalysisTaskSELc2V0bachelor & operator=(const AliAnalysisTaskSELc2V0bachelor &source)
double Double_t
Definition: External.C:58
void SetAdditionalChecks(Bool_t additionalChecks)
set flag for additional checks
Double_t Det(Double_t a00, Double_t a01, Double_t a10, Double_t a11) const
Bool_t fAdditionalChecks
magnetic field value [kG]
void TrackRotation(AliRDHFCutsLctoV0 *cutsAnal, AliAODRecoCascadeHF *part, TString appendthis)
void FillLc2pK0Sspectrum(AliAODRecoCascadeHF *part, Int_t isLc, Int_t &nSelectedAnal, AliRDHFCutsLctoV0 *cutsAnal, TClonesArray *mcArray, Int_t originLc)
histos
TTree * fVariablesTree
flag to decide whether to write the candidate variables on a tree variables
void SetPtMaxToFillTheTree(Double_t pTmax=999.)
char Char_t
Definition: External.C:18
void MakeSingleAnalysisForSystK0SP(AliAODEvent *aodEvent, TClonesArray *mcArray, AliRDHFCutsLctoV0 *cutsAnal)
void SetMC(Bool_t theMCon)
set MC usage
Double_t GetAlpha(Double_t xyz[3], Double_t pxpypz[3])
void SetMinAngleForRot(Double_t min=5.*TMath::Pi()/6.)
Int_t SearchForCommonMother(TClonesArray *mcArray, Int_t dgLabels[10], Int_t ndg, Int_t &ndgCk, Int_t *pdgDg, Int_t &labelMother, Int_t &nDauCand) const
Bool_t fWriteVariableTree
flag for event selected
TList * fOutputPIDBachTR
flag to check track rotation
AliNormalizationCounter * fCounter
Histogram to check selected events.
int Int_t
Definition: External.C:63
Int_t MatchToMC(AliAODRecoCascadeHF *lc2bacV0, Int_t *pdgDgLc2bacV0, Int_t *pdgDgV0, TClonesArray *mcArray)
Bool_t fUseOnTheFlyV0
Cuts - sent to output slot 3.
float Float_t
Definition: External.C:68
TList * fOutputAll
User output slot 1 // general histos.
TList * fOutputPIDBach
User output slot 4 // histos without pid and cut on V0.
void SetSign(Char_t sign)
set MC usage
Int_t SearchLcDaughter(TClonesArray *arrayMC, Int_t iii)
TH1F * fCEvents
User output slot 5 // histos with PID on Bachelor.
Double_t PropagateToDCA(AliAODv0 *v, AliAODTrack *bachelor, Double_t b, Double_t &xVtxLc, Double_t &yVtxLc, Double_t &zVtxLc, Double_t &pxVtxLc, Double_t &pyVtxLc, Double_t &pzVtxLc)
Int_t MatchToMClabelC(AliAODRecoCascadeHF *candidate, TClonesArray *mcArray)
Bool_t fTrackRotation
flag to fill additional histograms
void MakeAnalysisForLc2prK0S(AliAODEvent *aodEvent, TClonesArray *arrayLctopK0S, TClonesArray *mcArray, Int_t &nSelectedAnal, AliRDHFCutsLctoV0 *cutsAnal)
Float_t * fCandidateVariables
! variables to be written to the tree
AliRDHFCutsLctoV0 * fAnalCuts
AliNormalizationCounter on output slot 2.
void FillArmPodDistribution(AliAODRecoDecay *vZero, TString histoTitle, Bool_t isCandidateSelectedCuts, Bool_t isBachelorID)
void CheckCandidatesAtDifferentLevels(AliAODRecoCascadeHF *part, AliRDHFCutsLctoV0 *cutsAnal)
Double_t fMinAngleForRot
User output slot 6 // histos with PID on Bachelor and track rotation.
const char Option_t
Definition: External.C:48
void CheckEventSelectionWithCandidates(AliAODEvent *aodEvent)
bool Bool_t
Definition: External.C:53
void FillAnalysisHistograms(AliAODRecoCascadeHF *part, AliRDHFCutsLctoV0 *cutsAnal, TString appendthis)
void SetMaxAngleForRot(Double_t max=7.*TMath::Pi()/6.)
Int_t fAODProtection
flag to analyze also on-the-fly V0 candidates
virtual void UserCreateOutputObjects()
Implementation of interface methods.