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

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

Inheritance diagram for skim::EvaluatorNue:
skim::Evaluator

Public Member Functions

 EvaluatorNue (fhicl::ParameterSet const &p)
 
 EvaluatorNue (EvaluatorNue const &)=delete
 
 EvaluatorNue (EvaluatorNue &&)=delete
 
EvaluatorNueoperator= (EvaluatorNue const &)=delete
 
EvaluatorNueoperator= (EvaluatorNue &&)=delete
 
void reconfigure (fhicl::ParameterSet const &p)
 
bool Initialize (novadaq::cnv::DetId const &detId, art::Event const &e)
 
size_t CheckSlices ()
 
std::vector< KeptSliceInfo > const & SlicesToKeep ()
 

Protected Member Functions

bool CheckTiming (rb::Cluster const &slice)
 
bool CheckSliceQuality (rb::Cluster const &slice)
 

Protected Attributes

novadaq::cnv::DetId fDetId
 the id of the detector we are looking at More...
 
std::string fSliceLabel
 label of module creating slices More...
 
std::string fRecordLabel
 label of module creating records More...
 
bool fIsData
 is this data or MC? More...
 
int fCurrentRun
 the current run number More...
 
int fCurrentSubRun
 the current run number More...
 
int fCurrentEvent
 the current run number More...
 
std::vector< KeptSliceInfofKeptSlices
 slices we keep More...
 
std::vector< art::Ptr< rb::Cluster > > fSlicePtrs
 all slices in the spill More...
 

Private Member Functions

bool KeepSlice (size_t s)
 
void FillHistograms (skim::ParametersNue const &params)
 

Private Attributes

art::ServiceHandle< geo::LiveGeometryfLiveGeom
 the LiveGeometry service More...
 
art::ServiceHandle< geo::GeometryfGeom
 the Geometry service More...
 
std::unique_ptr< skim::SelectionBasefSel
 determine which type of selection to use at run time More...
 
std::map< size_t, std::vector< rb::Shower const * > > fShowers
 slice index to shower ptrs More...
 
std::map< size_t, std::vector< rb::Prong const * > > fProngs
 slice index to prong ptrs More...
 
std::map< size_t, std::vector< rb::Vertex const * > > fVertices
 slice index to vertex ptrs More...
 
std::map< size_t, std::vector< cosrej::NueCosRej const * > > fCosRejs
 slice index to cosrej ptrs More...
 
std::map< size_t, std::vector< slid::ShowerLID const * > > fSLIDs
 slice index to slid ptrs More...
 
std::map< size_t, std::vector< lem::PIDDetails const * > > fLEMs
 slice index to lem ptrs More...
 
std::map< size_t, std::vector< slid::EventLID const * > > fELIDs
 slice index to evtlid ptrs More...
 
std::map< size_t, std::vector< cvn::Result const * > > fCVNs
 slice index to cvn ptrs More...
 
std::map< size_t, std::vector< presel::Veto const * > > fNueVetos
 slice index to nue vetos ptrs More...
 
std::string fVertexLabel
 label of module creating vertex More...
 
std::string fVertexInstance
 label of module creating vertex More...
 
std::string fShowerLabel
 label of module creating showers More...
 
std::string fCosRejLabel
 label of module creating cosrejs More...
 
std::string fLIDLabel
 label of module creating shower and event lids More...
 
std::string fLEMLabel
 label of module creating lem pids More...
 
std::string fCVNLabel
 label of module creating cvn pids More...
 
std::string fNueVetoLabel
 label of module creating nue vetos More...
 
art::InputTag fProngTag
 input tag for prongs used in preselection More...
 
TH1F * fFDSliceNHitsPerPlane
 
TH1F * fFDShowerHitsXView
 
TH1F * fFDShowerHitsYView
 
TH1F * fFDShowerHitsViewAsym
 
TH1F * fFDSliceCosAngleShw
 
TH1F * fFDSliceDistShwVtx
 
TH1F * fFDSliceFracShwHits
 
TH1F * fFDVtxDistToEastWall
 
TH1F * fFDVtxDistToWestWall
 
TH1F * fFDVtxDistToTop
 
TH1F * fFDVtxDistToBottom
 
TH1F * fFDVtxDistToFront
 
TH1F * fFDVtxDistToBack
 
TH1F * fFDPt
 
TH1F * fNDlem
 
TH1F * fNDcvn
 
TH1F * fNDlid
 
TH1F * fNDVtxX
 
TH1F * fNDVtxY
 
TH1F * fNDVtxZ
 
TH1F * fNDNShowers
 
TH1F * fNDShwVtxX
 
TH1F * fNDShwVtxY
 
TH1F * fNDShwVtxZ
 
TH1F * fNDShwEndX
 
TH1F * fNDShwEndY
 
TH1F * fNDShwEndZ
 
TH1F * fNDShowerCalE
 
TH1F * fNDShowerCalEfraction
 
TH1F * fNDShowerDistToVtx
 
TH1F * fNDProngLength
 
TH1F * fNDCalorimetricE
 
TH1F * fNDCalEperHit
 
TH1F * fNDPlanesToFront
 
TH1F * fNDSliceHits
 
TH1F * fNDSliceNHitsPerPlane
 
TH1F * fNDSliceNoShowerCalE
 

Detailed Description

Definition at line 41 of file EvaluatorNue.h.

Constructor & Destructor Documentation

skim::EvaluatorNue::EvaluatorNue ( fhicl::ParameterSet const &  p)

Definition at line 36 of file EvaluatorNue.cxx.

References fFDPt, fFDShowerHitsViewAsym, fFDShowerHitsXView, fFDShowerHitsYView, fFDSliceCosAngleShw, fFDSliceDistShwVtx, fFDSliceFracShwHits, fFDSliceNHitsPerPlane, fFDVtxDistToBack, fFDVtxDistToBottom, fFDVtxDistToEastWall, fFDVtxDistToFront, fFDVtxDistToTop, fFDVtxDistToWestWall, fNDCalEperHit, fNDCalorimetricE, fNDcvn, fNDlem, fNDlid, fNDNShowers, fNDPlanesToFront, fNDProngLength, fNDShowerCalE, fNDShowerCalEfraction, fNDShowerDistToVtx, fNDShwEndX, fNDShwEndY, fNDShwEndZ, fNDShwVtxX, fNDShwVtxY, fNDShwVtxZ, fNDSliceHits, fNDSliceNHitsPerPlane, fNDSliceNoShowerCalE, fNDVtxX, fNDVtxY, fNDVtxZ, fhicl::ParameterSet::get(), and reconfigure().

37 {
38  this->reconfigure(p);
39 
40  // Selection Type added to Histogram Names to avoid memory leaks since root desn't like two named objects with the same name.
41  auto selPSet = p.get<fhicl::ParameterSet>("Selection");
42  std::string selType = selPSet.get<std::string>("SelectionType", "NueSA");
43 
44  // make histograms for each selection criteria
46 
47  // first the FD histograms
48  fFDSliceNHitsPerPlane = tfs->make<TH1F>((selType+"_fdSliceHitsPerPlane").c_str(), ";Slice Hits/Plane;Slices", 100, 0., 50.);
49  fFDShowerHitsXView = tfs->make<TH1F>((selType+"_fdShowerHitsXView").c_str(), ";Shower Hits (X view);Showers", 100, 0., 100.);
50  fFDShowerHitsYView = tfs->make<TH1F>((selType+"_fdShowerHitsYView").c_str(), ";Shower Hits (Y view);Showers", 100, 0., 100.);
51  fFDShowerHitsViewAsym = tfs->make<TH1F>((selType+"_fdShowerHitsViewAsym").c_str(), ";Shower Hits View Asymmetry;Showers", 200, -10., 10.);
52  fFDSliceCosAngleShw = tfs->make<TH1F>((selType+"_fdSliceCosAngleShw").c_str(), ";cos(#theta_{showers});Slices", 100, -1., 1.);
53  fFDSliceDistShwVtx = tfs->make<TH1F>((selType+"_fdSliceDistShwVtx").c_str(), ";#DeltaL_{shower,vertex};Slices", 100, 0., 400.);
54  fFDSliceFracShwHits = tfs->make<TH1F>((selType+"_fdSliceFracShwHits").c_str(), ";Hits_{shower}/Hits_{slice};Slices", 50, 0., 2.);
55  fFDVtxDistToEastWall = tfs->make<TH1F>((selType+"_fdVtxDistToEastWall").c_str(), ";Distance to East Wall;Showers", 100, 0., 100.);
56  fFDVtxDistToWestWall = tfs->make<TH1F>((selType+"_fdVtxDistToWestWall").c_str(), ";Distance to West Wall;Showers", 100, 0., 100.);
57  fFDVtxDistToTop = tfs->make<TH1F>((selType+"_fdVtxDistToTop").c_str(), ";Distance to Top;Showers", 100, 0., 400.);
58  fFDVtxDistToBottom = tfs->make<TH1F>((selType+"_fdVtxDistToBottom").c_str(), ";Distance to Bottom;Showers", 100, 0., 400.);
59  fFDVtxDistToFront = tfs->make<TH1F>((selType+"_fdVtxDistToFront").c_str(), ";Distance to Front;Showers", 100, 0., 100.);
60  fFDVtxDistToBack = tfs->make<TH1F>((selType+"_fdVtxDistToBack").c_str(), ";Distance to Back;Showers", 100, 0., 400.);
61  fFDPt = tfs->make<TH1F>((selType+"_fdPt").c_str(), ";p_{t};Showers", 50, 0., 2.);
62 
63  // now the ND histograms
64  fNDlem = tfs->make<TH1F>((selType+"_ndlem").c_str(), ";LEM;Slices", 100, 0., 1.);
65  fNDcvn = tfs->make<TH1F>((selType+"_ndcvn").c_str(), ";CVN;Slices", 100, 0., 1.);
66  fNDlid = tfs->make<TH1F>((selType+"_ndlid").c_str(), ";LID;Slices", 240, -0.1, 1.1);
67  fNDNShowers = tfs->make<TH1F>((selType+"_ndNshowers").c_str(), ";Nnumber of Showers;Slices", 10, 0., 10.);
68  fNDShowerCalE = tfs->make<TH1F>((selType+"_ndshowercale").c_str(), ";Shower E_{calorimetric};Slices", 120, 0., 6.);
69  fNDShowerCalEfraction = tfs->make<TH1F>((selType+"_ndshowercalefrac").c_str(), ";Fraction of Slice E in Shower;Slices", 110, 0., 1.1);
70  fNDSliceNoShowerCalE = tfs->make<TH1F>((selType+"_ndnoshowercale").c_str(), ";(Slice -Shower) E_{calorimetric};Slices",120, 0., 6.);
71  fNDShowerDistToVtx = tfs->make<TH1F>((selType+"_ndNshowergap").c_str(), ";Shower Distance to Vertex;Slices", 25, 0., 200.);
72  fNDVtxX = tfs->make<TH1F>((selType+"_ndVtxX").c_str(), ";x_{vertex} (cm);Showers", 200, -200., 200.);
73  fNDVtxY = tfs->make<TH1F>((selType+"_ndVtxY").c_str(), ";y_{vertex} (cm);Showers", 200, -200., 200.);
74  fNDVtxZ = tfs->make<TH1F>((selType+"_ndVtxZ").c_str(), ";z_{vertex} (cm);Showers", 700, 0., 1400.);
75  fNDShwVtxX = tfs->make<TH1F>((selType+"_ndShwVtxX").c_str(), ";x_{vertex} (cm);Showers", 200, -200., 200.);
76  fNDShwVtxY = tfs->make<TH1F>((selType+"_ndShwVtxY").c_str(), ";y_{vertex} (cm);Showers", 200, -200., 200.);
77  fNDShwVtxZ = tfs->make<TH1F>((selType+"_ndShwVtxZ").c_str(), ";z_{vertex} (cm);Showers", 700, 0., 1400.);
78  fNDShwEndX = tfs->make<TH1F>((selType+"_ndShwEndX").c_str(), ";x_{vertex} (cm);Showers", 200, -200., 200.);
79  fNDShwEndY = tfs->make<TH1F>((selType+"_ndShwEndY").c_str(), ";y_{vertex} (cm);Showers", 200, -200., 200.);
80  fNDShwEndZ = tfs->make<TH1F>((selType+"_ndShwEndZ").c_str(), ";z_{vertex} (cm);Showers", 700, 0., 1400.);
81  fNDSliceHits = tfs->make<TH1F>((selType+"_ndSliceHits").c_str(), ";Hits in Slice;Slices", 500, 0., 500.);
82  fNDCalorimetricE = tfs->make<TH1F>((selType+"_ndCalorimetricE").c_str(), ";E_{calorimetric} (GeV);Showers", 120, 0., 6.);
83  fNDCalEperHit = tfs->make<TH1F>((selType+"_ndCalEperHit").c_str(), ";E_{calorimetric}/ hit ;Slices", 100, 0., 0.1);
84  fNDProngLength = tfs->make<TH1F>((selType+"_ndProngLength").c_str(), ";L_{shower} (cm);Showers", 700, 0., 1400.);
85  fNDSliceNHitsPerPlane = tfs->make<TH1F>((selType+"_ndSliceHitsPerPlane").c_str(), ";Slice Hits/Plane;Slices", 100, 0., 50.);
86  fNDPlanesToFront = tfs->make<TH1F>((selType+"_ndPlanesToFront").c_str(), ";Planes to Front;Events", 600, 0., 600.);
87 
88  return;
89 }
TH1F * fFDVtxDistToEastWall
Definition: EvaluatorNue.h:113
TH1F * fFDShowerHitsViewAsym
Definition: EvaluatorNue.h:109
TH1F * fNDShowerCalEfraction
Definition: EvaluatorNue.h:135
const char * p
Definition: xmltok.h:285
void reconfigure(fhicl::ParameterSet const &p)
::xsd::cxx::tree::string< char, simple_type > string
Definition: Database.h:154
TH1F * fFDSliceCosAngleShw
Definition: EvaluatorNue.h:110
TH1F * fFDSliceNHitsPerPlane
Definition: EvaluatorNue.h:106
TH1F * fNDSliceNHitsPerPlane
Definition: EvaluatorNue.h:142
TH1F * fNDSliceNoShowerCalE
Definition: EvaluatorNue.h:143
TH1F * fFDSliceFracShwHits
Definition: EvaluatorNue.h:112
TH1F * fFDVtxDistToWestWall
Definition: EvaluatorNue.h:114
skim::EvaluatorNue::EvaluatorNue ( EvaluatorNue const &  )
delete
skim::EvaluatorNue::EvaluatorNue ( EvaluatorNue &&  )
delete

Member Function Documentation

bool skim::Evaluator::CheckSliceQuality ( rb::Cluster const &  slice)
protectedinherited

Definition at line 73 of file Evaluator.cxx.

References calcFirstLastLivePlane(), skim::Evaluator::fDetId, nova::dbi::RunHistory::GetConfiguration(), nova::dbi::RunHistory::GoodDiBlockMask(), novadaq::cnv::kFARDET, LOG_DEBUG, rb::Cluster::MaxPlane(), rb::Cluster::MinPlane(), and rh.

Referenced by skim::EvaluatorNumuCCpi::CheckSlices(), skim::EvaluatorNumu::CheckSlices(), and CheckSlices().

74 {
75  if(fDetId != novadaq::cnv::kFARDET) return true;
76 
78  unsigned int dibmask = (rh->GoodDiBlockMask()&rh->GetConfiguration());
79  std::bitset<14> binary(dibmask);
80 
81  std::pair<int,int> planesA = calcFirstLastLivePlane(slice.MinPlane(), binary, fDetId);
82  std::pair<int,int> planesB = calcFirstLastLivePlane(slice.MaxPlane(), binary, fDetId);
83 
84  LOG_DEBUG("Evaluator")
85  << "min plane: " << slice.MinPlane() << " max plane: " << slice.MaxPlane()
86  << " " << planesA.first << " " << planesA.second
87  << " " << planesB.first << " " << planesB.second
88  << " " << (planesA.second - planesA.first + 1)/64 << " > 3";
89 
90  if ((planesA.first != planesB.first) || (planesA.second != planesB.second))
91  return false;
92 
93  // 1/64 = 0.015625
94  return ((planesA.second - planesA.first + 1) * 0.015625 > 3);
95 }
#define LOG_DEBUG(stream)
Definition: Messenger.h:149
novadaq::cnv::DetId fDetId
the id of the detector we are looking at
Definition: Evaluator.h:84
TH2 * rh
Definition: drawXsec.C:5
std::pair< int, int > calcFirstLastLivePlane(int plane, std::bitset< 14 > binary, novadaq::cnv::DetId det)
Definition: Evaluator.cxx:51
Far Detector at Ash River, MN.
int GoodDiBlockMask(int subrun=-1, bool reload=false)
size_t skim::EvaluatorNue::CheckSlices ( )
virtual

Implements skim::Evaluator.

Definition at line 216 of file EvaluatorNue.cxx.

References skim::Evaluator::CheckSliceQuality(), skim::Evaluator::CheckTiming(), skim::Evaluator::fKeptSlices, skim::Evaluator::fSlicePtrs, KeepSlice(), and LOG_DEBUG.

217 {
218  // fKeptSlicePtrs was cleared in the initialize call
219  // only non-noise slices were put into fSlicePtrs in the initialize call
220  for(size_t s = 0; s < fSlicePtrs.size(); ++s){
221  LOG_DEBUG("EvaluatorNue")
222  << "on slice " << s;
223  if(this->KeepSlice(s) &&
224  this->CheckTiming( *(fSlicePtrs[s]) ) &&
225  this->CheckSliceQuality( *(fSlicePtrs[s]) )
226  ){
227  LOG_DEBUG("EvaluatorNue")
228  << "keeping slice " << s;
229  fKeptSlices.emplace_back(fSlicePtrs[s], s);
230  }
231  }
232 
233  return fKeptSlices.size();
234 }
std::vector< art::Ptr< rb::Cluster > > fSlicePtrs
all slices in the spill
Definition: Evaluator.h:92
#define LOG_DEBUG(stream)
Definition: Messenger.h:149
bool CheckTiming(rb::Cluster const &slice)
Definition: Evaluator.cxx:20
std::vector< KeptSliceInfo > fKeptSlices
slices we keep
Definition: Evaluator.h:91
const XML_Char * s
Definition: expat.h:262
bool KeepSlice(size_t s)
bool CheckSliceQuality(rb::Cluster const &slice)
Definition: Evaluator.cxx:73
bool skim::Evaluator::CheckTiming ( rb::Cluster const &  slice)
protectedinherited

Definition at line 20 of file Evaluator.cxx.

References skim::Evaluator::fCurrentRun, LOG_DEBUG, and rb::Cluster::MeanTNS().

Referenced by skim::EvaluatorNumuCCpi::CheckSlices(), skim::EvaluatorNumu::CheckSlices(), and CheckSlices().

21 {
22  // look in CAFAna/TimingCuts.h for definitions of the timing constants
23 
24  const double BeamWindowMinMicroSec = 217;
25  const double BeamWindowMaxMicroSec = 229;
26  const double PeakShiftMicroSec = 64;
27  const int LastBadTimingRun = 17945;
28 
29  auto time = slice.MeanTNS();
30 
31  LOG_DEBUG("Evaluator")
32  << "the mean time is " << time
33  << "\ncurrent Run " << fCurrentRun << "/" << LastBadTimingRun
34  << "\nbeam window min " << 1000 * BeamWindowMinMicroSec
35  << "\nbeam window max " << 1000 * BeamWindowMaxMicroSec
36  << "\nbeam offset " << 1000 * PeakShiftMicroSec;
37 
38  if(fCurrentRun <= LastBadTimingRun &&
39  time > 1000 * (BeamWindowMinMicroSec + PeakShiftMicroSec) &&
40  time < 1000 * (BeamWindowMaxMicroSec + PeakShiftMicroSec)) return true;
41 
42  if(time > 1000 * BeamWindowMinMicroSec &&
43  time < 1000 * BeamWindowMaxMicroSec) return true;
44 
45  return false;
46 }
#define LOG_DEBUG(stream)
Definition: Messenger.h:149
int fCurrentRun
the current run number
Definition: Evaluator.h:88
void skim::EvaluatorNue::FillHistograms ( skim::ParametersNue const &  params)
private

Definition at line 434 of file EvaluatorNue.cxx.

References skim::ParametersNue::CalorimetricE(), skim::ParametersNue::CellsPerPlane(), skim::ParametersNue::CosShowers(), skim::ParametersNue::CVNVal(), skim::Evaluator::fDetId, fFDPt, fFDShowerHitsViewAsym, fFDShowerHitsXView, fFDShowerHitsYView, fFDSliceCosAngleShw, fFDSliceDistShwVtx, fFDSliceFracShwHits, fFDSliceNHitsPerPlane, fFDVtxDistToBack, fFDVtxDistToBottom, fFDVtxDistToEastWall, fFDVtxDistToFront, fFDVtxDistToTop, fFDVtxDistToWestWall, fNDCalEperHit, fNDCalorimetricE, fNDcvn, fNDlem, fNDlid, fNDNShowers, fNDPlanesToFront, fNDProngLength, fNDShowerCalE, fNDShowerCalEfraction, fNDShowerDistToVtx, fNDShwEndX, fNDShwEndY, fNDShwEndZ, fNDShwVtxX, fNDShwVtxY, fNDShwVtxZ, fNDSliceHits, fNDSliceNHitsPerPlane, fNDSliceNoShowerCalE, fNDVtxX, fNDVtxY, fNDVtxZ, skim::ParametersNue::FracShowerHits(), skim::ParametersNue::HitAsymmetry(), novadaq::cnv::kFARDET, novadaq::cnv::kNEARDET, skim::ParametersNue::LEMVal(), skim::ParametersNue::LIDVal(), skim::ParametersNue::MinBackDist(), skim::ParametersNue::MinBotDist(), skim::ParametersNue::MinEastDist(), skim::ParametersNue::MinFrontDist(), skim::ParametersNue::MinTopDist(), skim::ParametersNue::MinWestDist(), skim::ParametersNue::NumShowers(), skim::ParametersNue::PlanesToFront(), skim::ParametersNue::ProngLength(), skim::ParametersNue::ShowerCalE(), skim::ParametersNue::ShowerEnd(), skim::ParametersNue::ShowerNumXCell(), skim::ParametersNue::ShowerNumYCell(), skim::ParametersNue::ShowerPt(), skim::ParametersNue::ShowerVertex(), skim::ParametersNue::ShowerVtxDist(), skim::ParametersNue::SliceHits(), and skim::ParametersNue::Vertex().

Referenced by KeepSlice(), and SlicesToKeep().

435 {
436 
438  fFDSliceNHitsPerPlane->Fill(params.CellsPerPlane());
439  fFDShowerHitsXView ->Fill(params.ShowerNumXCell());
440  fFDShowerHitsYView ->Fill(params.ShowerNumYCell());
441  fFDShowerHitsViewAsym->Fill(params.HitAsymmetry());
442  fFDSliceCosAngleShw ->Fill(params.CosShowers());
443  fFDSliceDistShwVtx ->Fill(params.ShowerVtxDist());
444  fFDSliceFracShwHits ->Fill(params.FracShowerHits());
445  fFDVtxDistToEastWall ->Fill(params.MinEastDist());
446  fFDVtxDistToWestWall ->Fill(params.MinWestDist());
447  fFDVtxDistToTop ->Fill(params.MinTopDist());
448  fFDVtxDistToBottom ->Fill(params.MinBotDist());
449  fFDVtxDistToFront ->Fill(params.MinFrontDist());
450  fFDVtxDistToBack ->Fill(params.MinBackDist());
451  fFDPt ->Fill(params.ShowerPt());
452  }
453  else if(fDetId == novadaq::cnv::kNEARDET){
454  fNDVtxX ->Fill(params.Vertex().X());
455  fNDVtxY ->Fill(params.Vertex().Y());
456  fNDVtxZ ->Fill(params.Vertex().Z());
457  fNDShwVtxX ->Fill(params.ShowerVertex().X());
458  fNDShwVtxY ->Fill(params.ShowerVertex().Y());
459  fNDShwVtxZ ->Fill(params.ShowerVertex().Z());
460  fNDShwEndX ->Fill(params.ShowerEnd().X());
461  fNDShwEndY ->Fill(params.ShowerEnd().Y());
462  fNDShwEndZ ->Fill(params.ShowerEnd().Z());
463  fNDSliceHits ->Fill(params.SliceHits());
464  fNDCalorimetricE ->Fill(params.CalorimetricE());
465  fNDPlanesToFront ->Fill(params.PlanesToFront());
466  fNDProngLength ->Fill(params.ProngLength());
467  fNDSliceNHitsPerPlane->Fill(params.CellsPerPlane());
468  fNDPlanesToFront ->Fill(params.PlanesToFront());
469  fNDNShowers ->Fill(params.NumShowers());
470  fNDShowerDistToVtx ->Fill(params.ShowerVtxDist());
471  fNDShowerCalE ->Fill(params.ShowerCalE());
472  fNDShowerCalEfraction->Fill(params.ShowerCalE()/params.CalorimetricE());
473  fNDSliceNoShowerCalE ->Fill(params.CalorimetricE()-params.ShowerCalE());
474  fNDCalEperHit ->Fill(params.CalorimetricE()/params.SliceHits());
475  fNDlem ->Fill(params.LEMVal());
476  fNDlid ->Fill(params.LIDVal());
477  fNDcvn ->Fill(params.CVNVal());
478  }
479 
480  return;
481 }
TH1F * fFDVtxDistToEastWall
Definition: EvaluatorNue.h:113
TH1F * fFDShowerHitsViewAsym
Definition: EvaluatorNue.h:109
novadaq::cnv::DetId fDetId
the id of the detector we are looking at
Definition: Evaluator.h:84
TH1F * fNDShowerCalEfraction
Definition: EvaluatorNue.h:135
Far Detector at Ash River, MN.
Near Detector in the NuMI cavern.
TH1F * fFDSliceCosAngleShw
Definition: EvaluatorNue.h:110
TH1F * fFDSliceNHitsPerPlane
Definition: EvaluatorNue.h:106
TH1F * fNDSliceNHitsPerPlane
Definition: EvaluatorNue.h:142
TH1F * fNDSliceNoShowerCalE
Definition: EvaluatorNue.h:143
TH1F * fFDSliceFracShwHits
Definition: EvaluatorNue.h:112
TH1F * fFDVtxDistToWestWall
Definition: EvaluatorNue.h:114
bool skim::EvaluatorNue::Initialize ( novadaq::cnv::DetId const &  detId,
art::Event const &  e 
)
virtual

Implements skim::Evaluator.

Definition at line 134 of file EvaluatorNue.cxx.

References runNovaSAM::detId, febshutoff_auto::end, art::EventID::event(), art::Event::event(), art::Handle< T >::failedToGet(), fCosRejLabel, fCosRejs, skim::Evaluator::fCurrentEvent, skim::Evaluator::fCurrentRun, skim::Evaluator::fCurrentSubRun, fCVNLabel, fCVNs, skim::Evaluator::fDetId, fELIDs, skim::SkimmingUtils::FillSliceMap(), skim::SkimmingUtils::FillSliceVector(), skim::Evaluator::fIsData, skim::Evaluator::fKeptSlices, fLEMLabel, fLEMs, fLIDLabel, fmc, fNueVetoLabel, fNueVetos, fProngs, fProngTag, fShowers, skim::Evaluator::fSliceLabel, skim::Evaluator::fSlicePtrs, fSLIDs, fVertexLabel, fVertices, art::DataViewImpl::getByLabel(), art::Event::id(), art::Event::isRealData(), LOG_DEBUG, LOG_WARNING, prongByLengthNue(), art::Event::run(), showerByEnergyNue(), and art::Event::subRun().

136 {
137  fSlicePtrs .clear();
138  fKeptSlices .clear();
139  fShowers .clear();
140  fProngs .clear();
141  fSLIDs .clear();
142  fVertices .clear();
143  fCosRejs .clear();
144  fLEMs .clear();
145  fELIDs .clear();
146  fCVNs .clear();
147  fNueVetos .clear();
148 
149  fIsData = e.isRealData();
150  fDetId = detId;
151  fCurrentRun = e.run();
152  fCurrentSubRun = e.subRun();
153  fCurrentEvent = e.event();
154 
155  // fill the vectors of vector<art::Ptr<>> for the reco objects related
156  // to each slice in the spill
157  // get the slices out of the event
159  e.getByLabel(fSliceLabel, slices);
160 
161  if( slices.failedToGet() ){
162  LOG_WARNING("EvaluatorNue") << "No slices in this event";
163  return false;
164  }
165 
166 
167  LOG_DEBUG("EvaluatorNue")
168  << "there are "
169  << slices->size()
170  << " slices in this event "
171  << e.id().event();
172 
173 
174  // get the FindMany for the slices to shower & vertex associations.
175  art::FindMany<slid::ShowerLID> fmslid (slices, e, fLIDLabel );
176  art::FindMany<rb::Vertex> fmv (slices, e, fVertexLabel );
177  art::FindMany<rb::Prong> fmp (slices, e, fProngTag );
179  art::FindMany<slid::EventLID> fmlid (slices, e, fLIDLabel );
180  art::FindMany<lem::PIDDetails> fmlem (slices, e, fLEMLabel );
181  art::FindMany<cvn::Result> fmcvn (slices, e, fCVNLabel );
182  art::FindMany<presel::Veto> fmnueveto(slices, e, fNueVetoLabel);
183 
185 
186  for(size_t s = 0; s < slices->size(); ++s){
187 
188  fSlicePtrs.emplace_back(slices, s);
189 
190  su.FillSliceMap(s, fmv, fVertices);
191  su.FillSliceMap(s, fmp, fProngs);
192  su.FillSliceMap(s, fmc, fCosRejs);
193  su.FillSliceMap(s, fmslid, fSLIDs);
194  if(fLEMLabel != "") su.FillSliceMap(s, fmlem, fLEMs);
195  su.FillSliceMap(s, fmlid, fELIDs);
196  su.FillSliceMap(s, fmcvn, fCVNs);
197  su.FillSliceMap(s, fmnueveto, fNueVetos);
198 
199  // sort the showerLIDs vector in order of decreasing energy
200  // sorting now ensures that the showers and slids are in the
201  // proper order for later use
202  std::sort(fSLIDs[s].begin(), fSLIDs[s].end(), showerByEnergyNue);
203 
204  // now get the shower associated with each ShowerLID
206 
207  // sort the prongs by decreasing length
208  std::sort(fProngs[s].begin(), fProngs[s].end(), prongByLengthNue);
209 
210  } // end the loop over the slices
211 
212  return true;
213 }
std::vector< art::Ptr< rb::Cluster > > fSlicePtrs
all slices in the spill
Definition: Evaluator.h:92
#define LOG_DEBUG(stream)
Definition: Messenger.h:149
std::string fNueVetoLabel
label of module creating nue vetos
Definition: EvaluatorNue.h:102
novadaq::cnv::DetId fDetId
the id of the detector we are looking at
Definition: Evaluator.h:84
art::InputTag fProngTag
input tag for prongs used in preselection
Definition: EvaluatorNue.h:103
std::string fVertexLabel
label of module creating vertex
Definition: EvaluatorNue.h:95
void FillSliceMap(size_t const &s, art::FindMany< T > &fmp, std::map< size_t, std::vector< T const * > > &ptrMap)
TFile * fmc
Definition: bdt_com.C:14
int fCurrentSubRun
the current run number
Definition: Evaluator.h:89
bool fIsData
is this data or MC?
Definition: Evaluator.h:87
std::string fSliceLabel
label of module creating slices
Definition: Evaluator.h:85
void FillSliceVector(size_t const &s, art::FindMany< T > &fmp, std::vector< T const * > &ptrMap)
std::vector< KeptSliceInfo > fKeptSlices
slices we keep
Definition: Evaluator.h:91
const XML_Char * s
Definition: expat.h:262
std::map< size_t, std::vector< cosrej::NueCosRej const * > > fCosRejs
slice index to cosrej ptrs
Definition: EvaluatorNue.h:88
std::map< size_t, std::vector< slid::EventLID const * > > fELIDs
slice index to evtlid ptrs
Definition: EvaluatorNue.h:91
std::map< size_t, std::vector< lem::PIDDetails const * > > fLEMs
slice index to lem ptrs
Definition: EvaluatorNue.h:90
std::map< size_t, std::vector< rb::Shower const * > > fShowers
slice index to shower ptrs
Definition: EvaluatorNue.h:85
int fCurrentEvent
the current run number
Definition: Evaluator.h:90
std::map< size_t, std::vector< rb::Vertex const * > > fVertices
slice index to vertex ptrs
Definition: EvaluatorNue.h:87
#define LOG_WARNING(category)
bool showerByEnergyNue(slid::ShowerLID const *s1, slid::ShowerLID const *s2)
bool prongByLengthNue(rb::Prong const *p1, rb::Prong const *p2)
std::map< size_t, std::vector< slid::ShowerLID const * > > fSLIDs
slice index to slid ptrs
Definition: EvaluatorNue.h:89
std::map< size_t, std::vector< cvn::Result const * > > fCVNs
slice index to cvn ptrs
Definition: EvaluatorNue.h:92
std::string fCVNLabel
label of module creating cvn pids
Definition: EvaluatorNue.h:101
std::string fCosRejLabel
label of module creating cosrejs
Definition: EvaluatorNue.h:98
std::string fLIDLabel
label of module creating shower and event lids
Definition: EvaluatorNue.h:99
std::map< size_t, std::vector< presel::Veto const * > > fNueVetos
slice index to nue vetos ptrs
Definition: EvaluatorNue.h:93
int fCurrentRun
the current run number
Definition: Evaluator.h:88
std::string fLEMLabel
label of module creating lem pids
Definition: EvaluatorNue.h:100
Float_t e
Definition: plot.C:35
std::map< size_t, std::vector< rb::Prong const * > > fProngs
slice index to prong ptrs
Definition: EvaluatorNue.h:86
bool failedToGet() const
Definition: Handle.h:196
bool skim::EvaluatorNue::KeepSlice ( size_t  s)
private

Definition at line 237 of file EvaluatorNue.cxx.

References rb::CellHit::Cell(), geo::PlaneGeo::Cell(), release_diff::diff, geo::LiveGeometry::DistToTop(), stan::math::fabs(), fCosRejs, fCVNs, skim::Evaluator::fDetId, fELIDs, fGeom, FillHistograms(), fLEMLabel, fLEMs, fLiveGeom, check_time_usage::float, fNueVetos, fProngs, fSel, fShowers, skim::Evaluator::fSlicePtrs, fSLIDs, fVertices, geo::CellGeo::HalfD(), geo::CellGeo::HalfW(), rb::Cluster::IsNoise(), LOG_DEBUG, cet::sqlite::max(), rb::Cluster::MaxXYZ(), rb::Cluster::MeanTNS(), std::min(), rb::Cluster::NXCell(), rb::Cluster::NYCell(), rb::CellHit::Plane(), geo::GeometryBase::Plane(), std::sqrt(), rb::Cluster::XCell(), and rb::Cluster::YCell().

Referenced by CheckSlices(), and SlicesToKeep().

238 {
239  // if this is a noise slice, we don't want it
240  if(fSlicePtrs.back()->IsNoise()){
241  LOG_DEBUG("EvaluatorNue::KeepSlice")
242  << "Noise Slice.";
243  return false;
244  }
245  // get the vectors of showers and vertices for this slice
246  std::vector<rb::Shower const*> showers;
247  if( fShowers.count(s) > 0 ){
248  showers = fShowers.find(s)->second;
249  }
250 
251  std::vector<slid::ShowerLID const*> slids;
252  if( fSLIDs.count(s) > 0) slids = fSLIDs.find(s)->second;
253 
254  std::vector<rb::Vertex const*> vertices;
255  if( fVertices.count(s) > 0 ) vertices = fVertices.find(s)->second;
256 
257  std::vector<rb::Prong const*> prongs;
258  if( fProngs.count(s) > 0 ) prongs = fProngs.find(s)->second;
259 
260  std::vector<cosrej::NueCosRej const*> cosrejs;
261  if( fCosRejs.count(s) > 0 ) cosrejs = fCosRejs.find(s)->second;
262 
263  std::vector<lem::PIDDetails const*> lems;
264  if( fLEMs.count(s) > 0) lems = fLEMs.find(s)->second;
265 
266  std::vector<slid::EventLID const*> elids;
267  if( fELIDs.count(s) > 0) elids = fELIDs.find(s)->second;
268 
269  std::vector<cvn::Result const*> cvns;
270  if( fCVNs.count(s) > 0) cvns = fCVNs.find(s)->second;
271 
272  std::vector<presel::Veto const*> nuevetos;
273  if( fNueVetos.count(s) > 0) nuevetos = fNueVetos.find(s)->second;
274 
275  // don't bother if there aren't any showers or vertices
276  // there should only be one vertex per slice according to the
277  // module creating the rb::Vertex objects and only one cosrej::NueCosRej
278  // per slice.
279  if(showers.size() < 1 ||
280  prongs.size() < 1 ||
281  slids.size() < 1 ||
282  vertices.size() != 1 ||
283  cosrejs.size() != 1 ||
284  elids.size() != 1 ||
285  // lems.size() != 1 ||
286  cvns.size() != 1 ||
287  nuevetos.size() != 1
288  ){
289  LOG_DEBUG("EvaluatorNue")
290  << "not enough showers (" << showers .size()
291  << ") or prongs(" << prongs .size()
292  << ") or slids(" << slids .size()
293  << ") or vertices(" << vertices.size()
294  << ") or cosrejs(" << cosrejs .size()
295  << ") or elids(" << elids .size()
296  << ") or lems(" << lems .size()
297  << ") or cvns(" << cvns .size()
298  << ") or nuevetos(" << nuevetos.size()
299  << ")";
300  return false;
301  }
302 
303  // check that all the necessary ptrs are legit
304  // return false if they are not
305  if(vertices[0] == nullptr ||
306  cosrejs[0] == nullptr ||
307  elids[0] == nullptr ||
308  // lems[0] == nullptr ||
309  cvns[0] == nullptr ||
310  nuevetos[0] == nullptr ||
311  showers[0] == nullptr ||
312  slids[0] == nullptr){
313  LOG_DEBUG("EvaluatorNue")
314  << "All the necessary ptrs are NOT legit";
315  return false;
316  }
317  LOG_DEBUG("EvaluatorNue")
318  << "passed - All the necessary ptrs are legit";
319  ////////////////////// Check nearest Slice //////////////////////////
320 
321  const rb::Cluster& slice = (*fSlicePtrs[s]);
322 
323  // find the slice with minimum mean time distance from this slice
324  float mintimediff = 1e7; // initialize to a big number
325  signed int mintimejsli = -1;
326 
327  for(size_t js = 0; js < fSlicePtrs.size(); ++js){
328  if( js == s ) continue;
329  const rb::Cluster& slicej = (*fSlicePtrs[js]);
330  if( slicej.IsNoise() ) continue;
331  float diff = fabs(slicej.MeanTNS() - slice.MeanTNS());
332  if (diff<mintimediff) {mintimejsli = js;}
333  mintimediff = std::min( mintimediff, diff);
334  }
335 
336 
337  float closestslicetime = std::numeric_limits<float>::max();
338  float closestsliceminfromtop = std::numeric_limits<float>::max();
339  float closestslicemindist = std::numeric_limits<float>::max();
340 
341  if (mintimejsli != -1 ){
342  const rb::Cluster& slicejmin = (*fSlicePtrs[mintimejsli]);
343 
344  closestslicetime = slicejmin.MeanTNS()-slice.MeanTNS();
345  TVector3 maxp = slicejmin.MaxXYZ();
346  closestsliceminfromtop = fLiveGeom->DistToTop(maxp);
347 
348  float mincelldistX = std::numeric_limits<float>::max();
349  float mincelldistY = std::numeric_limits<float>::max();
350 
351  float cellD = 2.*fGeom->Plane(0)->Cell(0)->HalfD();
352  float cellW = 2.*fGeom->Plane(0)->Cell(0)->HalfW();
353 
354  // look for minimum distance
355  for(unsigned int hitIdxX = 0; hitIdxX < slice.NXCell(); ++hitIdxX)
356  {
357  const art::Ptr<rb::CellHit>& chitX = slice.XCell(hitIdxX);
358  for(unsigned int minhitIdxX = 0; minhitIdxX < slicejmin.NXCell(); ++minhitIdxX)
359  {
360  const art::Ptr<rb::CellHit>& minchitX = slicejmin.XCell(minhitIdxX);
361  float dPlaneX = (float)chitX->Plane()-(float)minchitX->Plane();
362  float dCellX = (float)chitX->Cell()-(float)minchitX->Cell();
363  float distX = sqrt((dPlaneX*cellD)*(dPlaneX*cellD)+(dCellX*cellW)*(dCellX*cellW));
364  if(distX<mincelldistX) mincelldistX = distX;
365  }
366  }
367  for(unsigned int hitIdxY = 0; hitIdxY < slice.NYCell(); ++hitIdxY)
368  {
369  const art::Ptr<rb::CellHit>& chitY = slice.YCell(hitIdxY);
370  for(unsigned int minhitIdxY = 0; minhitIdxY < slicejmin.NYCell(); ++minhitIdxY)
371  {
372  const art::Ptr<rb::CellHit>& minchitY = slicejmin.YCell(minhitIdxY);
373  float dPlaneY = (float)chitY->Plane()-(float)minchitY->Plane();
374  float dCellY = (float)chitY->Cell()-(float)minchitY->Cell();
375  float distY = sqrt((dPlaneY*cellD)*(dPlaneY*cellD)+(dCellY*cellW)*(dCellY*cellW));
376  if(distY<mincelldistY) mincelldistY = distY;
377  }
378  }
379  closestslicemindist = std::min(mincelldistX, mincelldistY);
380  }
381 
382  LOG_DEBUG("EvaluatorNue") << "Nearest Slice Info: "
383  << closestslicetime << " "
384  << closestsliceminfromtop << " "
385  << closestslicemindist << " " ;
386 
387  // Fill Closes Slice Info Map
388  std::map<std::string, float> closestsliceinfo;
389  closestsliceinfo["Time"] = closestslicetime;
390  closestsliceinfo["DistFromTop"] = closestsliceminfromtop;
391  closestsliceinfo["MinDist"] = closestslicemindist;
392 
393 
394  if(fLEMLabel != "" ){ // Must be SA expect lem info and no nearest slice info
395  auto params = std::make_unique<skim::ParametersNue>(*(fSlicePtrs[s]),
396  *(vertices[0]),
397  *(cosrejs[0]),
398  showers,
399  prongs,
400  slids,
401  *(elids[0]),
402  *(lems[0]),
403  *(cvns[0]),
404  *(nuevetos[0]));
405 
406  LOG_DEBUG("EvaluatorNue") << *params;
407 
408  this->FillHistograms(*params);
409 
410  return fSel->PassesSelection(params.get(), fDetId);
411  } else { // Must be 2017 Analysis expects no lem info but uses nearest slice info
412 
413  auto params = std::make_unique<skim::ParametersNue>(*(fSlicePtrs[s]),
414  *(vertices[0]),
415  *(cosrejs[0]),
416  showers,
417  prongs,
418  slids,
419  closestsliceinfo,
420  *(elids[0]),
421  *(cvns[0]),
422  *(nuevetos[0]));
423 
424  LOG_DEBUG("EvaluatorNue") << *params;
425 
426  this->FillHistograms(*params);
427 
428  return fSel->PassesSelection(params.get(), fDetId);
429 
430  }
431 }
std::vector< art::Ptr< rb::Cluster > > fSlicePtrs
all slices in the spill
Definition: Evaluator.h:92
#define LOG_DEBUG(stream)
Definition: Messenger.h:149
novadaq::cnv::DetId fDetId
the id of the detector we are looking at
Definition: Evaluator.h:84
double HalfD() const
Definition: CellGeo.cxx:205
art::Ptr< rb::CellHit > XCell(unsigned int xIdx) const
Get the ith cell in the x-view.
Definition: Cluster.cxx:157
fvar< T > fabs(const fvar< T > &x)
Definition: fabs.hpp:15
unsigned short Plane() const
Definition: CellHit.h:39
const CellGeo * Cell(int icell) const
Definition: PlaneGeo.h:48
T sqrt(T number)
Definition: d0nt_math.hpp:156
double HalfW() const
Definition: CellGeo.cxx:191
A collection of associated CellHits.
Definition: Cluster.h:47
const PlaneGeo * Plane(unsigned int i) const
TVector3 MaxXYZ() const
Definition: Cluster.cxx:492
unsigned short Cell() const
Definition: CellHit.h:40
const XML_Char * s
Definition: expat.h:262
std::map< size_t, std::vector< cosrej::NueCosRej const * > > fCosRejs
slice index to cosrej ptrs
Definition: EvaluatorNue.h:88
double DistToTop(TVector3 vertex)
std::unique_ptr< skim::SelectionBase > fSel
determine which type of selection to use at run time
Definition: EvaluatorNue.h:83
art::Ptr< rb::CellHit > YCell(unsigned int yIdx) const
Get the ith cell in the y-view.
Definition: Cluster.cxx:165
std::map< size_t, std::vector< slid::EventLID const * > > fELIDs
slice index to evtlid ptrs
Definition: EvaluatorNue.h:91
std::map< size_t, std::vector< lem::PIDDetails const * > > fLEMs
slice index to lem ptrs
Definition: EvaluatorNue.h:90
std::map< size_t, std::vector< rb::Shower const * > > fShowers
slice index to shower ptrs
Definition: EvaluatorNue.h:85
std::map< size_t, std::vector< rb::Vertex const * > > fVertices
slice index to vertex ptrs
Definition: EvaluatorNue.h:87
unsigned int NYCell() const
Number of cells in the y-view.
Definition: Cluster.h:108
std::map< size_t, std::vector< slid::ShowerLID const * > > fSLIDs
slice index to slid ptrs
Definition: EvaluatorNue.h:89
std::map< size_t, std::vector< cvn::Result const * > > fCVNs
slice index to cvn ptrs
Definition: EvaluatorNue.h:92
unsigned int NXCell() const
Number of cells in the x-view.
Definition: Cluster.h:106
double MeanTNS(rb::AveragingScheme scheme=kDefaultScheme) const
Definition: Cluster.cxx:554
art::ServiceHandle< geo::LiveGeometry > fLiveGeom
the LiveGeometry service
Definition: EvaluatorNue.h:80
std::map< size_t, std::vector< presel::Veto const * > > fNueVetos
slice index to nue vetos ptrs
Definition: EvaluatorNue.h:93
T min(const caf::Proxy< T > &a, T b)
bool IsNoise() const
Is the noise flag set?
Definition: Cluster.h:163
std::string fLEMLabel
label of module creating lem pids
Definition: EvaluatorNue.h:100
T max(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
Definition: statistics.h:68
void FillHistograms(skim::ParametersNue const &params)
std::map< size_t, std::vector< rb::Prong const * > > fProngs
slice index to prong ptrs
Definition: EvaluatorNue.h:86
art::ServiceHandle< geo::Geometry > fGeom
the Geometry service
Definition: EvaluatorNue.h:81
EvaluatorNue& skim::EvaluatorNue::operator= ( EvaluatorNue const &  )
delete
EvaluatorNue& skim::EvaluatorNue::operator= ( EvaluatorNue &&  )
delete
void skim::EvaluatorNue::reconfigure ( fhicl::ParameterSet const &  p)
virtual

Implements skim::Evaluator.

Definition at line 92 of file EvaluatorNue.cxx.

References fCosRejLabel, fCVNLabel, fLEMLabel, fLIDLabel, fNueVetoLabel, fProngTag, fSel, fShowerLabel, skim::Evaluator::fSliceLabel, fVertexLabel, fhicl::ParameterSet::get(), and elec2geo::pos.

Referenced by EvaluatorNue().

93 {
94  fSliceLabel = p.get<std::string>("SliceLabel", "slicer" );
95  fVertexLabel = p.get<std::string>("VertexLabel", "elasticarmshs");
96  fShowerLabel = p.get<std::string>("ShowerLabel", "recluster" );
97  fLIDLabel = p.get<std::string>("LIDLabel", "slid" );
98  fCVNLabel = p.get<std::string>("CVNLabel", "cvneval" );
99  fCosRejLabel = p.get<std::string>("CosRejLabel", "nuecosrej" );
100  fNueVetoLabel = p.get<std::string>("NueVetoLabel", "veto" );
101  //Set default value to empty string because in 2017 Trees lem info is not available.
102  //Only set it int the fcl file if it is needed and available.
103  // fLEMLabel is used to check whether to look for lem values or not
104  // fLEMLabel = p.get<std::string>("LEMLabel", "lem" );
105  fLEMLabel = p.get<std::string>("LEMLabel", "" );
106 
107 
108  auto prongTag = p.get<std::string>("ProngTag", "fuzzykvertex:Prong3D");
109  auto pos = prongTag.find(":");
110  fProngTag = art::InputTag(prongTag.substr(0, pos),
111  prongTag.substr(pos+1, prongTag.size()));
112 
113  auto selPSet = p.get<fhicl::ParameterSet>("Selection");
114 
115  auto selType = selPSet.get<std::string>("SelectionType", "NueSA");
116  if(selType.compare("NueSA") == 0) fSel = std::make_unique<skim::SelectionNueSA >();
117  else if(selType.compare("Nue2017Peripheral") == 0) fSel = std::make_unique<skim::SelectionNue2017Peripheral>();
118  else if(selType.compare("Nue2017") == 0) fSel = std::make_unique<skim::SelectionNue2017>();
119  else if(selType.compare("Nue2018PeripheralFHC") == 0) fSel = std::make_unique<skim::SelectionNue2018PeripheralFHC>();
120  else if(selType.compare("Nue2018PeripheralRHC") == 0) fSel = std::make_unique<skim::SelectionNue2018PeripheralRHC>();
121  else if(selType.compare("Nue2018FHC") == 0) fSel = std::make_unique<skim::SelectionNue2018FHC>();
122  else if(selType.compare("Nue2018RHC") == 0) fSel = std::make_unique<skim::SelectionNue2018RHC>();
123  else
124  throw cet::exception("EvaluatorNue")
125  << "Requested unknown selection type: "
126  << selType;
127 
128  fSel->reconfigure(selPSet);
129 
130  return;
131 }
std::string fNueVetoLabel
label of module creating nue vetos
Definition: EvaluatorNue.h:102
art::InputTag fProngTag
input tag for prongs used in preselection
Definition: EvaluatorNue.h:103
std::string fVertexLabel
label of module creating vertex
Definition: EvaluatorNue.h:95
const char * p
Definition: xmltok.h:285
::xsd::cxx::tree::exception< char > exception
Definition: Database.h:225
std::string fSliceLabel
label of module creating slices
Definition: Evaluator.h:85
std::unique_ptr< skim::SelectionBase > fSel
determine which type of selection to use at run time
Definition: EvaluatorNue.h:83
T get(std::string const &key) const
Definition: ParameterSet.h:231
::xsd::cxx::tree::string< char, simple_type > string
Definition: Database.h:154
std::string fCVNLabel
label of module creating cvn pids
Definition: EvaluatorNue.h:101
std::string fCosRejLabel
label of module creating cosrejs
Definition: EvaluatorNue.h:98
std::string fLIDLabel
label of module creating shower and event lids
Definition: EvaluatorNue.h:99
std::string fLEMLabel
label of module creating lem pids
Definition: EvaluatorNue.h:100
std::string fShowerLabel
label of module creating showers
Definition: EvaluatorNue.h:97
std::vector<KeptSliceInfo> const& skim::EvaluatorNue::SlicesToKeep ( )
inline

Definition at line 66 of file EvaluatorNue.h.

References FillHistograms(), skim::Evaluator::fKeptSlices, and KeepSlice().

66 { return fKeptSlices; }
std::vector< KeptSliceInfo > fKeptSlices
slices we keep
Definition: Evaluator.h:91

Member Data Documentation

std::string skim::EvaluatorNue::fCosRejLabel
private

label of module creating cosrejs

Definition at line 98 of file EvaluatorNue.h.

Referenced by Initialize(), and reconfigure().

std::map< size_t, std::vector<cosrej::NueCosRej const*> > skim::EvaluatorNue::fCosRejs
private

slice index to cosrej ptrs

Definition at line 88 of file EvaluatorNue.h.

Referenced by Initialize(), and KeepSlice().

int skim::Evaluator::fCurrentEvent
protectedinherited

the current run number

Definition at line 90 of file Evaluator.h.

Referenced by Initialize().

int skim::Evaluator::fCurrentRun
protectedinherited
int skim::Evaluator::fCurrentSubRun
protectedinherited

the current run number

Definition at line 89 of file Evaluator.h.

Referenced by Initialize().

std::string skim::EvaluatorNue::fCVNLabel
private

label of module creating cvn pids

Definition at line 101 of file EvaluatorNue.h.

Referenced by Initialize(), and reconfigure().

std::map< size_t, std::vector<cvn::Result const*> > skim::EvaluatorNue::fCVNs
private

slice index to cvn ptrs

Definition at line 92 of file EvaluatorNue.h.

Referenced by Initialize(), and KeepSlice().

novadaq::cnv::DetId skim::Evaluator::fDetId
protectedinherited
std::map< size_t, std::vector<slid::EventLID const*> > skim::EvaluatorNue::fELIDs
private

slice index to evtlid ptrs

Definition at line 91 of file EvaluatorNue.h.

Referenced by Initialize(), and KeepSlice().

TH1F* skim::EvaluatorNue::fFDPt
private

Definition at line 119 of file EvaluatorNue.h.

Referenced by EvaluatorNue(), and FillHistograms().

TH1F* skim::EvaluatorNue::fFDShowerHitsViewAsym
private

Definition at line 109 of file EvaluatorNue.h.

Referenced by EvaluatorNue(), and FillHistograms().

TH1F* skim::EvaluatorNue::fFDShowerHitsXView
private

Definition at line 107 of file EvaluatorNue.h.

Referenced by EvaluatorNue(), and FillHistograms().

TH1F* skim::EvaluatorNue::fFDShowerHitsYView
private

Definition at line 108 of file EvaluatorNue.h.

Referenced by EvaluatorNue(), and FillHistograms().

TH1F* skim::EvaluatorNue::fFDSliceCosAngleShw
private

Definition at line 110 of file EvaluatorNue.h.

Referenced by EvaluatorNue(), and FillHistograms().

TH1F* skim::EvaluatorNue::fFDSliceDistShwVtx
private

Definition at line 111 of file EvaluatorNue.h.

Referenced by EvaluatorNue(), and FillHistograms().

TH1F* skim::EvaluatorNue::fFDSliceFracShwHits
private

Definition at line 112 of file EvaluatorNue.h.

Referenced by EvaluatorNue(), and FillHistograms().

TH1F* skim::EvaluatorNue::fFDSliceNHitsPerPlane
private

Definition at line 106 of file EvaluatorNue.h.

Referenced by EvaluatorNue(), and FillHistograms().

TH1F* skim::EvaluatorNue::fFDVtxDistToBack
private

Definition at line 118 of file EvaluatorNue.h.

Referenced by EvaluatorNue(), and FillHistograms().

TH1F* skim::EvaluatorNue::fFDVtxDistToBottom
private

Definition at line 116 of file EvaluatorNue.h.

Referenced by EvaluatorNue(), and FillHistograms().

TH1F* skim::EvaluatorNue::fFDVtxDistToEastWall
private

Definition at line 113 of file EvaluatorNue.h.

Referenced by EvaluatorNue(), and FillHistograms().

TH1F* skim::EvaluatorNue::fFDVtxDistToFront
private

Definition at line 117 of file EvaluatorNue.h.

Referenced by EvaluatorNue(), and FillHistograms().

TH1F* skim::EvaluatorNue::fFDVtxDistToTop
private

Definition at line 115 of file EvaluatorNue.h.

Referenced by EvaluatorNue(), and FillHistograms().

TH1F* skim::EvaluatorNue::fFDVtxDistToWestWall
private

Definition at line 114 of file EvaluatorNue.h.

Referenced by EvaluatorNue(), and FillHistograms().

art::ServiceHandle<geo::Geometry> skim::EvaluatorNue::fGeom
private

the Geometry service

Definition at line 81 of file EvaluatorNue.h.

Referenced by KeepSlice().

bool skim::Evaluator::fIsData
protectedinherited
std::vector< KeptSliceInfo > skim::Evaluator::fKeptSlices
protectedinherited
std::string skim::EvaluatorNue::fLEMLabel
private

label of module creating lem pids

Definition at line 100 of file EvaluatorNue.h.

Referenced by Initialize(), KeepSlice(), and reconfigure().

std::map< size_t, std::vector<lem::PIDDetails const*> > skim::EvaluatorNue::fLEMs
private

slice index to lem ptrs

Definition at line 90 of file EvaluatorNue.h.

Referenced by Initialize(), and KeepSlice().

std::string skim::EvaluatorNue::fLIDLabel
private

label of module creating shower and event lids

Definition at line 99 of file EvaluatorNue.h.

Referenced by Initialize(), and reconfigure().

art::ServiceHandle<geo::LiveGeometry> skim::EvaluatorNue::fLiveGeom
private

the LiveGeometry service

Definition at line 80 of file EvaluatorNue.h.

Referenced by KeepSlice().

TH1F* skim::EvaluatorNue::fNDCalEperHit
private

Definition at line 139 of file EvaluatorNue.h.

Referenced by EvaluatorNue(), and FillHistograms().

TH1F* skim::EvaluatorNue::fNDCalorimetricE
private

Definition at line 138 of file EvaluatorNue.h.

Referenced by EvaluatorNue(), and FillHistograms().

TH1F* skim::EvaluatorNue::fNDcvn
private

Definition at line 122 of file EvaluatorNue.h.

Referenced by EvaluatorNue(), and FillHistograms().

TH1F* skim::EvaluatorNue::fNDlem
private

Definition at line 121 of file EvaluatorNue.h.

Referenced by EvaluatorNue(), and FillHistograms().

TH1F* skim::EvaluatorNue::fNDlid
private

Definition at line 123 of file EvaluatorNue.h.

Referenced by EvaluatorNue(), and FillHistograms().

TH1F* skim::EvaluatorNue::fNDNShowers
private

Definition at line 127 of file EvaluatorNue.h.

Referenced by EvaluatorNue(), and FillHistograms().

TH1F* skim::EvaluatorNue::fNDPlanesToFront
private

Definition at line 140 of file EvaluatorNue.h.

Referenced by EvaluatorNue(), and FillHistograms().

TH1F* skim::EvaluatorNue::fNDProngLength
private

Definition at line 137 of file EvaluatorNue.h.

Referenced by EvaluatorNue(), and FillHistograms().

TH1F* skim::EvaluatorNue::fNDShowerCalE
private

Definition at line 134 of file EvaluatorNue.h.

Referenced by EvaluatorNue(), and FillHistograms().

TH1F* skim::EvaluatorNue::fNDShowerCalEfraction
private

Definition at line 135 of file EvaluatorNue.h.

Referenced by EvaluatorNue(), and FillHistograms().

TH1F* skim::EvaluatorNue::fNDShowerDistToVtx
private

Definition at line 136 of file EvaluatorNue.h.

Referenced by EvaluatorNue(), and FillHistograms().

TH1F* skim::EvaluatorNue::fNDShwEndX
private

Definition at line 131 of file EvaluatorNue.h.

Referenced by EvaluatorNue(), and FillHistograms().

TH1F* skim::EvaluatorNue::fNDShwEndY
private

Definition at line 132 of file EvaluatorNue.h.

Referenced by EvaluatorNue(), and FillHistograms().

TH1F* skim::EvaluatorNue::fNDShwEndZ
private

Definition at line 133 of file EvaluatorNue.h.

Referenced by EvaluatorNue(), and FillHistograms().

TH1F* skim::EvaluatorNue::fNDShwVtxX
private

Definition at line 128 of file EvaluatorNue.h.

Referenced by EvaluatorNue(), and FillHistograms().

TH1F* skim::EvaluatorNue::fNDShwVtxY
private

Definition at line 129 of file EvaluatorNue.h.

Referenced by EvaluatorNue(), and FillHistograms().

TH1F* skim::EvaluatorNue::fNDShwVtxZ
private

Definition at line 130 of file EvaluatorNue.h.

Referenced by EvaluatorNue(), and FillHistograms().

TH1F* skim::EvaluatorNue::fNDSliceHits
private

Definition at line 141 of file EvaluatorNue.h.

Referenced by EvaluatorNue(), and FillHistograms().

TH1F* skim::EvaluatorNue::fNDSliceNHitsPerPlane
private

Definition at line 142 of file EvaluatorNue.h.

Referenced by EvaluatorNue(), and FillHistograms().

TH1F* skim::EvaluatorNue::fNDSliceNoShowerCalE
private

Definition at line 143 of file EvaluatorNue.h.

Referenced by EvaluatorNue(), and FillHistograms().

TH1F* skim::EvaluatorNue::fNDVtxX
private

Definition at line 124 of file EvaluatorNue.h.

Referenced by EvaluatorNue(), and FillHistograms().

TH1F* skim::EvaluatorNue::fNDVtxY
private

Definition at line 125 of file EvaluatorNue.h.

Referenced by EvaluatorNue(), and FillHistograms().

TH1F* skim::EvaluatorNue::fNDVtxZ
private

Definition at line 126 of file EvaluatorNue.h.

Referenced by EvaluatorNue(), and FillHistograms().

std::string skim::EvaluatorNue::fNueVetoLabel
private

label of module creating nue vetos

Definition at line 102 of file EvaluatorNue.h.

Referenced by Initialize(), and reconfigure().

std::map< size_t, std::vector<presel::Veto const*> > skim::EvaluatorNue::fNueVetos
private

slice index to nue vetos ptrs

Definition at line 93 of file EvaluatorNue.h.

Referenced by Initialize(), and KeepSlice().

std::map< size_t, std::vector<rb::Prong const*> > skim::EvaluatorNue::fProngs
private

slice index to prong ptrs

Definition at line 86 of file EvaluatorNue.h.

Referenced by Initialize(), and KeepSlice().

art::InputTag skim::EvaluatorNue::fProngTag
private

input tag for prongs used in preselection

Definition at line 103 of file EvaluatorNue.h.

Referenced by Initialize(), and reconfigure().

std::string skim::Evaluator::fRecordLabel
protectedinherited

label of module creating records

Definition at line 86 of file Evaluator.h.

Referenced by skim::EvaluatorNumuCCpi::reconfigure(), and skim::EvaluatorNumu::reconfigure().

std::unique_ptr<skim::SelectionBase> skim::EvaluatorNue::fSel
private

determine which type of selection to use at run time

Definition at line 83 of file EvaluatorNue.h.

Referenced by KeepSlice(), and reconfigure().

std::string skim::EvaluatorNue::fShowerLabel
private

label of module creating showers

Definition at line 97 of file EvaluatorNue.h.

Referenced by reconfigure().

std::map< size_t, std::vector<rb::Shower const*> > skim::EvaluatorNue::fShowers
private

slice index to shower ptrs

Definition at line 85 of file EvaluatorNue.h.

Referenced by Initialize(), and KeepSlice().

std::string skim::Evaluator::fSliceLabel
protectedinherited

label of module creating slices

Definition at line 85 of file Evaluator.h.

Referenced by Initialize(), and reconfigure().

std::vector< art::Ptr<rb::Cluster> > skim::Evaluator::fSlicePtrs
protectedinherited
std::map< size_t, std::vector<slid::ShowerLID const*> > skim::EvaluatorNue::fSLIDs
private

slice index to slid ptrs

Definition at line 89 of file EvaluatorNue.h.

Referenced by Initialize(), and KeepSlice().

std::string skim::EvaluatorNue::fVertexInstance
private

label of module creating vertex

Definition at line 96 of file EvaluatorNue.h.

std::string skim::EvaluatorNue::fVertexLabel
private

label of module creating vertex

Definition at line 95 of file EvaluatorNue.h.

Referenced by Initialize(), and reconfigure().

std::map< size_t, std::vector<rb::Vertex const*> > skim::EvaluatorNue::fVertices
private

slice index to vertex ptrs

Definition at line 87 of file EvaluatorNue.h.

Referenced by Initialize(), and KeepSlice().


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