]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG3/hfe/AliHFEsecVtx.h
Classes for efficiency corrections (Xaver, Roberta)
[u/mrichter/AliRoot.git] / PWG3 / hfe / AliHFEsecVtx.h
CommitLineData
259c3296 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
259c3296 15/**************************************************************************
16 * *
17 * Secondary vertexing construction Class *
dbe3abbe 18 * Construct secondary vertex from Beauty hadron with electron and *
19 * hadrons, then apply selection criteria *
259c3296 20 * *
21 **************************************************************************/
22
23
dbe3abbe 24#ifndef ALIHFESECVTX_H
25#define ALIHFESECVTX_H
259c3296 26
27#ifndef ROOT_TObject
28#include <TObject.h>
29#endif
30
31class TH1F;
32class TH2F;
33class TString;
34class AliESDEvent;
35class AliESDtrack;
36class AliStack;
37
38//________________________________________________________________
39class AliHFEsecVtx : public TObject {
40
41 public:
42 AliHFEsecVtx();
43 AliHFEsecVtx(const AliHFEsecVtx &p); // copy constructor
44 AliHFEsecVtx &operator=(const AliHFEsecVtx &); // assignment operator
45 virtual ~AliHFEsecVtx();
46
259c3296 47 void CreateHistograms(TString hnopt="");
48
dbe3abbe 49 void SetEvent(AliESDEvent* const ESD){fESD1=ESD;}; // set ESD pointer
50 void SetStack(AliStack* const stack){fStack=stack;} // set stack pointer
259c3296 51 void InitAnaPair(); // initialize default parameters
dbe3abbe 52 void AnaPair(AliESDtrack* ESDtrack1, AliESDtrack* ESDtrack2, Int_t index2); // do e-h analysis
259c3296 53 void RunSECVTX(AliESDtrack *track); // run secondary vertexing algorithm
dbe3abbe 54
55 Int_t GetMCPID(AliESDtrack *track); // return MC pid
56 Int_t PairOrigin(AliESDtrack* track1, AliESDtrack* track2); // return pair origin as a pdg code
57 Int_t PairCode(AliESDtrack* track1,AliESDtrack* track2); // return corresponding pair code to pdg code
58 Int_t GetElectronSource(Int_t mclabel); // return origin of the electron
59
60 Bool_t SingleTrackCut(AliESDtrack* track1); // single track cut
61
62 protected:
63
64 void Init();
259c3296 65 void FindSECVTXCandid4Tracks(AliESDtrack* track1); // find secondary vertex for 4 tracks
66 void FindSECVTXCandid3Tracks(AliESDtrack* track1); // find secondary vertex for 3 tracks
67 void FindSECVTXCandid2Tracks(AliESDtrack* track1); // find secondary vertex for 2 tracks
68 void CalcSECVTXProperty(AliESDtrack* track1, AliESDtrack* track2, AliESDtrack* track3); // calculated distinctive variables
69 void ApplyPairTagCut(); // apply strict tagging condition for 1 pair secondary vertex
dbe3abbe 70 void ApplyVtxTagCut(Double_t chi2, Int_t id1, Int_t id2); // apply tagging condition for 3 track secondary vertex
259c3296 71 void ResetTagVar(); // reset tagging variables
72
73 Bool_t ApplyPairTagCut(Int_t id); // apply strict tagging condition for 1 pair secondary vertex
74 Bool_t ApplyTagCut(Double_t chi2); // apply tagging condition
259c3296 75
259c3296 76
77 Double_t GetSecVtxChi2(AliESDtrack* track1, AliESDtrack* track2, AliESDtrack* track3, AliESDtrack* track4); // get secondary vertex chi2 for 4 tracks
78 Double_t GetSecVtxChi2(AliESDtrack* track1, AliESDtrack* track2, AliESDtrack* track3); // get secondary vertex chi2 for 3 tracks
79 Double_t GetSecVtxChi2(AliESDtrack* track1, AliESDtrack* track2); // get secondary vertex chi2 for 2 tracks
80
81
82 private:
83
84 AliESDEvent* fESD1; // ESD pointer
85 AliStack* fStack; // stack pointer
86
dbe3abbe 87 Int_t fParentSelect[2][7]; // heavy hadron species
88 Int_t fNparents; // number of heavy hadrons to be considered
259c3296 89
dbe3abbe 90 TString fkSourceLabel[10]; // electron source label
259c3296 91
dbe3abbe 92 enum {kAll, kDirectCharm, kDirectBeauty, kBeautyCharm, kGamma, kPi0, kElse, kBeautyGamma, kBeautyPi0, kBeautyElse};
93 enum {kCharm=4, kBeauty=5};
259c3296 94
95 struct histspair{
96 TH2F *fInvMass; // histogram to store pair invariant mass
97 TH2F *fInvMassCut1; // histogram to store pair invariant mass after cut1
98 TH2F *fInvMassCut2; // histogram to store pair invariant mass after cut2
99 TH1F *fKFChi2; // histogram to store pair vertex chi2
dbe3abbe 100 TH1F *fOpenAngle; // histogram to store pair opening angle
101 TH1F *fCosOpenAngle; // histogram to store cosine of the pair opening angle
259c3296 102 TH2F *fSignedLxy; // histogram to store signed Lxy
103 TH1F *fKFIP; // histogram to store pair impact parameter
dbe3abbe 104 TH1F *fIPMax; // histogram to store larger impact parameter among pair tracks
259c3296 105 };
106
107 struct histstag{
108 TH1F *fPtBeautyElec; // histogram for electrons of single track cut passed
109 TH1F *fPtTaggedElec; // histogram for total b tagged electrons
110 TH1F *fPtRightTaggedElec; // histogram for right b tagged electrons
111 TH1F *fPtWrongTaggedElec; // histogram for wrong b tagged electrons
dbe3abbe 112 TH1F *fInvmassBeautyElecSecVtx; // histogram for right-tagged b invariant mass
113 TH1F *fInvmassNotBeautyElecSecVtx; // histogram for mis-tagged b invariant mass
114 TH1F *fSignedLxyBeautyElecSecVtx; // histogram for right-tagged b signed Lxy
115 TH1F *fSignedLxyNotBeautyElecSecVtx; // histogram for mis-tagged b signed Lxy
116 TH1F *fDistTwoVtxBeautyElecSecVtx; // histogram for right-tagged b two vertex distance
117 TH1F *fDistTwoVtxNotBeautyElecSecVtx; // histogram for mis-tagged b two vertex distance
118 TH1F *fCosPhiBeautyElecSecVtx; // histogram for right-tagged b cos of opening angle
119 TH1F *fCosPhiNotBeautyElecSecVtx; // histogram for mis-tagged b cos of opening angle
120 TH1F *fChi2BeautyElecSecVtx; // histogram for right-tagged b chi2 of secondary vertex
121 TH1F *fChi2NotBeautyElecSecVtx; // histogram for mis-tagged b chi2 of secondary vertex
122 TH1F *fInvmassBeautyElec2trkVtx; // histogram for right-tagged b invariant mass of two track vertex
123 TH1F *fInvmassNotBeautyElec2trkVtx; // histogram for mis-tagged b invariant mass of two track vertex
124 TH1F *fSignedLxyBeautyElec2trkVtx; // histogram for right-tagged b signed Lxy of two track vertex
125 TH1F *fSignedLxyNotBeautyElec2trkVtx; // histogram for mis-tagged b signed Lxy of two track vertex
126 TH1F *fChi2BeautyElec2trkVtx; // histogram for right-tagged b chi2 of two track vertex
127 TH1F *fChi2NotBeautyElec2trkVtx; // histogram for mis-tagged b chi2 of two track vertex
259c3296 128 };
129
dbe3abbe 130 histspair fHistPair[10]; // struct of above given histogram for different electron sources
131 histstag fHistTagged; // struct of above given histogram
259c3296 132
dbe3abbe 133 Int_t fPairTagged; // number of tagged e-h pairs
134 Int_t fpairedTrackID[20]; // paird hadron track track
135 Double_t fpairedChi2[20]; // pair chi2
136 Double_t fpairedInvMass[20]; // pair invariant mass
137 Double_t fpairedSignedLxy[20]; // pair signed Lxy
259c3296 138
dbe3abbe 139 Int_t fid[4][3]; // index to store sorting result
140 Int_t fia[4][3][2]; // index to store sorting result
259c3296 141
dbe3abbe 142 Double_t fdistTwoSecVtx; // distance between two pair vertex
143 Double_t fcosPhi; // cos of opening angle of two pair vertex
259c3296 144 Double_t fsignedLxy; // signed Lxy of secondary vertex
145 Double_t finvmass; // invariant mass of secondary vertex
146 Double_t finvmassSigma; // invariant mass sigma of secondary vertex
147
148 Bool_t fBTagged; // if b tagged, set true
dbe3abbe 149 Bool_t fBElec; // if set true for b electron, set true
259c3296 150
dbe3abbe 151 ClassDef(AliHFEsecVtx,0);
259c3296 152};
153
154#endif