8 #include "FairTrackParH.h"
9 #include "FairMCApplication.h"
10 #include "FairRunAna.h"
11 #include "FairRootManager.h"
12 #include "FairRuntimeDb.h"
14 #include "TObjArray.h"
16 #include "TGeoMatrix.h"
18 #include "TGeoManager.h"
26 Float_t mvdELoss = 0.;
29 Float_t SensorThickness=0;
33 FairTrackParH *helix =
new FairTrackParH(&par, ierr);
35 for (
size_t ii=0; ii<trackCand.
GetNHits(); ii++)
40 if ( (candHit.
GetDetId()!=FairRootManager::Instance()->GetBranchId(
"MVDHitsPixel")) && (candHit.
GetDetId()!=FairRootManager::Instance()->GetBranchId(
"MVDHitsStrip")) )
continue;
42 if ( (candHit.
GetDetId()!=FairRootManager::Instance()->GetBranchId(
"MVDHitsPixelMix")) && (candHit.
GetDetId()!=FairRootManager::Instance()->GetBranchId(
"MVDHitsStripMix")) )
continue;
44 if ( (candHit.
GetDetId()==FairRootManager::Instance()->GetBranchId(
"MVDHitsPixel") && !
fMixMode) ||
45 (candHit.
GetDetId()==FairRootManager::Instance()->GetBranchId(
"MVDHitsPixelMix") &&
fMixMode) )
47 if ( (candHit.
GetDetId()==FairRootManager::Instance()->GetBranchId(
"MVDHitsStrip") && !
fMixMode) ||
48 (candHit.
GetDetId()==FairRootManager::Instance()->GetBranchId(
"MVDHitsStripMix") &&
fMixMode))
50 if (mvdHit==0)
continue;
52 mvdHit->Position(mvdPos);
56 SensorThickness = SensorDim.Z();
59 const Double_t *rotM = matrix->GetRotationMatrix();
60 TVector3 zaxis(rotM[2], rotM[5], rotM[8]);
61 TVector3 momentum(0., 0., 0.);
66 cos =
TMath::Cos(helix->GetMomentum().Angle(zaxis));
74 FairTrackParH *fRes=
new FairTrackParH();
78 cos =
TMath::Cos(fRes->GetMomentum().Angle(zaxis));
90 if (
fabs(cos)<0.000001)
92 std::cout <<
"-W- PndPidCorrelator::GetMvdInfo: Track perpendicular to MVD strip/pixel! Not added to MVD eloss" << std::endl;
96 thickness = SensorThickness*2./
fabs(cos);
104 if (mvdPath>0.) pidCand->
SetMvdDEDX(mvdELoss/mvdPath);
friend F32vec4 cos(const F32vec4 &a)
TGeoHMatrix * GetMatrixPath(TString path)
Bool_t GetMvdInfo(PndTrack *track, PndPidCandidate *pid)
PndTrackCandHit GetSortedHit(UInt_t i)
void SetMvdHits(Int_t val)
Double_t GetEloss() const
TString GetPath(Int_t shortID)
for a given shortID the path is returned
TVector3 GetSensorDimensionsShortId(Int_t shortId)
PndTrackCand GetTrackCand()
TClonesArray * fMvdHitsPixel
PndSdsHit TCA for strip.
friend F32vec4 fabs(const F32vec4 &a)
FairGeanePro * fGeanePropagator
Refitter for MDT tracks.
TClonesArray * fMvdHitsStrip
PndTrack TCA for MDT refit.
Int_t GetSensorID() const
FairTrackParP GetParamFirst()
void SetMvdDEDX(Double_t val)