diff --git a/Rich/RichFutureGlobalPID/src/RichGlobalPIDWriteRichPIDs.cpp b/Rich/RichFutureGlobalPID/src/RichGlobalPIDWriteRichPIDs.cpp index 74ff6a005c1fd4375b755d72ac6c3f312611124e..18dae23279ae158accfe3ebd57b46b9c89998754 100644 --- a/Rich/RichFutureGlobalPID/src/RichGlobalPIDWriteRichPIDs.cpp +++ b/Rich/RichFutureGlobalPID/src/RichGlobalPIDWriteRichPIDs.cpp @@ -143,6 +143,9 @@ namespace Rich::Future::Rec::GlobalPID { } // ------------------------------------------------------------------------------- + // insert + rPIDs.insert( pid.get(), tk->key() ); + // print the final PID if ( !pidOK && !msgLevel( MSG::VERBOSE ) ) { _ri_debug << " " << *pid << endmsg; @@ -150,8 +153,8 @@ namespace Rich::Future::Rec::GlobalPID { _ri_verbo << " " << *pid << endmsg; } - // insert and release - rPIDs.insert( pid.release(), tk->key() ); + // finally release from local object ownership + pid.release(); } _ri_verbo << "Created " << rPIDs.size() << " RichPIDs : Version " << (unsigned int)rPIDs.version() << endmsg; diff --git a/Rich/RichFutureRecMCAlgorithms/src/RichPhotonUseMCInfo.cpp b/Rich/RichFutureRecMCAlgorithms/src/RichPhotonUseMCInfo.cpp index f4fad985efa4ebfc39e7c692237c7a80eb8f5bb9..63176aa02fc73c507568f3bdc6fa81aad934a5c0 100644 --- a/Rich/RichFutureRecMCAlgorithms/src/RichPhotonUseMCInfo.cpp +++ b/Rich/RichFutureRecMCAlgorithms/src/RichPhotonUseMCInfo.cpp @@ -140,18 +140,28 @@ namespace Rich::Future::Rec::MC { // Get the MCParticle(s) for this track const auto mcPs = mcHelper.mcParticles( *track, false, 0.75 ); - if ( mcPs.empty() ) { continue; } + m_hasMCP += !mcPs.empty(); + if ( mcPs.empty() ) { + _ri_verbo << " -> No MC Particles available" << endmsg; + continue; + } const auto mcP = mcPs.front(); // Get true PID type from first MCParticle const auto pid = mcHelper.mcParticleType( mcP ); - if ( Rich::Unknown == pid ) { continue; } + if ( Rich::Unknown == pid ) { + _ri_verbo << " -> Unknown MC PID type" << endmsg; + continue; + } // Loop over scalar entries in SIMD photon for ( std::size_t i = 0; i < SIMDCherenkovPhoton::SIMDFP::Size; ++i ) { // Select valid entries if ( !phot.validityMask()[i] ) { continue; } + // is updated ? + bool updated = false; + // ID for this hit const auto id = pixel.smartID()[i]; @@ -168,6 +178,7 @@ namespace Rich::Future::Rec::MC { if ( mcPhot ) { // should never fail but just in case ... phot.CherenkovTheta()[i] = mcPhot->cherenkovTheta(); phot.CherenkovPhi()[i] = mcPhot->cherenkovPhi(); + updated = true; _ri_verbo << " -> Updated from MCPhoton " << phot.CherenkovTheta()[i] << " " << phot.CherenkovPhi()[i] << endmsg; } @@ -175,20 +186,26 @@ namespace Rich::Future::Rec::MC { // Use expected values for true PID type with smearing const auto ckTheta = ckAngles[rels.segmentIndex()][pid]; // resolution for this momentum - const auto ptot = mcP->p(); + const auto mc_ptot = mcP->p(); // get the emulated CK theta res for this pixel, based on its detector region. const auto ckRes = - ( pixel.isInnerRegion()[i] ? m_ckVPInner[phot.rich()] : m_ckVPOuter[phot.rich()] )->Eval( ptot ); + ( pixel.isInnerRegion()[i] ? m_ckVPInner[phot.rich()] : m_ckVPOuter[phot.rich()] )->Eval( mc_ptot ); // New CK theta value with smearing const auto smeared_ckT = ckTheta + ( m_unitGauss.shoot() * ckRes ); // update the value in the photon - _ri_verbo << " -> Updated from TK expected: " << phot.rich() << " theta=" << ckTheta << " Ptot=" << ptot - << " CKRes=" << ckRes << " | New CKtheta=" << smeared_ckT << endmsg; + _ri_verbo << " -> Updated from TK expected: " << phot.rich() << " theta=" << ckTheta + << " MC-Ptot=" << mc_ptot << " CKRes=" << ckRes << " | New CKtheta=" << smeared_ckT << endmsg; phot.CherenkovTheta()[i] = smeared_ckT; + updated = true; } + } else { + _ri_verbo << " -> No MC Photons available" << endmsg; } - } - } + + m_updatedPhot[phot.rich()] += updated; + } // scalar photon loop + + } // photons return new_photons; } @@ -205,6 +222,16 @@ namespace Rich::Future::Rec::MC { // TF1 functions for CK theta smear value as a function of P (Outer) DetectorArray> m_ckVPOuter{ {} }; + private: + // counters + + /// Has linked MCParticle + mutable Gaudi::Accumulators::BinomialCounter<> m_hasMCP{ this, "Has MCParticle" }; + + /// Updated photons + mutable DetectorArray> m_updatedPhot{ + { { this, "Updated RICH1 Photons" }, { this, "Updated RICH2 Photons" } } }; + private: // properties diff --git a/Rich/RichFutureRecMCAlgorithms/src/RichPixelUseMCInfo.cpp b/Rich/RichFutureRecMCAlgorithms/src/RichPixelUseMCInfo.cpp index 92be7292b80a47cd7b3db6bb729890f4bcb46ca7..78aae99b87f0406e8ea0b1a7e7883edde42a78fd 100644 --- a/Rich/RichFutureRecMCAlgorithms/src/RichPixelUseMCInfo.cpp +++ b/Rich/RichFutureRecMCAlgorithms/src/RichPixelUseMCInfo.cpp @@ -384,15 +384,15 @@ namespace Rich::Future::Rec::MC { private: // Handles to access MCRichHits other than Signal, as they are not necessary there - DataObjectReadHandle m_prevHits{ this, "PrevLocation", + DataObjectReadHandle m_prevHits{ this, "PrevMCRichHitsLocation", "Prev/" + LHCb::MCRichHitLocation::Default }; - DataObjectReadHandle m_prevPrevHits{ this, "PrevPrevLocation", + DataObjectReadHandle m_prevPrevHits{ this, "PrevPrevMCRichHitsLocation", "PrevPrev/" + LHCb::MCRichHitLocation::Default }; - DataObjectReadHandle m_nextHits{ this, "NextLocation", + DataObjectReadHandle m_nextHits{ this, "NextMCRichHitsLocation", "Next/" + LHCb::MCRichHitLocation::Default }; - DataObjectReadHandle m_nextNextHits{ this, "NextNextLocation", + DataObjectReadHandle m_nextNextHits{ this, "NextNextMCRichHitsLocation", "NextNext/" + LHCb::MCRichHitLocation::Default }; - DataObjectReadHandle m_lhcBkgHits{ this, "LHCBackgroundLocation", + DataObjectReadHandle m_lhcBkgHits{ this, "LHCBackgroundMCRichHitsLocation", "LHCBackground/" + LHCb::MCRichHitLocation::Default }; }; diff --git a/Rich/RichFutureRecMCAlgorithms/src/RichTrSegMakerFromMCRichTracks.cpp b/Rich/RichFutureRecMCAlgorithms/src/RichTrSegMakerFromMCRichTracks.cpp index 20a71da9d4664490a488d1b235c42cecefb3dc8f..bb5e3062176f714b3655acf8f04e897620ceaab0 100644 --- a/Rich/RichFutureRecMCAlgorithms/src/RichTrSegMakerFromMCRichTracks.cpp +++ b/Rich/RichFutureRecMCAlgorithms/src/RichTrSegMakerFromMCRichTracks.cpp @@ -27,9 +27,13 @@ // Event Model #include "Event/LinksByKey.h" +#include "Event/MCParticle.h" +#include "Event/MCRichHit.h" +#include "Event/MCRichOpticalPhoton.h" #include "Event/MCRichSegment.h" #include "Event/MCRichTrack.h" #include "Event/MCTrackInfo.h" +#include "Event/MCVertex.h" #include "Event/State.h" #include "Event/StateVector.h" #include "Event/Track.h" @@ -120,10 +124,14 @@ namespace Rich::Future::Rec::MC { */ class TrSegMakerFromMCRichTracks final : public LHCb::Algorithm::MultiTransformer< - OutData( LHCb::MCParticles const&, // - LHCb::MCRichTracks const&, // - LHCb::MCProperty const&, // - SegMakerDetInfo const&, // + OutData( LHCb::MCVertices const&, // + LHCb::MCParticles const&, // + LHCb::MCRichHits const&, // + LHCb::MCRichSegments const&, // + LHCb::MCRichTracks const&, // + LHCb::MCRichOpticalPhotons const&, // + LHCb::MCProperty const&, // + SegMakerDetInfo const&, // DetectorElement const& ), LHCb::Algorithm::Traits::usesBaseAndConditions, // SegMakerDetInfo, DetectorElement>> { @@ -134,8 +142,12 @@ namespace Rich::Future::Rec::MC { : MultiTransformer( name, pSvcLocator, // data inputs - { KeyValue{ "MCParticleLocation", LHCb::MCParticleLocation::Default }, + { KeyValue{ "MCVerticesLocation", LHCb::MCVertexLocation::Default }, + KeyValue{ "MCParticlesLocation", LHCb::MCParticleLocation::Default }, + KeyValue{ "MCRichHitsLocation", LHCb::MCRichHitLocation::Default }, + KeyValue{ "MCRichSegmentsLocation", LHCb::MCRichSegmentLocation::Default }, KeyValue{ "MCRichTracksLocation", LHCb::MCRichTrackLocation::Default }, + KeyValue{ "MCRichOpticalPhotonsLocation", LHCb::MCRichOpticalPhotonLocation::Default }, KeyValue{ "MCPropertyLocation", LHCb::MCPropertyLocation::TrackInfo }, // conditions input KeyValue{ "DetectorCache", DeRichLocations::derivedCondition( name + "-DetectorCache" ) }, @@ -155,6 +167,8 @@ namespace Rich::Future::Rec::MC { // Force debug messages // sc = setProperty( "OutputLevel", MSG::VERBOSE ); + info() << "Will emulate tracks and RICH segments from MC" << endmsg; + if ( !radiatorIsActive( Rich::Rich1Gas ) ) { _ri_debug << "Track segments for Rich1Gas are disabled" << endmsg; } if ( !radiatorIsActive( Rich::Rich2Gas ) ) { _ri_debug << "Track segments for Rich2Gas are disabled" << endmsg; } @@ -179,11 +193,15 @@ namespace Rich::Future::Rec::MC { public: /// Algorithm execution via transform - OutData operator()( LHCb::MCParticles const& mcParts, // + OutData operator()( LHCb::MCVertices const&, // + LHCb::MCParticles const& mcParts, // + LHCb::MCRichHits const&, // + LHCb::MCRichSegments const&, // LHCb::MCRichTracks const& mcRichtracks, // - LHCb::MCProperty const& mcProps, // - SegMakerDetInfo const& detInfo, // - DetectorElement const& geometry ) const override { + LHCb::MCRichOpticalPhotons const&, // + LHCb::MCProperty const& mcProps, // + SegMakerDetInfo const& detInfo, // + DetectorElement const& geometry ) const override { _ri_debug << "Found " << mcRichtracks.size() << " MCRichTracks" << endmsg; @@ -228,32 +246,45 @@ namespace Rich::Future::Rec::MC { const auto charge = mcp->particleID().threeCharge() / 3; if ( !check( m_failedCharged, 1 == abs( charge ) ) ) { continue; } + _ri_verbo << "MCParticle " << mcp->key() << " : Momentum = " << mcp->momentum() << endmsg; + // Check we have an primary origin vertex const auto mcp_orig_pv = mcp->primaryVertex(); - if ( !check( m_failedNoPV, mcp_orig_pv != nullptr ) ) { continue; } - _ri_verbo << "Origin Primary Vertex " << mcp_orig_pv->position() << endmsg; + if ( !check( m_failedNoPV, mcp_orig_pv != nullptr ) ) { + _ri_verbo << " -> NULL Origin Primary Vertex -> rejected" << endmsg; + continue; + } + _ri_verbo << " -> Origin Primary Vertex " << mcp_orig_pv->position() << endmsg; // Check origin vertex position const auto mcp_orig_v = mcp->originVertex(); - if ( !check( m_failedNoOV, nullptr != mcp_orig_v ) ) { continue; } - _ri_verbo << "Origin Vertex " << mcp_orig_v->position() << endmsg; + if ( !check( m_failedNoOV, nullptr != mcp_orig_v ) ) { + _ri_verbo << " -> NULL Origin Vertex -> rejected" << endmsg; + continue; + } + _ri_verbo << " -> Origin Vertex " << mcp_orig_v->position() << endmsg; if ( !check( m_failedTkOriginV, ( m_tkOriginTol[0] >= fabs( mcp_orig_v->position().X() ) && m_tkOriginTol[1] >= fabs( mcp_orig_v->position().Y() ) && m_tkOriginTol[2] >= fabs( mcp_orig_v->position().Z() ) ) ) ) { - _ri_verbo << " -> Out of range -> rejected" << endmsg; + _ri_verbo << " -> Out of range -> rejected" << endmsg; continue; } // Check MCParticle momentum vector const auto mcp_vect = mcp->momentum().Vect(); - if ( !check( m_failedMinPt, mcp->momentum().Pt() >= m_minPt ) ) { continue; } + if ( !check( m_failedMinPt, mcp->momentum().Pt() >= m_minPt ) ) { + _ri_verbo << " -> Failed MinPT cut -> rejected" << endmsg; + continue; + } // Check MCParticle is reconstructible as a Long track if ( !check( m_failedRecoLong, !LHCb::Pr::Checker::reconstructibleType( mcp, LHCb::Pr::Checker::RecAs::isNotLong, trackInfo ) .value() ) ) { - _ri_verbo << " -> MCParticle is not reconstructible as Long -> rejected" << endmsg; + _ri_verbo << " -> MCParticle IS NOT reconstructible as Long -> rejected" << endmsg; continue; + } else { + _ri_verbo << " -> MCParticle IS reconstructible as Long" << endmsg; } // emulate tracking inefficiency @@ -272,7 +303,7 @@ namespace Rich::Future::Rec::MC { const auto p2 = mom.mag2(); const auto qOvP = ( p2 > 0 ? charge / std::sqrt( p2 ) : 999 ); const LHCb::State state( Gaudi::TrackVector{ x, y, tx, ty, qOvP }, z, loc ); - _ri_verbo << "Created State : " << state << endmsg; + _ri_verbo << " -> Created State : " << state << endmsg; tk->addToStates( std::move( state ) ); }; @@ -303,7 +334,7 @@ namespace Rich::Future::Rec::MC { const auto rad = radiator->radiatorID(); const auto rich = richType( rad ); if ( m_reqSegs[rich] && !mcRichTk->segmentInRad( rad ) ) { - _ri_verbo << " -> Has no " << rad << " segment -> rejected" << endmsg; + _ri_verbo << " -> Has no " << rad << " segment -> rejected" << endmsg; continue; } } @@ -322,7 +353,7 @@ namespace Rich::Future::Rec::MC { // which radiator const auto rad = radiator->radiatorID(); const auto rich = ( Rich::Rich2Gas == rad ? Rich::Rich2 : Rich::Rich1 ); - _ri_verbo << " -> Considering radiator " << rad << endmsg; + _ri_verbo << " -> Considering radiator " << rad << endmsg; // State info to extract Gaudi::XYZPoint entPoint, extPoint, midPoint; @@ -335,7 +366,7 @@ namespace Rich::Future::Rec::MC { auto checkXY = [&]( const auto& point ) { const auto isOK = ( fabs( point.x() ) < m_maxX[rich] && // fabs( point.y() ) < m_maxY[rich] ); - if ( !isOK ) { _ri_verbo << rich << " FAILED XY " << point << endmsg; } + if ( !isOK ) { _ri_verbo << rich << " -> FAILED XY " << point << endmsg; } return isOK; }; // veto beampipe region @@ -366,7 +397,7 @@ namespace Rich::Future::Rec::MC { // If we have a RichMCSegment use this if ( m_useRichMCStates[rich] && mcRichTk ) { // Use extended RICH MC information to form segment data - _ri_verbo << "Building segments using RICH extended MC information" << endmsg; + _ri_verbo << " -> Building segments using RICH extended MC information" << endmsg; // Get MC segment for this track and radiator const auto mcSeg = mcRichTk->segmentInRad( rad ); @@ -394,7 +425,7 @@ namespace Rich::Future::Rec::MC { bool usedIdealState = false; if ( !segDataOK && m_useIdealStates[rich] ) { // Try and use ideal state creator tool ... - _ri_verbo << "Building segments using ideal state creator" << endmsg; + _ri_verbo << " -> Building segments using ideal state creator" << endmsg; // radiator entry and exit z positions const auto zBeg = ( Rich::Rich2Gas == rad ? m_nomZstates[2] : m_nomZstates[0] ); @@ -479,7 +510,7 @@ namespace Rich::Future::Rec::MC { // Set mean photon energy segments.back().setAvPhotonEnergy( richPartProps()->meanPhotonEnergy( rad ) ); - _ri_verbo << "Created RichTrackSegment : " << segments.back() << endmsg; + _ri_verbo << " -> Created RichTrackSegment : " << segments.back() << endmsg; } // radiator loop @@ -494,7 +525,7 @@ namespace Rich::Future::Rec::MC { // fill Track <-> MCParticle link table (if not being made as a ghost) if ( !asGhost ) { tkToMCPs[mcp].push_back( tk.get() ); } // Finally pass ownership to container - _ri_verbo << "Created Track : " << *tk << endmsg; + _ri_verbo << " -> Created Track : " << *tk << endmsg; tks.insert( tk.release(), tkKey ); // finally increment tk index last for next one ++tkIndex; @@ -511,7 +542,7 @@ namespace Rich::Future::Rec::MC { if ( !tks.empty() ) { const double weight = 1.0 / tks.size(); for ( const auto tk : tks ) { - _ri_verbo << "Creating MCP->TK link Tk=" << tk->key() << " MCP=" << mcp->key() << " weight=" << weight + _ri_verbo << " -> Creating MCP->TK link Tk=" << tk->key() << " MCP=" << mcp->key() << " weight=" << weight << endmsg; tkLinks.link( tk->key(), mcp, weight ); } @@ -595,7 +626,7 @@ namespace Rich::Future::Rec::MC { Gaudi::Property> m_minR2{ this, "MinR2", { 30 * 30, 100 * 100 } }; /// Tolerance on track origin w.r.t. (0,0,0) - Gaudi::Property> m_tkOriginTol{ this, "TrackOriginTol", { 1.0, 1.0, 100.0 } }; + Gaudi::Property> m_tkOriginTol{ this, "TrackOriginTol", { 3.0, 3.0, 100.0 } }; /// Require segments in given radiator Gaudi::Property> m_reqSegs{ this, "RequireSegment", { false, false } }; diff --git a/Rich/RichFutureRecMonitors/python/RichFutureRecMonitors/ConfiguredRecoMonitors.py b/Rich/RichFutureRecMonitors/python/RichFutureRecMonitors/ConfiguredRecoMonitors.py index ae55a7be4a502abfd310188018fb9dd1eeee6271..9faeb7f6ae1343c05302310349a0851b45704f14 100644 --- a/Rich/RichFutureRecMonitors/python/RichFutureRecMonitors/ConfiguredRecoMonitors.py +++ b/Rich/RichFutureRecMonitors/python/RichFutureRecMonitors/ConfiguredRecoMonitors.py @@ -216,8 +216,6 @@ def RichRecMonitors( recoStats.TrackSegmentsLocation = locs["TrackSegmentsLocation"] recoStats.TrackToSegmentsLocation = locs["SelectedTrackToSegmentsLocation"] recoStats.CherenkovPhotonLocation = locs["CherenkovPhotonLocation"] - # Properties - recoStats.Enable4D = enable4DReco # Add to sequence tkSeq.Members += [recoStats] diff --git a/Rich/RichFutureRecMonitors/src/RichSIMDRecoStats.cpp b/Rich/RichFutureRecMonitors/src/RichSIMDRecoStats.cpp index 66d1e8cde3d11e5018bf606a3b20f2693a1f4ad0..5c05d2177c1ec8d0561dd941a2b478350312c2f6 100644 --- a/Rich/RichFutureRecMonitors/src/RichSIMDRecoStats.cpp +++ b/Rich/RichFutureRecMonitors/src/RichSIMDRecoStats.cpp @@ -102,9 +102,7 @@ namespace Rich::Future::Rec::Moni { // update counts m_nTracks += tkCount; for ( auto rich : { Rich::Rich1, Rich::Rich2 } ) { - // Only count pixels when 4D reco is enabled, as in 3D-only all hits are anyway - // used. Work around to avoid unnecessary ref diffs to run3 (3D) tests. - if ( m_enable4D[rich] ) { m_nPixs[rich] += pixels.nHitsScalar( rich ); } + m_nPixs[rich] += pixels.nHitsScalar( rich ); m_nSegs[rich] += segCount[rich]; m_nPhots[rich] += photCount[rich]; } @@ -132,12 +130,6 @@ namespace Rich::Future::Rec::Moni { // _ri_debug << "Photons " << photCount << endmsg; } - private: - // properties - - /// Enabled 4D reconstruction - Gaudi::Property> m_enable4D{ this, "Enable4D", { false, false } }; - private: // counters diff --git a/Rich/RichFutureRecPixelAlgorithms/src/RichSIMDSummaryPixels.cpp b/Rich/RichFutureRecPixelAlgorithms/src/RichSIMDSummaryPixels.cpp index 15e7f35d4dee177c256ec2a0945edbede40d67f2..5258ea2b7d8ba6fea7a54e8be0f83cd6d76a9aff 100644 --- a/Rich/RichFutureRecPixelAlgorithms/src/RichSIMDSummaryPixels.cpp +++ b/Rich/RichFutureRecPixelAlgorithms/src/RichSIMDSummaryPixels.cpp @@ -117,10 +117,10 @@ namespace Rich::Future::Rec { Gaudi::Property> m_overrideRegions{ this, "OverrideRegions", { false, false } }; /// Size in X defining the inner pixels for each RICH - Gaudi::Property> m_innerPixX{ this, "InnerPixelsX", { 250.0, 99999.9 } }; + Gaudi::Property> m_innerPixX{ this, "InnerPixelsX", { 336.0, 99999.9 } }; /// Size in Y defining the inner pixels for each RICH - Gaudi::Property> m_innerPixY{ this, "InnerPixelsY", { 300.0, 300.0 } }; + Gaudi::Property> m_innerPixY{ this, "InnerPixelsY", { 364.0, 300.0 } }; /// Time resolution for inner regions Gaudi::Property> m_innerTimeWindow{ diff --git a/Rich/RichFutureRecSys/examples/RichFuture.py b/Rich/RichFutureRecSys/examples/RichFuture.py index 266dadf1b279592692760078775a57761f9c4463..7d9f7e0dc9a9dc59a09feac9ce91ad4ced0d4e0f 100644 --- a/Rich/RichFutureRecSys/examples/RichFuture.py +++ b/Rich/RichFutureRecSys/examples/RichFuture.py @@ -149,8 +149,8 @@ if UseDD4Hep: # -------------------------------------------------------------------------------------- # Reco options -useMCTracks = boolOpt("USEMCTRACKS", False) -useMCHits = boolOpt("USEMCHITS", False) +useMCTracks = boolOpt("USEMCTRACKS", True) +useMCHits = boolOpt("USEMCHITS", True) # Get time windows from environment vars if set # otherwise use default values as passed. @@ -160,6 +160,14 @@ PhWinOutR1 = floatOpt("R1OUTERPHOTWIN", "0.2") PhWinInnR2 = floatOpt("R2INNERPHOTWIN", "0.1") PhWinOutR2 = floatOpt("R2OUTERPHOTWIN", "0.2") +# Inner/Outer regions dimensions +XinnerPixR1 = floatOpt("R1INNERXPIX", "250.0") +YinnerPixR1 = floatOpt("R1INNERYPIX", "300.0") +XinnerPixR2 = floatOpt("R2INNERXPIX", "99999.9") +YinnerPixR2 = floatOpt("R2INNERYPIX", "300.0") +InnerPixelsRegionsX = (XinnerPixR1, XinnerPixR2) +InnerPixelsRegionsY = (YinnerPixR1, YinnerPixR2) + # Enable 4D reco in each RICH is4D = boolOpt("ENABLE4D", False) enable4D = (is4D, is4D) @@ -584,6 +592,8 @@ RichRec = RichRecoSequence( tkSegAddTimeFromMC=tkSegAddTimeFromMC, pixUsePosFromMC=usePixelMCPos, pixOverrideRegions=pixOverrideRegions, + InnerRegionsX=InnerPixelsRegionsX, + InnerRegionsY=InnerPixelsRegionsY, photUseMC=photUseMC, photEmulatedResMC=photEmulatedResMC, tkSegUseMCExpCKTheta=tkSegUseMCExpCKTheta, diff --git a/Rich/RichFutureRecSys/python/RichFutureRecSys/ConfiguredRichReco.py b/Rich/RichFutureRecSys/python/RichFutureRecSys/ConfiguredRichReco.py index a5e5577f4a259c1f2e828761dbd337f354d2de6e..cd2294acb1f62a0806f9fbacce5b2651a8d64c46 100644 --- a/Rich/RichFutureRecSys/python/RichFutureRecSys/ConfiguredRichReco.py +++ b/Rich/RichFutureRecSys/python/RichFutureRecSys/ConfiguredRichReco.py @@ -248,7 +248,7 @@ def RichRecoSequence( applyPixelClustering=(False, False), # Average hit time expected in each RICH (for 4D reco) averageHitTime=(13.03, 52.94), - # Course time window for hit selection (in ns) + # Course time window for hit selection (in ns) (for 4D reco) pixelTimeWindow=(1.0, 1.0), # MC cheating options # Use MC to cheat pixel hit positions @@ -257,6 +257,8 @@ def RichRecoSequence( pixUseTimeFromMC=False, # Override Inner/Outer regions pixOverrideRegions=None, + InnerRegionsX=None, + InnerRegionsY=None, # =========================================================== # Track treatment options # =========================================================== @@ -422,7 +424,9 @@ def RichRecoSequence( from Configurables import ( Rich__Future__Rec__PixelClusterLocalPositions as RichLocalPoints, ) - from Configurables import Rich__Future__SmartIDClustering as RichClustering + from Configurables import ( + Rich__Future__SmartIDClustering as RichClustering, + ) # Clustering name extension clusName = "" @@ -470,6 +474,8 @@ def RichRecoSequence( simdPixels.OuterFineTimeWindow = photonTimeWindow[1] if pixOverrideRegions: simdPixels.OverrideRegions = pixOverrideRegions + simdPixels.InnerPixelsX = InnerRegionsX + simdPixels.InnerPixelsY = InnerRegionsY # inputs simdPixels.RichPixelClustersLocation = cLocs["RichPixelClustersLocation"] # Outputs @@ -930,7 +936,7 @@ def RichRecoSequence( if photEmulatedResMC: photMCInfo.CKThetaSmearFuncInner = photEmulatedResMC[0] photMCInfo.CKThetaSmearFuncOuter = photEmulatedResMC[1] - photMCInfo.UseMCPhotonCKThetaValues = False + photMCInfo.UseMCPhotonCKThetaValues = False # Predicted pixel signals photPredSig = makeRichAlg(