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

The CrossSection class This class stores a yield tree... stored as (particle, tagger channel) pair Yield tree has: is MC = marker for MC data = data string, could be decay from MC, or setup, user specified sp_X = kinematics for scattered particle tc_X = parameters for tagger channel missing_mass = missing mass (ignoring recoil) More...

#include <cross_section.h>

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

Classes

struct  Scalers_t
 
struct  Yield_t
 

Public Member Functions

 scratch_collicott_CrossSection (const HistogramFactory &histFac, OptionsPtr opts)
 
virtual ~scratch_collicott_CrossSection ()
 
void SetEventType (bool isMC, const std::string &decay)
 
void AcceptEvent (const LorentzVec &sp, double sp_time, const TTaggerHit &tc, const PromptRandom::Switch &promptrandom)
 
void TrackIncidentFlux ()
 

Protected Attributes

std::shared_ptr< TaggerDetector_tTagger
 
unsigned int nTagger
 
HistogramFactory HistFac
 
TH1D * flux
 
TH1D * flux_ltcorrected
 
Yield_t yield
 
Scalers_t scalers
 
bool event_isMC = false
 
std::string event_decay = ""
 
bool useSC = false
 

Static Protected Attributes

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

Detailed Description

The CrossSection class This class stores a yield tree... stored as (particle, tagger channel) pair Yield tree has: is MC = marker for MC data = data string, could be decay from MC, or setup, user specified sp_X = kinematics for scattered particle tc_X = parameters for tagger channel missing_mass = missing mass (ignoring recoil)

Note: prompt random fill weight is stored as tc_promptrandom Yield->Draw("missing_mass","tc_promptrandom") produces pr-subtracted missing mass

Also stores scaler tree: tagger_channel = dummy vector of tagger channel tagger_scalers = vector of scalers tagger_eff = vector of tagging efficiency tagger_deff = vector of tagging efficiency errors exp_livetime = experimental livetime

Scalers->Draw("tagger_eff:tagger_channel") produces 2d tagg eff vs. tagger channel plot Scalers->Draw("tagger_eff[30]") produces 1d tagg eff values for channel 30

USE:

Once per event:

 cross_section.SetEventType(event.Reconstructed().ID.isSet(ant::TID::Flags_t::MC), decay);
 Note: this will also track incident flux

After all cuts,loop over tagger channels:

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

Constructor & Destructor Documentation

◆ scratch_collicott_CrossSection()

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

◆ ~scratch_collicott_CrossSection()

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

Member Function Documentation

◆ AcceptEvent()

void scratch_collicott_CrossSection::AcceptEvent ( const LorentzVec sp,
double  sp_time,
const TTaggerHit tc,
const PromptRandom::Switch promptrandom 
)

◆ SetEventType()

void scratch_collicott_CrossSection::SetEventType ( bool  isMC,
const std::string &  decay 
)

◆ TrackIncidentFlux()

void scratch_collicott_CrossSection::TrackIncidentFlux ( )

Member Data Documentation

◆ event_decay

std::string ant::analysis::utils::scratch_collicott_CrossSection::event_decay = ""
protected

◆ event_isMC

bool ant::analysis::utils::scratch_collicott_CrossSection::event_isMC = false
protected

◆ flux

TH1D* ant::analysis::utils::scratch_collicott_CrossSection::flux
protected

◆ flux_ltcorrected

TH1D* ant::analysis::utils::scratch_collicott_CrossSection::flux_ltcorrected
protected

◆ HistFac

HistogramFactory ant::analysis::utils::scratch_collicott_CrossSection::HistFac
protected

◆ nTagger

unsigned int ant::analysis::utils::scratch_collicott_CrossSection::nTagger
protected

◆ radtodeg

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

◆ scalers

Scalers_t ant::analysis::utils::scratch_collicott_CrossSection::scalers
protected

◆ Tagger

std::shared_ptr<TaggerDetector_t> ant::analysis::utils::scratch_collicott_CrossSection::Tagger
protected

◆ useSC

bool ant::analysis::utils::scratch_collicott_CrossSection::useSC = false
protected

◆ yield

Yield_t ant::analysis::utils::scratch_collicott_CrossSection::yield
protected

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