]>
Commit | Line | Data |
---|---|---|
bffc7f8c | 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" | |
0ebb458a | 25 | #include "AliAODMCHeader.h" |
26 | #include "AliGenEventHeader.h" | |
27 | #include "AliAODMCParticle.h" | |
bffc7f8c | 28 | |
29 | //==================================================================================================================================================== | |
30 | ||
31 | class AliMFTAnalysisTools : public TObject { | |
32 | ||
33 | public: | |
34 | ||
35 | AliMFTAnalysisTools() : TObject() {;} | |
36 | virtual ~AliMFTAnalysisTools() {;} | |
9664859a | 37 | |
38 | // In principle, the first two methods should be replaced by the third one | |
bffc7f8c | 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 | ||
9664859a | 43 | static Bool_t ExtrapAODMuonToXY(AliAODTrack *muon, Double_t xy[2], Double_t &zFinal, TLorentzVector &kinem, TMatrixD &cov); |
44 | ||
a8b6b8e9 | 45 | static Bool_t GetAODMuonOffset(AliAODTrack *muon, Double_t xv, Double_t yv, Double_t zv, Double_t &offset); |
46 | static Bool_t GetAODMuonWeightedOffset(AliAODTrack *muon, Double_t xv, Double_t yv, Double_t zv, Double_t &offset); | |
bffc7f8c | 47 | |
9664859a | 48 | static Bool_t GetAODMuonOffsetZ(AliAODTrack *muon, Double_t xv, Double_t yv, Double_t zv, Double_t &offset); |
49 | ||
19393921 | 50 | static Bool_t CalculatePCA(AliAODDimuon *dimuon, Double_t *pca, Double_t &pcaQuality, TLorentzVector &kinem); |
51 | static Bool_t CalculatePCA(TObjArray *muons, Double_t *pca, Double_t &pcaQuality, TLorentzVector &kinem); | |
bffc7f8c | 52 | static Double_t GetDistanceBetweenPoints(TVector3 **points, Int_t nPoints); |
53 | ||
54 | static Double_t GetPseudoProperDecayTimeXY(Double_t xVtx, Double_t yVtx, Double_t xDimu, Double_t yDimu, Double_t mDimu, Double_t ptDimu); | |
55 | static Double_t GetPseudoProperDecayTimeZ(Double_t zVtx, Double_t zDimu, Double_t mDimu, Double_t pzDimu); | |
56 | ||
57 | static Bool_t PlaneExists(AliAODTrack *muon, Int_t iPlane) { return muon->GetMFTClusterPattern() & (1<<iPlane); } | |
58 | ||
59 | static Bool_t IsWrongCluster(AliAODTrack *muon, Int_t iPlane) { | |
60 | if (!PlaneExists(muon, iPlane)) return kFALSE; | |
61 | else return !(muon->GetMFTClusterPattern() & (1<<(iPlane+AliMFTConstants::fNMaxPlanes))); | |
62 | } | |
63 | ||
0ebb458a | 64 | static Bool_t IsCorrectMatch(AliAODTrack *muon); |
65 | ||
66 | static TString GetGenerator(Int_t label, AliAODMCHeader* header); | |
67 | static void GetTrackPrimaryGenerator(AliAODTrack *track, AliAODMCHeader *header, TClonesArray *arrayMC, TString &nameGen); | |
68 | static Bool_t IsTrackInjected(AliAODTrack *track, AliAODMCHeader *header, TClonesArray *arrayMC); | |
69 | ||
bffc7f8c | 70 | static void ConvertCovMatrixMUON2AOD(const TMatrixD& covMUON, Double_t covAOD[21]); |
71 | static const TMatrixD ConvertCovMatrixAOD2MUON(AliAODTrack *muon); | |
2666aca2 | 72 | |
73 | static Bool_t TranslateMuon(AliAODTrack *muon, Double_t vtxInitial[3], Double_t vtxFinal[3]); | |
74 | static Bool_t TranslateMuonToOrigin(AliAODTrack *muon, Double_t vtx[3]); | |
bffc7f8c | 75 | |
76 | ClassDef(AliMFTAnalysisTools,1) | |
77 | ||
78 | }; | |
79 | ||
80 | //==================================================================================================================================================== | |
81 | ||
82 | #endif |