You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browse filesBrowse the repository at this point in the historyBrowse files
jokonig
committed
[PWGEM/PhotonMeson] Add option for fast analytical propagation of tracks
- Photonconversion builder is slow due to many propagation of the tracks to the primary vertex etc.
- Add a fast routine to calcuate DCA and Phiv, Psi-Pair from the track helix.
- Add histograms to compare the results of both methods
Configurable<int> modeTrackPropagation{"modeTrackPropagation", 0, "0: use real track propagation, including material, 1: use fast approximation using only geometry, 2: Use real track propagation and make comparison to fast propagation (only for debugging and testing)"};
// This method uses the track Helix instead of the full propagation.
629
+
// Hence, it is only an approximation but much faster
630
+
if (modeTrackPropagation > 0) {
631
+
632
+
o2::track::TrackAuxPar helixPosEle(nTrack, d_bz);
633
+
o2::track::TrackAuxPar helixPosPos(pTrack, d_bz);
634
+
635
+
float diffX = helixPosEle.xC - helixPosPos.xC;
636
+
float diffY = helixPosEle.yC - helixPosPos.yC;
637
+
float phiHelix = std::atan2(diffY, diffX);
638
+
phiHelix -= o2::constants::math::PI / 2.;
639
+
if (phiHelix > 2 * o2::constants::math::PI) {
640
+
phiHelix -= o2::constants::math::PI * 2;
641
+
}
642
+
if (phiHelix < 0) {
643
+
phiHelix += o2::constants::math::PI * 2;
611
644
}
612
-
LOG(debug) << "Propagation to offset" << offsetR << " cm failed for " << (pPropagatedSuccess ? "negative" : "positive") << " track. Trying smaller offset.";
645
+
646
+
// Electron
647
+
float arcLenghtEle = helixPosEle.rC * 0.9 > propV0LegsRadius ? std::asin(propV0LegsRadius / helixPosEle.rC) * helixPosEle.rC : o2::constants::math::PI / 2.2 * helixPosEle.rC; // This assumes that the photon momentum vector is a tangent of the circle
float arcLenghtPos = helixPosPos.rC * 0.9 > propV0LegsRadius ? std::asin(propV0LegsRadius / helixPosPos.rC) * helixPosPos.rC : o2::constants::math::PI / 2.2 * helixPosPos.rC; // This assumes that the photon momentum vector is a tangent of the circle
// o2::track::TrackParametrizationWithError<TrackPrecision> = TrackParCov, I use the full version to have control over the data type
112
207
o2::track::TrackParametrizationWithError<TrackPrecision> trackPosInformation = getTrackParCov(lTrackPos); // first get an object that stores Track information (positive)
113
208
o2::track::TrackParametrizationWithError<TrackPrecision> trackNegInformation = getTrackParCov(lTrackNeg); // first get an object that stores Track information (negative)
0 commit comments