Line data Source code
1 : #ifndef AliMFTAnalysisTools_H
2 : #define AliMFTAnalysisTools_H
3 :
4 : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 : * See cxx source for full Copyright notice */
6 :
7 : //====================================================================================================================================================
8 : //
9 : // Support class for various common operation on MFT objects
10 : //
11 : // Contact author: antonio.uras@cern.ch
12 : //
13 : //====================================================================================================================================================
14 :
15 : #include "TObject.h"
16 : #include "AliAODTrack.h"
17 : #include "AliAODDimuon.h"
18 : #include "TLorentzVector.h"
19 : #include "AliMFTConstants.h"
20 : #include "TDatabasePDG.h"
21 : #include "TMath.h"
22 : #include "AliLog.h"
23 : #include "TMatrixD.h"
24 : #include "TClonesArray.h"
25 : #include "AliAODMCHeader.h"
26 : #include "AliGenEventHeader.h"
27 : #include "AliAODMCParticle.h"
28 :
29 : //====================================================================================================================================================
30 :
31 0 : class AliMFTAnalysisTools : public TObject {
32 :
33 : public:
34 :
35 0 : AliMFTAnalysisTools() : TObject() {;}
36 0 : virtual ~AliMFTAnalysisTools() {;}
37 :
38 : // In principle, the first two methods should be replaced by the third one
39 : static Bool_t ExtrapAODMuonToZ(AliAODTrack *muon, Double_t z, Double_t xy[2]);
40 : static Bool_t ExtrapAODMuonToZ(AliAODTrack *muon, Double_t z, Double_t xy[2], TLorentzVector &kinem);
41 : static Bool_t ExtrapAODMuonToZ(AliAODTrack *muon, Double_t z, Double_t xy[2], TLorentzVector &kinem, TMatrixD &cov);
42 :
43 : static Bool_t ExtrapAODMuonToXY(AliAODTrack *muon, Double_t xy[2], Double_t &zFinal, TLorentzVector &kinem, TMatrixD &cov);
44 :
45 : static Bool_t GetAODMuonOffset(AliAODTrack *muon, Double_t xv, Double_t yv, Double_t zv, Double_t &offset);
46 : static Bool_t GetAODMuonOffsetSmeared(AliAODTrack *muon, Double_t xv, Double_t yv, Double_t zv, Double_t smearOffsetX, Double_t smearOffsetY, Double_t &offset);
47 : static Bool_t GetAODMuonWeightedOffset(AliAODTrack *muon, Double_t xv, Double_t yv, Double_t zv, Double_t &offset);
48 :
49 : static Bool_t GetAODMuonOffsetZ(AliAODTrack *muon, Double_t xv, Double_t yv, Double_t zv, Double_t &offset);
50 :
51 : static Bool_t CalculatePCA(AliAODDimuon *dimuon, Double_t *pca, Double_t &pcaQuality, TLorentzVector &kinem);
52 : static Bool_t CalculatePCA(TObjArray *muons, Double_t *pca, Double_t &pcaQuality, TLorentzVector &kinem);
53 : static Double_t GetDistanceBetweenPoints(TVector3 **points, Int_t nPoints);
54 :
55 : static Double_t GetPseudoProperDecayTimeXY(Double_t xVtx, Double_t yVtx, Double_t xDimu, Double_t yDimu, Double_t mDimu, Double_t ptDimu);
56 : static Double_t GetPseudoProperDecayTimeZ(Double_t zVtx, Double_t zDimu, Double_t mDimu, Double_t pzDimu);
57 :
58 0 : static Bool_t PlaneExists(AliAODTrack *muon, Int_t iPlane) { return muon->GetMFTClusterPattern() & (1<<iPlane); }
59 :
60 : static Bool_t IsWrongCluster(AliAODTrack *muon, Int_t iPlane) {
61 0 : if (!PlaneExists(muon, iPlane)) return kFALSE;
62 0 : else return !(muon->GetMFTClusterPattern() & (1<<(iPlane+AliMFTConstants::fNMaxPlanes)));
63 0 : }
64 :
65 : static Bool_t IsCorrectMatch(AliAODTrack *muon);
66 :
67 : static TString GetGenerator(Int_t label, AliAODMCHeader* header);
68 : static void GetTrackPrimaryGenerator(AliAODTrack *track, AliAODMCHeader *header, TClonesArray *arrayMC, TString &nameGen);
69 : static Bool_t IsTrackInjected(AliAODTrack *track, AliAODMCHeader *header, TClonesArray *arrayMC);
70 :
71 : static void ConvertCovMatrixMUON2AOD(const TMatrixD& covMUON, Double_t covAOD[21]);
72 : static const TMatrixD ConvertCovMatrixAOD2MUON(AliAODTrack *muon);
73 :
74 : static Bool_t TranslateMuon(AliAODTrack *muon, Double_t vtxInitial[3], Double_t vtxFinal[3]);
75 : static Bool_t TranslateMuonToOrigin(AliAODTrack *muon, Double_t vtx[3]);
76 :
77 : static Bool_t IsPDGCharm(Int_t pdgCode);
78 : static Bool_t IsPDGBeauty(Int_t pdgCode);
79 : static Bool_t IsPDGResonance(Int_t pdgCode);
80 :
81 14 : ClassDef(AliMFTAnalysisTools,1)
82 :
83 : };
84 :
85 : //====================================================================================================================================================
86 :
87 : #endif
|