#include "PndPidCorrelator.h" #include "PndDskParticle.h" #include //_________________________________________________________________ Bool_t PndPidCorrelator::GetDskInfo(FairTrackParH* helix, PndPidCandidate* pidCand) { if (helix->GetZ()<165.) return kFALSE; // consider tracks only from last gem plane //--- PndDskParticle *dskParticle = NULL; Int_t dskEntries = fDskParticle->GetEntriesFast(); Int_t dskIndex = -1, dskPhot = 0; Float_t dskThetaC = -1000,dskGLength = -1000; //dskThetaCErr = 0, //[R.K. 01/2017] unused variable Float_t dskQuality = 1000000; Float_t x_p = -1000; TVector3 vertex(0., 0., 0.); TVector3 dskPos(0., 0., 0.); TVector3 momentum(0., 0., 0.); if (fGeanePro) // Overwrites vertex if Geane is used { fGeanePropagator->PropagateToVolume("Plate",0,1); vertex.SetXYZ(-10000, -10000, -10000); // reset vertex FairTrackParH *fRes= new FairTrackParH(); Bool_t rc = fGeanePropagator->Propagate(helix, fRes, fPidHyp*pidCand->GetCharge()); if (!rc) return kFALSE; vertex.SetXYZ(fRes->GetX(), fRes->GetY(), fRes->GetZ()); dskGLength = fGeanePropagator->GetLengthAtPCA(); x_p = fRes->GetMomentum().Mag(); } for (Int_t dd = 0; ddAt(dd); if ( fIdeal && (dskParticle->GetTrackID() !=pidCand->GetMcIndex()) ) continue; dskParticle->Position(dskPos); Float_t dist = (vertex-dskPos).Mag2(); if ( dskQuality > dist) { dskIndex = dd; dskQuality = dist; dskThetaC = dskParticle->GetThetaC(); //dskThetaCErr = dskParticle->GetErrThetaC(); dskPhot = 0; // ** to be filled ** } if (fDebugMode) { Float_t ntuple[] = {static_cast(vertex.X()), static_cast(vertex.Y()), static_cast(vertex.Z()), static_cast(vertex.Phi()), static_cast(helix->GetMomentum().Mag()), static_cast(helix->GetQ()), static_cast(helix->GetMomentum().Theta()), static_cast(helix->GetZ()), static_cast(dskPos.X()), static_cast(dskPos.Y()), static_cast(dskPos.Z()), static_cast(dskPos.Phi()), dist, static_cast(dskParticle->GetThetaC()), 0., static_cast(vertex.DeltaPhi(dskPos)), dskGLength, static_cast(helix->GetX()), static_cast(helix->GetY()), static_cast(helix->GetZ()), x_p, static_cast(pidCand->GetFitStatus()) }; // Float_t ntuple[] = {vertex.X(), vertex.Y(), vertex.Z(), vertex.Phi(), // helix->GetMomentum().Mag(), helix->GetQ(), helix->GetMomentum().Theta(), helix->GetZ(), // dskPos.X(), dskPos.Y(), dskPos.Z(), dskPos.Phi(), // dist, dskParticle->GetThetaC(), 0., vertex.DeltaPhi(dskPos), dskGLength, // helix->GetX(), helix->GetY(), helix->GetZ(), x_p, pidCand->GetFitStatus() // }; dskCorr->Fill(ntuple); } } if ((dskQualityGetDskCut()) || (fIdeal && dskIndex!=-1)) { pidCand->SetDiscQuality(dskQuality); pidCand->SetDiscThetaC(dskThetaC); //pidCand->SetDskThetaCErr(dskThetaCErr); pidCand->SetDiscNumberOfPhotons(dskPhot); pidCand->SetDiscIndex(dskIndex); } return kTRUE; } ClassImp(PndPidCorrelator)