CbmRoot
Loading...
Searching...
No Matches
PairAnalysisTrack.h
Go to the documentation of this file.
1/* Copyright (C) 2015-2019 Justus-Liebig-Universitaet Giessen, Giessen
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Julian Book [committer] */
4
5#ifndef PAIRANALYSISTRACK_H
6#define PAIRANALYSISTRACK_H
7
8//#############################################################
9//# #
10//# Class PairAnalysisTrack #
11//# Class for management of the gobal track #
12//# #
13//# Authors: #
14//# Julian Book, Uni Ffm / Julian.Book@cern.ch #
15//# #
16//#############################################################
17
18#include "CbmDefs.h"
19
20#include <TLorentzVector.h>
21#include <TNamed.h>
22//#include "CbmTrackMatchNew.h"
23
24class FairTrackParam;
25class CbmTrack;
26class CbmGlobalTrack;
27class CbmStsTrack;
28class CbmMuchTrack;
29class CbmTrdTrack;
30class CbmRichRing;
31class CbmTofHit;
32class CbmMCTrack;
34class CbmKFVertex;
35
36class TParticle;
37//class TObjArray;
38//class TProcessID;
39//class FairRootManager;
40
41class PairAnalysisTrack : public TNamed {
42public:
44 PairAnalysisTrack(const char* name, const char* title);
46 CbmTrdTrack* trdtrk, CbmRichRing* richring, CbmTofHit* tofhit, CbmMCTrack* mctrk,
47 CbmTrackMatchNew* stsmatch, CbmTrackMatchNew* muchmatch, CbmTrackMatchNew* trdMatch,
48 CbmTrackMatchNew* richMatch, FairTrackParam* richproj, Int_t gIndex);
49 PairAnalysisTrack(TParticle* fastTrk, CbmMCTrack* mctrk);
50
51 virtual ~PairAnalysisTrack();
53
54 // setter
55 void SetPdgCode(Int_t pdg) { fPdgCode = pdg; }
56 void SetLabel(Int_t lbl) { fLabel = lbl; }
57 void SetWeight(Double_t wght) { fWeight = wght; }
58 void SetMassHypo(Int_t pdg1, Int_t pdg2, Bool_t refitMassAssump);
59
60 // track getters
61 TLorentzVector* GetPosition() { return &fPosition; }
62 TLorentzVector* GetMomentum() { return &fMomentum; }
64 Int_t GetGlobalIndex() const { return fGlblTrackIndex; }
65 CbmStsTrack* GetStsTrack() const { return fStsTrack; }
67 CbmTrdTrack* GetTrdTrack() const { return fTrdTrack; }
68 CbmRichRing* GetRichRing() const { return fRichRing; }
69 CbmTofHit* GetTofHit() const { return fTofHit; }
70 CbmTrack* GetTrack(ECbmModuleId det) const;
71
72 FairTrackParam* GetRichProj() const { return fRichProj; }
73 FairTrackParam* GetMvdEntrance() const { return fMvdEntrance; }
74 // mc track
75 CbmMCTrack* GetMCTrack() const { return fMCTrack; }
77
79 // default kinematics
80 Double_t Px() const { return fMomentum.Px(); }
81 Double_t Py() const { return fMomentum.Py(); }
82 Double_t Pz() const { return fMomentum.Pz(); }
83 Double_t Pt() const { return fMomentum.Pt(); }
84 Double_t P() const { return fMomentum.P(); }
85
86 Double_t Xv() const { return fPosition.X(); }
87 Double_t Yv() const { return fPosition.Y(); }
88 Double_t Zv() const { return fPosition.Z(); }
89
90 Double_t OneOverPt() const { return 1. / fMomentum.Pt(); }
91 Double_t Phi() const { return fMomentum.Phi(); }
92 Double_t Theta() const { return fMomentum.Theta(); }
93
94 Double_t E() const { return fMomentum.Energy(); }
95 Double_t M() const { return fMomentum.M(); }
96
97 // Double_t Eta() const { return fMomentum.Eta(); }
98 Double_t Y() const { return fMomentum.Rapidity(); }
99
100 Double_t ChiToVertex() const { return fChi2Vtx; }
101 Short_t Charge() const { return fCharge; }
102 Int_t PdgCode() const { return fPdgCode; }
103 Int_t GetLabel() const { return fLabel; }
104 Double_t GetWeight() const { return fWeight; }
105
106private:
107 void Refit(Int_t pidHypo);
108 void CalculateChi2Vtx();
109
110 CbmKFVertex* fPrimVertex = NULL; // primary vertex
111 CbmGlobalTrack* fGlblTrack = NULL; // global track
112 Int_t fGlblTrackIndex = -1; // global track
113 CbmStsTrack* fStsTrack = NULL; // sts track
114 CbmMuchTrack* fMuchTrack = NULL; // much track
115 CbmTrdTrack* fTrdTrack = NULL; // trd track
116 CbmRichRing* fRichRing = NULL; // rich ring
117 CbmTofHit* fTofHit = NULL; // tof hit
118
119 CbmMCTrack* fMCTrack = NULL; // matched mc track
120 CbmTrackMatchNew* fStsTrackMatch = NULL; // sts track match
121 CbmTrackMatchNew* fMuchTrackMatch = NULL; // much track match
122 CbmTrackMatchNew* fTrdTrackMatch = NULL; // trd track match
123 CbmTrackMatchNew* fRichRingMatch = NULL; // rich ring match
124
125 FairTrackParam* fRichProj = NULL; // rich ring projection
126 FairTrackParam* fMvdEntrance = NULL; // mvd entrance
127
128 TLorentzVector fMomentum; // momentum vector
129 TLorentzVector fPosition; // position vector
130 Double_t fChi2Vtx = -1.; // chi2 to vertex in sigma
131 Short_t fCharge = 0; // charge
132 Int_t fPdgCode = 0; // pdg code
133 Int_t fLabel = -1; // MC label
134 Double_t fWeight = 1.; // weighting
135 Int_t fMultiMatch = 0; // MC label for n-times matched tracks
136
137 Bool_t fFastTrack = kFALSE; // fast simulation track identifier
138
140 ClassDef(PairAnalysisTrack, 6) // Track structure
141};
142
143
144#endif
ECbmModuleId
Definition CbmDefs.h:39
CbmKFVertex * GetPrimaryKFVertex() const
Double_t P() const
CbmTrackMatchNew * fRichRingMatch
FairTrackParam * fRichProj
TLorentzVector fMomentum
Double_t Phi() const
CbmTrackMatchNew * fMuchTrackMatch
TLorentzVector * GetMomentum()
CbmStsTrack * GetStsTrack() const
CbmTrackMatchNew * GetTrackMatch(ECbmModuleId det) const
PairAnalysisTrack & operator=(const PairAnalysisTrack &c)
CbmTrack * GetTrack(ECbmModuleId det) const
CbmGlobalTrack * fGlblTrack
TLorentzVector fPosition
Double_t OneOverPt() const
Double_t Y() const
CbmMCTrack * GetMCTrack() const
void SetMassHypo(Int_t pdg1, Int_t pdg2, Bool_t refitMassAssump)
Double_t Theta() const
CbmTrdTrack * fTrdTrack
Double_t Xv() const
Double_t ChiToVertex() const
Double_t Zv() const
TLorentzVector * GetPosition()
void SetWeight(Double_t wght)
void Refit(Int_t pidHypo)
CbmTrackMatchNew * fStsTrackMatch
FairTrackParam * fMvdEntrance
CbmTofHit * GetTofHit() const
CbmMuchTrack * fMuchTrack
CbmMuchTrack * GetMuchTrack() const
void SetLabel(Int_t lbl)
Int_t GetGlobalIndex() const
Double_t Pt() const
Double_t Px() const
Double_t M() const
Double_t E() const
CbmRichRing * fRichRing
void SetPdgCode(Int_t pdg)
Double_t GetWeight() const
Double_t Py() const
CbmTrdTrack * GetTrdTrack() const
Short_t Charge() const
CbmTrackMatchNew * fTrdTrackMatch
FairTrackParam * GetRichProj() const
Double_t Pz() const
CbmRichRing * GetRichRing() const
CbmStsTrack * fStsTrack
CbmGlobalTrack * GetGlobalTrack() const
FairTrackParam * GetMvdEntrance() const
Double_t Yv() const
CbmKFVertex * fPrimVertex