Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
jmshower::NueSelLID Class Reference
Inheritance diagram for jmshower::NueSelLID:
art::EDProducer art::detail::Producer art::detail::LegacyModule art::Modifier art::ModuleBase art::ProductRegistryHelper

Public Types

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

Public Member Functions

 NueSelLID (const fhicl::ParameterSet &pset)
 
 ~NueSelLID ()
 
virtual void produce (art::Event &evt)
 
virtual void reconfigure (const fhicl::ParameterSet &pset)
 
virtual void beginRun (art::Run &run)
 
virtual void endJob ()
 
double EnergyEstimator (TVector3 beamDir, TLorentzVector elecP4, double etot, int mode)
 
double GetPointDoca (TVector3 vtx, TVector3 start, TVector3 stop)
 
std::string workerType () const
 
void doBeginJob ()
 
void doEndJob ()
 
void doRespondToOpenInputFile (FileBlock const &fb)
 
void doRespondToCloseInputFile (FileBlock const &fb)
 
void doRespondToOpenOutputFiles (FileBlock const &fb)
 
void doRespondToCloseOutputFiles (FileBlock const &fb)
 
bool doBeginRun (RunPrincipal &rp, ModuleContext const &mc)
 
bool doEndRun (RunPrincipal &rp, ModuleContext const &mc)
 
bool doBeginSubRun (SubRunPrincipal &srp, ModuleContext const &mc)
 
bool doEndSubRun (SubRunPrincipal &srp, ModuleContext const &mc)
 
bool doEvent (EventPrincipal &ep, ModuleContext const &mc, std::atomic< std::size_t > &counts_run, std::atomic< std::size_t > &counts_passed, std::atomic< std::size_t > &counts_failed)
 
ModuleDescription const & moduleDescription () const
 
void setModuleDescription (ModuleDescription const &)
 
std::array< std::vector< ProductInfo >, NumBranchTypes > const & getConsumables () const
 
void sortConsumables (std::string const &current_process_name)
 
template<typename T , BranchType BT>
ViewToken< TconsumesView (InputTag const &tag)
 
template<typename T , BranchType BT>
ViewToken< TmayConsumeView (InputTag const &tag)
 

Protected Member Functions

ConsumesCollector & consumesCollector ()
 
template<typename T , BranchType = InEvent>
ProductToken< Tconsumes (InputTag const &)
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > consumesView (InputTag const &)
 
template<typename T , BranchType = InEvent>
void consumesMany ()
 
template<typename T , BranchType = InEvent>
ProductToken< TmayConsume (InputTag const &)
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > mayConsumeView (InputTag const &)
 
template<typename T , BranchType = InEvent>
void mayConsumeMany ()
 

Protected Attributes

std::string fLIDLabel
 Label for LID input. More...
 
std::string fSlicerLabel
 Label for rb::Cluster input. More...
 
std::string fVertexLabel
 Label for rb::Vertex input. More...
 
std::string fLibPath
 Path to PID libraries. More...
 
TTree * fEvent
 
int m_evtTrueNuCCNC
 
int m_evtTrueNuMode
 
int m_evtTrueNuPdg
 
double m_evtTrueNuEnergy
 
int m_evtTrueNuIsFid
 
double m_evtTrueNuP4 [4]
 
double m_evtTrueNuVtx [3]
 
int m_evtTruePdg [20]
 
int m_evtTrueMother [20]
 
double m_evtTrueEnergy [20]
 
int m_evtRun
 
int m_evtSRun
 
int m_evtEvent
 
double m_evtNSlice
 
double m_evtNSh
 
double m_evt
 
double m_evtANN
 
double m_evtSh1DedxANN
 
double m_evtSh1DedxANNE
 
double m_evtEtot
 
double m_evtSigOscW
 
double m_evtBkgOscW
 
int m_evtIsMuon
 
int m_evtIsInvPhoton
 
int m_evtIsMuonSh1
 
double m_evtDetEnergy
 
double m_evtNuEnergy
 
double m_evtSh1Energy
 
double m_evtSh1ExclEnergy
 
double m_evtSh1Length
 
double m_evtSh1Start [3]
 
double m_evtSh1Stop [3]
 
double m_evtSh1Dir [3]
 
double m_evtVtx [3]
 
double m_evtSh1EGLLL
 
double m_evtSh1EGLLT
 
double m_evtSh1EMuLLL
 
double m_evtSh1EMuLLT
 
double m_evtSh1EPi0LLL
 
double m_evtSh1EPi0LLT
 
double m_evtSh1EPLLL
 
double m_evtSh1EPLLT
 
double m_evtSh1ENLLL
 
double m_evtSh1ENLLT
 
double m_evtSh1EPiLLL
 
double m_evtSh1EPiLLT
 
double m_evtSh1VtxGeV
 
double m_evtSh1Pi0Mass
 
double m_evtSh1ShE
 
double m_evtSh1Gap
 
double m_evtSh1ELLL
 
double m_evtSh1ELLT
 
double m_evtSh1MuLLL
 
double m_evtSh1MuLLT
 
double m_evtSh1GLLL
 
double m_evtSh1InvGLLL
 
double m_evtSh1DistToEdge
 
double m_evtSh1SliceEdge2GeV
 
double m_evtSh1SliceEdge5GeV
 
double m_evtSh1SliceEdge10GeV
 

Private Member Functions

double OscWeight (int pdg, int ccnc, double energy, bool issig)
 
bool LoadHistograms (int detid)
 
void InitializeNTuple ()
 

Private Attributes

TH1D * ht_nue_rw
 
TH1D * ht_bkg_nue_rw
 
TH1D * ht_bkg_numu_rw
 
TMultiLayerPerceptron * mlp_evt
 

Detailed Description

Definition at line 55 of file NueSelLID_module.cc.

Member Typedef Documentation

Definition at line 17 of file EDProducer.h.

template<typename UserConfig , typename KeysToIgnore = void>
using art::detail::Producer::Table = Modifier::Table<UserConfig, KeysToIgnore>
inherited

Definition at line 25 of file Producer.h.

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

Definition at line 18 of file EDProducer.h.

Constructor & Destructor Documentation

jmshower::NueSelLID::NueSelLID ( const fhicl::ParameterSet pset)
explicit

Definition at line 169 of file NueSelLID_module.cc.

References reconfigure().

170  : EDProducer(pset)
171  , fEvent(0)
172  {
173  reconfigure(pset);
174  produces< std::vector<rb::Vertex> >();
175  produces< std::vector<jmshower::EID> >();
176  produces< art::Assns<jmshower::EID, rb::Cluster> >();
177  }
EDProducer(fhicl::ParameterSet const &pset)
Definition: EDProducer.h:20
virtual void reconfigure(const fhicl::ParameterSet &pset)
jmshower::NueSelLID::~NueSelLID ( )

Definition at line 180 of file NueSelLID_module.cc.

181  {
182  }

Member Function Documentation

void jmshower::NueSelLID::beginRun ( art::Run run)
virtual

Reimplemented from art::EDProducer.

Definition at line 278 of file NueSelLID_module.cc.

References geo::GeometryBase::DetId(), fEvent, geom(), LoadHistograms(), m_evtANN, m_evtBkgOscW, m_evtDetEnergy, m_evtEtot, m_evtIsInvPhoton, m_evtIsMuon, m_evtIsMuonSh1, m_evtNSh, m_evtNSlice, m_evtNuEnergy, m_evtRun, m_evtSh1DedxANN, m_evtSh1DedxANNE, m_evtSh1Dir, m_evtSh1DistToEdge, m_evtSh1EGLLL, m_evtSh1EGLLT, m_evtSh1ELLL, m_evtSh1ELLT, m_evtSh1EMuLLL, m_evtSh1EMuLLT, m_evtSh1Energy, m_evtSh1ENLLL, m_evtSh1ENLLT, m_evtSh1EPi0LLL, m_evtSh1EPi0LLT, m_evtSh1EPiLLL, m_evtSh1EPiLLT, m_evtSh1EPLLL, m_evtSh1EPLLT, m_evtSh1ExclEnergy, m_evtSh1Gap, m_evtSh1GLLL, m_evtSh1InvGLLL, m_evtSh1Length, m_evtSh1MuLLL, m_evtSh1MuLLT, m_evtSh1Pi0Mass, m_evtSh1ShE, m_evtSh1SliceEdge10GeV, m_evtSh1SliceEdge2GeV, m_evtSh1SliceEdge5GeV, m_evtSh1Start, m_evtSh1Stop, m_evtSh1VtxGeV, m_evtSigOscW, m_evtSRun, m_evtTrueEnergy, m_evtTrueMother, m_evtTrueNuCCNC, m_evtTrueNuEnergy, m_evtTrueNuIsFid, m_evtTrueNuMode, m_evtTrueNuP4, m_evtTrueNuPdg, m_evtTrueNuVtx, m_evtTruePdg, and m_evtVtx.

279  {
280  if(fEvent) return; // Don't do this twice
281 
285 
286  //True neutrino information
287  fEvent = tfs->make<TTree>("fEvent", "fEvent");
288  fEvent->Branch("evtTrueNuCCNC", &m_evtTrueNuCCNC);
289  fEvent->Branch("evtTrueNuMode", &m_evtTrueNuMode);
290  fEvent->Branch("evtTrueNuPdg", &m_evtTrueNuPdg);
291  fEvent->Branch("evtTrueNuEnergy", &m_evtTrueNuEnergy);
292  fEvent->Branch("evtTrueNuIsFid", &m_evtTrueNuIsFid);
293  fEvent->Branch("evtTrueNuP4[4]", m_evtTrueNuP4);
294  fEvent->Branch("evtTrueNuVtx[3]", m_evtTrueNuVtx);
295  fEvent->Branch("evtTrueEnergy[20]", m_evtTrueEnergy);
296  fEvent->Branch("evtTruePdg[20]", m_evtTruePdg);
297  fEvent->Branch("evtTrueMother[20]", m_evtTrueMother);
298 
299  //Reconstructed information
300  fEvent->Branch("evtRun", &m_evtRun);
301  fEvent->Branch("evtSRun", &m_evtSRun);
302  fEvent->Branch("evtNSlice", &m_evtNSlice);
303  fEvent->Branch("evtNSh", &m_evtNSh);
304  fEvent->Branch("evtANN", &m_evtANN);
305  fEvent->Branch("evtANNSh1", &m_evtSh1DedxANN);
306  fEvent->Branch("evtANNESh1", &m_evtSh1DedxANNE);
307  fEvent->Branch("evtEtot", &m_evtEtot);
308  fEvent->Branch("evtSigOscW", &m_evtSigOscW);
309  fEvent->Branch("evtBkgOscW", &m_evtBkgOscW);
310  fEvent->Branch("evtIsMuon", &m_evtIsMuon);
311  fEvent->Branch("evtIsMuonSh1", &m_evtIsMuonSh1);
312  fEvent->Branch("evtIsInvPhoton", &m_evtIsInvPhoton);
313  fEvent->Branch("evtDetEnergy", &m_evtDetEnergy);
314  fEvent->Branch("evtNuEnergy", &m_evtNuEnergy);
315  fEvent->Branch("evtSh1Energy", &m_evtSh1Energy);
316  fEvent->Branch("evtSh1ExclEnergy", &m_evtSh1ExclEnergy);
317  fEvent->Branch("evtSh1Length", &m_evtSh1Length);
318  fEvent->Branch("evtSh1Start[3]", m_evtSh1Start);
319  fEvent->Branch("evtSh1Stop[3]", m_evtSh1Stop);
320  fEvent->Branch("evtSh1Dir[3]", m_evtSh1Dir);
321 
322  fEvent->Branch("evtVtx[3]", m_evtVtx);
323  fEvent->Branch("evtSh1EGLLL",&m_evtSh1EGLLL);
324  fEvent->Branch("evtSh1EGLLT",&m_evtSh1EGLLT);
325  fEvent->Branch("evtSh1EMuLLL",&m_evtSh1EMuLLL);
326  fEvent->Branch("evtSh1EMuLLT",&m_evtSh1EMuLLT);
327  fEvent->Branch("evtSh1EPi0LLL",&m_evtSh1EPi0LLL);
328  fEvent->Branch("evtSh1EPi0LLT",&m_evtSh1EPi0LLT);
329  fEvent->Branch("evtSh1EPLLL",&m_evtSh1EPLLL);
330  fEvent->Branch("evtSh1EPLLT",&m_evtSh1EPLLT);
331  fEvent->Branch("evtSh1ENLLL",&m_evtSh1ENLLL);
332  fEvent->Branch("evtSh1ENLLT",&m_evtSh1ENLLT);
333  fEvent->Branch("evtSh1EPiLLL",&m_evtSh1EPiLLL);
334  fEvent->Branch("evtSh1EPiLLT",&m_evtSh1EPiLLT);
335  fEvent->Branch("evtSh1VtxGeV",&m_evtSh1VtxGeV);
336  fEvent->Branch("evtSh1Pi0Mass",&m_evtSh1Pi0Mass);
337  fEvent->Branch("evtSh1ShE",&m_evtSh1ShE);
338  fEvent->Branch("evtSh1Gap",&m_evtSh1Gap);
339  fEvent->Branch("evtSh1ELLL",&m_evtSh1ELLL);
340  fEvent->Branch("evtSh1ELLT",&m_evtSh1ELLT);
341  fEvent->Branch("evtSh1MuLLL",&m_evtSh1MuLLL);
342  fEvent->Branch("evtSh1MuLLT",&m_evtSh1MuLLT);
343  fEvent->Branch("evtSh1GLLL",&m_evtSh1GLLL);
344  fEvent->Branch("evtSh1InvGLLL",&m_evtSh1InvGLLL);
345 
346  fEvent->Branch("evtSh1DistToEdge", &m_evtSh1DistToEdge);
347  fEvent->Branch("evtSh1SliceEdge2GeV", &m_evtSh1SliceEdge2GeV);
348  fEvent->Branch("evtSh1SliceEdge5GeV", &m_evtSh1SliceEdge5GeV);
349  fEvent->Branch("evtSh1SliceEdge10GeV", &m_evtSh1SliceEdge10GeV);
350 
351  }
bool LoadHistograms(int detid)
novadaq::cnv::DetId DetId() const
Prefer ds::DetectorService::DetId() instead.
Definition: GeometryBase.h:243
void geom(int which=0)
Definition: geom.C:163
template<typename T , BranchType BT>
ProductToken< T > art::ModuleBase::consumes ( InputTag const &  tag)
protectedinherited

Definition at line 55 of file ModuleBase.h.

References art::ModuleBase::collector_, art::ConsumesCollector::consumes(), T, and getGoodRuns4SAM::tag.

56  {
57  return collector_.consumes<T, BT>(tag);
58  }
ConsumesCollector collector_
Definition: ModuleBase.h:50
ProductToken< T > consumes(InputTag const &)
double T
Definition: Xdiff_gwt.C:5
ConsumesCollector& art::ModuleBase::consumesCollector ( )
protectedinherited
template<typename T , BranchType BT>
void art::ModuleBase::consumesMany ( )
protectedinherited

Definition at line 69 of file ModuleBase.h.

References art::ModuleBase::collector_, art::ConsumesCollector::consumesMany(), and T.

70  {
71  collector_.consumesMany<T, BT>();
72  }
ConsumesCollector collector_
Definition: ModuleBase.h:50
double T
Definition: Xdiff_gwt.C:5
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::ModuleBase::consumesView ( InputTag const &  )
protectedinherited
template<typename T , BranchType BT>
ViewToken<T> art::ModuleBase::consumesView ( InputTag const &  tag)
inherited

Definition at line 62 of file ModuleBase.h.

References art::ModuleBase::collector_, art::ConsumesCollector::consumesView(), T, and getGoodRuns4SAM::tag.

63  {
64  return collector_.consumesView<T, BT>(tag);
65  }
ConsumesCollector collector_
Definition: ModuleBase.h:50
ViewToken< Element > consumesView(InputTag const &)
double T
Definition: Xdiff_gwt.C:5
void art::detail::Producer::doBeginJob ( )
inherited
bool art::detail::Producer::doBeginRun ( RunPrincipal rp,
ModuleContext const &  mc 
)
inherited
bool art::detail::Producer::doBeginSubRun ( SubRunPrincipal srp,
ModuleContext const &  mc 
)
inherited
void art::detail::Producer::doEndJob ( )
inherited
bool art::detail::Producer::doEndRun ( RunPrincipal rp,
ModuleContext const &  mc 
)
inherited
bool art::detail::Producer::doEndSubRun ( SubRunPrincipal srp,
ModuleContext const &  mc 
)
inherited
bool art::detail::Producer::doEvent ( EventPrincipal ep,
ModuleContext const &  mc,
std::atomic< std::size_t > &  counts_run,
std::atomic< std::size_t > &  counts_passed,
std::atomic< std::size_t > &  counts_failed 
)
inherited
void art::detail::Producer::doRespondToCloseInputFile ( FileBlock const &  fb)
inherited
void art::detail::Producer::doRespondToCloseOutputFiles ( FileBlock const &  fb)
inherited
void art::detail::Producer::doRespondToOpenInputFile ( FileBlock const &  fb)
inherited
void art::detail::Producer::doRespondToOpenOutputFiles ( FileBlock const &  fb)
inherited
void jmshower::NueSelLID::endJob ( )
virtual

Reimplemented from art::EDProducer.

Definition at line 462 of file NueSelLID_module.cc.

References om::cout, allTimeWatchdog::endl, jmshower::Ncount1, jmshower::Ncount2, and jmshower::Nput.

463  {
464  std::cout<<"Total number of events "<<Ncount0<<std::endl;
465  std::cout<<"Muon like events "<<Ncount1<<std::endl;
466  std::cout<<"Nue CC events "<<Ncount2<<std::endl;
467  std::cout<<"Nfill, Nput "<<Nfill<<" "<<Nput<<std::endl;
468  }
OStream cout
Definition: OStream.cxx:6
double jmshower::NueSelLID::EnergyEstimator ( TVector3  beamDir,
TLorentzVector  elecP4,
double  etot,
int  mode 
)

Definition at line 435 of file NueSelLID_module.cc.

436  {
437  // Neutrino energy estimator
438  double Ee = elecP4.E();
439  double Ehad = etot - Ee;
440  double EhadCor = 0.282525 + 1.0766*Ehad;
441  if(mode!=0&&mode!=1) return etot;
442  // EM shower has been calibrated in RecoJMShower, so there is no correction for Ee.
443  // The overall correction is for the assymetric convoluton effect.
444  double Enue = (Ee + EhadCor)/0.98343;
445  return Enue;
446  }
std::array<std::vector<ProductInfo>, NumBranchTypes> const& art::ModuleBase::getConsumables ( ) const
inherited
double jmshower::NueSelLID::GetPointDoca ( TVector3  vtx,
TVector3  start,
TVector3  stop 
)

Definition at line 449 of file NueSelLID_module.cc.

References d, dir, Mag(), and febshutoff_auto::start.

Referenced by produce().

450  {
451  double d = 9999;
452  double denorm = (start-stop).Mag();
453  if(denorm<0.00001){d = (vtx-start).Mag();}else{
454  d = ((vtx-start).Cross(vtx-stop)).Mag()/denorm;
455  TVector3 dir = stop-start;
456  }
457  return d;
458  }
Float_t d
Definition: plot.C:236
TDirectory * dir
Definition: macro.C:5
float Mag() const
void jmshower::NueSelLID::InitializeNTuple ( )
private

Definition at line 353 of file NueSelLID_module.cc.

References MECModelEnuComparisons::i, m_evt, m_evtANN, m_evtBkgOscW, m_evtDetEnergy, m_evtEtot, m_evtEvent, m_evtIsInvPhoton, m_evtIsMuon, m_evtNSh, m_evtNSlice, m_evtNuEnergy, m_evtRun, m_evtSh1DedxANN, m_evtSh1DedxANNE, m_evtSh1Dir, m_evtSh1DistToEdge, m_evtSh1EGLLL, m_evtSh1EGLLT, m_evtSh1ELLL, m_evtSh1ELLT, m_evtSh1EMuLLL, m_evtSh1EMuLLT, m_evtSh1Energy, m_evtSh1ENLLL, m_evtSh1ENLLT, m_evtSh1EPi0LLL, m_evtSh1EPi0LLT, m_evtSh1EPiLLL, m_evtSh1EPiLLT, m_evtSh1EPLLL, m_evtSh1EPLLT, m_evtSh1ExclEnergy, m_evtSh1Gap, m_evtSh1GLLL, m_evtSh1InvGLLL, m_evtSh1Length, m_evtSh1MuLLL, m_evtSh1MuLLT, m_evtSh1Pi0Mass, m_evtSh1ShE, m_evtSh1SliceEdge10GeV, m_evtSh1SliceEdge2GeV, m_evtSh1SliceEdge5GeV, m_evtSh1Start, m_evtSh1Stop, m_evtSh1VtxGeV, m_evtSigOscW, m_evtSRun, m_evtTrueEnergy, m_evtTrueMother, m_evtTrueNuCCNC, m_evtTrueNuEnergy, m_evtTrueNuIsFid, m_evtTrueNuMode, m_evtTrueNuP4, m_evtTrueNuPdg, m_evtTrueNuVtx, m_evtTruePdg, and m_evtVtx.

Referenced by produce().

354  {
355  //fEvent
356  m_evtTrueNuCCNC = 0;
357  m_evtTrueNuMode = 0;
358  m_evtTrueNuPdg = 0;
359  m_evtTrueNuEnergy = 0;
360  m_evtTrueNuIsFid = 0;
361  for(int i=0;i<4;i++){m_evtTrueNuP4[i] = 0;}
362  for(int i=0;i<3;i++){m_evtTrueNuVtx[i] = 0;}
363  for(int i=0;i<20;i++){m_evtTruePdg[i] = 0;}
364  for(int i=0;i<20;i++){m_evtTrueMother[i] = 0;}
365  for(int i=0;i<20;i++){m_evtTrueEnergy[i] = 0;}
366  m_evtRun = 0;
367  m_evtSRun = 0;
368  m_evtEvent = 0;
369  m_evtNSlice = 0;
370  m_evtNSh = 0;
371  m_evt = 0;
372  m_evtANN = -5;
373  m_evtSh1DedxANN = -5;
374  m_evtSh1DedxANNE = -5;
375  m_evtEtot = 0;
376  m_evtSigOscW = 0;
377  m_evtBkgOscW = 0;
378  m_evtIsMuon = 0;
379  m_evtIsInvPhoton = 0;
380  m_evtDetEnergy = 0;
381  m_evtTrueNuEnergy = 0;
382  m_evtNuEnergy = 0;
383  m_evtSh1Energy = 0;
384  m_evtSh1ExclEnergy = 0;
385  m_evtSh1Length = 0;
386 
387  for(int i=0;i<3;i++){
388  m_evtVtx[i]=0;
389  m_evtSh1Start[i]=0;
390  m_evtSh1Stop[i]=0;
391  m_evtSh1Dir[i]=0;
392  }
393 
394  m_evtSh1EGLLL = 0;
395  m_evtSh1EGLLT = 0;
396  m_evtSh1EMuLLL = 0;
397  m_evtSh1EMuLLT = 0;
398  m_evtSh1EPi0LLL = 0;
399  m_evtSh1EPi0LLT = 0;
400  m_evtSh1EPLLL = 0;
401  m_evtSh1EPLLT = 0;
402  m_evtSh1ENLLL = 0;
403  m_evtSh1ENLLT = 0;
404  m_evtSh1EPiLLL = 0;
405  m_evtSh1EPiLLT = 0;
406  m_evtSh1VtxGeV = 0;
407  m_evtSh1Pi0Mass = 0;
408  m_evtSh1ShE = 0;
409  m_evtSh1Gap = 0;
410  m_evtSh1ELLL = 0;
411  m_evtSh1ELLT = 0;
412  m_evtSh1MuLLL = 0;
413  m_evtSh1MuLLT = 0;
414  m_evtSh1GLLL = 0;
415  m_evtSh1InvGLLL = 0;
416  m_evtSh1DistToEdge = 0;
420  }
bool jmshower::NueSelLID::LoadHistograms ( int  detid)
private

Definition at line 193 of file NueSelLID_module.cc.

References fLibPath, ht_bkg_nue_rw, ht_bkg_numu_rw, ht_nue_rw, novadaq::cnv::kFARDET, novadaq::cnv::kNDOS, novadaq::cnv::kNEARDET, mlp_evt, and string.

Referenced by beginRun(), and website.controllers.MakeCanvases.CanvasMaker::MakeCanvases().

194  {
195  std::string fnameOs(fLibPath);
196  switch (detid) {
198  fnameOs += "extrahist_fd.root";
199  break;
200  case novadaq::cnv::kNDOS:
201  fnameOs += "extrahist_ndos.root";
202  break;
204  fnameOs += "extrahist_ndos.root";
205  break;
206  default:
207  throw cet::exception("BAD DETID") << __FILE__ << ":" << __LINE__
208  << " Bad detector id = " << detid;
209  }
210 /*
211  std::string fFnameOs;
212  cet::search_path sp("FW_SEARCH_PATH");
213  sp.find_file(fnameOs, fFnameOs);
214  struct stat sb;
215  if (fFnameOs.empty() || stat(fFnameOs.c_str(), &sb)!=0){
216  // Failed to resolve the file name
217  mf::LogWarning("NueSelLID") << "Histogram -- Os " << fFnameOs << " not found.";
218  throw cet::exception("FILE_NOT_FOUND") << "Histogram file not found.";
219  }
220 */
221  TFile hfileOs(fnameOs.c_str());
222  ht_nue_rw = (TH1D*)hfileOs.Get("ht_nue_rw");
223  ht_bkg_nue_rw = (TH1D*)hfileOs.Get("ht_bkg_nue_rw");
224  ht_bkg_numu_rw = (TH1D*)hfileOs.Get("ht_bkg_numu_rw");
225 
226  std::string fnameWeightsEvt(fLibPath);
227  switch (detid) {
229  fnameWeightsEvt += "weights_evt_fd.txt";
230  break;
231  case novadaq::cnv::kNDOS:
232  fnameWeightsEvt += "weights_evt_ndos.txt";
233  break;
235  fnameWeightsEvt += "weights_evt_ndos.txt";
236  break;
237  default:
238  throw cet::exception("BAD DETID") << __FILE__ << ":" << __LINE__
239  << " Bad detector id = " << detid;
240  }
241 
242 // std::cout<<"Trained Evt ANN "<<fnameWeightsEvt.c_str()<<" is loaded."<<std::endl;
243  double egLLL;
244  double egLLT;
245  double epi0LLL;
246  double epi0LLT;
247  double epLLL;
248  double epLLT;
249  double enLLL;
250  double enLLT;
251  double epiLLL;
252  double epiLLT;
253  double pi0mass;
254  double vtxgev;
255  int type;
256  TTree *trainTree_evt = new TTree("trainTree_evt","m_trainTree_evt");
257  trainTree_evt->Branch("egLLL", &egLLL, "egLLL/D");
258  trainTree_evt->Branch("egLLT", &egLLT, "egLLT/D");
259  trainTree_evt->Branch("epi0LLL", &epi0LLL, "epi0LLL/D");
260  trainTree_evt->Branch("epi0LLT", &epi0LLT, "epi0LLT/D");
261  trainTree_evt->Branch("epLLL", &epLLL, "epLLL/D");
262  trainTree_evt->Branch("epLLT", &epLLT, "epLLT/D");
263  trainTree_evt->Branch("enLLL", &enLLL, "enLLL/D");
264  trainTree_evt->Branch("enLLT", &enLLT, "enLLT/D");
265  trainTree_evt->Branch("epiLLL", &epiLLL, "epiLLL/D");
266  trainTree_evt->Branch("epiLLT", &epiLLT, "epiLLT/D");
267  trainTree_evt->Branch("pi0mass", &pi0mass, "pi0mass/D");
268  trainTree_evt->Branch("vtxgev", &vtxgev, "vtxgev/D");
269  trainTree_evt->Branch("type", &type, "type/I");
270  mlp_evt = new TMultiLayerPerceptron("egLLL,egLLT,epi0LLL,epi0LLT,epLLL,epLLT,enLLL,enLLT,epiLLL,epiLLT,pi0mass,vtxgev:18:12:6:type",trainTree_evt);
271  mlp_evt->LoadWeights(fnameWeightsEvt.c_str());
272 
273  return true;
274  }
::xsd::cxx::tree::exception< char > exception
Definition: Database.h:225
Far Detector at Ash River, MN.
Prototype Near Detector on the surface at FNAL.
Near Detector in the NuMI cavern.
std::string fLibPath
Path to PID libraries.
TMultiLayerPerceptron * mlp_evt
enum BeamMode string
template<typename T , BranchType BT>
ProductToken< T > art::ModuleBase::mayConsume ( InputTag const &  tag)
protectedinherited

Definition at line 76 of file ModuleBase.h.

References art::ModuleBase::collector_, art::ConsumesCollector::mayConsume(), T, and getGoodRuns4SAM::tag.

77  {
78  return collector_.mayConsume<T, BT>(tag);
79  }
ProductToken< T > mayConsume(InputTag const &)
ConsumesCollector collector_
Definition: ModuleBase.h:50
double T
Definition: Xdiff_gwt.C:5
template<typename T , BranchType BT>
void art::ModuleBase::mayConsumeMany ( )
protectedinherited

Definition at line 90 of file ModuleBase.h.

References art::ModuleBase::collector_, art::ConsumesCollector::mayConsumeMany(), and T.

91  {
93  }
ConsumesCollector collector_
Definition: ModuleBase.h:50
double T
Definition: Xdiff_gwt.C:5
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::ModuleBase::mayConsumeView ( InputTag const &  )
protectedinherited
template<typename T , BranchType BT>
ViewToken<T> art::ModuleBase::mayConsumeView ( InputTag const &  tag)
inherited

Definition at line 83 of file ModuleBase.h.

References art::ModuleBase::collector_, art::ConsumesCollector::mayConsumeView(), T, and getGoodRuns4SAM::tag.

84  {
85  return collector_.mayConsumeView<T, BT>(tag);
86  }
ConsumesCollector collector_
Definition: ModuleBase.h:50
ViewToken< Element > mayConsumeView(InputTag const &)
double T
Definition: Xdiff_gwt.C:5
ModuleDescription const& art::ModuleBase::moduleDescription ( ) const
inherited
double jmshower::NueSelLID::OscWeight ( int  pdg,
int  ccnc,
double  energy,
bool  issig 
)
private

Definition at line 423 of file NueSelLID_module.cc.

References ht_nue_rw, and ana::weight.

Referenced by produce().

424  {
425  // Obtain oscillation weight for swapping MC
426  double weight = 1.0;
427  if(fabs(pdg)==12&&ccnc==0&&issig==true){
428  weight = ht_nue_rw->Interpolate(energy);
429  }
430  if(fabs(pdg)==14&&ccnc==0&&issig==false) weight = 0.1787396954;
431  return weight;
432  }
const Var weight
double energy
Definition: plottest35.C:25
void jmshower::NueSelLID::produce ( art::Event evt)
virtual

Implements art::EDProducer.

Definition at line 472 of file NueSelLID_module.cc.

References rb::Cluster::Cell(), util::CreateAssn(), DEFINE_ART_MODULE(), E, art::EventID::event(), fEvent, fLIDLabel, fSlicerLabel, fVertexLabel, geom(), art::Ptr< T >::get(), art::DataViewImpl::getByLabel(), GetPointDoca(), GetX(), GetY(), rb::RecoHit::GeV(), MECModelEnuComparisons::i, art::Event::id(), InitializeNTuple(), rb::IsFiltered(), rb::Cluster::IsNoise(), calib::j, slid::kELECTRON, slid::kMUON, geo::kY, m, m_evtEvent, m_evtRun, m_evtSRun, m_evtTrueNuCCNC, m_evtTrueNuEnergy, m_evtTrueNuMode, m_evtTrueNuP4, m_evtTrueNuPdg, m_evtTrueNuVtx, calib::Calibrator::MakeRecoHit(), rb::Cluster::MeanTNS(), rb::Cluster::NCell(), jmshower::Ncount1, jmshower::Ncount2, jmshower::Nput, geo::GeometryBase::NuMIBeamDirection(), rb::Cluster::NXCell(), rb::Cluster::NYCell(), OscWeight(), make_associated_cosmic_defs::p3, rb::CellHit::Plane(), geo::GeometryBase::Plane(), art::DataViewImpl::put(), updateRunHistoryTables::run, art::DataViewImpl::run(), jmshower::EID::SetANN(), jmshower::EID::SetANNE(), jmshower::EID::SetBkgOscW(), jmshower::EID::SetDetEnergy(), jmshower::EID::SetEEdge10Cell(), jmshower::EID::SetEEdge2Cell(), jmshower::EID::SetEEdge5Cell(), jmshower::EID::SetEGLLL(), jmshower::EID::SetEGLLT(), jmshower::EID::SetELLL(), jmshower::EID::SetELLT(), jmshower::EID::SetEMuLLL(), jmshower::EID::SetEMuLLT(), jmshower::EID::SetENLLL(), jmshower::EID::SetENLLT(), jmshower::EID::SetEPi0LLL(), jmshower::EID::SetEPi0LLT(), jmshower::EID::SetEPiLLL(), jmshower::EID::SetEPiLLT(), jmshower::EID::SetEPLLL(), jmshower::EID::SetEPLLT(), jmshower::EID::SetEvtEtot(), jmshower::EID::SetEvtGapTNS(), jmshower::EID::SetEvtMaxX(), jmshower::EID::SetEvtMaxY(), jmshower::EID::SetEvtMaxZ(), jmshower::EID::SetEvtMinX(), jmshower::EID::SetEvtMinY(), jmshower::EID::SetEvtMinZ(), jmshower::EID::SetEvtNCell(), jmshower::EID::SetEvtNCellToEdge(), jmshower::EID::SetEvtSumCosTheta(), jmshower::EID::SetEvtSumP(), jmshower::EID::SetEvtSumP0(), jmshower::EID::SetEvtSumPt(), jmshower::EID::SetEvtSumPt0(), jmshower::EID::SetGap(), jmshower::EID::SetGLLL(), jmshower::EID::SetInvGLLL(), jmshower::EID::SetIsInvPhoton(), jmshower::EID::SetIsMuon(), jmshower::EID::SetMuLLL(), jmshower::EID::SetMuLLT(), jmshower::EID::SetNuEnergy(), jmshower::EID::SetPi0Mass(), jmshower::EID::SetSh1Dir(), jmshower::EID::SetSh1DistToEdge(), jmshower::EID::SetSh1Energy(), jmshower::EID::SetSh1ExclEnergy(), jmshower::EID::SetSh1Gap(), jmshower::EID::SetSh1NCell(), jmshower::EID::SetSh1NCellToEdge(), jmshower::EID::SetSh1NPlane(), jmshower::EID::SetSh1PID(), jmshower::EID::SetSh1Sh2Dang(), jmshower::EID::SetSh1Start(), jmshower::EID::SetSh1Stop(), jmshower::EID::SetSh1TotalLength(), jmshower::EID::SetSh1VtxDoca(), jmshower::EID::SetSh1XNCell(), jmshower::EID::SetSh1XNPlane(), jmshower::EID::SetSh1YNCell(), jmshower::EID::SetSh1YNPlane(), jmshower::EID::SetSh2Dir(), jmshower::EID::SetSh2Energy(), jmshower::EID::SetSh2ExclEnergy(), jmshower::EID::SetSh2Gap(), jmshower::EID::SetSh2NCell(), jmshower::EID::SetSh2NCellToEdge(), jmshower::EID::SetSh2NPlane(), jmshower::EID::SetSh2PID(), jmshower::EID::SetSh2Start(), jmshower::EID::SetSh2Stop(), jmshower::EID::SetSh2TotalLength(), jmshower::EID::SetSh2VtxDoca(), jmshower::EID::SetSh2XNCell(), jmshower::EID::SetSh2XNPlane(), jmshower::EID::SetSh2YNCell(), jmshower::EID::SetSh2YNPlane(), jmshower::EID::SetShE(), jmshower::EID::SetSigOscW(), jmshower::EID::SetVtx(), jmshower::EID::SetVtxGeV(), showerlength, std::sin(), std::sqrt(), art::DataViewImpl::subRun(), registry_explorer::v, rb::PID::Value(), slid::EventLID::ValueWithE(), Vect(), w, rb::Cluster::W(), rb::Cluster::XCell(), and rb::Cluster::YCell().

473  {
474  //----------------------------------------------------
475  // Run, subrun and event information
476  //----------------------------------------------------
477  Ncount0++;
478  int run = evt.run();
479  int srun = evt.subRun();
480  int event = evt.id().event();
481  // std::cout<<"In NueSel event "<<event<<std::endl;
482 
483 
484  // Neutrino MC truth
485  TLorentzVector evtTrueNuP4(0,0,0,0);
486  TVector3 evtTrueNuVtx(0,0,0);
487  int evtTrueNuCCNC = -1;
488  int evtTrueNuMode = -1;
489  int evtTrueNuPdg = 0;
490  double evtTrueNuEnergy = 0;
491 
492  /*
493  if(!evt.isRealData()){
494  for(int i=0;i<1;i++){
495  art::Handle< std::vector<simb::MCTruth> > mc;
496  try {
497  evt.getByLabel("generator", mc);
498  if (mc->size()!=1) break;
499  }
500  catch (...) {
501  break;
502  }
503  if ((*mc)[0].NeutrinoSet()) {
504  const simb::MCNeutrino& gen = (*mc)[0].GetNeutrino();
505  const simb::MCParticle& nu = gen.Nu();
506  evtTrueNuP4 = nu.Momentum();
507  evtTrueNuVtx.SetXYZ(nu.EndX(),nu.EndY(),nu.EndZ());
508  evtTrueNuCCNC = gen.CCNC() ;
509  evtTrueNuMode = gen.Mode() ;
510  evtTrueNuPdg = nu.PdgCode() ;
511  evtTrueNuEnergy = nu.Momentum().E() ;
512  }
513  }
514  }
515  */
516 
517 
518  // Showers reconstruction
519 
522 
523 
524  // Event information with PID
525  std::unique_ptr<std::vector<jmshower::EID> > eidcol(new std::vector<jmshower::EID>);
526  std::unique_ptr< art::Assns<jmshower::EID, rb::Cluster> > assns(new art::Assns<jmshower::EID, rb::Cluster>);
527 
528 
529 // EID product for analysis.
531  evt.getByLabel(fSlicerLabel, slicecol);
532 
533 
534 
535  for(unsigned int sliceIdx = 0; sliceIdx < slicecol->size(); ++sliceIdx){//Reconstruct EID slice by slice
536  if(rb::IsFiltered(evt,slicecol,sliceIdx)) continue;
537  const rb::Cluster& slice = (*slicecol)[sliceIdx];
538  if(slice.IsNoise()) continue;
539 
540  double evtGapTNS = 1e8;
541  for(unsigned int iic = 0; iic < slicecol->size(); ++iic){
542  if(iic==sliceIdx)continue;
543  const rb::Cluster& slice1 = (*slicecol)[iic];
544  if(slice1.IsNoise()) continue;
545  // if(slice1.NCell()<20)continue;
546  if(evtGapTNS > fabs(slice1.MeanTNS()-slice.MeanTNS())){
547  evtGapTNS = fabs(slice1.MeanTNS()-slice.MeanTNS());
548  }
549  }
550 
551 
553  m_evtRun = run;
554  m_evtSRun = srun;
555  m_evtEvent = event;
556 
557  m_evtTrueNuCCNC = evtTrueNuCCNC;
558  m_evtTrueNuMode = evtTrueNuMode;
559  m_evtTrueNuPdg = evtTrueNuPdg;
560 
561 
562  m_evtTrueNuEnergy = evtTrueNuEnergy;
563  m_evtTrueNuP4[0] = evtTrueNuP4.Px();
564  m_evtTrueNuP4[1] = evtTrueNuP4.Py();
565  m_evtTrueNuP4[2] = evtTrueNuP4.Pz();
566  m_evtTrueNuP4[3] = evtTrueNuP4.E();
567  m_evtTrueNuVtx[0] = evtTrueNuVtx[0];
568  m_evtTrueNuVtx[1] = evtTrueNuVtx[1];
569  m_evtTrueNuVtx[2] = evtTrueNuVtx[2];
570 
571  const double wx = (slice.NXCell() > 0) ? slice.W(slice.XCell(0).get()) : 0;
572  const double wy = (slice.NYCell() > 0) ? slice.W(slice.YCell(0).get()) : 0;
573  //calculate slce reco energy
574  double slicegev = 0;
575  for(unsigned int i=0;i<slice.NCell();i++){
576  const art::Ptr<rb::CellHit>& chit = slice.Cell(i);
577  double w = wx;
578  if(geom->Plane(chit->Plane())->View()==geo::kY)w=wy;
579 
580  const rb::RecoHit rhit(cal->MakeRecoHit(*chit, w));
581 
582  double gev=0;
583  if(rhit.IsCalibrated())gev = rhit.GeV();
584  slicegev+=gev;
585  }
586 
587  art::FindOneP<slid::EventLID> foLID(slicecol, evt, fLIDLabel); //one lid object per slice
588  art::FindManyP<slid::ShowerLID> fmShwLID(slicecol, evt, fLIDLabel);
589  art::FindManyP<rb::Vertex> fmv(slicecol, evt, fVertexLabel); // get vertices
590 
591  TVector3 evtVtx(0,0,0);
592  if(fmv.isValid()){
593  std::vector<art::Ptr<rb::Vertex> > v = fmv.at(sliceIdx);
594  for (unsigned int j=0; j<v.size(); ++j) {
595  //store vertex coordinates
596  evtVtx.SetX(v[j]->GetX());
597  evtVtx.SetY(v[j]->GetY());
598  evtVtx.SetZ(v[j]->GetZ());
599  break;
600  }
601  }
602 
603  // Get slice level PID from LIDBuilder
604  jmshower::EID eid;
605  std::vector< art::Ptr<slid::ShowerLID> > shwlids;
606  std::vector<art::Ptr<rb::Shower> > showercol;
607  shwlids.clear();
608  showercol.clear();
610 
611  if(foLID.isValid())
612  {
613  cet::maybe_ref<art::Ptr<slid::EventLID> const> rlid(foLID.at(sliceIdx));
614  elid = rlid.ref();
615  //if the pointer is valid
616  if (elid){
617  if(fmShwLID.isValid())
618  {
619  shwlids = fmShwLID.at(sliceIdx);
620  art::FindOneP<rb::Shower> fos(shwlids, evt, fLIDLabel);
621  for(unsigned int shwId = 0; shwId < shwlids.size(); ++shwId)
622  {
623  cet::maybe_ref<art::Ptr<rb::Shower> const> rshw(fos.at(shwId));
624  art::Ptr<rb::Shower> shw = rshw.ref();
625  showercol.push_back(shw);
626  }
627  }
628  }
629  }
630 
631 
632  int evtNSh = showercol.size();
633  // std::cout<<"nshowercol, nshowerlids "<<showercol.size()<<" "<<shwlids.size()<<std::endl;
634  if(evtNSh<1){ // No shower be recontructed
635  fEvent->Fill(); // Fill NTuple
636  eid.SetANN(-5.);
637  eid.SetANNE(-5.);
638  eid.SetVtx(evtTrueNuVtx);
639  eid.SetNuEnergy(slicegev*1.9);
640  eid.SetDetEnergy(0);
641  eid.SetEvtNCell(slice.NCell());
642  eid.SetEvtSumCosTheta(0);
643  eid.SetEvtSumP(0);
644  eid.SetEvtSumPt(0);
645  eid.SetEvtSumP0(0);
646  eid.SetEvtSumPt0(0);
647 
648  eid.SetEvtEtot(0);
649  eid.SetEvtMinX(99999);
650  eid.SetEvtMinY(99999);
651  eid.SetEvtMinZ(99999);
652  eid.SetEvtMaxX(-99999);
653  eid.SetEvtMaxY(-99999);
654  eid.SetEvtMaxZ(-99999);
655  eid.SetEvtGapTNS(evtGapTNS);
656  eid.SetEvtNCellToEdge(10000);
657 
658  eid.SetSh1Energy(0);
659  eid.SetSh1ExclEnergy(0);
660  eid.SetSh1TotalLength(0);
661  TVector3 v3null(0,0,0);
662  eid.SetSh1Start(v3null);
663  eid.SetSh1Stop(v3null);
664  eid.SetSh1Dir(v3null);
665  eid.SetSh1VtxDoca(0);
666  eid.SetSh1Gap(0);
667  eid.SetSh1NPlane(0);
668  eid.SetSh1XNPlane(0);
669  eid.SetSh1YNPlane(0);
670  eid.SetSh1NCell(0);
671  eid.SetSh1XNCell(0);
672  eid.SetSh1YNCell(0);
673  eid.SetSh1PID(-1);
674  eid.SetSh1NCellToEdge(10000);
675 
676  eid.SetSh1Sh2Dang(0);
677  eid.SetSh2Energy(0);
678  eid.SetSh2ExclEnergy(0);
679  eid.SetSh2TotalLength(0);
680  eid.SetSh2Start(v3null);
681  eid.SetSh2Stop(v3null);
682  eid.SetSh2Dir(v3null);
683  eid.SetSh2VtxDoca(0);
684  eid.SetSh2Gap(0);
685  eid.SetSh2NPlane(0);
686  eid.SetSh2XNPlane(0);
687  eid.SetSh2YNPlane(0);
688  eid.SetSh2NCell(0);
689  eid.SetSh2XNCell(0);
690  eid.SetSh2YNCell(0);
691  eid.SetSh2PID(-1);
692  eid.SetSh2NCellToEdge(10000);
693 
694 
695  eid.SetIsMuon(0);
696  eid.SetIsInvPhoton(0);
697  eid.SetSigOscW(0);
698  eid.SetBkgOscW(0);
699 
700  eid.SetEGLLL(-10);
701  eid.SetEGLLT(-10);
702  eid.SetEMuLLL(-10);
703  eid.SetEMuLLT(-10);
704  eid.SetEPi0LLL(-10);
705  eid.SetEPi0LLT(-10);
706  eid.SetEPLLL(-10);
707  eid.SetEPLLT(-10);
708  eid.SetENLLL(-10);
709  eid.SetENLLT(-10);
710  eid.SetEPiLLL(-10);
711  eid.SetEPiLLT(-10);
712  eid.SetVtxGeV(0);
713  eid.SetPi0Mass(0);
714  eid.SetShE(0);
715  eid.SetGap(0);
716  eid.SetELLL(-10);
717  eid.SetELLT(-10);
718  eid.SetMuLLL(-10);
719  eid.SetMuLLT(-10);
720  eid.SetGLLL(-10);
721  eid.SetInvGLLL(-10);
722 
723  eid.SetSh1DistToEdge(0);
724  eid.SetEEdge2Cell(0);
725  eid.SetEEdge5Cell(0);
726  eid.SetEEdge10Cell(0);
727 
728 
729  eidcol->push_back(eid);
730  Nfill++;
731  fEvent->Fill(); // Fill NTuple
732  }
733  else{
734 
735  std::vector<rb::Prong> vXCluster;
736  std::vector<rb::Prong> vYCluster;
737  vXCluster.clear();
738  vYCluster.clear();
739 
740 
741  double evtMinX = 99999;
742  double evtMinY = 99999;
743  double evtMinZ = 99999;
744  double evtMaxX = -99999;
745  double evtMaxY = -99999;
746  double evtMaxZ = -99999;
747  for(unsigned int i=0;i<showercol.size();i++){
748  if((showercol[i]->Start())[0]<evtMinX)evtMinX = (showercol[i]->Start())[0];
749  if((showercol[i]->Stop())[0]<evtMinX)evtMinX = (showercol[i]->Stop())[0];
750  if((showercol[i]->Start())[1]<evtMinY)evtMinY = (showercol[i]->Start())[1];
751  if((showercol[i]->Stop())[1]<evtMinY)evtMinY = (showercol[i]->Stop())[1];
752  if((showercol[i]->Start())[2]<evtMinZ)evtMinZ = (showercol[i]->Start())[2];
753  if((showercol[i]->Stop())[2]<evtMinZ)evtMinZ = (showercol[i]->Stop())[2];
754 
755  if((showercol[i]->Start())[0]>evtMaxX)evtMaxX = (showercol[i]->Start())[0];
756  if((showercol[i]->Stop())[0]>evtMaxX)evtMaxX = (showercol[i]->Stop())[0];
757  if((showercol[i]->Start())[1]>evtMaxY)evtMaxY = (showercol[i]->Start())[1];
758  if((showercol[i]->Stop())[1]>evtMaxY)evtMaxY = (showercol[i]->Stop())[1];
759  if((showercol[i]->Start())[2]>evtMaxZ)evtMaxZ = (showercol[i]->Start())[2];
760  if((showercol[i]->Stop())[2]>evtMaxZ)evtMaxZ = (showercol[i]->Stop())[2];
761 
762  const art::PtrVector<rb::CellHit>& xcells = showercol[i]->XCells();
763  const art::PtrVector<rb::CellHit>& ycells = showercol[i]->YCells();
764  rb::Prong ClustX(xcells,showercol[i]->Start(),showercol[i]->Dir());
765  rb::Prong ClustY(ycells,showercol[i]->Start(),showercol[i]->Dir());
766  vXCluster.push_back(ClustX);
767  vYCluster.push_back(ClustY);
768  }
769 
770 
771  std::vector<TLorentzVector> showerpGam;// Set shower momentum with photon assumption
772  showerpGam.clear();
773  std::vector<double> vtxdoca;
774 
775  for(unsigned int i = 0; i < showercol.size(); i++){
776  double showereraw = shwlids[i]->ShowerEnergy();
777  TLorentzVector showerptrk(showercol[i]->Dir()[0]*showereraw,showercol[i]->Dir()[1]*showereraw,showercol[i]->Dir()[2]*showereraw,showereraw);
778  double vtxDoca = NueSelLID::GetPointDoca(evtVtx, showercol[i]->Start(), showercol[i]->Stop());
779  vtxdoca.push_back(vtxDoca);
780  showerpGam.push_back(showerptrk);
781  }
782  // Looping over showers
783  int ish1 = 0;
784  int ish1e = 0;
785  double sh1ann = -1;
786  double sh1eann = -1;
787  double sh1eanne = -1;
788  double sh1gev = 0;
789  double sh1egev = 0;
790  double sh1elength = 0;
791  double evtetot = 0;
792  std::vector<TLorentzVector> showerP4Col;
793  std::vector<TLorentzVector> showerP40Col;
794  std::vector<int> showerpid;
795  showerP4Col.clear();
796  showerP40Col.clear();
797  showerpid.clear();
798  double sh1egLLL = -10;
799  double sh1egLLT = -10;
800  double sh1emuLLL = -10;
801  double sh1emuLLT = -10;
802  double sh1epi0LLL = -10;
803  double sh1epi0LLT = -10;
804  double sh1epLLL = -10;
805  double sh1epLLT = -10;
806  double sh1enLLL = -10;
807  double sh1enLLT = -10;
808  double sh1epiLLL = -10;
809  double sh1epiLLT = -10;
810  double sh1vtxgev = 0;
811  double sh1pi0mass = 0;
812  double sh1shE = 0;
813  double sh1gap = 0;
814  double sh1eLLL = -10;
815  double sh1eLLT = -10;
816  double sh1muLLL = -10;
817  double sh1muLLT = -10;
818 
819 // int evtNCellToEdge = 10000;
820 
821  for(unsigned int i = 0; i < showercol.size(); i++){
822  // if(evtNCellToEdge>showercol[i]->NCellToEdge())evtNCellToEdge=showercol[i]->NCellToEdge();
823  double showerenergy = shwlids[i]->ShowerEnergy();
824  double showerlength = showercol[i]->TotalLength();
825  // ANN deterimantion
826  double showerann = elid->Value();
827  double showeranne = elid->ValueWithE();
828 
829  double egLLL = shwlids[i]->EGLLL();
830  double egLLT = shwlids[i]->EGLLT();
831  double emuLLL = shwlids[i]->EMuLLL();
832  double emuLLT = shwlids[i]->EMuLLT();
833  double epi0LLL = shwlids[i]->EPi0LLL();
834  double epi0LLT = shwlids[i]->EPi0LLT();
835  double epLLL = shwlids[i]->EPLLL();
836  double epLLT = shwlids[i]->EPLLT();
837  double enLLL = shwlids[i]->ENLLL();
838  double enLLT = shwlids[i]->EGLLT();
839  double epiLLL = shwlids[i]->EPiLLL();
840  double epiLLT = shwlids[i]->EPiLLT();
841  double vtxgev = shwlids[i]->VertexEnergy();
842  double pi0mass = shwlids[i]->Pi0mass();
843  double shE = shwlids[i]->ShowerEFrac();
844  double gap = shwlids[i]->Gap();
845 
846  std::map<int, float> tPartLongLL = shwlids[i]->fPartLongLL;
847  std::map<int, float> tPartTransLL = shwlids[i]->fPartTransLL;
848  std::map<int, float>::iterator itr = tPartLongLL.find(slid::DedxParticleType::kELECTRON);
849  double eLLL, eLLT, muLLL, muLLT;
850  if (itr != tPartLongLL.end()) eLLL = itr->second;
851  else eLLL = -5;
852  itr = tPartTransLL.find(slid::DedxParticleType::kELECTRON);
853  if (itr != tPartTransLL.end()) eLLT = itr->second;
854  else eLLT = -5;
855  itr = tPartLongLL.find(slid::DedxParticleType::kMUON);
856  if (itr != tPartLongLL.end()) muLLL = itr->second;
857  else muLLL = -5;
858  itr = tPartTransLL.find(slid::DedxParticleType::kMUON);
859  if (itr != tPartTransLL.end()) muLLT = itr->second;
860  else muLLT = -5;
861 
862  if(showerann > sh1ann){// Looking for the the shower with the largest electron ANN then set it's ANN as event ANN
863  ish1 = i;
864  sh1ann = showerann;
865  sh1gev = showerenergy;
866  }
867 
868  if(showerenergy > sh1egev){// Looking for the leading shower then set it's ANN as event ANN
869  ish1e = i;
870  sh1eann = showerann;
871  sh1eanne = showeranne;
872  sh1egev = showerenergy;
873  sh1elength = showerlength;
874 
875  sh1egLLL = egLLL;
876  sh1egLLT = egLLT;
877  sh1emuLLL = emuLLL;
878  sh1emuLLT = emuLLT;
879  sh1epi0LLL = epi0LLL;
880  sh1epi0LLT = epi0LLT;
881  sh1epLLL = epLLL;
882  sh1epLLT = epLLT;
883  sh1enLLL = enLLL;
884  sh1enLLT = enLLT;
885  sh1epiLLL = epiLLL;
886  sh1epiLLT = epiLLT;
887  sh1vtxgev = vtxgev;
888  sh1pi0mass = pi0mass;
889  sh1shE = shE;
890  sh1gap = gap;
891  sh1eLLL = eLLL;
892  sh1eLLT = eLLT;
893  sh1muLLL = muLLL;
894  sh1muLLT = muLLT;
895  }
896  evtetot+=showerenergy;
897 
898 //assign P4 based on shower PID, calculated by longitudinal+transverse likelihoods
899  TVector3 p3(showercol[i]->Dir()[0]*showerenergy,showercol[i]->Dir()[1]*showerenergy,showercol[i]->Dir()[2]*showerenergy);
900  double maxll = -9999;
901  int lltype = -1;
902  for( int itype = 0; itype <11; ++itype){
903  std::map<int, float> tempLLL;
904  std::map<int, float> tempLLT;
905  tempLLL.clear();
906  tempLLT.clear();
907  tempLLL = shwlids[i]->fPartLongLL;
908  tempLLT = shwlids[i]->fPartTransLL;
909  if(tempLLL[itype] + tempLLT[itype] > maxll){
910  lltype = itype;
911  maxll = tempLLL[itype] + tempLLT[itype];
912  }
913  }
914 
915  double m = xmass[0];
916  if(lltype>=0&&lltype<7) m=xmass[lltype];
917  double showerEtot0 = sqrt(p3.X()*p3.X()+p3.Y()*p3.Y()+p3.Z()*p3.Z());
918  double P3 = sqrt(showerEtot0*showerEtot0+2*showerEtot0*m);
919  double E = showerEtot0+m;
920 // std::cout<<"lltype, m, showere, showerE0, shower E "<<lltype<<" "<<maxll<<" "<<showerenergy<<" "<<showerEtot0<<" "<<showerEtot<<std::endl;
921  TLorentzVector showerP40(showercol[i]->Dir()[0]*showerEtot0,showercol[i]->Dir()[1]*showerEtot0,showercol[i]->Dir()[2]*showerEtot0, showerEtot0);
922  TLorentzVector showerP4(showercol[i]->Dir()[0]*P3, showercol[i]->Dir()[1]*P3, showercol[i]->Dir()[2]*P3, E);
923 //std::cout<<"showerP0, showerP "<<showerP40.Mag()<<" "<<showerP4.Mag()<<std::endl;
924 // TLorentzVector showerP4(showercol[i]->Dir()[0]*showerenergy, showercol[i]->Dir()[1]*showerenergy,showercol[i]->Dir()[2]*showerenergy,showerenergy);
925  showerP40Col.push_back(showerP40); // 4-Momentum of showers without pid
926  showerP4Col.push_back(showerP4); // 4-Momentum of showers
927  showerpid.push_back(lltype);// PID of showers
928  }
929 
930 // looking for the secondary shower
931 
932  int ish2 = -1;
933  double sh2gev = 0;
934 
935  for(unsigned int i = 0; i < showercol.size(); i++){
936  if(i==(unsigned int)ish1e)continue;
937  if(shwlids[i]->ShowerEnergy() > sh2gev){
938  ish2 = i;
939  sh2gev = shwlids[i]->ShowerEnergy();
940  }
941  }
942 
943 // calculate total momentum, Pt and direction for the event
944  TLorentzVector evtSumP4(0,0,0,0);
945  TLorentzVector evtSumP40(0,0,0,0);
946 
947  for(unsigned int ii=0;ii<showerP4Col.size();ii++){
948  evtSumP4+=showerP4Col[ii];
949  }
950 
951  for(unsigned int ii=0;ii<showerP40Col.size();ii++){
952  evtSumP40+=showerP40Col[ii];
953  }
954 
955  TVector3 nuDir = geom->NuMIBeamDirection(); //(-0.845e-3, 52.552e-3, 0.998618);//Beam dir
956  double evtSumTheta = evtSumP4.Angle(nuDir);
957  double evtSumPt = evtSumP4.Vect().Mag()*sin(evtSumTheta);
958  double evtSumP = evtSumP4.Vect().Mag();
959 
960  double evtSumTheta0 = evtSumP40.Angle(nuDir);
961  double evtSumPt0 = evtSumP40.Vect().Mag()*sin(evtSumTheta0);
962  double evtSumP0 = evtSumP40.Vect().Mag();
963 
964 
965 
966  bool ismuon = shwlids[ish1]->IsMuon(); // Muon like shower?
967  bool ismuone = shwlids[ish1e]->IsMuon(); // Muon like shower?
968 
969  if(sh1ann>0.84&&ismuon==true)Ncount1++;
970 // if( ismuon == true ) return; // remove muon
971 
972  TVector3 beamDir = evtTrueNuP4.Vect(); // True Neutrino 4-momentum
973 
974 // Osc illation weigt for sigal
975  double sigw = OscWeight(evtTrueNuPdg,evtTrueNuCCNC, evtTrueNuEnergy, true); // Signal
976  double bkgw = OscWeight(evtTrueNuPdg,evtTrueNuCCNC, evtTrueNuEnergy, false); // Background
977 
978 // Neutrino energy reconstruction
979  double evtNuEnergy = shwlids[ish1e]->NueEnergy();
980 
981  if(sh1ann>0.84&&sh1gev>0&&ismuon==false)Ncount2++;
982 // std::cout<<"N NueCC "<<Ncount2<<std::endl;
983  Nfill++;
984  fEvent->Fill(); // Fill NTuple
985 
986  eid.SetANN(sh1eann);
987  eid.SetANNE(sh1eanne);
988  eid.SetVtx(evtTrueNuVtx);
989  eid.SetNuEnergy(evtNuEnergy);
990  eid.SetDetEnergy(evtetot);
991 
992  eid.SetEvtNCell(slice.NCell());
993 // eid.SetEvtSumCosTheta(cos(evtSumTheta));
994  eid.SetEvtSumCosTheta(shwlids[ish1e]->CosTheta());
995  eid.SetEvtSumP(evtSumP);
996  eid.SetEvtSumPt(evtSumPt);
997  eid.SetEvtSumP0(evtSumP0);
998  eid.SetEvtSumPt0(evtSumPt0);
999 
1000  eid.SetEvtEtot(evtetot);
1001  eid.SetEvtMinX(evtMinX);
1002  eid.SetEvtMinY(evtMinY);
1003  eid.SetEvtMinZ(evtMinZ);
1004  eid.SetEvtMaxX(evtMaxX);
1005  eid.SetEvtMaxY(evtMaxY);
1006  eid.SetEvtMaxZ(evtMaxZ);
1007  eid.SetEvtGapTNS(evtGapTNS);
1008 // eid.SetEvtNCellToEdge(evtNCellToEdge);
1009 
1010  eid.SetSh1Energy(sh1egev);
1011  eid.SetSh1ExclEnergy(shwlids[ish1e]->HadronicEnergy());
1012  eid.SetSh1TotalLength(sh1elength);
1013  eid.SetSh1Start(showercol[ish1e]->Start());
1014  eid.SetSh1Stop(showercol[ish1e]->Stop());
1015  eid.SetSh1Dir(showercol[ish1e]->Dir());
1016 
1017  eid.SetSh1VtxDoca(vtxdoca[ish1e]);
1018  eid.SetSh1Gap(shwlids[ish1e]->Gap());
1019  eid.SetSh1NPlane(showercol[ish1e]->ExtentPlane());
1020  eid.SetSh1XNPlane(vXCluster[ish1e].ExtentPlane());
1021  eid.SetSh1YNPlane(vYCluster[ish1e].ExtentPlane());
1022  eid.SetSh1NCell(showercol[ish1e]->NCell());
1023  eid.SetSh1XNCell(showercol[ish1e]->NXCell());
1024  eid.SetSh1YNCell(showercol[ish1e]->NYCell());
1025  eid.SetSh1PID(showerpid[ish1e]);
1026 // eid.SetSh1NCellToEdge(showercol[ish1e]->NCellToEdge());
1027  if(ish2!=-1){
1028  double evtSh1Sh2Dang = 180*showerP4Col[ish1e].Angle(showerP4Col[ish2].Vect())/3.14159265;
1029  eid.SetSh1Sh2Dang(evtSh1Sh2Dang);
1030  eid.SetSh2Energy(shwlids[ish2]->ShowerEnergy());
1031  eid.SetSh2ExclEnergy(shwlids[ish2]->HadronicEnergy());
1032  eid.SetSh2TotalLength(showercol[ish2]->TotalLength());
1033  eid.SetSh2Start(showercol[ish2]->Start());
1034  eid.SetSh2Stop(showercol[ish2]->Stop());
1035  eid.SetSh2Dir(showercol[ish2]->Dir());
1036 
1037  eid.SetSh2VtxDoca(vtxdoca[ish2]);
1038  eid.SetSh2Gap(shwlids[ish2]->Gap());
1039  eid.SetSh2NPlane(showercol[ish2]->ExtentPlane());
1040  eid.SetSh2XNPlane(vXCluster[ish2].ExtentPlane());
1041  eid.SetSh2YNPlane(vYCluster[ish2].ExtentPlane());
1042  eid.SetSh2NCell(showercol[ish2]->NCell());
1043  eid.SetSh2XNCell(showercol[ish2]->NXCell());
1044  eid.SetSh2YNCell(showercol[ish2]->NYCell());
1045  eid.SetSh2PID(showerpid[ish2]);
1046 // eid.SetSh2NCellToEdge(showercol[ish2]->NCellToEdge());
1047  }else{
1048  eid.SetSh1Sh2Dang(0);
1049  eid.SetSh2Energy(0);
1050  eid.SetSh2ExclEnergy(0);
1051  eid.SetSh2TotalLength(0);
1052  TVector3 v3null(0,0,0);
1053  eid.SetSh2Start(v3null);
1054  eid.SetSh2Stop(v3null);
1055  eid.SetSh2Dir(v3null);
1056  eid.SetSh2VtxDoca(0);
1057  eid.SetSh2Gap(0);
1058  eid.SetSh2NPlane(0);
1059  eid.SetSh2XNPlane(0);
1060  eid.SetSh2YNPlane(0);
1061  eid.SetSh2NCell(0);
1062  eid.SetSh2XNCell(0);
1063  eid.SetSh2YNCell(0);
1064  eid.SetSh2PID(-1);
1065  eid.SetSh2NCellToEdge(10000);
1066  }
1067 
1068 
1069  eid.SetIsMuon(ismuone);
1070  eid.SetIsInvPhoton(shwlids[ish1e]->IsInversePhoton());
1071  eid.SetSigOscW(sigw);
1072  eid.SetBkgOscW(bkgw);
1073 
1074  eid.SetEGLLL(sh1egLLL);
1075  eid.SetEGLLT(sh1egLLT);
1076  eid.SetEMuLLL(sh1emuLLL);
1077  eid.SetEMuLLT(sh1emuLLT);
1078  eid.SetEPi0LLL(sh1epi0LLL);
1079  eid.SetEPi0LLT(sh1epi0LLT);
1080  eid.SetEPLLL(sh1epLLL);
1081  eid.SetEPLLT(sh1epLLT);
1082  eid.SetENLLL(sh1enLLL);
1083  eid.SetENLLT(sh1enLLT);
1084  eid.SetEPiLLL(sh1epiLLL);
1085  eid.SetEPiLLT(sh1epiLLT);
1086  eid.SetVtxGeV(sh1vtxgev);
1087  eid.SetPi0Mass(sh1pi0mass);
1088  eid.SetShE(sh1shE);
1089  eid.SetGap(sh1gap);
1090  eid.SetELLL(sh1eLLL);
1091  eid.SetELLT(sh1eLLT);
1092  eid.SetMuLLL(sh1muLLL);
1093  eid.SetMuLLT(sh1muLLT);
1094 // eid.SetGLLL(shwlids[ish1e]->GLLL());
1095  eid.SetInvGLLL(shwlids[ish1e]->InverseGLLL());
1096 
1097 // eid.SetSh1DistToEdge(showercol[ish1e]->DistToEdge()); // Shower distance to edge
1098 // eid.SetEEdge2Cell(showercol[ish1e]->SliceEdge2GeV()); //Energy deposit within 2 cells to detector edges
1099 // eid.SetEEdge5Cell(showercol[ish1e]->SliceEdge5GeV()); //Energy deposit within 5 cells to detector edges
1100 // eid.SetEEdge10Cell(showercol[ish1e]->SliceEdge10GeV()); //Energy deposit within 10 cells to detector edges
1101  eidcol->push_back(eid);
1102  }
1103 
1104  util::CreateAssn(evt,*eidcol,art::Ptr<rb::Cluster>(slicecol,sliceIdx),*assns);
1105  }
1106 
1107 
1108  //unsigned int iSlice = showercol[ish1e]->ISlice();
1109  //std::cout << "iSlice: " << iSlice << std::endl;
1110  //util::CreateAssn(evt,*eidcol,slicelist[iSlice],*assns);
1111  //assert(iSlice >=0 && iSlice < slicecol->size());
1112 
1113 
1114  evt.put(std::move(eidcol));
1115  evt.put(std::move(assns));
1116  Nput++;
1117 // if(Ncount0%100==0)std::cout<<Ncount0<<" events processed, "<<Ncount2<<" Pass NueCC Sel "<<Ncount1<<" muon like"<<std::endl;
1118  return;
1119  }
void SetEMuLLT(double emuLLT)
Definition: EID.cxx:663
void SetIsMuon(bool ismuon)
Definition: EID.cxx:543
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.
virtual double W(const rb::CellHit *chit) const
Estimate the unmeasured coordinate of chit.
Definition: Cluster.cxx:121
void SetSh1VtxDoca(double doca)
Definition: EID.cxx:299
void SetSh1YNPlane(unsigned int ynplane)
Definition: EID.cxx:334
void SetSh1NCellToEdge(int ncell)
Definition: EID.cxx:378
unsigned int NCell(geo::View_t view) const
Number of cells in view view.
Definition: Cluster.cxx:134
void SetPi0Mass(double pi0mass)
Definition: EID.cxx:763
void SetEvtEtot(double etot)
Definition: EID.cxx:141
art::Ptr< rb::CellHit > XCell(unsigned int xIdx) const
Get the ith cell in the x-view.
Definition: Cluster.cxx:157
void SetEPiLLL(double epiLLL)
Definition: EID.cxx:733
void SetSh1Gap(double gap)
Definition: EID.cxx:307
void SetEPi0LLT(double epi0LLT)
Definition: EID.cxx:683
unsigned short Plane() const
Definition: CellHit.h:39
void SetSh2TotalLength(double sh1totallength)
Definition: EID.cxx:417
T sqrt(T number)
Definition: d0nt_math.hpp:156
void SetSh2Stop(TVector3 sh1stop)
Definition: EID.cxx:436
void SetSh1XNPlane(unsigned int xnplane)
Definition: EID.cxx:325
rb::RecoHit MakeRecoHit(rb::CellHit const &cellhit, double w)
void SetSh1NCell(unsigned int ncell)
Definition: EID.cxx:342
void SetSh1YNCell(unsigned int yncell)
Definition: EID.cxx:360
A collection of associated CellHits.
Definition: Cluster.h:47
void SetNuEnergy(double energy)
Definition: EID.cxx:224
void SetSh2NCellToEdge(int ncell)
Definition: EID.cxx:534
const PlaneGeo * Plane(unsigned int i) const
void SetVtx(TVector3 vtx)
Definition: EID.cxx:581
void SetGap(double gap)
Definition: EID.cxx:783
void SetGLLL(double gLLL)
Definition: EID.cxx:855
std::string fVertexLabel
Label for rb::Vertex input.
Horizontal planes which measure Y.
Definition: PlaneGeo.h:29
Calibrated quantities relying on position in the orthogonal view. To generate a rb::CellHit from a rb...
Definition: RecoHit.h:19
void SetEPiLLT(double epiLLT)
Definition: EID.cxx:743
void SetSh2XNPlane(unsigned int xnplane)
Definition: EID.cxx:481
void SetEvtSumP0(double p)
Definition: EID.cxx:103
void SetEPi0LLL(double epi0LLL)
Definition: EID.cxx:673
void SetEvtGapTNS(double tns)
Definition: EID.cxx:205
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
Definition: DataViewImpl.h:446
void SetSh2YNPlane(unsigned int ynplane)
Definition: EID.cxx:490
std::string fLIDLabel
Label for LID input.
void SetSh2YNCell(unsigned int yncell)
Definition: EID.cxx:516
void SetEvtMaxX(double m)
Definition: EID.cxx:178
void SetEEdge10Cell(double eedge10cell)
Definition: EID.cxx:904
void SetEvtSumP(double p)
Definition: EID.cxx:123
void SetSh2NPlane(unsigned int nplane)
Definition: EID.cxx:472
Float_t E
Definition: plot.C:20
void SetShE(double shE)
Definition: EID.cxx:773
void SetEvtMaxZ(double m)
Definition: EID.cxx:196
double GetPointDoca(TVector3 vtx, TVector3 start, TVector3 stop)
void SetSh2Start(TVector3 sh1start)
Definition: EID.cxx:427
art::Ptr< rb::CellHit > YCell(unsigned int yIdx) const
Get the ith cell in the y-view.
Definition: Cluster.cxx:165
void SetEvtMinY(double m)
Definition: EID.cxx:160
void SetSh2Dir(TVector3 sh1dir)
Definition: EID.cxx:445
void SetSh1NPlane(unsigned int nplane)
Definition: EID.cxx:316
void SetELLL(double eLLL)
Definition: EID.cxx:793
void SetEGLLT(double egLLT)
Definition: EID.cxx:643
void SetSh1PID(int pid)
Definition: EID.cxx:369
void SetVtxGeV(double vtxgev)
Definition: EID.cxx:753
const double xmass[8]
void SetSh2PID(int pid)
Definition: EID.cxx:525
void SetSh1XNCell(unsigned int xncell)
Definition: EID.cxx:351
SubRunNumber_t subRun() const
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
void SetSh1Sh2Dang(double sh1sh2dang)
Definition: EID.cxx:387
const double j
Definition: BetheBloch.cxx:29
double GetY(int dcm=1, int feb=0, int pix=0)
Definition: PlotOnMon.C:119
RunNumber_t run() const
std::string fSlicerLabel
Label for rb::Cluster input.
void SetEvtMaxY(double m)
Definition: EID.cxx:187
Definition: run.py:1
void SetSh2Energy(double sh1energy)
Definition: EID.cxx:398
void SetEPLLL(double epLLL)
Definition: EID.cxx:693
void SetEEdge2Cell(double eedge2cell)
Definition: EID.cxx:886
void SetEGLLL(double egLLL)
Definition: EID.cxx:633
unsigned int NYCell() const
Number of cells in the y-view.
Definition: Cluster.h:108
TVector3 NuMIBeamDirection() const
Direction of neutrinos from the NuMI beam (unit vector)
EventNumber_t event() const
Definition: EventID.h:116
art::Ptr< rb::CellHit > Cell(geo::View_t view, unsigned int viewIdx) const
Get the ith cell from view view.
Definition: Cluster.cxx:145
void SetEvtNCell(int ncell)
Definition: EID.cxx:84
void SetMuLLT(double muLLT)
Definition: EID.cxx:845
void SetSh1Dir(TVector3 sh1dir)
Definition: EID.cxx:289
float GeV() const
Definition: RecoHit.cxx:69
A Cluster with defined start position and direction.
Definition: Prong.h:19
T sin(T number)
Definition: d0nt_math.hpp:132
void SetInvGLLL(double invgLLL)
Definition: EID.cxx:865
double OscWeight(int pdg, int ccnc, double energy, bool issig)
void SetIsInvPhoton(bool isinvphoton)
Definition: EID.cxx:552
void SetBkgOscW(double weight)
Definition: EID.cxx:571
void SetDetEnergy(double energy)
Definition: EID.cxx:75
void SetSh1ExclEnergy(double sh1exclenergy)
Definition: EID.cxx:252
void SetEvtSumCosTheta(double costheta)
Definition: EID.cxx:93
void SetEvtSumPt0(double pt)
Definition: EID.cxx:111
unsigned int NXCell() const
Number of cells in the x-view.
Definition: Cluster.h:106
void SetSh1Start(TVector3 sh1start)
Definition: EID.cxx:271
double MeanTNS(rb::AveragingScheme scheme=kDefaultScheme) const
Definition: Cluster.cxx:554
void geom(int which=0)
Definition: geom.C:163
void SetMuLLL(double muLLL)
Definition: EID.cxx:835
void SetEEdge5Cell(double eedge5cell)
Definition: EID.cxx:895
void SetSh2VtxDoca(double doca)
Definition: EID.cxx:455
void SetEvtMinZ(double m)
Definition: EID.cxx:169
void SetELLT(double eLLT)
Definition: EID.cxx:803
void SetSh1Energy(double sh1energy)
Definition: EID.cxx:242
void SetSh2XNCell(unsigned int xncell)
Definition: EID.cxx:507
void SetENLLL(double enLLL)
Definition: EID.cxx:713
void SetEvtNCellToEdge(int ncell)
Definition: EID.cxx:215
void SetEvtMinX(double m)
Definition: EID.cxx:151
bool IsNoise() const
Is the noise flag set?
Definition: Cluster.h:163
void SetANNE(double anne)
Definition: EID.cxx:21
void SetSh2ExclEnergy(double sh1exclenergy)
Definition: EID.cxx:408
T const * get() const
Definition: Ptr.h:149
ProductID put(std::unique_ptr< PROD > &&edp, FullSemantic< Level::Run > const semantic)
Definition: DataViewImpl.h:730
Float_t w
Definition: plot.C:20
void SetSh1Stop(TVector3 sh1stop)
Definition: EID.cxx:280
void SetEMuLLL(double emuLLL)
Definition: EID.cxx:653
void SetEPLLT(double epLLT)
Definition: EID.cxx:703
void SetANN(double ann)
Definition: EID.cxx:12
EventID id() const
void SetSh1DistToEdge(double dist)
Definition: EID.cxx:875
void SetENLLT(double enLLT)
Definition: EID.cxx:723
void SetEvtSumPt(double pt)
Definition: EID.cxx:132
double GetX(int ndb=14, int db=1, int feb=0, int pix=0)
Definition: PlotOnMon.C:111
TVector3 Vect() const
float showerlength
void SetSigOscW(double weight)
Definition: EID.cxx:561
void SetSh2NCell(unsigned int ncell)
Definition: EID.cxx:498
void SetSh2Gap(double gap)
Definition: EID.cxx:463
void SetSh1TotalLength(double sh1totallength)
Definition: EID.cxx:261
void jmshower::NueSelLID::reconfigure ( const fhicl::ParameterSet pset)
virtual

Definition at line 185 of file NueSelLID_module.cc.

References fLibPath, fLIDLabel, fSlicerLabel, fVertexLabel, fhicl::ParameterSet::get(), and string.

Referenced by NueSelLID().

186  {
187  fLIDLabel = pset.get< std::string >("LIDLabel" );
188  fSlicerLabel = pset.get< std::string >("SlicerLabel");
189  fVertexLabel = pset.get< std::string >("VertexLabel");
190  fLibPath = pset.get< std::string >("LibraryPath");
191  }
std::string fVertexLabel
Label for rb::Vertex input.
std::string fLIDLabel
Label for LID input.
T get(std::string const &key) const
Definition: ParameterSet.h:231
std::string fSlicerLabel
Label for rb::Cluster input.
std::string fLibPath
Path to PID libraries.
enum BeamMode string
void art::ModuleBase::setModuleDescription ( ModuleDescription const &  )
inherited
void art::ModuleBase::sortConsumables ( std::string const &  current_process_name)
inherited
std::string art::EDProducer::workerType ( ) const
inherited

Member Data Documentation

TTree* jmshower::NueSelLID::fEvent
protected

Definition at line 79 of file NueSelLID_module.cc.

Referenced by beginRun(), and produce().

std::string jmshower::NueSelLID::fLibPath
protected

Path to PID libraries.

Definition at line 76 of file NueSelLID_module.cc.

Referenced by LoadHistograms(), and reconfigure().

std::string jmshower::NueSelLID::fLIDLabel
protected

Label for LID input.

Definition at line 73 of file NueSelLID_module.cc.

Referenced by produce(), and reconfigure().

std::string jmshower::NueSelLID::fSlicerLabel
protected

Label for rb::Cluster input.

Definition at line 74 of file NueSelLID_module.cc.

Referenced by produce(), and reconfigure().

std::string jmshower::NueSelLID::fVertexLabel
protected

Label for rb::Vertex input.

Definition at line 75 of file NueSelLID_module.cc.

Referenced by produce(), and reconfigure().

TH1D* jmshower::NueSelLID::ht_bkg_nue_rw
private

Definition at line 149 of file NueSelLID_module.cc.

Referenced by LoadHistograms().

TH1D* jmshower::NueSelLID::ht_bkg_numu_rw
private

Definition at line 150 of file NueSelLID_module.cc.

Referenced by LoadHistograms().

TH1D* jmshower::NueSelLID::ht_nue_rw
private

Definition at line 148 of file NueSelLID_module.cc.

Referenced by LoadHistograms(), and OscWeight().

double jmshower::NueSelLID::m_evt
protected

Definition at line 97 of file NueSelLID_module.cc.

Referenced by InitializeNTuple().

double jmshower::NueSelLID::m_evtANN
protected

Definition at line 98 of file NueSelLID_module.cc.

Referenced by beginRun(), and InitializeNTuple().

double jmshower::NueSelLID::m_evtBkgOscW
protected

Definition at line 103 of file NueSelLID_module.cc.

Referenced by beginRun(), and InitializeNTuple().

double jmshower::NueSelLID::m_evtDetEnergy
protected

Definition at line 107 of file NueSelLID_module.cc.

Referenced by beginRun(), and InitializeNTuple().

double jmshower::NueSelLID::m_evtEtot
protected

Definition at line 101 of file NueSelLID_module.cc.

Referenced by beginRun(), and InitializeNTuple().

int jmshower::NueSelLID::m_evtEvent
protected

Definition at line 94 of file NueSelLID_module.cc.

Referenced by InitializeNTuple(), and produce().

int jmshower::NueSelLID::m_evtIsInvPhoton
protected

Definition at line 105 of file NueSelLID_module.cc.

Referenced by beginRun(), and InitializeNTuple().

int jmshower::NueSelLID::m_evtIsMuon
protected

Definition at line 104 of file NueSelLID_module.cc.

Referenced by beginRun(), and InitializeNTuple().

int jmshower::NueSelLID::m_evtIsMuonSh1
protected

Definition at line 106 of file NueSelLID_module.cc.

Referenced by beginRun().

double jmshower::NueSelLID::m_evtNSh
protected

Definition at line 96 of file NueSelLID_module.cc.

Referenced by beginRun(), and InitializeNTuple().

double jmshower::NueSelLID::m_evtNSlice
protected

Definition at line 95 of file NueSelLID_module.cc.

Referenced by beginRun(), and InitializeNTuple().

double jmshower::NueSelLID::m_evtNuEnergy
protected

Definition at line 108 of file NueSelLID_module.cc.

Referenced by beginRun(), and InitializeNTuple().

int jmshower::NueSelLID::m_evtRun
protected

Definition at line 92 of file NueSelLID_module.cc.

Referenced by beginRun(), InitializeNTuple(), and produce().

double jmshower::NueSelLID::m_evtSh1DedxANN
protected

Definition at line 99 of file NueSelLID_module.cc.

Referenced by beginRun(), and InitializeNTuple().

double jmshower::NueSelLID::m_evtSh1DedxANNE
protected

Definition at line 100 of file NueSelLID_module.cc.

Referenced by beginRun(), and InitializeNTuple().

double jmshower::NueSelLID::m_evtSh1Dir[3]
protected

Definition at line 114 of file NueSelLID_module.cc.

Referenced by beginRun(), and InitializeNTuple().

double jmshower::NueSelLID::m_evtSh1DistToEdge
protected

Definition at line 140 of file NueSelLID_module.cc.

Referenced by beginRun(), and InitializeNTuple().

double jmshower::NueSelLID::m_evtSh1EGLLL
protected

Definition at line 117 of file NueSelLID_module.cc.

Referenced by beginRun(), and InitializeNTuple().

double jmshower::NueSelLID::m_evtSh1EGLLT
protected

Definition at line 118 of file NueSelLID_module.cc.

Referenced by beginRun(), and InitializeNTuple().

double jmshower::NueSelLID::m_evtSh1ELLL
protected

Definition at line 133 of file NueSelLID_module.cc.

Referenced by beginRun(), and InitializeNTuple().

double jmshower::NueSelLID::m_evtSh1ELLT
protected

Definition at line 134 of file NueSelLID_module.cc.

Referenced by beginRun(), and InitializeNTuple().

double jmshower::NueSelLID::m_evtSh1EMuLLL
protected

Definition at line 119 of file NueSelLID_module.cc.

Referenced by beginRun(), and InitializeNTuple().

double jmshower::NueSelLID::m_evtSh1EMuLLT
protected

Definition at line 120 of file NueSelLID_module.cc.

Referenced by beginRun(), and InitializeNTuple().

double jmshower::NueSelLID::m_evtSh1Energy
protected

Definition at line 109 of file NueSelLID_module.cc.

Referenced by beginRun(), and InitializeNTuple().

double jmshower::NueSelLID::m_evtSh1ENLLL
protected

Definition at line 125 of file NueSelLID_module.cc.

Referenced by beginRun(), and InitializeNTuple().

double jmshower::NueSelLID::m_evtSh1ENLLT
protected

Definition at line 126 of file NueSelLID_module.cc.

Referenced by beginRun(), and InitializeNTuple().

double jmshower::NueSelLID::m_evtSh1EPi0LLL
protected

Definition at line 121 of file NueSelLID_module.cc.

Referenced by beginRun(), and InitializeNTuple().

double jmshower::NueSelLID::m_evtSh1EPi0LLT
protected

Definition at line 122 of file NueSelLID_module.cc.

Referenced by beginRun(), and InitializeNTuple().

double jmshower::NueSelLID::m_evtSh1EPiLLL
protected

Definition at line 127 of file NueSelLID_module.cc.

Referenced by beginRun(), and InitializeNTuple().

double jmshower::NueSelLID::m_evtSh1EPiLLT
protected

Definition at line 128 of file NueSelLID_module.cc.

Referenced by beginRun(), and InitializeNTuple().

double jmshower::NueSelLID::m_evtSh1EPLLL
protected

Definition at line 123 of file NueSelLID_module.cc.

Referenced by beginRun(), and InitializeNTuple().

double jmshower::NueSelLID::m_evtSh1EPLLT
protected

Definition at line 124 of file NueSelLID_module.cc.

Referenced by beginRun(), and InitializeNTuple().

double jmshower::NueSelLID::m_evtSh1ExclEnergy
protected

Definition at line 110 of file NueSelLID_module.cc.

Referenced by beginRun(), and InitializeNTuple().

double jmshower::NueSelLID::m_evtSh1Gap
protected

Definition at line 132 of file NueSelLID_module.cc.

Referenced by beginRun(), and InitializeNTuple().

double jmshower::NueSelLID::m_evtSh1GLLL
protected

Definition at line 137 of file NueSelLID_module.cc.

Referenced by beginRun(), and InitializeNTuple().

double jmshower::NueSelLID::m_evtSh1InvGLLL
protected

Definition at line 138 of file NueSelLID_module.cc.

Referenced by beginRun(), and InitializeNTuple().

double jmshower::NueSelLID::m_evtSh1Length
protected

Definition at line 111 of file NueSelLID_module.cc.

Referenced by beginRun(), and InitializeNTuple().

double jmshower::NueSelLID::m_evtSh1MuLLL
protected

Definition at line 135 of file NueSelLID_module.cc.

Referenced by beginRun(), and InitializeNTuple().

double jmshower::NueSelLID::m_evtSh1MuLLT
protected

Definition at line 136 of file NueSelLID_module.cc.

Referenced by beginRun(), and InitializeNTuple().

double jmshower::NueSelLID::m_evtSh1Pi0Mass
protected

Definition at line 130 of file NueSelLID_module.cc.

Referenced by beginRun(), and InitializeNTuple().

double jmshower::NueSelLID::m_evtSh1ShE
protected

Definition at line 131 of file NueSelLID_module.cc.

Referenced by beginRun(), and InitializeNTuple().

double jmshower::NueSelLID::m_evtSh1SliceEdge10GeV
protected

Definition at line 143 of file NueSelLID_module.cc.

Referenced by beginRun(), and InitializeNTuple().

double jmshower::NueSelLID::m_evtSh1SliceEdge2GeV
protected

Definition at line 141 of file NueSelLID_module.cc.

Referenced by beginRun(), and InitializeNTuple().

double jmshower::NueSelLID::m_evtSh1SliceEdge5GeV
protected

Definition at line 142 of file NueSelLID_module.cc.

Referenced by beginRun(), and InitializeNTuple().

double jmshower::NueSelLID::m_evtSh1Start[3]
protected

Definition at line 112 of file NueSelLID_module.cc.

Referenced by beginRun(), and InitializeNTuple().

double jmshower::NueSelLID::m_evtSh1Stop[3]
protected

Definition at line 113 of file NueSelLID_module.cc.

Referenced by beginRun(), and InitializeNTuple().

double jmshower::NueSelLID::m_evtSh1VtxGeV
protected

Definition at line 129 of file NueSelLID_module.cc.

Referenced by beginRun(), and InitializeNTuple().

double jmshower::NueSelLID::m_evtSigOscW
protected

Definition at line 102 of file NueSelLID_module.cc.

Referenced by beginRun(), and InitializeNTuple().

int jmshower::NueSelLID::m_evtSRun
protected

Definition at line 93 of file NueSelLID_module.cc.

Referenced by beginRun(), InitializeNTuple(), and produce().

double jmshower::NueSelLID::m_evtTrueEnergy[20]
protected

Definition at line 90 of file NueSelLID_module.cc.

Referenced by beginRun(), and InitializeNTuple().

int jmshower::NueSelLID::m_evtTrueMother[20]
protected

Definition at line 89 of file NueSelLID_module.cc.

Referenced by beginRun(), and InitializeNTuple().

int jmshower::NueSelLID::m_evtTrueNuCCNC
protected

Definition at line 81 of file NueSelLID_module.cc.

Referenced by beginRun(), InitializeNTuple(), and produce().

double jmshower::NueSelLID::m_evtTrueNuEnergy
protected

Definition at line 84 of file NueSelLID_module.cc.

Referenced by beginRun(), InitializeNTuple(), and produce().

int jmshower::NueSelLID::m_evtTrueNuIsFid
protected

Definition at line 85 of file NueSelLID_module.cc.

Referenced by beginRun(), and InitializeNTuple().

int jmshower::NueSelLID::m_evtTrueNuMode
protected

Definition at line 82 of file NueSelLID_module.cc.

Referenced by beginRun(), InitializeNTuple(), and produce().

double jmshower::NueSelLID::m_evtTrueNuP4[4]
protected

Definition at line 86 of file NueSelLID_module.cc.

Referenced by beginRun(), InitializeNTuple(), and produce().

int jmshower::NueSelLID::m_evtTrueNuPdg
protected

Definition at line 83 of file NueSelLID_module.cc.

Referenced by beginRun(), InitializeNTuple(), and produce().

double jmshower::NueSelLID::m_evtTrueNuVtx[3]
protected

Definition at line 87 of file NueSelLID_module.cc.

Referenced by beginRun(), InitializeNTuple(), and produce().

int jmshower::NueSelLID::m_evtTruePdg[20]
protected

Definition at line 88 of file NueSelLID_module.cc.

Referenced by beginRun(), and InitializeNTuple().

double jmshower::NueSelLID::m_evtVtx[3]
protected

Definition at line 115 of file NueSelLID_module.cc.

Referenced by beginRun(), and InitializeNTuple().

TMultiLayerPerceptron* jmshower::NueSelLID::mlp_evt
private

Definition at line 152 of file NueSelLID_module.cc.

Referenced by LoadHistograms().


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