11 #include "FairTrackParH.h"
12 #include "FairMCApplication.h"
13 #include "FairRunAna.h"
14 #include "FairRootManager.h"
15 #include "FairRuntimeDb.h"
25 std::cerr <<
"<Error> PndPidCorrelator::GetRichInfo: FairTrackParH NULL pointer parameter."<<std::endl;
30 std::cerr <<
"<Error> PndPidCorrelator::GetRichInfo: pidCand NULL pointer parameter."<<std::endl;
36 if (
fVerbose>0) std::cout <<
"-W- PndPidCorrelator::GetRichInfo: Skipping tracks not reaching the last FTS layer" << std::endl;
40 if(helix->GetPz() <= 0.)
42 std::cout <<
"-W- PndPidCorrelator::GetRichInfo: Skipping tracks going backward" << std::endl;
46 Int_t richIndex = -1, richPhot = 0;
47 Float_t richThetaC = -1000, richThetaCErr = 0, richGLength = -1000;
48 Float_t richQuality = 1000000;
50 TVector3 vertex(0., 0., -10000.);
51 TVector3 momentum(0., 0., 0.);
58 FairTrackParH *fRes=
new FairTrackParH();
60 if (!rc)
return kFALSE;
62 vertex.SetXYZ(fRes->GetX(), fRes->GetY(), fRes->GetZ());
63 momentum.SetXYZ(fRes->GetPx(), fRes->GetPy(), fRes->GetPz());
67 Int_t richEntries =
fRichHit->GetEntriesFast();
68 TVector3 richPos(0., 0., 0.);
70 for (Int_t dd = 0; dd<richEntries; dd++)
75 richHit->Position(richPos);
77 Float_t dX = vertex.X()-richPos.X();
78 Float_t dY = vertex.Y()-richPos.Y();
79 Float_t dist = dX*dX + dY*dY;
80 if (richQuality > dist)
91 Float_t ntuple[] = {
static_cast<Float_t
>(vertex.X()), static_cast<Float_t>(vertex.Y()), static_cast<Float_t>(vertex.Z()), static_cast<Float_t>(vertex.Phi()),
92 static_cast<Float_t>(helix->GetMomentum().Mag()), static_cast<Float_t>(helix->GetQ()), static_cast<Float_t>(helix->GetMomentum().Theta()), static_cast<Float_t>(helix->GetZ()),
93 static_cast<Float_t>(richPos.X()), static_cast<Float_t>(richPos.Y()), static_cast<Float_t>(richPos.Phi()),
94 dist, static_cast<Float_t>(richHit->
GetThetaC()), 0., static_cast<Float_t>(vertex.DeltaPhi(richPos)), richGLength,
void SetRichQuality(Double_t val)
virtual Int_t GetRefIndex()
friend F32vec4 sqrt(const F32vec4 &a)
PndPidCorrPar * fCorrPar
PndRichHit TCA.
virtual Double_t GetErrThetaC()
virtual Double_t GetThetaC()
TClonesArray * fRichHit
PndRichBarPoint TCA.
void SetRichIndex(Int_t val)
Bool_t GetRichInfo(FairTrackParH *helix, PndPidCandidate *pid)
void SetRichNumberOfPhotons(Int_t val)
FairGeanePro * fGeanePropagator
Refitter for MDT tracks.
void SetRichThetaC(Double_t val)
TClonesArray * fRichPoint
PndFtsHit TCA.
Int_t GetFitStatus() const
void SetRichThetaCErr(Double_t val)