Anp::Pmt Namespace Reference

Functions

const VldContext GetValidity (const Header &header)
bool IsSamePmt (const VldContext &vldc, const Strip &lhs, const Strip &rhs)

Function Documentation

const VldContext Anp::Pmt::GetValidity ( const Header header  ) 

Definition at line 387 of file PmtHit.cxx.

References Anp::Header::IsData(), Anp::Header::IsFar(), Anp::Header::IsNear(), SimFlag::kData, Detector::kFar, SimFlag::kMC, Detector::kNear, SimFlag::kUnknown, Detector::kUnknown, Anp::Header::NSec(), and Anp::Header::Sec().

Referenced by Anp::PmtHit::Plot().

00388 {
00389    //
00390    // Convert Anp::Header to VldContext
00391    //
00392 
00393    const VldTimeStamp time(header.Sec(), header.NSec());
00394    if(header.IsData())
00395    {
00396       if     (header.IsNear()) return VldContext(Detector::kNear, SimFlag::kData, time);
00397       else if(header.IsFar())  return VldContext(Detector::kFar, SimFlag::kData, time);
00398    }
00399    else
00400    {
00401       if     (header.IsNear()) return VldContext(Detector::kNear, SimFlag::kMC, time);
00402       else if(header.IsFar())  return VldContext(Detector::kFar, SimFlag::kMC, time);
00403    }
00404 
00405    return VldContext(Detector::kUnknown, SimFlag::kUnknown, time);  
00406 }

bool Anp::Pmt::IsSamePmt ( const VldContext vldc,
const Strip &  lhs,
const Strip &  rhs 
)

Definition at line 410 of file PmtHit.cxx.

References Anp::Strip::GetEncoded(), PlexHandle::GetPixelSpotId(), and PlexPixelSpotId::IsSameTube().

Referenced by Anp::PlotPmt::Collect().

00411 {
00412    PlexHandle plex(vldc);
00413    
00414    const PlexStripEndId seidL(stripL.GetEncoded());
00415    const PlexStripEndId seidR(stripR.GetEncoded());
00416 
00417    const PlexPixelSpotId psidL = plex.GetPixelSpotId(seidL);
00418    const PlexPixelSpotId psidR = plex.GetPixelSpotId(seidR);
00419 
00420    //return (psidL.GetTube() == psidR.GetTube());
00421    //return (psidL.GetUniquePmtEncodedValue() == psidR.GetUniquePmtEncodedValue());
00422    return psidL.IsSameTube(psidR);
00423 }


Generated on 15 Jul 2018 for loon by  doxygen 1.6.1