diff --git a/Tr/TrackCheckers/src/.TrackResChecker.cpp.swo b/Tr/TrackCheckers/src/.TrackResChecker.cpp.swo new file mode 100644 index 0000000000000000000000000000000000000000..512c7708c16adf40857b1bc7b95f8c87b642737a Binary files /dev/null and b/Tr/TrackCheckers/src/.TrackResChecker.cpp.swo differ diff --git a/Tr/TrackCheckers/src/TrackResChecker.cpp b/Tr/TrackCheckers/src/TrackResChecker.cpp index 0998881dada5929fbc1c3f6272baece9d5afe6a5..0733d275290343561f0e9565fbdc25707016e6b9 100644 --- a/Tr/TrackCheckers/src/TrackResChecker.cpp +++ b/Tr/TrackCheckers/src/TrackResChecker.cpp @@ -156,6 +156,21 @@ private: }, { 50, -10., 10. } }; mutable HistoMap<2> m_vpulleta{ this, "vertex/p_pull_vs_eta", "p pull vs eta", { 20, 2., 5. }, { 50, -10., 10. } }; + + mutable HistoMap<2> m_rxp{this, "r_x_vs_p", "resolution of x vs p", {101, -0.4, 0.4}, {50, 0., 50.0 * 1000}}; + mutable HistoMap<2> m_ryp{this, "r_y_vs_p", "resolution of y vs p", {101, -0.4, 0.4}, {50, 0., 50.0 * 1000}}; + mutable HistoMap<2> m_rtxp{this, "r_tx_vs_p", "resolution of tx vs p", {101, -0.0025, 0.0025}, {50, 0., 50.0 * 1000}}; + mutable HistoMap<2> m_rtyp{this, "r_ty_vs_p", "resolution of ty vs p", {101, -0.0025, 0.0025}, {50, 0., 50.0 * 1000}}; + + mutable HistoMap<2> m_rxp_over_uncertainty{this, "r_x_vs_p_over_uncertainty", "(resolution of x)/uncertainty vs p", {101, -5., 5.}, {50, 0., 50.0 * 1000}}; + mutable HistoMap<2> m_ryp_over_uncertainty{this, "r_y_vs_p_over_uncertainty", "(resolution of y)/uncertainty vs p", {101, -5., 5.}, {50, 0., 50.0 * 1000}}; + mutable HistoMap<2> m_rtxp_over_uncertainty{this, "r_tx_vs_p_over_uncertainty", "(resolution of tx)/uncertainty vs p", {101, -5., 5.}, {50, 0., 50.0 * 1000}}; + mutable HistoMap<2> m_rtyp_over_uncertainty{this, "r_ty_vs_p_over_uncertainty", "(resolution of ty)/uncertainty vs p", {101, -5., 5.}, {50, 0., 50.0 * 1000}}; + + mutable HistoMap<2> m_rxp_pull{this, "r_x_vs_p_pull", "resolution of x as %, in terms p", {101, -5., 5.}, {50, 0., 50.0 * 1000}}; + mutable HistoMap<2> m_ryp_pull{this, "r_y_vs_p_pull", "resolution of y as %, in terms p", {101, -5., 5.}, {50, 0., 50.0 * 1000}}; + mutable HistoMap<2> m_rtxp_pull{this, "r_tx_vs_p_pull", "resolution of tx as %, in terms p", {101, -5., 5.}, {50, 0., 50.0 * 1000}}; + mutable HistoMap<2> m_rtyp_pull{this, "r_ty_vs_p_pull", "resolution of ty as %, in terms p", {101, -5., 5.}, {50, 0., 50.0 * 1000}}; }; DECLARE_COMPONENT( TrackResChecker ) @@ -224,6 +239,20 @@ void TrackResChecker::resolutionHistos( LHCb::Track::Types type, LHCb::Track con StatusCode sc = extrapolator()->propagate( track, trueStateVertex.z(), vtxState, geometry ); if ( sc.isSuccess() ) pullplots( type, trueStateVertex, vtxState, "vertex" ); + LHCb::State trueStateRICH1Beg; + double state_z_RICH1Beg = 990.; + idealStateCreator()->createState( &mcPart, state_z_RICH1Beg, trueStateRICH1Beg, geometry ); + LHCb::State RICH1StateBeg; + StatusCode sc_RICH1Beg = extrapolator()->propagate( track, trueStateRICH1Beg.z(), RICH1StateBeg, geometry ); + if ( sc_RICH1Beg.isSuccess() ) pullplots( type, trueStateRICH1Beg, RICH1StateBeg, "RICH1Beg" ); + + LHCb::State trueStateRICH1End; + double state_z_RICH1End = 2165.; + idealStateCreator()->createState( &mcPart, state_z_RICH1End, trueStateRICH1End, geometry ); + LHCb::State RICH1StateEnd; + StatusCode sc_RICH1End = extrapolator()->propagate( track, trueStateRICH1End.z(), RICH1StateEnd, geometry ); + if ( sc_RICH1End.isSuccess() ) pullplots( type, trueStateRICH1End, RICH1StateEnd, "RICH1End" ); + // for vertex also make some 2-d plots if ( track.type() == LHCb::Track::Types::Long || track.type() == LHCb::Track::Types::Upstream || track.type() == LHCb::Track::Types::Downstream || track.type() == LHCb::Track::Types::Ttrack ) { @@ -245,11 +274,11 @@ void TrackResChecker::resolutionHistos( LHCb::Track::Types type, LHCb::Track con // fraction of tracks with correct charge bool correctcharge = track.firstState().qOverP() * mcPart.particleID().threeCharge() > 0; ++m_correctcharge.get( type )[correctcharge]; - + if ( m_fullDetail.value() ) { for ( const LHCb::State* state : track.states() ) { // skip the closest to beam, since we already have it - if ( state->location() == LHCb::State::Location::ClosestToBeam ) continue; + if ( state->location() == LHCb::State::Location::ClosestToBeam ) { continue; } double state_z = state->z(); if ( state_z > mcPart.originVertex()->position().Z() && state_z < mcPart.endVertices().back()->position().Z() ) { LHCb::State trueState; @@ -282,6 +311,21 @@ void TrackResChecker::pullplots( LHCb::Track::Types type, const LHCb::State& tru const double dty = vec( 3 ) - trueVec( 3 ); // fill the histograms + ++m_rxp.get(type, location)[{dx, trueState.p()}]; + ++m_ryp.get(type, location)[{dy, trueState.p()}]; + ++m_rtxp.get(type, location)[{dtx, trueState.p()}]; + ++m_rtyp.get(type, location)[{dty, trueState.p()}]; + + ++m_rxp_pull.get(type, location)[{dx / trueVec(0) * 100, trueState.p()}]; + ++m_ryp_pull.get(type, location)[{dy / trueVec(1) * 100, trueState.p()}]; + ++m_rtxp_pull.get(type, location)[{dtx / trueVec(2) * 100, trueState.p()}]; + ++m_rtyp_pull.get(type, location)[{dty / trueVec(3) * 100, trueState.p()}]; + + ++m_rxp_over_uncertainty.get(type, location)[{dx / sqrt( cov( 0, 0 ) + trueCov( 0, 0 )), trueState.p()}]; + ++m_ryp_over_uncertainty.get(type, location)[{dy / sqrt( cov( 1, 1 ) + trueCov( 1, 1 )), trueState.p()}]; + ++m_rtxp_over_uncertainty.get(type, location)[{dtx / sqrt( cov( 2, 2 ) + trueCov( 2, 2 )), trueState.p()}]; + ++m_rtyp_over_uncertainty.get(type, location)[{dty / sqrt( cov( 3, 3 ) + trueCov( 3, 3 )), trueState.p()}]; + ++m_xres.get( type, location )[dx]; ++m_yres.get( type, location )[dy]; ++m_txres.get( type, location )[dtx];