Skip to content
Snippets Groups Projects

RICH 4D Reco Update

Files
9
@@ -84,6 +84,8 @@ namespace Rich::Future::Rec::MC::Moni {
// print some stats on the final plots
setProperty( "HistoPrint", true ).ignore();
setProperty( "NBins1DHistos", 100 ).ignore();
// debugging
// setProperty( "OutputLevel", MSG::VERBOSE ).ignore();
}
public:
@@ -339,6 +341,7 @@ void SIMDPhotonCherenkovAngles::operator()( const Summary::Track::Vector&
// Get the MCParticles for this track
const auto mcPs = mcHelper.mcParticles( *tk, true, 0.5 );
_ri_verbo << "Found " << mcPs.size() << " MCPs for Track " << tk->key() << endmsg;
// loop over photons for this track
for ( const auto photIn : sumTk.photonIndices() ) {
@@ -351,11 +354,12 @@ void SIMDPhotonCherenkovAngles::operator()( const Summary::Track::Vector&
const auto& simdPix = pixels[rels.pixelIndex()];
// the segment for this photon
_ri_verbo << " -> Segment " << rels.segmentIndex() << endmsg;
const auto& seg = segments[rels.segmentIndex()];
// Radiator info
const auto rad = seg.radiator();
if ( !radiatorIsActive( rad ) ) continue;
if ( !radiatorIsActive( rad ) ) { continue; }
// get the expected CK theta values for this segment
const auto& expCKangles = expTkCKThetas[rels.segmentIndex()];
@@ -369,22 +373,24 @@ void SIMDPhotonCherenkovAngles::operator()( const Summary::Track::Vector&
// 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;
if ( !phot.validityMask()[i] ) { continue; }
// SmartID
const auto id = phot.smartID()[i];
_ri_verbo << " -> " << id << endmsg;
// scalar cluster
const auto& clus = clusters[simdPix.scClusIndex()[i]];
// do we have an true MC Cherenkov photon
const auto trueCKMCPs = mcHelper.trueCherenkovPhoton( *tk, rad, clus );
// reconstructed theta
const auto thetaRec = phot.CherenkovTheta()[i];
// reconstructed phi
const auto phiRec = phot.CherenkovPhi()[i];
// SmartID
const auto id = phot.smartID()[i];
// do we have an true MC Cherenkov photon
const auto trueCKMCPs = mcHelper.trueCherenkovPhoton( *tk, rad, clus );
_ri_verbo << " -> Found " << trueCKMCPs.size() << " trueCK MCPs" << endmsg;
// loop over MCPs
for ( const auto mcP : mcPs ) {
@@ -401,7 +407,9 @@ void SIMDPhotonCherenkovAngles::operator()( const Summary::Track::Vector&
const auto betaC = ( mcbeta >= m_minBeta[rad] && mcbeta <= m_maxBeta[rad] );
// true Cherenkov signal ?
const auto trueCKSig = std::find( trueCKMCPs.begin(), trueCKMCPs.end(), mcP ) != trueCKMCPs.end();
const auto trueCKSig =
( mcP ? std::find( trueCKMCPs.begin(), trueCKMCPs.end(), mcP ) != trueCKMCPs.end() : false );
_ri_verbo << " -> Matched MCP " << ( mcP ? mcP->key() : -1 ) << " = " << trueCKSig << endmsg;
// expected CK theta ( for true type )
const auto thetaExp = expCKangles[pid];
Loading