AliPhysics  f05a842 (f05a842)
 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 
63  void SetMC(Bool_t theMCon) {fUseMCInfo = theMCon;}
64  Bool_t GetMC() const {return fUseMCInfo;}
65 
67  void SetAdditionalChecks(Bool_t additionalChecks) {fAdditionalChecks = additionalChecks;}
69 
70  void FillArmPodDistribution(AliAODRecoDecay *vZero,TString histoTitle, Bool_t isCandidateSelectedCuts, Bool_t isBachelorID);
71 
74 
75  Int_t MatchToMClabelC(AliAODRecoCascadeHF *candidate,TClonesArray *mcArray);
76 
77 
78  void SetNRotations(Int_t nRot=9) { fNRotations=nRot; }
80 
85 
86  void SetMinAngleForRot(Double_t min=5.*TMath::Pi()/6.) { fMinAngleForRot=min; }
87  void SetMaxAngleForRot(Double_t max=7.*TMath::Pi()/6.) { fMaxAngleForRot=max; }
90 
93 
95  void SetSign(Char_t sign) {fSign = sign;}
96  Char_t GetSign() const {return fSign;}
97 
98  void SetCheckOrigin(Bool_t origin) {fCheckOrigin = origin;}
100 
101  private:
102 
103  void CheckEventSelection(AliAODEvent *aodEvent);
106  void FillTheTree(AliAODRecoCascadeHF *part, AliRDHFCutsLctoV0 *cutsAnal, TClonesArray *mcArray, Int_t isLc, Int_t originLc);
107  void DefineTreeVariables();
108 
110  Int_t *pdgDgLc2bacV0, Int_t *pdgDgV0,
111  TClonesArray *mcArray);
112 
113  Int_t SearchLcDaughter(TClonesArray *arrayMC, Int_t iii);
114 
116  void DefineK0SHistos();
118  void FillAnalysisHistograms(AliAODRecoCascadeHF *part, AliRDHFCutsLctoV0 *cutsAnal, TString appendthis);
119  void TrackRotation(AliRDHFCutsLctoV0 *cutsAnal, AliAODRecoCascadeHF *part, TString appendthis);
120 
123 
124  Double_t Det(Double_t a00,Double_t a01,
125  Double_t a10,Double_t a11) const;
126  Double_t Det(Double_t a00,Double_t a01,Double_t a02,
127  Double_t a10,Double_t a11,Double_t a12,
128  Double_t a20,Double_t a21,Double_t a22) const;
129  Double_t PropagateToDCA(AliAODv0 *v, AliAODTrack *bachelor, Double_t b,
130  Double_t &xVtxLc, Double_t &yVtxLc, Double_t &zVtxLc,
131  Double_t &pxVtxLc, Double_t &pyVtxLc, Double_t &pzVtxLc);
132 
133  Double_t GetAlpha(Double_t xyz[3],Double_t pxpypz[3]);
134 
135  Int_t SearchForCommonMother(TClonesArray *mcArray,
136  Int_t dgLabels[10],Int_t ndg,
137  Int_t &ndgCk, Int_t *pdgDg, Int_t &labelMother, Int_t &nDauCand) const;
138 
143 
144  TH1F *fCEvents;
149 
153  AliAODVertex *fVtx1;
156 
159 
170 
172  ClassDef(AliAnalysisTaskSELc2V0bachelor,9);
173 };
175 
176 #endif
177 
void FillTheTree(AliAODRecoCascadeHF *part, AliRDHFCutsLctoV0 *cutsAnal, TClonesArray *mcArray, Int_t isLc, Int_t originLc)
Bool_t fIsEventSelected
flag to analyze also on-the-fly V0 candidates
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 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.)
virtual void UserCreateOutputObjects()
Implementation of interface methods.