Public Member Functions | Private Attributes | List of all members
skim::SpillEvaluator Class Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-09-17/AnalysisSkimmer/evaluators/SpillEvaluator.h"

Public Member Functions

 SpillEvaluator (fhicl::ParameterSet const &p)
 
virtual ~SpillEvaluator ()
 
void reconfigure (fhicl::ParameterSet const &p)
 
bool EvaluateSpill (sumdata::SpillData const &spillData)
 

Private Attributes

float fMaxDeltaTToSpill
 in ns More...
 
float fMinPOTInSpill
 in units of e12 More...
 
float fMaxHornCurrent
 in kA More...
 
float fMinHornCurrent
 in kA More...
 
float fMaxBeamXYPos
 in mm More...
 
float fMinBeamXYPos
 in mm More...
 
float fMaxBeamWidth
 in mm More...
 
float fMinBeamWidth
 in mm More...
 

Detailed Description

Definition at line 24 of file SpillEvaluator.h.

Constructor & Destructor Documentation

skim::SpillEvaluator::SpillEvaluator ( fhicl::ParameterSet const &  p)
explicit

Definition at line 18 of file SpillEvaluator.cxx.

References reconfigure().

19 {
20  this->reconfigure(p);
21 }
const char * p
Definition: xmltok.h:285
void reconfigure(fhicl::ParameterSet const &p)
skim::SpillEvaluator::~SpillEvaluator ( )
virtual

Definition at line 24 of file SpillEvaluator.cxx.

25 {
26  return;
27 }

Member Function Documentation

bool skim::SpillEvaluator::EvaluateSpill ( sumdata::SpillData const &  spillData)

Definition at line 45 of file SpillEvaluator.cxx.

References std::abs(), sumdata::SpillData::deltaspilltimensec, fMaxBeamWidth, fMaxBeamXYPos, fMaxDeltaTToSpill, fMaxHornCurrent, fMinBeamWidth, fMinBeamXYPos, fMinHornCurrent, fMinPOTInSpill, sumdata::SpillData::hornI, LOG_DEBUG, sumdata::SpillData::posx, sumdata::SpillData::posy, sumdata::SpillData::spillpot, sumdata::SpillData::widthx, and sumdata::SpillData::widthy.

Referenced by skim::CellHitSkimmer::CheckEvent(), and skim::POTSummary::event().

46 {
47  LOG_DEBUG("CellHitSkimmer")
48  << "got the SpillData and EventQuality objects"
49  << "\n" << spillData.deltaspilltimensec << " < " << fMaxDeltaTToSpill
50  << "\n" << spillData.spillpot << " > " << fMinPOTInSpill
51  << "\n" << fMinHornCurrent << " < " << spillData.hornI << " < " << fMaxHornCurrent
52  << "\n" << fMinBeamXYPos << " < " << spillData.posx << " < " << fMaxBeamXYPos
53  << "\n" << fMinBeamXYPos << " < " << spillData.posy << " < " << fMaxBeamXYPos
54  << "\n" << fMinBeamWidth << " < " << spillData.widthx << " < " << fMaxBeamWidth
55  << "\n" << fMinBeamWidth << " < " << spillData.widthy << " < " << fMaxBeamWidth;
56 
57  // check the beam quality first
58  if(std::abs(spillData.deltaspilltimensec) > fMaxDeltaTToSpill ||
59  spillData.spillpot < fMinPOTInSpill ||
60  spillData.hornI > fMaxHornCurrent ||
61  spillData.hornI < fMinHornCurrent ||
62  spillData.posx > fMaxBeamXYPos ||
63  spillData.posx < fMinBeamXYPos ||
64  spillData.posy > fMaxBeamXYPos ||
65  spillData.posy < fMinBeamXYPos ||
66  spillData.widthx > fMaxBeamWidth ||
67  spillData.widthx < fMinBeamWidth ||
68  spillData.widthy > fMaxBeamWidth ||
69  spillData.widthy < fMinBeamWidth ){
70  return false;
71  }
72 
73  return true;
74 }
#define LOG_DEBUG(stream)
Definition: Messenger.h:149
float fMaxHornCurrent
in kA
float fMinPOTInSpill
in units of e12
float fMinHornCurrent
in kA
float abs(float number)
Definition: d0nt_math.hpp:39
float fMaxBeamWidth
in mm
float fMinBeamWidth
in mm
float fMaxDeltaTToSpill
in ns
float fMaxBeamXYPos
in mm
float fMinBeamXYPos
in mm
void skim::SpillEvaluator::reconfigure ( fhicl::ParameterSet const &  p)

Definition at line 30 of file SpillEvaluator.cxx.

References fMaxBeamWidth, fMaxBeamXYPos, fMaxDeltaTToSpill, fMaxHornCurrent, fMinBeamWidth, fMinBeamXYPos, fMinHornCurrent, fMinPOTInSpill, and fhicl::ParameterSet::get().

Referenced by SpillEvaluator().

31 {
32  fMaxDeltaTToSpill = p.get<float>("MaxDeltaTToSpill", 5.e8);
33  fMinPOTInSpill = p.get<float>("MinPOTInSpill", 2 );
34  fMaxHornCurrent = p.get<float>("MaxHornCurrent", -198.);
35  fMinHornCurrent = p.get<float>("MinHornCurrent", -202.);
36  fMaxBeamXYPos = p.get<float>("MaxBeamXYPos", 2.00);
37  fMinBeamXYPos = p.get<float>("MinBeamXYPos", -2.00);
38  fMaxBeamWidth = p.get<float>("MaxBeamWidth", 1.58);
39  fMinBeamWidth = p.get<float>("MinBeamWidth", 0.57);
40 
41  return;
42 }
float fMaxHornCurrent
in kA
float fMinPOTInSpill
in units of e12
const char * p
Definition: xmltok.h:285
float fMinHornCurrent
in kA
float fMaxBeamWidth
in mm
float fMinBeamWidth
in mm
float fMaxDeltaTToSpill
in ns
float fMaxBeamXYPos
in mm
float fMinBeamXYPos
in mm

Member Data Documentation

float skim::SpillEvaluator::fMaxBeamWidth
private

in mm

Definition at line 41 of file SpillEvaluator.h.

Referenced by EvaluateSpill(), and reconfigure().

float skim::SpillEvaluator::fMaxBeamXYPos
private

in mm

Definition at line 39 of file SpillEvaluator.h.

Referenced by EvaluateSpill(), and reconfigure().

float skim::SpillEvaluator::fMaxDeltaTToSpill
private

in ns

Definition at line 35 of file SpillEvaluator.h.

Referenced by EvaluateSpill(), and reconfigure().

float skim::SpillEvaluator::fMaxHornCurrent
private

in kA

Definition at line 37 of file SpillEvaluator.h.

Referenced by EvaluateSpill(), and reconfigure().

float skim::SpillEvaluator::fMinBeamWidth
private

in mm

Definition at line 42 of file SpillEvaluator.h.

Referenced by EvaluateSpill(), and reconfigure().

float skim::SpillEvaluator::fMinBeamXYPos
private

in mm

Definition at line 40 of file SpillEvaluator.h.

Referenced by EvaluateSpill(), and reconfigure().

float skim::SpillEvaluator::fMinHornCurrent
private

in kA

Definition at line 38 of file SpillEvaluator.h.

Referenced by EvaluateSpill(), and reconfigure().

float skim::SpillEvaluator::fMinPOTInSpill
private

in units of e12

Definition at line 36 of file SpillEvaluator.h.

Referenced by EvaluateSpill(), and reconfigure().


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