30 if(
it.first.ID() == cut.
ID()){
31 it.second.sinks.push_back(s);
37 fCuts.back().second.sinks.push_back(s);
47 double pot = cut.
POT(spill);
62 static bool once =
true;
65 std::cout <<
"WARNING: no way to compute livetime for FD data spectrum. If you want a livetime you need to be applying one of the cuts from TimingCuts.h or similar. You probably should be anyway to remove bad data near the spill ends." <<
std::endl;
100 if(denom != 0) os <<
" (" <<
int(100*pot/denom+.5)<<
"%)";
110 std::map<double, int> livetimes;
111 std::map<double, int>
pots;
113 livetimes[
it.second.livetime] +=
it.second.sinks.size();
114 pots[
it.second.pot] +=
it.second.sinks.size();
117 if(pots.size() == 1){
130 if(livetimes.size() == 1){
131 if(livetimes.begin()->first == 0){
139 for(
auto it: livetimes){
Far Detector at Ash River.
Cuts and Vars for the 2020 FD DiF Study.
void HandleSpill(const caf::SRSpillProxy *spill) override
double Livetime(const caf::SRSpillProxy *spill) const
Provide a Livetime function if your cut is a timing cut etc.
caf::Proxy< float > spillpot
double POT(const caf::SRSpillProxy *spill) const
Could be useful for cuts on specific batches?
std::pair< Spectrum *, CheatDecomp * > make_pair(SpectrumLoaderBase &loader_data, SpectrumLoaderBase &loader_mc, HistAxis *axis, Cut *cut, const SystShifts &shift, const Var &wei)
void AddSink(const Cut &cut, IExposureSink *s)
int ID() const
Cuts with the same definition will have the same ID.
void POTPlusPercent(std::ostream &os, double pot, double denom)
virtual void HandleLivetime(double expo)=0
std::vector< std::pair< Cut, CutDetails > > fCuts
virtual void HandlePOT(double pot)=0
caf::Proxy< caf::Det_t > det
assert(nhit_max >=nhit_nbins)
void Finalize()
POT/livetime is not filled into sinks until this is called!
void ReportExposures(double denom=0) const