AliPhysics  b97afa6 (b97afa6)
 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 SetFillSubSampleHist(Bool_t subChecks) {fFillSubSampleHist = subChecks;}
75 
76  void FillArmPodDistribution(AliAODRecoDecay *vZero,TString histoTitle, Bool_t isCandidateSelectedCuts, Bool_t isBachelorID);
77 
80 
81  Int_t MatchToMClabelC(AliAODRecoCascadeHF *candidate,TClonesArray *mcArray);
82 
83 
84  void SetNRotations(Int_t nRot=9) { fNRotations=nRot; }
86 
91 
92  void SetMinAngleForRot(Double_t min=5.*TMath::Pi()/6.) { fMinAngleForRot=min; }
93  void SetMaxAngleForRot(Double_t max=7.*TMath::Pi()/6.) { fMaxAngleForRot=max; }
96 
99 
101  void SetSign(Char_t sign) {fSign = sign;}
102  Char_t GetSign() const {return fSign;}
103 
104  void SetCheckOrigin(Bool_t origin) {fCheckOrigin = origin;}
106 
107 
108  void ReconstructSecVtx(Bool_t dummy=kTRUE) {fReconstructSecVtx=dummy;}
110 
113 
115 
116  private:
117 
118  void CheckEventSelection(AliAODEvent *aodEvent);
121  void FillTheTree(AliAODRecoCascadeHF *part, AliRDHFCutsLctoV0 *cutsAnal, TClonesArray *mcArray, Int_t isLc, Int_t originLc);
122  void DefineTreeVariables();
123 
125  Int_t *pdgDgLc2bacV0, Int_t *pdgDgV0,
126  TClonesArray *mcArray);
127 
128  Int_t SearchLcDaughter(TClonesArray *arrayMC, Int_t iii);
129 
131  void DefineK0SHistos();
133  void FillAnalysisHistograms(AliAODRecoCascadeHF *part, AliRDHFCutsLctoV0 *cutsAnal, TString appendthis);
134  void TrackRotation(AliRDHFCutsLctoV0 *cutsAnal, AliAODRecoCascadeHF *part, TString appendthis);
135 
138 
139  Double_t Det(Double_t a00,Double_t a01,
140  Double_t a10,Double_t a11) const;
141  Double_t Det(Double_t a00,Double_t a01,Double_t a02,
142  Double_t a10,Double_t a11,Double_t a12,
143  Double_t a20,Double_t a21,Double_t a22) const;
144  Double_t PropagateToDCA(AliAODv0 *v, AliAODTrack *bachelor, Double_t b,
145  Double_t &xVtxLc, Double_t &yVtxLc, Double_t &zVtxLc,
146  Double_t &pxVtxLc, Double_t &pyVtxLc, Double_t &pzVtxLc);
147 
148  Double_t GetAlpha(Double_t xyz[3],Double_t pxpypz[3]);
149 
150  Int_t SearchForCommonMother(TClonesArray *mcArray,
151  Int_t dgLabels[10],Int_t ndg,
152  Int_t &ndgCk, Int_t *pdgDg, Int_t &labelMother, Int_t &nDauCand) const;
153 
158 
159  TH1F *fCEvents;
166 
170  AliAODVertex *fVtx1;
174 
177 
189 
191 
193  ClassDef(AliAnalysisTaskSELc2V0bachelor,13);
194 };
196 
197 #endif
198 
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
Event counter for sub sample test.
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.
Int_t fEventCounter
Histogram to check selected events.
TList * fOutputPIDBach
User output slot 4 // histos without pid and cut on V0.
Bool_t fFillSubSampleHist
flag to fill additional histograms
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 subsample 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.