Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | List of all members
ncpi0::MakeNCPi0BkgRej Class Reference
Inheritance diagram for ncpi0::MakeNCPi0BkgRej:
art::EDProducer art::ProducerBase art::Consumer art::EngineCreator art::ProductRegistryHelper

Public Types

using ModuleType = EDProducer
 
using WorkerType = WorkerT< EDProducer >
 
template<typename UserConfig , typename KeysToIgnore = void>
using Table = ProducerBase::Table< UserConfig, KeysToIgnore >
 

Public Member Functions

 MakeNCPi0BkgRej (fhicl::ParameterSet const &p)
 
 ~MakeNCPi0BkgRej ()
 
void beginRun (art::Run &run) override
 
void reconfigure (const fhicl::ParameterSet &p)
 
void produce (art::Event &evt) override
 
template<typename PROD , BranchType B = InEvent>
ProductID getProductID (std::string const &instanceName={}) const
 
template<typename PROD , BranchType B>
ProductID getProductID (ModuleDescription const &moduleDescription, std::string const &instanceName) const
 
bool modifiesEvent () const
 
template<typename T , BranchType = InEvent>
ProductToken< Tconsumes (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ProductToken< Tconsumes (InputTag const &it)
 
template<typename T , BranchType = InEvent>
void consumesMany ()
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > consumesView (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ViewToken< TconsumesView (InputTag const &it)
 
template<typename T , BranchType = InEvent>
ProductToken< TmayConsume (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ProductToken< TmayConsume (InputTag const &it)
 
template<typename T , BranchType = InEvent>
void mayConsumeMany ()
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > mayConsumeView (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ViewToken< TmayConsumeView (InputTag const &it)
 
base_engine_tcreateEngine (seed_t seed)
 
base_engine_tcreateEngine (seed_t seed, std::string const &kind_of_engine_to_make)
 
base_engine_tcreateEngine (seed_t seed, std::string const &kind_of_engine_to_make, label_t const &engine_label)
 
seed_t get_seed_value (fhicl::ParameterSet const &pset, char const key[]="seed", seed_t const implicit_seed=-1)
 

Static Public Member Functions

static cet::exempt_ptr< Consumernon_module_context ()
 

Protected Member Functions

CurrentProcessingContext const * currentContext () const
 
void validateConsumedProduct (BranchType const bt, ProductInfo const &pi)
 
void prepareForJob (fhicl::ParameterSet const &pset)
 
void showMissingConsumes () const
 

Private Attributes

std::string fSliceLabel
 
std::string fCVNLabel
 
std::string fNueSandboxLabel
 
std::string fShowerLIDLabel
 
std::string fShowerLabel
 
std::string fPIDLibPath
 
std::string fPIDLibPathLT
 
std::string fTestPath
 
std::string fNCPi0BkgRejPIDFile
 
std::string fNCPi0BkgRejPIDFileLT
 
bool fObeyPreselection
 
std::vector< std::stringfPreselectionLabels
 
TMVA::Reader * fReaderBDTG
 
TMVA::Reader * fReaderBDTGLowThres
 
float TMVAvarsBDTG [9]
 
float TMVAvarsBDTGLowThres [10]
 

Detailed Description

Definition at line 47 of file MakeNCPi0BkgRej_module.cc.

Member Typedef Documentation

using art::EDProducer::ModuleType = EDProducer
inherited

Definition at line 34 of file EDProducer.h.

template<typename UserConfig , typename KeysToIgnore = void>
using art::EDProducer::Table = ProducerBase::Table<UserConfig, KeysToIgnore>
inherited

Definition at line 43 of file EDProducer.h.

using art::EDProducer::WorkerType = WorkerT<EDProducer>
inherited

Definition at line 35 of file EDProducer.h.

Constructor & Destructor Documentation

ncpi0::MakeNCPi0BkgRej::MakeNCPi0BkgRej ( fhicl::ParameterSet const &  p)
explicit

Definition at line 87 of file MakeNCPi0BkgRej_module.cc.

References reconfigure().

88  : fReaderBDTG(nullptr) //for NCPi0
89  {
90  this->reconfigure(p);
91  this->produces< std::vector<ncpi0::NCPi0BkgRej> > ();
92  this->produces< art::Assns<ncpi0::NCPi0BkgRej, rb::Cluster> > ();
93  }
const char * p
Definition: xmltok.h:285
void reconfigure(const fhicl::ParameterSet &p)
ncpi0::MakeNCPi0BkgRej::~MakeNCPi0BkgRej ( )

Definition at line 96 of file MakeNCPi0BkgRej_module.cc.

References fReaderBDTG.

97  {
98  if(fReaderBDTG) delete fReaderBDTG;
99  }

Member Function Documentation

void ncpi0::MakeNCPi0BkgRej::beginRun ( art::Run run)
overridevirtual

Reimplemented from art::EDProducer.

Definition at line 102 of file MakeNCPi0BkgRej_module.cc.

References allTimeWatchdog::endl, util::EnvExpansion(), cet::file_exists(), fNCPi0BkgRejPIDFile, fNCPi0BkgRejPIDFileLT, fPIDLibPath, fPIDLibPathLT, fReaderBDTG, fReaderBDTGLowThres, string, and TMVAvarsBDTG.

103  {
104 
105  fReaderBDTG = new TMVA::Reader;
106  fReaderBDTG->AddVariable("cvnnumu", &TMVAvarsBDTG[0]);
107  fReaderBDTG->AddVariable("prong1epi0LLL", &TMVAvarsBDTG[1]);
108  fReaderBDTG->AddVariable("prong1epiLLL", &TMVAvarsBDTG[2]);
109  fReaderBDTG->AddVariable("prong1ContPl", &TMVAvarsBDTG[3]);
110  fReaderBDTG->AddVariable("prong1epLLT", &TMVAvarsBDTG[4]);
111  fReaderBDTG->AddVariable("prong1Width", &TMVAvarsBDTG[5]);
112  fReaderBDTG->AddVariable("cvnncid", &TMVAvarsBDTG[6]);
113  fReaderBDTG->AddVariable("prong2dedx", &TMVAvarsBDTG[7]);
114  fReaderBDTG->AddVariable("prong1MissingPl", &TMVAvarsBDTG[8]);
115 
116 
118  // Make sure we can find the Gradient Boosted Decision (For NCPi0) Trees
119  // weight file before we set up MVA
120  if(!cet::file_exists(pidlibpath+fNCPi0BkgRejPIDFile)){
121  throw cet::exception("MakeNCPi0BkgRej")
122  << "Couldn't find file " << pidlibpath+fNCPi0BkgRejPIDFile <<std::endl;
123  }
124  fReaderBDTG->BookMVA("BDTG", pidlibpath+fNCPi0BkgRejPIDFile);
125 
126  //For 10 variables PID with 100meV latest weight file
127 
128  fReaderBDTGLowThres = new TMVA::Reader;
129  fReaderBDTGLowThres->AddVariable("cvnnumu", &TMVAvarsBDTG[0]);
130  fReaderBDTGLowThres->AddVariable("prong1epi0LLL", &TMVAvarsBDTG[1]);
131  fReaderBDTGLowThres->AddVariable("prong1epiLLL", &TMVAvarsBDTG[2]);
132  fReaderBDTGLowThres->AddVariable("prong1ContPl", &TMVAvarsBDTG[3]);
133  fReaderBDTGLowThres->AddVariable("prong1epLLT", &TMVAvarsBDTG[4]);
134  fReaderBDTGLowThres->AddVariable("prong1Width", &TMVAvarsBDTG[5]);
135  fReaderBDTGLowThres->AddVariable("cvnncid", &TMVAvarsBDTG[6]);
136  fReaderBDTGLowThres->AddVariable("prong1dedx", &TMVAvarsBDTG[7]);
137  fReaderBDTGLowThres->AddVariable("prong2dedx", &TMVAvarsBDTG[8]);
138  fReaderBDTGLowThres->AddVariable("prong1MissingPl", &TMVAvarsBDTG[9]);
139 
140 
142  // Make sure we can find the Gradient Boosted Decision (For NCPi0) Trees
143  // weight file before we set up MVA
144  if(!cet::file_exists(pidlibpathLT+fNCPi0BkgRejPIDFileLT)){
145  throw cet::exception("MakeNCPi0BkgRejLT")
146  << "Couldn't find file " << pidlibpathLT+fNCPi0BkgRejPIDFileLT <<std::endl;
147  }
148  fReaderBDTGLowThres->BookMVA("BDTG", pidlibpathLT+fNCPi0BkgRejPIDFileLT);
149 
150 
151  }
std::string EnvExpansion(const std::string &inString)
Function to expand environment variables.
Definition: EnvExpand.cxx:8
::xsd::cxx::tree::exception< char > exception
Definition: Database.h:225
bool file_exists(std::string const &qualified_filename)
enum BeamMode string
template<typename T , BranchType = InEvent>
ProductToken<T> art::Consumer::consumes ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ProductToken<T> art::Consumer::consumes ( InputTag const &  it)
inherited

Definition at line 146 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

147 {
148  if (!moduleContext_)
149  return ProductToken<T>::invalid();
150 
151  consumables_[BT].emplace_back(ConsumableType::Product,
152  TypeID{typeid(T)},
153  it.label(),
154  it.instance(),
155  it.process());
156  return ProductToken<T>{it};
157 }
set< int >::iterator it
static ProductToken< T > invalid()
Definition: ProductToken.h:47
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
template<typename T , art::BranchType BT>
void art::Consumer::consumesMany ( )
inherited

Definition at line 161 of file Consumer.h.

References T.

162 {
163  if (!moduleContext_)
164  return;
165 
166  consumables_[BT].emplace_back(ConsumableType::Many, TypeID{typeid(T)});
167 }
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::Consumer::consumesView ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ViewToken<T> art::Consumer::consumesView ( InputTag const &  it)
inherited

Definition at line 171 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

172 {
173  if (!moduleContext_)
174  return ViewToken<T>::invalid();
175 
176  consumables_[BT].emplace_back(ConsumableType::ViewElement,
177  TypeID{typeid(T)},
178  it.label(),
179  it.instance(),
180  it.process());
181  return ViewToken<T>{it};
182 }
set< int >::iterator it
static ViewToken< Element > invalid()
Definition: ProductToken.h:75
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
base_engine_t& art::EngineCreator::createEngine ( seed_t  seed)
inherited
base_engine_t& art::EngineCreator::createEngine ( seed_t  seed,
std::string const &  kind_of_engine_to_make 
)
inherited
base_engine_t& art::EngineCreator::createEngine ( seed_t  seed,
std::string const &  kind_of_engine_to_make,
label_t const &  engine_label 
)
inherited
CurrentProcessingContext const* art::EDProducer::currentContext ( ) const
protectedinherited
seed_t art::EngineCreator::get_seed_value ( fhicl::ParameterSet const &  pset,
char const  key[] = "seed",
seed_t const  implicit_seed = -1 
)
inherited
template<typename PROD , BranchType B>
ProductID art::EDProducer::getProductID ( std::string const &  instanceName = {}) const
inlineinherited

Definition at line 123 of file EDProducer.h.

References art::EDProducer::moduleDescription_.

Referenced by skim::NueSkimmer::CopyMichelSlice(), and skim::NueSkimmer::CopyMichelTrack().

124  {
125  return ProducerBase::getProductID<PROD, B>(moduleDescription_,
126  instanceName);
127  }
ModuleDescription moduleDescription_
Definition: EDProducer.h:115
template<typename PROD , BranchType B>
ProductID art::ProducerBase::getProductID ( ModuleDescription const &  moduleDescription,
std::string const &  instanceName 
) const
inherited

Definition at line 56 of file ProducerBase.h.

References art::ModuleDescription::moduleLabel().

Referenced by art::ProducerBase::modifiesEvent().

58  {
59  auto const& pd =
60  get_ProductDescription<PROD>(B, md.moduleLabel(), instanceName);
61  return pd.productID();
62  }
template<typename T , BranchType = InEvent>
ProductToken<T> art::Consumer::mayConsume ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ProductToken<T> art::Consumer::mayConsume ( InputTag const &  it)
inherited

Definition at line 189 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

190 {
191  if (!moduleContext_)
192  return ProductToken<T>::invalid();
193 
194  consumables_[BT].emplace_back(ConsumableType::Product,
195  TypeID{typeid(T)},
196  it.label(),
197  it.instance(),
198  it.process());
199  return ProductToken<T>{it};
200 }
set< int >::iterator it
static ProductToken< T > invalid()
Definition: ProductToken.h:47
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
template<typename T , art::BranchType BT>
void art::Consumer::mayConsumeMany ( )
inherited

Definition at line 204 of file Consumer.h.

References T.

205 {
206  if (!moduleContext_)
207  return;
208 
209  consumables_[BT].emplace_back(ConsumableType::Many, TypeID{typeid(T)});
210 }
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::Consumer::mayConsumeView ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ViewToken<T> art::Consumer::mayConsumeView ( InputTag const &  it)
inherited

Definition at line 214 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

215 {
216  if (!moduleContext_)
217  return ViewToken<T>::invalid();
218 
219  consumables_[BT].emplace_back(ConsumableType::ViewElement,
220  TypeID{typeid(T)},
221  it.label(),
222  it.instance(),
223  it.process());
224  return ViewToken<T>{it};
225 }
set< int >::iterator it
static ViewToken< Element > invalid()
Definition: ProductToken.h:75
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
bool art::ProducerBase::modifiesEvent ( ) const
inlineinherited

Definition at line 40 of file ProducerBase.h.

References art::ProducerBase::getProductID(), and string.

41  {
42  return true;
43  }
static cet::exempt_ptr<Consumer> art::Consumer::non_module_context ( )
staticinherited
void art::Consumer::prepareForJob ( fhicl::ParameterSet const &  pset)
protectedinherited
void ncpi0::MakeNCPi0BkgRej::produce ( art::Event evt)
overridevirtual

Implements art::EDProducer.

Definition at line 170 of file MakeNCPi0BkgRej_module.cc.

References slid::CompareByEnergy(), om::cout, util::CreateAssn(), DEFINE_ART_MODULE(), art::Handle< T >::failedToGet(), fCVNLabel, nuesand::NueSandObj::fdEdxProng1, nuesand::NueSandObj::fdEdxProng2, art::fill_ptr_vector(), fNueSandboxLabel, fObeyPreselection, cvn::Result::fOutput, fPreselectionLabels, fReaderBDTG, fReaderBDTGLowThres, fShowerLIDLabel, fSliceLabel, art::DataViewImpl::getByLabel(), rb::IsFiltered(), rb::Cluster::IsNoise(), geo::kXorY, art::Event::put(), ncpi0::NCPi0BkgRej::SetNCPIDBDTG(), ncpi0::NCPi0BkgRej::SetNCPIDBDTGLT(), TMVAvarsBDTG, and TMVAvarsBDTGLowThres.

171  {
172  float prong1dedx = -5.;
173  float prong2dedx = -5.;
174  float prong1epi0LLL = -5.;
175  float prong1epLLT = -5.;
176  float prong1epiLLL = -5.;
177  float prong1ContPl = -5.;
178  float prong1MissingPl = -5.;
179  float prong1Width = -5.;
180 
181  // Get the slices in the event
183  evt.getByLabel( fSliceLabel, sliceHandle);
184  std::vector<art::Ptr<rb::Cluster> > slices;
185  art::fill_ptr_vector(slices, sliceHandle);
186 
187  if(sliceHandle.failedToGet()){
188  mf::LogInfo("MakeNCPi0BkgRej") << "NO SLICE FOUND, skipping event.....";
189  }
190 
191 
192  std::unique_ptr< std::vector<ncpi0::NCPi0BkgRej> > ncpi0BkgRejjies(new std::vector<ncpi0::NCPi0BkgRej>);
193  std::unique_ptr< art::Assns<ncpi0::NCPi0BkgRej, rb::Cluster> > sliceAssn(new art::Assns<ncpi0::NCPi0BkgRej, rb::Cluster>);
194 
195  ncpi0::NCPi0BkgRej ncpi0bkgrej;
196 
197  // Get things associated with slices
198  art::FindMany < slid::ShowerLID > showerLidAssn(sliceHandle, evt, fShowerLIDLabel);
199  unsigned int nslices = slices.size();
200 
201  for(unsigned int isli = 0; isli < nslices; ++isli){
202  if(fObeyPreselection && rb::IsFiltered(evt, sliceHandle, isli, fPreselectionLabels)) continue;
203  //if(fObeyPreselection && rb::IsFiltered(evt, sliceHandle, isli)) continue;
204  if(slices.empty()) continue;
205 
206  art::Ptr<rb::Cluster> thisSlice = slices.at(isli);
207  if(thisSlice->IsNoise()) continue;
208 
209  // Only execute when there are showers associated with the shwlids
210  if(!showerLidAssn.isValid()) continue;
211  std::vector< const slid::ShowerLID* > shwlids = showerLidAssn.at(isli);
212  if(shwlids.empty()) continue;
213 
214  sort(shwlids.begin(), shwlids.end(), slid::CompareByEnergy);
215  art::FindOneP<rb::Shower> foSh(shwlids, evt, fShowerLIDLabel);
216  if(!foSh.isValid()) continue;
217 
218  //Getting 3dProng1 variables
219  std::vector< art::Ptr<rb::Shower> > showers;
220  cet::maybe_ref< art::Ptr<rb::Shower> const > roShws(foSh.at(0));
221  art::Ptr<rb::Shower> showers_dist = roShws.ref();
222  showers.push_back(showers_dist);
223  art::FindOneP<slid::ShowerLID> foShLID(showers, evt,fShowerLIDLabel);
224  if(!foShLID.isValid()) continue;
225  cet::maybe_ref< art::Ptr<slid::ShowerLID> const > roShLID(foShLID.at(0));
226  art::Ptr<slid::ShowerLID> showerLID = roShLID.ref();
227 
228  prong1epi0LLL = showerLID->EPi0LLL();
229  prong1epLLT = showerLID->EPLLT();
230  prong1epiLLL = showerLID->EPiLLL();
231  prong1ContPl = showers_dist->MostContiguousPlanes(geo::kXorY);
232  prong1MissingPl = showers_dist->MostMissingPlanes(geo::kXorY);
233  prong1Width = showerLID->Radius();
234 
235  //Prong1 and Prong2 dEdx as a input to Grad BDT
236 
237  //
238  // ATTENTION:
239  //
240  // Warning future users about using the nue sandbox...
241  std::cout << "\n\n\nWARNING: This module is attempting to use the nue sandbox variables which are no longer a part of standard production.\n\n\n";
242 
243  art::FindOneP<nuesand::NueSandObj> fmNueSand(sliceHandle, evt, fNueSandboxLabel);
244  if(!fmNueSand.isValid()) continue;
245  art::Ptr<nuesand::NueSandObj> nuesands = fmNueSand.at(isli);
246  if(!nuesands) continue;
247 
248  prong1dedx = nuesands->fdEdxProng1;
249  prong2dedx = nuesands->fdEdxProng2;
250 
251  // Need CVN, input to Grad BDT
252 
253  art::FindOneP<cvn::Result> fmCVN(sliceHandle, evt, fCVNLabel);
254  if(!fmCVN.isValid()) continue; // CVN Validation
255  art::Ptr<cvn::Result> cvns = fmCVN.at(isli);
256  if(!cvns) continue;
257  float cvnnumu = 0.;
258  float cvnncid = 0.;
259 
260  //
261  // ATTENTION:
262  //
263  // Warning future users about using CVN with the wrong number of output labels...
264  std::cout << "\n\n\nWARNING: This module is assuming an OLD output label scheme for CVN. The number of output labels has not been 14 since prod3. Any results obtained this way are likely nonsense.\n\n\n";
265 
266  // CVN values
267  cvnnumu = cvns->fOutput[0] + cvns->fOutput[1] + cvns->fOutput[2] + cvns->fOutput[3];
268  cvnncid = cvns->fOutput[13];
269 
270  //PID with K.E threshold > 0.5 GeV and with Reco K.E Cut > 0.5GeV
271  TMVAvarsBDTG[0] = cvnnumu;
272  TMVAvarsBDTG[1] = prong1epi0LLL;
273  TMVAvarsBDTG[2] = prong1epiLLL;
274  TMVAvarsBDTG[3] = prong1ContPl;
275  TMVAvarsBDTG[4] = prong1epLLT;
276  TMVAvarsBDTG[5] = prong1Width;
277  TMVAvarsBDTG[6] = cvnncid;
278  TMVAvarsBDTG[7] = prong2dedx;
279  TMVAvarsBDTG[8] = prong1MissingPl;
280  ncpi0bkgrej.SetNCPIDBDTG(fReaderBDTG->EvaluateMVA("BDTG"));
281 
282  //PID with lower threshold > 0.2 GeV and no reco K.E cut
283  TMVAvarsBDTGLowThres[0] = cvnnumu;
284  TMVAvarsBDTGLowThres[1] = prong1epi0LLL;
285  TMVAvarsBDTGLowThres[2] = prong1epiLLL;
286  TMVAvarsBDTGLowThres[3] = prong1ContPl;
287  TMVAvarsBDTGLowThres[4] = prong1epLLT;
288  TMVAvarsBDTGLowThres[5] = prong1Width;
289  TMVAvarsBDTGLowThres[6] = cvnncid;
290  TMVAvarsBDTGLowThres[7] = prong1dedx;
291  TMVAvarsBDTGLowThres[8] = prong2dedx;
292  TMVAvarsBDTGLowThres[9] = prong1MissingPl;
293  ncpi0bkgrej.SetNCPIDBDTGLT(fReaderBDTGLowThres->EvaluateMVA("BDTG"));
294 
295  ncpi0BkgRejjies->push_back(ncpi0bkgrej);
296 
297  util::CreateAssn(*this, evt, *ncpi0BkgRejjies, thisSlice ,*sliceAssn);
298 
299  } // end loop over slices
300 
301  evt.put(std::move(ncpi0BkgRejjies));
302  evt.put(std::move(sliceAssn));
303 
304  } // end of producer
static bool CreateAssn(art::EDProducer const &prod, art::Event &evt, std::vector< T > &a, art::Ptr< U > b, art::Assns< T, U > &assn, size_t indx=UINT_MAX, std::string const &instance=std::string())
Create a 1 to 1 association between a new product and one already in the event.
X or Y views.
Definition: PlaneGeo.h:30
void SetNCPIDBDTGLT(double input)
Definition: NCPi0BkgRej.h:27
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
std::vector< std::string > fPreselectionLabels
std::vector< float > fOutput
Vector of outputs from neural net.
Definition: Result.h:30
bool CompareByEnergy(const slid::ShowerLID *a, const slid::ShowerLID *b)
Definition: ShowerLID.cxx:51
ProductID put(std::unique_ptr< PROD > &&product)
Definition: Event.h:102
bool IsFiltered(const art::Event &evt, art::Ptr< T > x, const std::vector< std::string > &labels)
Is this Ptr marked "filtered out"?
Definition: FilterList.h:96
OStream cout
Definition: OStream.cxx:6
void SetNCPIDBDTG(double input)
Definition: NCPi0BkgRej.h:24
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
Definition: DataViewImpl.h:344
bool IsNoise() const
Is the noise flag set?
Definition: Cluster.h:163
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
Definition: Ptr.h:464
bool failedToGet() const
Definition: Handle.h:196
void ncpi0::MakeNCPi0BkgRej::reconfigure ( const fhicl::ParameterSet p)

Definition at line 154 of file MakeNCPi0BkgRej_module.cc.

References fCVNLabel, fNCPi0BkgRejPIDFile, fNCPi0BkgRejPIDFileLT, fNueSandboxLabel, fObeyPreselection, fPIDLibPath, fPIDLibPathLT, fPreselectionLabels, fShowerLabel, fShowerLIDLabel, fSliceLabel, fhicl::ParameterSet::get(), and string.

Referenced by MakeNCPi0BkgRej().

155  {
156  fSliceLabel = p.get< std::string >("SliceLabel");
157  fCVNLabel = p.get< std::string >("CVNLabel");
158  fShowerLabel = p.get< std::string >("ShowerLabel");
159  fShowerLIDLabel = p.get< std::string >("ShowerLIDLabel");
160  fNueSandboxLabel = p.get< std::string >("NueSandboxLabel");
161  fPIDLibPath = p.get< std::string >("PIDLibPath");
162  fNCPi0BkgRejPIDFile = p.get< std::string >("NCPi0BkgRejPIDFile");
163  fPIDLibPathLT = p.get< std::string >("PIDLibPathLT");
164  fNCPi0BkgRejPIDFileLT = p.get< std::string >("NCPi0BkgRejPIDFileLT");
165  fObeyPreselection = p.get< bool >("ObeyPreselection");
166  fPreselectionLabels = p.get< std::vector<std::string> > ("PreselectionLabels");
167  }
std::vector< std::string > fPreselectionLabels
T get(std::string const &key) const
Definition: ParameterSet.h:231
enum BeamMode string
void art::Consumer::showMissingConsumes ( ) const
protectedinherited

Referenced by art::RootOutput::endJob().

void art::Consumer::validateConsumedProduct ( BranchType const  bt,
ProductInfo const &  pi 
)
protectedinherited

Member Data Documentation

std::string ncpi0::MakeNCPi0BkgRej::fCVNLabel
private

Definition at line 60 of file MakeNCPi0BkgRej_module.cc.

Referenced by produce(), and reconfigure().

std::string ncpi0::MakeNCPi0BkgRej::fNCPi0BkgRejPIDFile
private

Definition at line 67 of file MakeNCPi0BkgRej_module.cc.

Referenced by beginRun(), and reconfigure().

std::string ncpi0::MakeNCPi0BkgRej::fNCPi0BkgRejPIDFileLT
private

Definition at line 68 of file MakeNCPi0BkgRej_module.cc.

Referenced by beginRun(), and reconfigure().

std::string ncpi0::MakeNCPi0BkgRej::fNueSandboxLabel
private

Definition at line 61 of file MakeNCPi0BkgRej_module.cc.

Referenced by produce(), and reconfigure().

bool ncpi0::MakeNCPi0BkgRej::fObeyPreselection
private

Definition at line 69 of file MakeNCPi0BkgRej_module.cc.

Referenced by produce(), and reconfigure().

std::string ncpi0::MakeNCPi0BkgRej::fPIDLibPath
private

Definition at line 64 of file MakeNCPi0BkgRej_module.cc.

Referenced by beginRun(), and reconfigure().

std::string ncpi0::MakeNCPi0BkgRej::fPIDLibPathLT
private

Definition at line 65 of file MakeNCPi0BkgRej_module.cc.

Referenced by beginRun(), and reconfigure().

std::vector<std::string> ncpi0::MakeNCPi0BkgRej::fPreselectionLabels
private

Definition at line 70 of file MakeNCPi0BkgRej_module.cc.

Referenced by produce(), and reconfigure().

TMVA::Reader* ncpi0::MakeNCPi0BkgRej::fReaderBDTG
private

Definition at line 73 of file MakeNCPi0BkgRej_module.cc.

Referenced by beginRun(), produce(), and ~MakeNCPi0BkgRej().

TMVA::Reader* ncpi0::MakeNCPi0BkgRej::fReaderBDTGLowThres
private

Definition at line 74 of file MakeNCPi0BkgRej_module.cc.

Referenced by beginRun(), and produce().

std::string ncpi0::MakeNCPi0BkgRej::fShowerLabel
private

Definition at line 63 of file MakeNCPi0BkgRej_module.cc.

Referenced by reconfigure().

std::string ncpi0::MakeNCPi0BkgRej::fShowerLIDLabel
private

Definition at line 62 of file MakeNCPi0BkgRej_module.cc.

Referenced by produce(), and reconfigure().

std::string ncpi0::MakeNCPi0BkgRej::fSliceLabel
private

Definition at line 59 of file MakeNCPi0BkgRej_module.cc.

Referenced by produce(), and reconfigure().

std::string ncpi0::MakeNCPi0BkgRej::fTestPath
private

Definition at line 66 of file MakeNCPi0BkgRej_module.cc.

float ncpi0::MakeNCPi0BkgRej::TMVAvarsBDTG[9]
private

Definition at line 77 of file MakeNCPi0BkgRej_module.cc.

Referenced by beginRun(), and produce().

float ncpi0::MakeNCPi0BkgRej::TMVAvarsBDTGLowThres[10]
private

Definition at line 78 of file MakeNCPi0BkgRej_module.cc.

Referenced by produce().


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