ant
A2 ant: class-based analysis framework
ant::analysis::utils::scratch_collicott_DetEff Class Reference

The DetEff class. More...

#include <det_eff.h>

+ Collaboration diagram for ant::analysis::utils::scratch_collicott_DetEff:

Classes

struct  DetEff_t
 
struct  Stats_t
 

Public Member Functions

 scratch_collicott_DetEff (const HistogramFactory &histFac, OptionsPtr opts)
 
virtual ~scratch_collicott_DetEff ()
 
void SetEventType (bool isSignal, const std::string decay)
 
void TrackSignalEvent (const LorentzVec &sp, const double &sp_time, const TTaggerHit &tc, const PromptRandom::Switch &promptrandom)
 
void AcceptEvent (const LorentzVec &sp, const double &sp_time, const TTaggerHit &tc, const PromptRandom::Switch &promptrandom)
 
void AcceptSigEvent (const LorentzVec &sp, const double &sp_time, const TTaggerHit &tc, const PromptRandom::Switch &promptrandom)
 
void AcceptBkgEvent (const LorentzVec &sp, const double &sp_time, const TTaggerHit &tc, const PromptRandom::Switch &promptrandom)
 
void FillDetEff (DetEff_t &t, const LorentzVec &sp, const double &sp_time, const TTaggerHit &tc, const PromptRandom::Switch &promptrandom)
 

Protected Attributes

HistogramFactory HistFac
 
Stats_t stats
 
DetEff_t total
 
DetEff_t accepted
 
DetEff_t contamination
 
bool Signal = false
 
std::string Decay = ""
 

Static Protected Attributes

static constexpr auto radtodeg = std_ext::radian_to_degree(1.0)
 

Detailed Description

The DetEff class.

This class stores a set of yield trees needed to calculate detection efficiencies

DetEff tree used to store full kinematics of

  • total signal events (users should fill trueMC)
  • accepted signal events (users should fill reconstructed)
  • Store accepted background events (users should fill reconstructed)
  • Basic stats

USE:

Once per event:

  if(event.Reconstructed().ID.isSet(ant::TID::Flags_t::MC))
          detection_efficiency.SetEventType(signal,decay);

If signal event, and MC event, loop over tagger channels:

  for (const auto &tc : event.Reconstructed().TaggerHits){
     promptrandom.SetTaggerHit(tc.Time);
     detection_efficiency.TrackSignalEvent(*pi0, 0, tc, promptrandom);
  }

After all cuts, if MC event, loop over tagger channels:

  for (const auto &tc : event.Reconstructed().TaggerHits){
     promptrandom.SetTaggerHit(tc.Time);
     detection_efficiency.AcceptEvent(Meson,Meson_time, tc,promptrandom);
  }

Constructor & Destructor Documentation

◆ scratch_collicott_DetEff()

scratch_collicott_DetEff::scratch_collicott_DetEff ( const HistogramFactory histFac,
OptionsPtr  opts 
)

◆ ~scratch_collicott_DetEff()

virtual ant::analysis::utils::scratch_collicott_DetEff::~scratch_collicott_DetEff ( )
inlinevirtual

Member Function Documentation

◆ AcceptBkgEvent()

void scratch_collicott_DetEff::AcceptBkgEvent ( const LorentzVec sp,
const double &  sp_time,
const TTaggerHit tc,
const PromptRandom::Switch promptrandom 
)

◆ AcceptEvent()

void ant::analysis::utils::scratch_collicott_DetEff::AcceptEvent ( const LorentzVec sp,
const double &  sp_time,
const TTaggerHit tc,
const PromptRandom::Switch promptrandom 
)
inline

◆ AcceptSigEvent()

void scratch_collicott_DetEff::AcceptSigEvent ( const LorentzVec sp,
const double &  sp_time,
const TTaggerHit tc,
const PromptRandom::Switch promptrandom 
)

◆ FillDetEff()

void scratch_collicott_DetEff::FillDetEff ( DetEff_t t,
const LorentzVec sp,
const double &  sp_time,
const TTaggerHit tc,
const PromptRandom::Switch promptrandom 
)

◆ SetEventType()

void scratch_collicott_DetEff::SetEventType ( bool  isSignal,
const std::string  decay 
)

◆ TrackSignalEvent()

void scratch_collicott_DetEff::TrackSignalEvent ( const LorentzVec sp,
const double &  sp_time,
const TTaggerHit tc,
const PromptRandom::Switch promptrandom 
)

Member Data Documentation

◆ accepted

DetEff_t ant::analysis::utils::scratch_collicott_DetEff::accepted
protected

◆ contamination

DetEff_t ant::analysis::utils::scratch_collicott_DetEff::contamination
protected

◆ Decay

std::string ant::analysis::utils::scratch_collicott_DetEff::Decay = ""
protected

◆ HistFac

HistogramFactory ant::analysis::utils::scratch_collicott_DetEff::HistFac
protected

◆ radtodeg

constexpr auto ant::analysis::utils::scratch_collicott_DetEff::radtodeg = std_ext::radian_to_degree(1.0)
staticprotected

◆ Signal

bool ant::analysis::utils::scratch_collicott_DetEff::Signal = false
protected

◆ stats

Stats_t ant::analysis::utils::scratch_collicott_DetEff::stats
protected

◆ total

DetEff_t ant::analysis::utils::scratch_collicott_DetEff::total
protected

The documentation for this class was generated from the following files: