Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
evgen::ProtoDUNEBeam Class Reference
Inheritance diagram for evgen::ProtoDUNEBeam:
art::EDProducer art::detail::Producer art::detail::LegacyModule art::Modifier art::ModuleBase art::ProductRegistryHelper

Classes

struct  ProtoFullSpill
 

Public Member Functions

 ProtoDUNEBeam (fhicl::ParameterSet const &p)
 
 ~ProtoDUNEBeam ()
 
 ProtoDUNEBeam (ProtoDUNEBeam const &)=delete
 
 ProtoDUNEBeam (ProtoDUNEBeam &&)=delete
 
ProtoDUNEBeamoperator= (ProtoDUNEBeam const &)=delete
 
ProtoDUNEBeamoperator= (ProtoDUNEBeam &&)=delete
 
void produce (art::Event &e) override
 
void beginJob () override
 
void beginRun (art::Run &run) override
 
void endJob () override
 
- Public Member Functions inherited from art::EDProducer
 EDProducer (fhicl::ParameterSet const &pset)
 
template<typename Config >
 EDProducer (Table< Config > const &config)
 
std::string workerType () const
 
- Public Member Functions inherited from art::detail::Producer
virtual ~Producer () noexcept
 
 Producer (fhicl::ParameterSet const &)
 
 Producer (Producer const &)=delete
 
 Producer (Producer &&)=delete
 
Produceroperator= (Producer const &)=delete
 
Produceroperator= (Producer &&)=delete
 
void doBeginJob (SharedResources const &resources)
 
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)
 
- Public Member Functions inherited from art::Modifier
 ~Modifier () noexcept
 
 Modifier ()
 
 Modifier (Modifier const &)=delete
 
 Modifier (Modifier &&)=delete
 
Modifieroperator= (Modifier const &)=delete
 
Modifieroperator= (Modifier &&)=delete
 
- Public Member Functions inherited from art::ModuleBase
virtual ~ModuleBase () noexcept
 
 ModuleBase ()
 
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< T > consumesView (InputTag const &tag)
 
template<typename T , BranchType BT>
ViewToken< T > mayConsumeView (InputTag const &tag)
 

Private Member Functions

void CalculateNOverlays ()
 
int IsOverlayEvent (int event, int nOverlay)
 
std::vector< int > GetAllOverlays (int event, int nOverlay)
 
void FillParticleMaps ()
 
void GenerateTrueEvent (simb::MCTruth &mcTruth, std::vector< sim::ProtoDUNEbeamsim > &beamsimcol, beam::ProtoDUNEBeamEvent &beamEvent)
 
void OpenInputFile ()
 
TLorentzVector ConvertCoordinates (float x, float y, float z, float t)
 
TLorentzVector MakeMomentumVector (float px, float py, float pz, int pdg, bool shifts)
 
TLorentzVector MakeMomentumVector (const TVector3 &mom, int pdg, bool shifts)
 
TLorentzVector ConvertBeamMonitorCoordinates (float x, float y, float z, float t, float offset)
 
TVector3 ConvertProfCoordinates (double x, double y, double z, double zOffset)
 
TVector3 ProjectToTPC (TVector3 firstPoint, TVector3 secondPoint)
 
double GetPosition (short fiber)
 
void MakeTracks (beam::ProtoDUNEBeamEvent &beamEvent)
 
void MomentumSpectrometer (beam::ProtoDUNEBeamEvent &beamEvent)
 
double MomentumCosTheta (double, double, double)
 
TVector3 ConvertBeamMonitorMomentumVec (float px, float py, float pz)
 
void BeamMonitorBasisVectors ()
 
void RotateMonitorVector (TVector3 &vec)
 
void SetBeamEvent (beam::ProtoDUNEBeamEvent &beamevt)
 
beam::FBM MakeFiberMonitor (float pos)
 
TVector3 GetBackgroundPosition (float x, float y, float z, float px, float py, float pz)
 

Private Attributes

std::vector< ProtoFullSpillfAllSpills
 
unsigned int fCurrentGoodEvent
 
std::vector< int > fGoodEventList
 
CLHEP::RandFlat fFlatRnd
 
std::string fFileName
 
std::string fGoodParticleTreeName
 
std::string fAllParticlesTreeName
 
int fEventNumber
 
int fStartEvent
 
TFile * fInputFile
 
TTree * fGoodParticleTree
 
TTree * fAllParticlesTree
 
Float_t fGoodNP04front_x
 
Float_t fGoodNP04front_y
 
Float_t fGoodNP04front_z
 
Float_t fGoodNP04front_t
 
Float_t fGoodNP04front_Px
 
Float_t fGoodNP04front_Py
 
Float_t fGoodNP04front_Pz
 
Float_t fGoodNP04front_PDGid
 
Float_t fGoodNP04front_EventID
 
Float_t fGoodNP04front_TrackID
 
Float_t fGoodTOF1_x
 
Float_t fGoodTOF1_y
 
Float_t fGoodTOF1_z
 
Float_t fGoodTOF1_t
 
Float_t fGoodTOF1_Px
 
Float_t fGoodTOF1_Py
 
Float_t fGoodTOF1_Pz
 
Float_t fGoodTOF1_PDGid
 
Float_t fGoodTOF1_EventID
 
Float_t fGoodTOF1_TrackID
 
Float_t fGoodTRIG1_x
 
Float_t fGoodTRIG1_y
 
Float_t fGoodTRIG1_z
 
Float_t fGoodTRIG1_t
 
Float_t fGoodTRIG1_Px
 
Float_t fGoodTRIG1_Py
 
Float_t fGoodTRIG1_Pz
 
Float_t fGoodTRIG1_PDGid
 
Float_t fGoodTRIG1_EventID
 
Float_t fGoodTRIG1_TrackID
 
Float_t fGoodTRIG2_x
 
Float_t fGoodTRIG2_y
 
Float_t fGoodTRIG2_z
 
Float_t fGoodTRIG2_t
 
Float_t fGoodTRIG2_Px
 
Float_t fGoodTRIG2_Py
 
Float_t fGoodTRIG2_Pz
 
Float_t fGoodTRIG2_PDGid
 
Float_t fGoodTRIG2_EventID
 
Float_t fGoodTRIG2_TrackID
 
Float_t fGoodBPROF1_x
 
Float_t fGoodBPROF1_y
 
Float_t fGoodBPROF1_z
 
Float_t fGoodBPROF1_t
 
Float_t fGoodBPROF1_Px
 
Float_t fGoodBPROF1_Py
 
Float_t fGoodBPROF1_Pz
 
Float_t fGoodBPROF1_PDGid
 
Float_t fGoodBPROF1_EventID
 
Float_t fGoodBPROF1_TrackID
 
Float_t fGoodBPROF2_x
 
Float_t fGoodBPROF2_y
 
Float_t fGoodBPROF2_z
 
Float_t fGoodBPROF2_t
 
Float_t fGoodBPROF2_Px
 
Float_t fGoodBPROF2_Py
 
Float_t fGoodBPROF2_Pz
 
Float_t fGoodBPROF2_PDGid
 
Float_t fGoodBPROF2_EventID
 
Float_t fGoodBPROF2_TrackID
 
Float_t fGoodBPROF3_x
 
Float_t fGoodBPROF3_y
 
Float_t fGoodBPROF3_z
 
Float_t fGoodBPROF3_t
 
Float_t fGoodBPROF3_Px
 
Float_t fGoodBPROF3_Py
 
Float_t fGoodBPROF3_Pz
 
Float_t fGoodBPROF3_PDGid
 
Float_t fGoodBPROF3_EventID
 
Float_t fGoodBPROF3_TrackID
 
Float_t fGoodBPROF4_x
 
Float_t fGoodBPROF4_y
 
Float_t fGoodBPROF4_z
 
Float_t fGoodBPROF4_t
 
Float_t fGoodBPROF4_Px
 
Float_t fGoodBPROF4_Py
 
Float_t fGoodBPROF4_Pz
 
Float_t fGoodBPROF4_PDGid
 
Float_t fGoodBPROF4_EventID
 
Float_t fGoodBPROF4_TrackID
 
Float_t fGoodBPROFEXT_x
 
Float_t fGoodBPROFEXT_y
 
Float_t fGoodBPROFEXT_z
 
Float_t fGoodBPROFEXT_t
 
Float_t fGoodBPROFEXT_Px
 
Float_t fGoodBPROFEXT_Py
 
Float_t fGoodBPROFEXT_Pz
 
Float_t fGoodBPROFEXT_PDGid
 
Float_t fGoodBPROFEXT_EventID
 
Float_t fGoodBPROFEXT_TrackID
 
TTree * fRecoTree
 
float fXBPF697_x
 
float fXBPF701_x
 
float fXBPF702_x
 
float fXBPF697_rx
 
float fXBPF701_rx
 
float fXBPF702_rx
 
float fXBPF697_p
 
float fXBPF701_p
 
float fXBPF702_p
 
float fXBPF697_f
 
float fXBPF701_f
 
float fXBPF702_f
 
float fReco_p
 
float fReco_tof
 
int fNP04_PDG
 
float fNP04front_p
 
float fXBPF716_x
 
float fXBPF717_y
 
float fXBPF707_x
 
float fXBPF708_y
 
float fXBPF716_rx
 
float fXBPF717_ry
 
float fXBPF707_rx
 
float fXBPF708_ry
 
float fXBPF716_f
 
float fXBPF717_f
 
float fXBPF707_f
 
float fXBPF708_f
 
float fTrueFront_x
 
float fTrueFront_y
 
float fTrueFront_z
 
float fTrueFront_Px
 
float fTrueFront_Py
 
float fTrueFront_Pz
 
float fRecoFront_x
 
float fRecoFront_y
 
float fRecoFront_z
 
float fX
 
float fY
 
float fZ
 
float fPx
 
float fPy
 
float fPz
 
float fPDG
 
int fTrueID
 
float fAllEventID
 
float fAllTrackID
 
float fAllParentID
 
float fEntryT
 
float fBeamX
 
float fBeamY
 
float fBeamZ
 
float fBeamThetaShift
 
float fBeamPhiShift
 
float fRotateXZ
 
float fRotateYZ
 
float fRotateMonitorXZ
 
float fRotateMonitorYZ
 
TVector3 fBMBasisX
 
TVector3 fBMBasisY
 
TVector3 fBMBasisZ
 
float fBPROFEXTPos
 
float fBPROF4Pos
 
float fNP04frontPos
 
float fIntensity
 
float fReadoutWindow
 
float fBeamSpillLength
 
float fT_Resolution
 
float fPos_Resolution
 
float fCh_Efficiency
 
float fLB
 
float fL1
 
float fL2
 
float fL3
 
float fBeamBend
 
float fLMag
 
float fNominalP
 
float fB
 
bool fSaveRecoTree
 
int fOverlays
 
ifdh_ns::ifdh * fIFDH
 

Additional Inherited Members

- Public Types inherited from art::EDProducer
using ModuleType = EDProducer
 
using WorkerType = WorkerT< EDProducer >
 
- Public Types inherited from art::detail::Producer
template<typename UserConfig , typename KeysToIgnore = void>
using Table = Modifier::Table< UserConfig, KeysToIgnore >
 
- Public Types inherited from art::Modifier
template<typename UserConfig , typename UserKeysToIgnore = void>
using Table = ProducerTable< UserConfig, detail::ModuleConfig, UserKeysToIgnore >
 
- Static Public Member Functions inherited from art::EDProducer
static void commitEvent (EventPrincipal &ep, Event &e)
 
- Protected Member Functions inherited from art::ModuleBase
ConsumesCollectorconsumesCollector ()
 
template<typename T , BranchType = InEvent>
ProductToken< T > consumes (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< T > mayConsume (InputTag const &)
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > mayConsumeView (InputTag const &)
 
template<typename T , BranchType = InEvent>
void mayConsumeMany ()
 

Detailed Description

Definition at line 69 of file ProtoDUNEBeam_module.cc.

Constructor & Destructor Documentation

evgen::ProtoDUNEBeam::ProtoDUNEBeam ( fhicl::ParameterSet const &  p)
explicit

Definition at line 422 of file ProtoDUNEBeam_module.cc.

423  : EDProducer{pset}
424  // now create the engine (for example, use art); seed will be set
425  // by calling declareEngine
426  , fFlatRnd(createEngine(art::ServiceHandle<rndm::NuRandomService>{}->declareEngine(instanceName),
427  "HepJamesRandom", instanceName))
428 {
429  // Call appropriate produces<>() functions here.
430  produces< std::vector<simb::MCTruth> >();
431  produces<std::vector<sim::ProtoDUNEbeamsim>>();
432  produces< sumdata::RunData, art::InRun >();
433  produces< std::vector< beam::ProtoDUNEBeamEvent > >();
434  //produces< art::Assns<sim::ProtoDUNEbeamsim, simb::MCTruth>>();
435  // File reading variable initialisations
436  fFileName = pset.get< std::string>("FileName");
437  fGoodParticleTreeName = pset.get< std::string>("GoodParticleTreeName");
438  fAllParticlesTreeName = pset.get< std::string>("AllParticlesTreeName");
439  std::cout << "All particles tree name = " << fAllParticlesTreeName << std::endl;
440  // Intensity variables
441  fIntensity = pset.get<float>("Intensity");
442  fReadoutWindow = pset.get<float>("ReadoutWindow");
443  fBeamSpillLength = pset.get<float>("BeamSpillLength");
444 
445 // Beam monitors resolutions
446  fT_Resolution = pset.get<float>("T_Resolution");
447  fPos_Resolution = pset.get<float>("Pos_Resolution");
448  fCh_Efficiency = pset.get<float>("Ch_Efficiency");
449 
450  // See if the user wants to start at an event other than zero.
451  fStartEvent = pset.get<int>("StartEvent");
452 
453  // Or maybe there was --nskip specified in the command line or skipEvents in FHiCL?
454  for (auto const & p : fhicl::ParameterSetRegistry::get())
455  {
456  auto const& ps = p.second;
457  if (ps.has_key("source") && ps.has_key("source.skipEvents"))
458  {
459  fStartEvent += ps.get<int>("source.skipEvents");
460  break; // take the first occurence
461  } // no "else", if parameter not found, then just don't change anything
462  }
463  // ...and if there is -e option or firstEvent in FHiCL, this add up to the no. of events to skip.
464  for (auto const & p : fhicl::ParameterSetRegistry::get())
465  {
466  auto const& ps = p.second;
467  if (ps.has_key("source") && ps.has_key("source.firstEvent"))
468  {
469  int fe = ps.get<int>("source.firstEvent") - 1; // events base index is 1
470  if (fe > 0) fStartEvent += fe;
471  break; // take the first occurence
472  } // no "else", if parameter not found, then just don't change anything
473  }
474  mf::LogInfo("ProtoDUNEBeam") << "Skip " << fStartEvent << " first events from the input file.";
475 
476  fEventNumber = 0;
477 
478  // Coordinate transform
479  fBeamX = pset.get<float>("BeamX");
480  fBeamY = pset.get<float>("BeamY");
481  fBeamZ = pset.get<float>("BeamZ");
482  fBeamThetaShift = pset.get<float>("BeamThetaShift",0.0);
483  fBeamPhiShift = pset.get<float>("BeamPhiShift",0.0);
484  fRotateXZ = pset.get<float>("RotateXZ"); // Only use rotation if the above aren't defined
485  fRotateYZ = pset.get<float>("RotateYZ");
486 
487  fRotateMonitorXZ = pset.get<float>("RotateMonitorXZ");
488  fRotateMonitorYZ = pset.get<float>("RotateMonitorYZ");
489  fBPROFEXTPos = pset.get<float>("BPROFEXTPosZ");
490  fBPROF4Pos = pset.get<float>("BPROF4PosZ");
491  fNP04frontPos = pset.get<float>("NP04frontPosZ");
492  // Setup the beam monitor basis vectors
494 
495  // Initialise the input file and tree to be null.
496  fInputFile = 0x0;
497  fGoodParticleTree = 0x0;
498  fAllParticlesTree = 0x0;
499  fIFDH = 0;
500 
501  fCurrentGoodEvent = 0;
502 
503  // For momentum spectrometer
504 /*
505  fCurrent = pset.get<float>("Current");
506  fMagP1 = pset.get<float>("MagP1");
507  fMagP3 = pset.get<float>("MagP3");
508  fMagP4 = pset.get<float>("MagP4");
509 */
510  fL1 = pset.get<float>("L1");
511  fL2 = pset.get<float>("L2");
512  fL3 = pset.get<float>("L3");
513  fBeamBend = pset.get<float>("BeamBend");
514 
515  //New values for momentum spectrometer
516  fLMag = pset.get<float>("LMag");
517  fB = pset.get<float>("B");
518  fNominalP = pset.get<float>("NominalP");
519 
520 
521 /*
522  fLB = fMagP1*fabs(fCurrent);
523  float deltaI = fabs(fCurrent) - fMagP4;
524  if(deltaI>0) fLB += fMagP3*deltaI*deltaI;
525 
526  std::cout << "Old LB: " << fLB << std::endl;
527 */
528  fLB = fB * fLMag * fNominalP / 7.;
529 // std::cout << "New LB: " << fLB << std::endl;
530 
531  fSaveRecoTree = pset.get<bool>("SaveRecoTree");
532 
533 
534  // Make sure we use ifdh to open the beam input file.
535  OpenInputFile();
536 }
base_engine_t & createEngine(seed_t seed)
std::string string
Definition: nybbler.cc:12
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
EDProducer(fhicl::ParameterSet const &pset)
Definition: EDProducer.h:20
static collection_type const & get() noexcept
p
Definition: test.py:223
static constexpr double ps
Definition: Units.h:99
QTextStream & endl(QTextStream &s)
evgen::ProtoDUNEBeam::~ProtoDUNEBeam ( )

Definition at line 542 of file ProtoDUNEBeam_module.cc.

543 {
544  fIFDH->cleanup();
545 
546 }
evgen::ProtoDUNEBeam::ProtoDUNEBeam ( ProtoDUNEBeam const &  )
delete
evgen::ProtoDUNEBeam::ProtoDUNEBeam ( ProtoDUNEBeam &&  )
delete

Member Function Documentation

void evgen::ProtoDUNEBeam::BeamMonitorBasisVectors ( )
private

Definition at line 1293 of file ProtoDUNEBeam_module.cc.

1293  {
1294 
1295  fBMBasisX = TVector3(1.,0.,0.);
1296  fBMBasisY = TVector3(0.,1.,0.);
1297  fBMBasisZ = TVector3(0.,0.,1.);
1301 
1302 }
void RotateMonitorVector(TVector3 &vec)
void evgen::ProtoDUNEBeam::beginJob ( )
overridevirtual

Reimplemented from art::EDProducer.

Definition at line 549 of file ProtoDUNEBeam_module.cc.

549  {
550 
552 
553  fInputFile = new TFile(fFileName.c_str(),"READ");
554  // Check we have the file
555  if(fInputFile == 0x0){
556  throw cet::exception("ProtoDUNEBeam") << "Input file " << fFileName << " cannot be read.\n";
557  }
558 
559  fGoodParticleTree = (TTree*)fInputFile->Get(fGoodParticleTreeName.c_str());
560  // Check we have the tree
561  if(fGoodParticleTree == 0x0){
562  throw cet::exception("ProtoDUNEBeam") << "Input tree " << fGoodParticleTreeName << " cannot be read.\n";
563  }
564 
565  fAllParticlesTree = (TTree*)fInputFile->Get(fAllParticlesTreeName.c_str());
566  // Check we have the tree
567  if(fAllParticlesTree == 0x0){
568  throw cet::exception("ProtoDUNEBeam") << "Input tree " << fAllParticlesTreeName << " cannot be read.\n";
569  }
570  std::cout << "All particle tree " << fAllParticlesTreeName << " has " << fAllParticlesTree->GetEntries() << " entries" << std::endl;
571 
572  // We need different bits of information for different particles.
573  // The GoodParticles should be fired from the detector front (NP04front)
574  // Background particles should be fired from the first monitor after the final bending magnet in order
575  // to ensure those that should hit the CRT will do so (BPROFEXT)
576 
577  // Since this is technically an ntuple, all objects are floats
578  // Position four-vector components
579  fAllParticlesTree->SetBranchAddress("x",&fX);
580  fAllParticlesTree->SetBranchAddress("y",&fY);
581  fAllParticlesTree->SetBranchAddress("z",&fZ);
582  fAllParticlesTree->SetBranchAddress("t",&fEntryT);
583  // Momentum components
584  fAllParticlesTree->SetBranchAddress("Px",&fPx);
585  fAllParticlesTree->SetBranchAddress("Py",&fPy);
586  fAllParticlesTree->SetBranchAddress("Pz",&fPz);
587  // PDG code
588  fAllParticlesTree->SetBranchAddress("PDGid",&fPDG);
589  // Event and track number
590  fAllParticlesTree->SetBranchAddress("EventID",&fAllEventID);
591  fAllParticlesTree->SetBranchAddress("TrackID",&fAllTrackID);
592  fAllParticlesTree->SetBranchAddress("ParentID", &fAllParentID);
593 
594  // We only need the trigger time and event number from the good particle tree.
595  // The good particle tree variable should match the names of the other trees
596  std::string namePrefix = fAllParticlesTreeName.substr(fAllParticlesTreeName.find_last_of("\\/")+1,std::string::npos);
597 
598  std::cout << "Name prefix for good particle tree = " << namePrefix << std::endl;
599 
600 // fGoodParticleTree->SetBranchAddress((namePrefix+"_EventID").c_str(),&fBeamEvent);
601 // fGoodParticleTree->SetBranchAddress((namePrefix+"_TrackID").c_str(),&fTrackID);
602 
603  ////////************added by Caroline for beam simulation storage for good particles ***************//////////////
604  fGoodParticleTree->SetBranchAddress("NP04front_x",&fGoodNP04front_x);
605  fGoodParticleTree->SetBranchAddress("NP04front_y",&fGoodNP04front_y);
606  fGoodParticleTree->SetBranchAddress("NP04front_z",&fGoodNP04front_z);
607  fGoodParticleTree->SetBranchAddress("NP04front_t",&fGoodNP04front_t);
608  fGoodParticleTree->SetBranchAddress("NP04front_Px",&fGoodNP04front_Px);
609  fGoodParticleTree->SetBranchAddress("NP04front_Py",&fGoodNP04front_Py);
610  fGoodParticleTree->SetBranchAddress("NP04front_Pz",&fGoodNP04front_Pz);
611  fGoodParticleTree->SetBranchAddress("NP04front_PDGid",&fGoodNP04front_PDGid);
612  fGoodParticleTree->SetBranchAddress("NP04front_EventID",&fGoodNP04front_EventID);
613  fGoodParticleTree->SetBranchAddress("NP04front_TrackID",&fGoodNP04front_TrackID);
614 
615  // add more lines for the TOF part
616  fGoodParticleTree->SetBranchAddress("TOF1_x",&fGoodTOF1_x);
617  fGoodParticleTree->SetBranchAddress("TOF1_y",&fGoodTOF1_y);
618  fGoodParticleTree->SetBranchAddress("TOF1_z",&fGoodTOF1_z);
619  fGoodParticleTree->SetBranchAddress("TOF1_t",&fGoodTOF1_t);
620  fGoodParticleTree->SetBranchAddress("TOF1_Px",&fGoodTOF1_Px);
621  fGoodParticleTree->SetBranchAddress("TOF1_Py",&fGoodTOF1_Py);
622  fGoodParticleTree->SetBranchAddress("TOF1_Pz",&fGoodTOF1_Pz);
623  fGoodParticleTree->SetBranchAddress("TOF1_PDGid",&fGoodTOF1_PDGid);
624  fGoodParticleTree->SetBranchAddress("TOF1_EventID",&fGoodTOF1_EventID);
625  fGoodParticleTree->SetBranchAddress("TOF1_TrackID",&fGoodTOF1_TrackID);
626 
627  // add more lines for the TRIG part
628  fGoodParticleTree->SetBranchAddress("TRIG1_x",&fGoodTRIG2_x);
629  fGoodParticleTree->SetBranchAddress("TRIG1_y",&fGoodTRIG2_y);
630  fGoodParticleTree->SetBranchAddress("TRIG1_z",&fGoodTRIG2_z);
631  fGoodParticleTree->SetBranchAddress("TRIG1_t",&fGoodTRIG2_t);
632  fGoodParticleTree->SetBranchAddress("TRIG1_Px",&fGoodTRIG2_Px);
633  fGoodParticleTree->SetBranchAddress("TRIG1_Py",&fGoodTRIG2_Py);
634  fGoodParticleTree->SetBranchAddress("TRIG1_Pz",&fGoodTRIG2_Pz);
635  fGoodParticleTree->SetBranchAddress("TRIG1_PDGid",&fGoodTRIG2_PDGid);
636  fGoodParticleTree->SetBranchAddress("TRIG1_EventID",&fGoodTRIG2_EventID);
637  fGoodParticleTree->SetBranchAddress("TRIG1_TrackID",&fGoodTRIG2_TrackID);
638 
639  fGoodParticleTree->SetBranchAddress("TRIG2_x",&fGoodTRIG2_x);
640  fGoodParticleTree->SetBranchAddress("TRIG2_y",&fGoodTRIG2_y);
641  fGoodParticleTree->SetBranchAddress("TRIG2_z",&fGoodTRIG2_z);
642  fGoodParticleTree->SetBranchAddress("TRIG2_t",&fGoodTRIG2_t);
643  fGoodParticleTree->SetBranchAddress("TRIG2_Px",&fGoodTRIG2_Px);
644  fGoodParticleTree->SetBranchAddress("TRIG2_Py",&fGoodTRIG2_Py);
645  fGoodParticleTree->SetBranchAddress("TRIG2_Pz",&fGoodTRIG2_Pz);
646  fGoodParticleTree->SetBranchAddress("TRIG2_PDGid",&fGoodTRIG2_PDGid);
647  fGoodParticleTree->SetBranchAddress("TRIG2_EventID",&fGoodTRIG2_EventID);
648  fGoodParticleTree->SetBranchAddress("TRIG2_TrackID",&fGoodTRIG2_TrackID);
649 
650  //add more lines for the BPROF part
651  fGoodParticleTree->SetBranchAddress("BPROF1_x",&fGoodBPROF1_x);
652  fGoodParticleTree->SetBranchAddress("BPROF1_y",&fGoodBPROF1_y);
653  fGoodParticleTree->SetBranchAddress("BPROF1_z",&fGoodBPROF1_z);
654  fGoodParticleTree->SetBranchAddress("BPROF1_t",&fGoodBPROF1_t);
655  fGoodParticleTree->SetBranchAddress("BPROF1_Px",&fGoodBPROF1_Px);
656  fGoodParticleTree->SetBranchAddress("BPROF1_Py",&fGoodBPROF1_Py);
657  fGoodParticleTree->SetBranchAddress("BPROF1_Pz",&fGoodBPROF1_Pz);
658  fGoodParticleTree->SetBranchAddress("BPROF1_PDGid",&fGoodBPROF1_PDGid);
659  fGoodParticleTree->SetBranchAddress("BPROF1_EventID",&fGoodBPROF1_EventID);
660  fGoodParticleTree->SetBranchAddress("BPROF1_TrackID",&fGoodBPROF1_TrackID);
661 
662  fGoodParticleTree->SetBranchAddress("BPROF2_x",&fGoodBPROF2_x);
663  fGoodParticleTree->SetBranchAddress("BPROF2_y",&fGoodBPROF2_y);
664  fGoodParticleTree->SetBranchAddress("BPROF2_z",&fGoodBPROF2_z);
665  fGoodParticleTree->SetBranchAddress("BPROF2_t",&fGoodBPROF2_t);
666  fGoodParticleTree->SetBranchAddress("BPROF2_Px",&fGoodBPROF2_Px);
667  fGoodParticleTree->SetBranchAddress("BPROF2_Py",&fGoodBPROF2_Py);
668  fGoodParticleTree->SetBranchAddress("BPROF2_Pz",&fGoodBPROF2_Pz);
669  fGoodParticleTree->SetBranchAddress("BPROF2_PDGid",&fGoodBPROF2_PDGid);
670  fGoodParticleTree->SetBranchAddress("BPROF2_EventID",&fGoodBPROF2_EventID);
671  fGoodParticleTree->SetBranchAddress("BPROF2_TrackID",&fGoodBPROF2_TrackID);
672 
673  fGoodParticleTree->SetBranchAddress("BPROF3_x",&fGoodBPROF3_x);
674  fGoodParticleTree->SetBranchAddress("BPROF3_y",&fGoodBPROF3_y);
675  fGoodParticleTree->SetBranchAddress("BPROF3_z",&fGoodBPROF3_z);
676  fGoodParticleTree->SetBranchAddress("BPROF3_t",&fGoodBPROF3_t);
677  fGoodParticleTree->SetBranchAddress("BPROF3_Px",&fGoodBPROF3_Px);
678  fGoodParticleTree->SetBranchAddress("BPROF3_Py",&fGoodBPROF3_Py);
679  fGoodParticleTree->SetBranchAddress("BPROF3_Pz",&fGoodBPROF3_Pz);
680  fGoodParticleTree->SetBranchAddress("BPROF3_PDGid",&fGoodBPROF3_PDGid);
681  fGoodParticleTree->SetBranchAddress("BPROF3_EventID",&fGoodBPROF3_EventID);
682  fGoodParticleTree->SetBranchAddress("BPROF3_TrackID",&fGoodBPROF3_TrackID);
683 
684  fGoodParticleTree->SetBranchAddress("BPROF4_x",&fGoodBPROF4_x);
685  fGoodParticleTree->SetBranchAddress("BPROF4_y",&fGoodBPROF4_y);
686  fGoodParticleTree->SetBranchAddress("BPROF4_z",&fGoodBPROF4_z);
687  fGoodParticleTree->SetBranchAddress("BPROF4_t",&fGoodBPROF4_t);
688  fGoodParticleTree->SetBranchAddress("BPROF4_Px",&fGoodBPROF4_Px);
689  fGoodParticleTree->SetBranchAddress("BPROF4_Py",&fGoodBPROF4_Py);
690  fGoodParticleTree->SetBranchAddress("BPROF4_Pz",&fGoodBPROF4_Pz);
691  fGoodParticleTree->SetBranchAddress("BPROF4_PDGid",&fGoodBPROF4_PDGid);
692  fGoodParticleTree->SetBranchAddress("BPROF4_EventID",&fGoodBPROF4_EventID);
693  fGoodParticleTree->SetBranchAddress("BPROF4_TrackID",&fGoodBPROF4_TrackID);
694 
695  fGoodParticleTree->SetBranchAddress("BPROFEXT_x",&fGoodBPROFEXT_x);
696  fGoodParticleTree->SetBranchAddress("BPROFEXT_y",&fGoodBPROFEXT_y);
697  fGoodParticleTree->SetBranchAddress("BPROFEXT_z",&fGoodBPROFEXT_z);
698  fGoodParticleTree->SetBranchAddress("BPROFEXT_t",&fGoodBPROFEXT_t);
699  fGoodParticleTree->SetBranchAddress("BPROFEXT_Px",&fGoodBPROFEXT_Px);
700  fGoodParticleTree->SetBranchAddress("BPROFEXT_Py",&fGoodBPROFEXT_Py);
701  fGoodParticleTree->SetBranchAddress("BPROFEXT_Pz",&fGoodBPROFEXT_Pz);
702  fGoodParticleTree->SetBranchAddress("BPROFEXT_PDGid",&fGoodBPROFEXT_PDGid);
703  fGoodParticleTree->SetBranchAddress("BPROFEXT_EventID",&fGoodBPROFEXT_EventID);
704  fGoodParticleTree->SetBranchAddress("BPROFEXT_TrackID",&fGoodBPROFEXT_TrackID);
705 
706  // Calculate the number of events to overlay
708 
709  // Now we need to fill the particle map
711 
712 
713  if( fSaveRecoTree ){
714  fRecoTree = tfs->make<TTree>("tree", "");
715  fRecoTree->Branch( "XBPF697_p", &fXBPF697_p );
716  fRecoTree->Branch( "XBPF701_p", &fXBPF701_p );
717  fRecoTree->Branch( "XBPF702_p", &fXBPF702_p );
718 
719  fRecoTree->Branch( "XBPF697_f", &fXBPF697_f );
720  fRecoTree->Branch( "XBPF701_f", &fXBPF701_f );
721  fRecoTree->Branch( "XBPF702_f", &fXBPF702_f );
722 
723  fRecoTree->Branch( "XBPF697_x", &fXBPF697_x );
724  fRecoTree->Branch( "XBPF701_x", &fXBPF701_x );
725  fRecoTree->Branch( "XBPF702_x", &fXBPF702_x );
726 
727  fRecoTree->Branch( "XBPF697_rx", &fXBPF697_rx );
728  fRecoTree->Branch( "XBPF701_rx", &fXBPF701_rx );
729  fRecoTree->Branch( "XBPF702_rx", &fXBPF702_rx );
730 
731  fRecoTree->Branch( "Reco_p", &fReco_p );
732  fRecoTree->Branch( "Reco_tof", &fReco_tof );
733  fRecoTree->Branch( "NP04front_p", &fNP04front_p );
734 
735  fRecoTree->Branch( "NP04_PDG", &fNP04_PDG );
736 
737  fRecoTree->Branch( "XBPF707_x", &fXBPF707_x );
738  fRecoTree->Branch( "XBPF707_f", &fXBPF707_f );
739  fRecoTree->Branch( "XBPF708_y", &fXBPF708_y );
740  fRecoTree->Branch( "XBPF708_f", &fXBPF708_f );
741  fRecoTree->Branch( "XBPF716_x", &fXBPF716_x );
742  fRecoTree->Branch( "XBPF716_f", &fXBPF716_f );
743  fRecoTree->Branch( "XBPF717_y", &fXBPF717_y );
744  fRecoTree->Branch( "XBPF717_f", &fXBPF717_f );
745 
746  fRecoTree->Branch( "XBPF707_rx", &fXBPF707_rx );
747  fRecoTree->Branch( "XBPF708_ry", &fXBPF708_ry );
748  fRecoTree->Branch( "XBPF716_rx", &fXBPF716_rx );
749  fRecoTree->Branch( "XBPF717_ry", &fXBPF717_ry );
750 
751  fRecoTree->Branch( "TrueFront_x", &fTrueFront_x );
752  fRecoTree->Branch( "TrueFront_y", &fTrueFront_y );
753  fRecoTree->Branch( "TrueFront_z", &fTrueFront_z );
754 
755  fRecoTree->Branch( "TrueFront_Px", &fTrueFront_Px );
756  fRecoTree->Branch( "TrueFront_Py", &fTrueFront_Py );
757  fRecoTree->Branch( "TrueFront_Pz", &fTrueFront_Pz );
758 
759  fRecoTree->Branch( "RecoFront_x", &fRecoFront_x );
760  fRecoTree->Branch( "RecoFront_y", &fRecoFront_y );
761  fRecoTree->Branch( "RecoFront_z", &fRecoFront_z );
762  fRecoTree->Branch("TrueID", &fTrueID);
763 
764  }
765 }
std::string string
Definition: nybbler.cc:12
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
QTextStream & endl(QTextStream &s)
void evgen::ProtoDUNEBeam::beginRun ( art::Run run)
overridevirtual

Reimplemented from art::EDProducer.

Definition at line 769 of file ProtoDUNEBeam_module.cc.

770 {
771  // Grab the geometry object to see what geometry we are using
773  std::unique_ptr<sumdata::RunData> runcol(new sumdata::RunData(geo->DetectorName()));
774  run.put(std::move(runcol));
775 }
std::string DetectorName() const
Returns a string with the name of the detector, as configured.
def move(depos, offset)
Definition: depos.py:107
ProductID put(std::unique_ptr< PROD > &&edp, std::string const &instance={})
Definition: DataViewImpl.h:686
LArSoft geometry interface.
Definition: ChannelGeo.h:16
void evgen::ProtoDUNEBeam::CalculateNOverlays ( )
private

Definition at line 1202 of file ProtoDUNEBeam_module.cc.

1202  {
1203 
1204  // The number of events to overlay is as follows:
1205  // N = Intensity * 2.0 * ReadoutWindow / BeamSpillLength
1206  fOverlays = fIntensity * (2.0 * fReadoutWindow / 1000.) / fBeamSpillLength;
1207  std::cout << "Number of overlays = " << fOverlays << std::endl;
1208 }
QTextStream & endl(QTextStream &s)
TLorentzVector evgen::ProtoDUNEBeam::ConvertBeamMonitorCoordinates ( float  x,
float  y,
float  z,
float  t,
float  offset 
)
private

Definition at line 1240 of file ProtoDUNEBeam_module.cc.

1240  {
1241 
1242  float off = fNP04frontPos - zOffset;
1243 
1244  TLorentzVector old(x,y,z,t);
1245 
1246  // Convert the coordinates using the rotated basis vectors
1247  float newX = x*fBMBasisX.X() + y*fBMBasisY.X() + (z-zOffset)*fBMBasisZ.X() + off*fabs(fBMBasisZ.X());
1248  float newY = x*fBMBasisX.Y() + y*fBMBasisY.Y() + (z-zOffset)*fBMBasisZ.Y() + off*fabs(fBMBasisZ.Y());
1249  float newZ = x*fBMBasisX.Z() + y*fBMBasisY.Z() + (z-zOffset) - off*fabs(fBMBasisZ.Z());
1250 
1251  // Account for the small differences between NP04front and the detector coordinates
1252  newX += fBeamX*10.;
1253  newY += fBeamY*10.;
1254  newZ += fBeamZ*10.;
1255 
1256  // Make our new beam monitor position in the detector coordinate system
1257  TLorentzVector result(newX,newY,newZ,t);
1258 
1259 // std::cout << "Coordinate transform..." << std::endl;
1260 // old.Print();
1261 // result.Print();
1262 
1263  return result;
1264 }
static QCString result
list x
Definition: train.py:276
TVector3 evgen::ProtoDUNEBeam::ConvertBeamMonitorMomentumVec ( float  px,
float  py,
float  pz 
)
private

Definition at line 1283 of file ProtoDUNEBeam_module.cc.

1283  {
1284 
1285  TVector3 newMom(px,py,pz);
1286 // std::cout << "Momentum transform..." << std::endl;
1287 // newMom.Unit().Print();
1288  RotateMonitorVector(newMom);
1289 // newMom.Unit().Print();
1290  return newMom;
1291 }
void RotateMonitorVector(TVector3 &vec)
TLorentzVector evgen::ProtoDUNEBeam::ConvertCoordinates ( float  x,
float  y,
float  z,
float  t 
)
private

Definition at line 1148 of file ProtoDUNEBeam_module.cc.

1148  {
1149 
1150  float finalX = x + fBeamX;
1151  float finalY = y + fBeamY;
1152 // float finalZ = (z - z) + fBeamZ; // Just use the z position
1153  float finalZ = z + fBeamZ; // Just use the z position
1154 
1155  TLorentzVector newPos(finalX,finalY,finalZ,t);
1156  return newPos;
1157 }
list x
Definition: train.py:276
TVector3 evgen::ProtoDUNEBeam::ConvertProfCoordinates ( double  x,
double  y,
double  z,
double  zOffset 
)
private

Definition at line 1266 of file ProtoDUNEBeam_module.cc.

1266  {
1267  double off = fNP04frontPos - zOffset;
1268 
1269  TVector3 old(x,y,z);
1270 
1271  double newX = x*fBMBasisX.X() + y*fBMBasisY.X() + /*(z-zOffset)*fBMBasisZ.X()*/ + off*fabs(fBMBasisZ.X());
1272  double newY = x*fBMBasisX.Y() + y*fBMBasisY.Y() + /*(z-zOffset)*fBMBasisZ.Y()*/ + off*fabs(fBMBasisZ.Y());
1273  double newZ = x*fBMBasisX.Z() + y*fBMBasisY.Z() + /*(z-zOffset) */ - off*fabs(fBMBasisZ.Z());
1274 
1275  newX += fBeamX*10.;
1276  newY += fBeamY*10.;
1277  newZ += fBeamZ*10.;
1278 
1279  TVector3 result(newX/10., newY/10., newZ/10.);
1280  return result;
1281 }
static QCString result
list x
Definition: train.py:276
void evgen::ProtoDUNEBeam::endJob ( )
overridevirtual

Reimplemented from art::EDProducer.

Definition at line 779 of file ProtoDUNEBeam_module.cc.

779  {
780  fInputFile->Close();
781 }
void evgen::ProtoDUNEBeam::FillParticleMaps ( )
private

Definition at line 821 of file ProtoDUNEBeam_module.cc.

821  {
822 
823  // First off, loop over the good particles tree.
824  int goodEventCounter = 0;
825  for(int i = 0; i < fGoodParticleTree->GetEntries(); ++i){
826  // If we want to skip some events, make sure we don't bother reading them in.
827  if(fStartEvent > goodEventCounter){
828  ++goodEventCounter;
829  continue;
830  }
831  else{
832  ++goodEventCounter;
833  }
834 
835  fGoodParticleTree->GetEntry(i);
836 
837 // std::cout << "Tree entry " << i << " corresponds to event " << fGoodBPROFEXT_EventID << std::endl;
838 
839  // Make sure we didn't have two good particles in one event
840  if(std::find(fGoodEventList.begin(),fGoodEventList.end(),(int)fGoodBPROFEXT_EventID)!=fGoodEventList.end()) continue;
841 
842  // NEW APPROACH - construct a ProtoFullSpill object
844  fAllSpills.push_back(newSpill);
845 
847 
848  }
849 
850  // Print a message in case a user starts thinking something has broken.
851  mf::LogInfo("ProtoDUNEBeam") << "About to loop over the beam simulation tree, this could take some time.";
852 
853  // Now we need to loop over the main particle tree
854  for(int i = 0; i < fAllParticlesTree->GetEntries(); ++i){
855  fAllParticlesTree->GetEntry(i);
856 
857  if (i%100000==0) std::cout << "Looking at entry " << i << std::endl;
858 
859  int event = int(fAllEventID);
860 
861  // Look at which good events this should be overlaid with
862  std::vector<int> goodEventList = GetAllOverlays(event,fOverlays);
863 
864  unsigned int nMatches = 0;
865  for(auto &spill : fAllSpills){
866  // Stop looking if we have found all of our matches
867  if(nMatches == goodEventList.size()) break;
868 
869  // Is this a spill of interest?
870  if(std::find(goodEventList.begin(),goodEventList.end(),spill.fGoodEvent) == goodEventList.end()) continue;
871 
872  // Yes, so add this track to the spill
873  spill.fAllSpillTracks[event].push_back(i);
874  ++nMatches;
875  }
876 
877  } // End loop over the main tree.
878 
879  mf::LogInfo("ProtoDUNEBeam") << "Found " << fGoodEventList.size() << " good events containing " << goodEventCounter << " good particles.";
880  mf::LogInfo("ProtoDUNEBeam") << "Built " << fAllSpills.size() << " beam spills.";
881  mf::LogInfo("ProtoDUNEBeam") << "All maps built, beginning event generation.";
882 
883 }
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
std::vector< int > GetAllOverlays(int event, int nOverlay)
std::vector< int > fGoodEventList
std::vector< ProtoFullSpill > fAllSpills
QTextStream & endl(QTextStream &s)
Event finding and building.
void evgen::ProtoDUNEBeam::GenerateTrueEvent ( simb::MCTruth mcTruth,
std::vector< sim::ProtoDUNEbeamsim > &  beamsimcol,
beam::ProtoDUNEBeamEvent beamEvent 
)
private

Definition at line 889 of file ProtoDUNEBeam_module.cc.

889  {
890  // std::unique_ptr<std::vector<sim::ProtoDUNEbeamsim>> beamsimcol
891  // Check we haven't exceeded the length of the input tree
892  if(fEventNumber >= (int)fGoodEventList.size()){
893  throw cet::exception("ProtoDUNEBeam") << "Requested entry " << fEventNumber
894  << " but tree only has entries 0 to "
895  << fGoodEventList.size() - 1 << std::endl;
896  } //end of if statement
897 
898  size_t nBeamEvents = 0;
899 
900  // Get the list of entries for the current event
901 // int beamEvent = fGoodEventList[fCurrentGoodEvent];
902 
903  // A single particle seems the most accurate description.
905 
906  // NEW APPROACH
907  ProtoFullSpill spill = fAllSpills[fCurrentGoodEvent];
908 // std::cout << "This spill has " << spill.fAllSpillTracks.size() << " contributing events" << std::endl;
909 
910  // Find the entries that we are interested in.
911  //std::cout << "Finding all particles associated with good particle event " << std::endl;
912  for(auto const & event : spill.fAllSpillTracks){
913 
914  //std::cout << " - This event has " << event.second.size() << " contributing tracks" << std::endl;
915 
916  // Is this the event we would have triggered on?
917  bool trigEvent = (event.first == spill.fGoodEvent);
918  float baseTime;
919  if(trigEvent){
920  // Set the base time for the triggered event equal to the negative of the good particle time.
921  // This will be corrected later on to set the time to zero, but keep time offsets within the event.
922  baseTime = -1.0 * spill.fGoodTime;
923  }
924  else{
925  // Get a random time from -fReadoutWindow to +fReadoutWindow in ns (fReadoutWindow value is in ms).
926  baseTime = (fFlatRnd.fire() - 0.5)*2.0*(fReadoutWindow*1000.*1000.);
927  }
928  for(auto const t : event.second){
929  // Get the entry from the tree for this event and track.
930  fAllParticlesTree->GetEntry(t);
931 
932  //std::cout << fAllEventID << ", " << fAllTrackID << ", " << spill.fGoodEvent << ", " << spill.fGoodTrack << std::endl;
933 
934  // Convert the pdgCode to an int
935  int intPDG = (int)fPDG;
936  // We need to ignore nuclei for now...
937  if(intPDG > 100000){
938  //std::cout << "Skipping nuc" << std::endl;
939  continue;
940  }
941 
942  // Check to see if this should be a primary beam particle (good particle) or beam background
943  std::string process="primaryBackground";
944 
945  TLorentzVector pos;
946  TLorentzVector mom;
947  // If this track is a "good particle", use the usual "primary" tag
948  /*
949  std::cout << "Trig: " << trigEvent << std::endl;
950  std::cout << "SpillGoodEvent: " << spill.fGoodEvent << std::endl;
951  std::cout << "SpillTrack: " << spill.fGoodTrack << std::endl;
952  std::cout << "AllTrack: " << (int)fAllTrackID << std::endl;
953  std::cout << "t: " << t << std::endl;
954  */
955  if(trigEvent && (spill.fGoodTrack == (int)fAllTrackID)){
956  process="primary";
957  // We also need to build the momentum vector using the correct good particle information
958  fGoodParticleTree->GetEntry(spill.fGoodIndex);
961  if (fSaveRecoTree) {
962  fTrueFront_x = pos.X();
963  fTrueFront_y = pos.Y();
964  fTrueFront_z = pos.Z();
965 
966  fTrueFront_Px = mom.X();
967  fTrueFront_Py = mom.Y();
968  fTrueFront_Pz = mom.Z();
969  }
970 
971  SetBeamEvent(beamEvent);
972  ++nBeamEvents;
973  }
974  else{
975  // We just need to shift our background particles upstream to BPROFEXT so they will hit the CRTs
976  TVector3 tempPos = GetBackgroundPosition(fX,fY,fZ,fPx,fPy,fPz);
977  // At this step the position and momentum matches the GoodPartcle coordinates so apply the same functions
978  pos = ConvertCoordinates(tempPos.X()/10.,tempPos.Y()/10.,tempPos.Z()/10.,baseTime+fEntryT);
979  mom = MakeMomentumVector(fPx/1000.,fPy/1000.,fPz/1000.,intPDG,false);
980  fGoodParticleTree->GetEntry(spill.fGoodIndex);
981  std::cout << "SpillGoodTrack: " << spill.fGoodTrack << " " << (int)fGoodNP04front_PDGid << std::endl;
982  std::cout << "ParentID: " << (int)fAllParentID << " " << (int)fPDG << std::endl;
983  std::cout << "TrackID: " << (int)fAllTrackID<< std::endl;
984  std::cout << "GoodEvent: " << spill.fGoodEvent << std::endl;
985 // if(fabs(intPDG) == 13){
986 // std::cout << "Found a " << process << " muon at time = " << baseTime+fEntryT << ":" << std::endl;
987 // std::cout << fX/10. << ", " << fY/10. << ", " << fZ/10. << std::endl;
988 // pos.Print();
989 // mom.Vect().Unit().Print();
990 // }
991  }
992 
993 // std::cout << "Information for particle " << intPDG << " with process " << process << std::endl;
994 // pos.Print();
995 // mom.Print();
996 // mom.Vect().Unit().Print();
997 
998  // Track ID needs to be negative for primaries
999  int trackID = -1*(mcTruth.NParticles() + 1); //g4trkid in larsoft
1000  if (fSaveRecoTree)
1001  fTrueID = trackID;
1002 
1003  // Create the particle and add the starting position and momentum
1004  //std::cout << "Adding particle with process " << process
1005  // << " and PDG " << intPDG << std::endl;
1006  simb::MCParticle newParticle(trackID,intPDG,process);
1007  newParticle.AddTrajectoryPoint(pos,mom);
1008 
1009  // Add the MCParticle to the MCTruth for the event.
1010  mcTruth.Add(newParticle);
1011 
1012  // We want to save extra information from the beam monitors for the Good Particle
1013  if(trigEvent && (spill.fGoodTrack == (int)fAllTrackID)){
1014 
1015  fGoodParticleTree->GetEntry(spill.fGoodIndex);
1016 
1019 
1020  // For BPROF4 we want to rotate the coordinates into the detector frame
1023  sim::ProtoDUNEBeamInstrument bprof4("BPROF4",bprof4Pos.X(),bprof4Pos.Y(),bprof4Pos.Z(),fGoodBPROF4_t,bprof4Mom.X(),bprof4Mom.Y(),bprof4Mom.Z(),fGoodBPROF4_PDGid,fGoodBPROF4_EventID,fGoodBPROF4_TrackID,fPos_Resolution);
1024 
1025  // Same for BPROFEXT
1028  sim::ProtoDUNEBeamInstrument bprofext("BPROFEXT",bprofextPos.X(),bprofextPos.Y(),bprofextPos.Z(),fGoodBPROFEXT_t,bprofextMom.X(),bprofextMom.Y(),bprofextMom.Z(),fGoodBPROFEXT_PDGid,fGoodBPROFEXT_EventID,fGoodBPROFEXT_TrackID,fPos_Resolution);
1029 
1030 // std::cout << "Predicted detector position" << std::endl;
1031 // TVector3 predDir = (bprof4Pos.Vect()-bprofextPos.Vect()).Unit();
1032 // float projDist = (fNP04frontPos - fBPROF4Pos) + fabs(fBeamZ*10./fBMBasisZ.Z());
1033 // (bprof4Pos.Vect() + projDist*predDir).Print();
1034 
1039 
1040 // Adding Cherenkovs with same variables as BPROFEXT except for their response
1043 
1044 
1046  temp.AddInstrument(tof1);
1047  temp.AddInstrument(trig2);
1048  temp.AddInstrument(bprof4);
1049  temp.AddInstrument(bprofext);
1050  temp.AddInstrument(trig1);
1051  temp.AddInstrument(bprof3);
1052  temp.AddInstrument(bprof2);
1053  temp.AddInstrument(bprof1);
1054  temp.AddInstrument(cherenkov1);
1055  temp.AddInstrument(cherenkov2);
1056 
1057 // std::cout << "ProtoDUNEbeamsim object has " << temp.NInstruments() << " beam instruments" << std::endl;
1058 //std::cout << "TOF1 resolution: " << fT_Resolution << std::endl;
1059 
1060  beamsimcol.push_back(temp);
1061 // std::cout<< beamsimcol.size() << std::endl;
1062  // std::cout<<" test value beam profile monitor: TTREE "<<fGoodBPROF4_x<<std::endl;
1063 // std::cout<<"From TTree TRIG2_TRACKID: "<<fGoodTRIG2_TrackID<<std::endl;
1064 // std::cout<<"From ProtoDUNEBeamInstrument: "<<tof1.GetT()<<std::endl;
1065 // std::cout<<"From ProtoDUNEBeamInstrument: "<<tof1.GetSmearedVar1()<<std::endl;
1066 
1067 
1068  // std::cout<<"the testing for beam profile monitor information: "<<fGoodBPROF4_z<<std::endl;
1069 
1070 
1071 // std::cout<< "From the data product: TRIG2TRACKID: "<<temp.get_TRIG2_TrackID()<<std::endl;
1072  //check the last index of the vector
1073  sim::ProtoDUNEbeamsim lastelement = beamsimcol.back();
1074 
1075 // std::cout<<"From the vector TRIG2_TRACKID: "<<lastelement.get_TRIG2_TrackID()<<std::endl;
1076 
1077 
1078  //Make the assn
1079  //util::CreateAssn(*this, e, *beamsimcol, newParticle, *beamsimassn)
1080 
1081 
1082  } // End beam instrumentation section
1083 
1084  } // End loop over interesting tracks for each event
1085  } // End loop over the vector of interesting events
1086 
1087  mf::LogInfo("ProtoDUNEBeam") << "Got " << nBeamEvents << " beam events";
1088  mf::LogInfo("ProtoDUNEBeam") << "Created event with " << mcTruth.NParticles() << " particles.";
1089 
1090  // Move on the good event iterator
1092 }
void SetOrigin(simb::Origin_t origin)
Definition: MCTruth.h:82
std::string string
Definition: nybbler.cc:12
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
STL namespace.
int NParticles() const
Definition: MCTruth.h:75
def process(f, kind)
Definition: search.py:254
single particles thrown at the detector
Definition: MCTruth.h:26
std::vector< int > fGoodEventList
TVector3 GetBackgroundPosition(float x, float y, float z, float px, float py, float pz)
Base utilities and modules for event generation and detector simulation.
TLorentzVector ConvertBeamMonitorCoordinates(float x, float y, float z, float t, float offset)
std::vector< ProtoFullSpill > fAllSpills
if(!yymsg) yymsg
void SetBeamEvent(beam::ProtoDUNEBeamEvent &beamevt)
TLorentzVector ConvertCoordinates(float x, float y, float z, float t)
TVector3 ConvertBeamMonitorMomentumVec(float px, float py, float pz)
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
void AddInstrument(ProtoDUNEBeamInstrument newInst)
QTextStream & endl(QTextStream &s)
Event finding and building.
TLorentzVector MakeMomentumVector(float px, float py, float pz, int pdg, bool shifts)
std::vector< int > evgen::ProtoDUNEBeam::GetAllOverlays ( int  event,
int  nOverlay 
)
private

Definition at line 1225 of file ProtoDUNEBeam_module.cc.

1225  {
1226 
1227  std::vector<int> nMatches;
1228  for(auto const e : fGoodEventList){
1229  if(fabs(event - e) < nOverlay/2){
1230  nMatches.push_back(e);
1231  }
1232  }
1233  return nMatches;
1234 
1235 }
const double e
std::vector< int > fGoodEventList
Event finding and building.
TVector3 evgen::ProtoDUNEBeam::GetBackgroundPosition ( float  x,
float  y,
float  z,
float  px,
float  py,
float  pz 
)
private

Definition at line 1313 of file ProtoDUNEBeam_module.cc.

1313  {
1314 
1315  TVector3 pos(x,y,z);
1316  TVector3 dir = TVector3(px,py,pz).Unit();
1317 
1318  // Want to move the position upstream by a distance equal to fNP04frontPos - fBPROFEXTPos
1319  // This length is in the beam direction frame unless we account for it
1320  float shiftLength = (fNP04frontPos - fBPROFEXTPos)/fBMBasisZ.Z();
1321 
1322  return pos - shiftLength*dir;
1323 }
string dir
list x
Definition: train.py:276
double evgen::ProtoDUNEBeam::GetPosition ( short  fiber)
private

Definition at line 1444 of file ProtoDUNEBeam_module.cc.

1444  {
1445  return ((96 - fiber) - .5);
1446 }
int evgen::ProtoDUNEBeam::IsOverlayEvent ( int  event,
int  nOverlay 
)
private

Definition at line 1212 of file ProtoDUNEBeam_module.cc.

1212  {
1213 
1214  // Check if this event lies within nOverlay/2 of each
1215  for(auto const e : fGoodEventList){
1216  if(fabs(event - e) < nOverlay/2){
1217  return e;
1218  }
1219  }
1220  return -1;
1221 }
const double e
std::vector< int > fGoodEventList
Event finding and building.
beam::FBM evgen::ProtoDUNEBeam::MakeFiberMonitor ( float  pos)
private

Definition at line 1425 of file ProtoDUNEBeam_module.cc.

1425  {
1426  beam::FBM theFBM;
1427 
1428  //I should probably just make this into
1429  //a constructor for the FBM...
1430  theFBM.ID = -1;
1431  theFBM.glitch_mask = {};
1432  std::uninitialized_fill( std::begin(theFBM.fiberData), std::end(theFBM.fiberData), 0. );
1433  std::uninitialized_fill( std::begin(theFBM.timeData), std::end(theFBM.timeData), 0. );
1434  theFBM.timeStamp = 0.;
1435 
1436  short f = 96 - short( floor(pos) ) - 1;
1437  theFBM.fibers[f] = 1;
1438  theFBM.active.push_back(f);
1439  theFBM.decoded = true;
1440 
1441  return theFBM;
1442 }
end
while True: pbar.update(maxval-len(onlies[E][S])) #print iS, "/", len(onlies[E][S]) found = False for...
std::vector< short > active
std::array< short, 192 > fibers
std::array< short, 192 > glitch_mask
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.
Definition: StdUtils.h:72
double fiberData[6]
double timeData[4]
TLorentzVector evgen::ProtoDUNEBeam::MakeMomentumVector ( float  px,
float  py,
float  pz,
int  pdg,
bool  shifts 
)
private

Definition at line 1161 of file ProtoDUNEBeam_module.cc.

1161  {
1162 
1163  //float rotationXZ = fRotateXZ;
1164  //float rotationYZ = fRotateYZ;
1165 
1166  // Make the momentum vector and rotate it
1167  TVector3 momVec(px,py,pz);
1168 
1169  if(shifts){
1170  // Shift theta and phi first, and only rotate if we should
1171  if(fabs(fBeamThetaShift) > 1.e-10 && fabs(fBeamPhiShift) > 1.e-10){
1172  //std::cout << "Shifted momentum vector from " << momVec.Theta() << ", " << momVec.Phi() << " ";
1173  momVec.SetTheta(momVec.Theta() + fBeamThetaShift);
1174  momVec.SetPhi(momVec.Phi() + fBeamPhiShift);
1175  //std::cout << "to " << momVec.Theta() << ", " << momVec.Phi() << std::endl;
1176  }
1177  else{
1178  momVec.RotateY(fRotateXZ/*rotationXZ*/ * TMath::Pi() / 180.);
1179  momVec.RotateX(fRotateYZ/*rotationYZ*/ * TMath::Pi() / 180.);
1180  }
1181  }
1182 
1183  // Find the particle mass so we can form the energy
1184  const TDatabasePDG* databasePDG = TDatabasePDG::Instance();
1185  const TParticlePDG* definition = databasePDG->GetParticle(pdg);
1186  float mass = definition->Mass();
1187 
1188  float energy = sqrt(mass*mass + momVec.Mag2());
1189 
1190  TLorentzVector newMom(momVec,energy);
1191  return newMom;
1192 }
const double e
TLorentzVector evgen::ProtoDUNEBeam::MakeMomentumVector ( const TVector3 &  mom,
int  pdg,
bool  shifts 
)
private

Definition at line 1194 of file ProtoDUNEBeam_module.cc.

1194  {
1195 
1196  return MakeMomentumVector(mom.X(),mom.Y(),mom.Z(),pdg,shifts);
1197 
1198 }
TLorentzVector MakeMomentumVector(float px, float py, float pz, int pdg, bool shifts)
void evgen::ProtoDUNEBeam::MakeTracks ( beam::ProtoDUNEBeamEvent beamEvent)
private

Definition at line 1448 of file ProtoDUNEBeam_module.cc.

1448  {
1449 
1450  //We should only have one active fiber at a time
1451  //
1452  //Might need to ask Leigh, etc. if it's possible
1453  //to have multiple particles going through at the
1454  //same time. In which case -- try to implement it
1455 
1456  short fx1 = beamEvent.GetFBM( "XBPF022707" ).active[0];
1457  short fy1 = beamEvent.GetFBM( "XBPF022708" ).active[0];
1458 
1459  double x1 = GetPosition( fx1 );
1460  double y1 = GetPosition( fy1 );
1461 
1462  TVector3 pos1 = ConvertProfCoordinates( x1, y1, 0., fBPROFEXTPos );
1463 
1464  short fx2 = beamEvent.GetFBM( "XBPF022716" ).active[0];
1465  short fy2 = beamEvent.GetFBM( "XBPF022717" ).active[0];
1466 
1467  double x2 = GetPosition( fx2 );
1468  double y2 = GetPosition( fy2 );
1469 
1470  TVector3 pos2 = ConvertProfCoordinates( x2, y2, 0., fBPROF4Pos );
1471 
1472  std::vector< TVector3 > thePoints = { pos1, pos2, ProjectToTPC( pos1, pos2 ) };
1473  std::vector< TVector3 > theMomenta = {
1474  ( pos2 - pos1 ).Unit(),
1475  ( pos2 - pos1 ).Unit(),
1476  ( pos2 - pos1 ).Unit()
1477  };
1478 
1479  beamEvent.AddBeamTrack(
1480  recob::Track(
1483  recob::Track::Flags_t( thePoints.size() ),
1484  false ),
1486  )
1487  );
1488 
1489 }
const FBM & GetFBM(std::string) const
double GetPosition(short fiber)
ROOT::Math::SMatrix< Double32_t, 5, 5, ROOT::Math::MatRepSym< Double32_t, 5 > > SMatrixSym55
Definition: TrackingTypes.h:85
std::vector< Vector_t > convertCollToVector(std::vector< Vector > const &coll)
Definition: TrackingTypes.h:58
TrackTrajectory::Flags_t Flags_t
Definition: Track.h:68
std::vector< short > active
TVector3 ConvertProfCoordinates(double x, double y, double z, double zOffset)
A trajectory in space reconstructed from hits.
std::vector< Point_t > convertCollToPoint(std::vector< Point > const &coll)
Definition: TrackingTypes.h:55
void AddBeamTrack(recob::Track theTrack)
TVector3 ProjectToTPC(TVector3 firstPoint, TVector3 secondPoint)
Track from a non-cascading particle.A recob::Track consists of a recob::TrackTrajectory, plus additional members relevant for a "fitted" track:
Definition: Track.h:49
double evgen::ProtoDUNEBeam::MomentumCosTheta ( double  x1,
double  x2,
double  x3 
)
private

Definition at line 1518 of file ProtoDUNEBeam_module.cc.

1518  {
1519  double a = (x2*fL3 - x3*fL2)*cos(fBeamBend)/(fL3-fL2);
1520 
1521 
1522  double numTerm = (a - x1)*( (fL3 - fL2)*tan(fBeamBend) + (x3 - x2)*cos(fBeamBend) ) + fL1*( fL3 - fL2 );
1523 
1524  double denomTerm1, denomTerm2, denom;
1525  denomTerm1 = sqrt( fL1*fL1 + (a - x1)*(a - x1) );
1526  denomTerm2 = sqrt( TMath::Power( ( (fL3 - fL2)*tan(fBeamBend) + (x3 - x2)*cos(fBeamBend) ),2)
1527  + TMath::Power( ( (fL3 - fL2) ),2) );
1528  denom = denomTerm1 * denomTerm2;
1529 
1530  double cosTheta = numTerm/denom;
1531  return cosTheta;
1532 }
const double a
void evgen::ProtoDUNEBeam::MomentumSpectrometer ( beam::ProtoDUNEBeamEvent beamEvent)
private

Definition at line 1502 of file ProtoDUNEBeam_module.cc.

1502  {
1503 
1504  short f1 = beamEvent.GetFBM( "XBPF022697" ).active[0];
1505  short f2 = beamEvent.GetFBM( "XBPF022701" ).active[0];
1506  short f3 = beamEvent.GetFBM( "XBPF022702" ).active[0];
1507 
1508  double x1 = -1.e-3 * GetPosition( f1 );
1509  double x2 = -1.e-3 * GetPosition( f2 );
1510  double x3 = -1.e-3 * GetPosition( f3 );
1511 
1512  double cos_theta = MomentumCosTheta( x1, x2, x3 );
1513  double momentum = 299792458*fLB/(1.E9 * acos(cos_theta));
1514  beamEvent.AddRecoBeamMomentum( momentum );
1515 
1516 }
const FBM & GetFBM(std::string) const
double GetPosition(short fiber)
std::vector< short > active
double MomentumCosTheta(double, double, double)
void AddRecoBeamMomentum(double theMomentum)
def momentum(x1, x2, x3, scale=1.)
void evgen::ProtoDUNEBeam::OpenInputFile ( )
private

Definition at line 1097 of file ProtoDUNEBeam_module.cc.

1098 {
1099  // Setup ifdh object
1100  if (!fIFDH)
1101  {
1102  fIFDH = new ifdh_ns::ifdh;
1103  }
1104 
1105  const char* ifdh_debug_env = std::getenv("IFDH_DEBUG_LEVEL");
1106  if ( ifdh_debug_env )
1107  {
1108  mf::LogInfo("ProtoDUNEBeam") << "IFDH_DEBUG_LEVEL: " << ifdh_debug_env<<"\n";
1109  fIFDH->set_debug(ifdh_debug_env);
1110  }
1111 
1112  std::string path(gSystem->DirName(fFileName.c_str()));
1113  std::string pattern(gSystem->BaseName(fFileName.c_str()));
1114 
1115  auto flist = fIFDH->findMatchingFiles(path,pattern);
1116  if (flist.empty())
1117  {
1118  struct stat buffer;
1119  if (stat(fFileName.c_str(), &buffer) != 0)
1120  {
1121  throw cet::exception("ProtoDUNEBeam") << "No files returned for path:pattern: "<<path<<":"<<pattern<<std::endl;
1122  }
1123  else
1124  {
1125  mf::LogInfo("ProtoDUNEBeam") << "For "<< fFileName <<"\n";
1126  }
1127  }
1128  else
1129  {
1130  std::pair<std::string, long> f = flist.front();
1131 
1132  mf::LogInfo("ProtoDUNEBeam") << "For "<< fFileName <<"\n";
1133 
1134  // Do the fetching, store local filepaths in locallist
1135 
1136  mf::LogInfo("ProtoDUNEBeam")
1137  << "Fetching: " << f.first << " " << f.second <<"\n";
1138  std::string fetchedfile(fIFDH->fetchInput(f.first));
1139  MF_LOG_DEBUG("ProtoDUNEBeam") << " Fetched; local path: " << fetchedfile;
1140 
1141  fFileName = fetchedfile;
1142  }
1143 }
std::string string
Definition: nybbler.cc:12
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
std::string getenv(std::string const &name)
Definition: getenv.cc:15
std::string pattern
Definition: regex_t.cc:35
#define MF_LOG_DEBUG(id)
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
QTextStream & endl(QTextStream &s)
ProtoDUNEBeam& evgen::ProtoDUNEBeam::operator= ( ProtoDUNEBeam const &  )
delete
ProtoDUNEBeam& evgen::ProtoDUNEBeam::operator= ( ProtoDUNEBeam &&  )
delete
void evgen::ProtoDUNEBeam::produce ( art::Event e)
overridevirtual

Implements art::EDProducer.

Definition at line 785 of file ProtoDUNEBeam_module.cc.

786 {
787 
788  // Define the truth collection for this event.
789  auto truthcol = std::make_unique< std::vector<simb::MCTruth> >();
790 
791  //------------ Added by Caroline for beam simulation storage----------------------------
792  std::unique_ptr<std::vector<sim::ProtoDUNEbeamsim>> beamsimcol (new std::vector<sim::ProtoDUNEbeamsim>);
793  std::unique_ptr<std::vector<beam::ProtoDUNEBeamEvent> > beamData(new std::vector<beam::ProtoDUNEBeamEvent>);
794  //std::unique_ptr<art::Assns<sim::ProtoDUNEbeamsim, simb::MCTruth> > beamsimassn (new art::Assns<sim::ProtoDUNEbeamsim, simb::MCTruth>);
795  simb::MCTruth truth;
796  beam::ProtoDUNEBeamEvent beamEvent;
797 
798  // Fill the MCTruth object
799  GenerateTrueEvent(truth, (*beamsimcol), beamEvent ); // Add a reference for ProtoDUNEBeamEvent
800 
801  // Add the MCTruth to the vector
802  truthcol->push_back(truth);
803 
804  //Make the assn
805  // util::CreateAssn(*this, e, *beamsimcol, truth, *beamsimassn);
806  // Finally, add the MCTruth to the event
807  e.put(std::move(truthcol));
808  e.put(std::move(beamsimcol));
809 
810  beamData->push_back( beamEvent );
811  e.put( std::move( beamData ) );
812 
813  //puts the vector object on to each event
814  // We have made our event, increment the event number.
815  ++fEventNumber;
816 }
void GenerateTrueEvent(simb::MCTruth &mcTruth, std::vector< sim::ProtoDUNEbeamsim > &beamsimcol, beam::ProtoDUNEBeamEvent &beamEvent)
def move(depos, offset)
Definition: depos.py:107
ProductID put(std::unique_ptr< PROD > &&edp, std::string const &instance={})
Definition: DataViewImpl.h:686
Event generator information.
Definition: MCTruth.h:32
TVector3 evgen::ProtoDUNEBeam::ProjectToTPC ( TVector3  firstPoint,
TVector3  secondPoint 
)
private

Definition at line 1491 of file ProtoDUNEBeam_module.cc.

1491  {
1492  TVector3 dR = (secondPoint - firstPoint);
1493 
1494  double deltaZ = -1.*secondPoint.Z();
1495  double deltaX = deltaZ * (dR.X() / dR.Z());
1496  double deltaY = deltaZ * (dR.Y() / dR.Z());
1497 
1498  TVector3 lastPoint = secondPoint + TVector3(deltaX, deltaY, deltaZ);
1499  return lastPoint;
1500 }
void evgen::ProtoDUNEBeam::RotateMonitorVector ( TVector3 &  vec)
private

Definition at line 1304 of file ProtoDUNEBeam_module.cc.

1304  {
1305 
1306  // Note: reordering how these are done in order to keep the basis
1307  // vectors of the monitors parallel to the ground.
1308  vec.RotateX( fRotateMonitorYZ * TMath::Pi() / 180. );
1309  vec.RotateY( fRotateMonitorXZ * TMath::Pi() / 180. );
1310 
1311 }
void evgen::ProtoDUNEBeam::SetBeamEvent ( beam::ProtoDUNEBeamEvent beamevt)
private

Definition at line 1326 of file ProtoDUNEBeam_module.cc.

1326  {
1327  //This will just use the class members
1328 
1329  beamevt.SetTOFs( std::vector<double>{ fGoodTRIG2_t - fGoodTOF1_t } );
1330  beamevt.SetTOFChans( std::vector<int>{ 0 } );
1331  beamevt.SetUpstreamTriggers( std::vector<size_t>{0} );
1332  beamevt.SetDownstreamTriggers( std::vector<size_t>{0} );
1333  beamevt.SetCalibrations( 0., 0., 0., 0. );
1334  beamevt.DecodeTOF();
1335 
1336  beamevt.SetMagnetCurrent( 0. );
1337  beamevt.SetTimingTrigger( 12 );
1338 
1339  beam::CKov dummy;
1340  dummy.trigger = 0;
1341  dummy.pressure = 0.;
1342  dummy.timeStamp = 0.;
1343  beamevt.SetCKov0( dummy );
1344  beamevt.SetCKov1( dummy );
1345 
1346  beamevt.SetActiveTrigger(0);
1347  beamevt.SetT0( std::make_pair(0.,0.) );
1348 
1349  beamevt.SetFBMTrigger( "XBPF022697", MakeFiberMonitor( fGoodBPROF1_x ) );
1350  beamevt.SetFBMTrigger( "XBPF022698", MakeFiberMonitor( fGoodBPROF1_y ) );
1351  beamevt.SetFBMTrigger( "XBPF022701", MakeFiberMonitor( fGoodBPROF2_x ) );
1352  beamevt.SetFBMTrigger( "XBPF022702", MakeFiberMonitor( fGoodBPROF3_x ) );
1353 
1354  beamevt.SetFBMTrigger( "XBPF022707", MakeFiberMonitor( fGoodBPROFEXT_x ) );
1355  beamevt.SetFBMTrigger( "XBPF022708", MakeFiberMonitor( fGoodBPROFEXT_y ) );
1356 
1357  beamevt.SetFBMTrigger( "XBPF022716", MakeFiberMonitor( fGoodBPROF4_x ) );
1358  beamevt.SetFBMTrigger( "XBPF022717", MakeFiberMonitor( fGoodBPROF4_y ) );
1359 
1360  MakeTracks( beamevt );
1361  MomentumSpectrometer( beamevt );
1362 
1363 
1364  if( fSaveRecoTree ){
1365  fReco_p = beamevt.GetRecoBeamMomentum(0);
1366  fReco_tof = beamevt.GetTOF();
1367  std::cout << "TOF: " << beamevt.GetTOFs()[0] << " " << beamevt.GetTOF() << std::endl;
1369 
1373 
1377 
1381 
1388 
1393 
1394 
1395  fXBPF697_f = beamevt.GetFBM( "XBPF022697" ).active[0];
1396  fXBPF701_f = beamevt.GetFBM( "XBPF022701" ).active[0];
1397  fXBPF702_f = beamevt.GetFBM( "XBPF022702" ).active[0];
1398 
1399  fXBPF707_f = beamevt.GetFBM( "XBPF022707" ).active[0];
1400  fXBPF708_f = beamevt.GetFBM( "XBPF022708" ).active[0];
1401  fXBPF716_f = beamevt.GetFBM( "XBPF022716" ).active[0];
1402  fXBPF717_f = beamevt.GetFBM( "XBPF022717" ).active[0];
1403 
1407 
1412 
1413  //fTrueFront_x = fGoodNP04front_x + fBeamX;
1414  //fTrueFront_y = fGoodNP04front_y + fBeamY;
1415  //fTrueFront_z = fGoodNP04front_z + fBeamZ;
1416 
1417  fRecoFront_x = beamevt.GetBeamTrack(0).End().X();
1418  fRecoFront_y = beamevt.GetBeamTrack(0).End().Y();
1419  fRecoFront_z = beamevt.GetBeamTrack(0).End().Z();
1420 
1421  fRecoTree->Fill();
1422  }
1423 }
const FBM & GetFBM(std::string) const
beam::FBM MakeFiberMonitor(float pos)
void MakeTracks(beam::ProtoDUNEBeamEvent &beamEvent)
double GetPosition(short fiber)
const recob::Track & GetBeamTrack(size_t i) const
const std::vector< double > & GetTOFs() const
void SetTimingTrigger(int theTrigger)
std::vector< short > active
void SetFBMTrigger(std::string, FBM)
void SetCKov0(CKov theCKov)
void SetMagnetCurrent(double theMagnetCurrent)
const double & GetTOF() const
void MomentumSpectrometer(beam::ProtoDUNEBeamEvent &beamEvent)
void SetDownstreamTriggers(std::vector< size_t > theContent)
void SetUpstreamTriggers(std::vector< size_t > theContent)
cet::LibraryManager dummy("noplugin")
Point_t const & End() const
Definition: Track.h:125
void SetT0(std::pair< double, double > theT0)
void SetCKov1(CKov theCKov)
const double & GetRecoBeamMomentum(size_t i) const
void SetTOFs(std::vector< double > theContent)
void SetCalibrations(double TOFCalAA, double TOFCalBA, double TOFCalAB, double TOFCalBB)
void SetTOFChans(std::vector< int > theContent)
QTextStream & endl(QTextStream &s)
void SetActiveTrigger(size_t theTrigger)

Member Data Documentation

float evgen::ProtoDUNEBeam::fAllEventID
private

Definition at line 350 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fAllParentID
private

Definition at line 352 of file ProtoDUNEBeam_module.cc.

TTree* evgen::ProtoDUNEBeam::fAllParticlesTree
private

Definition at line 183 of file ProtoDUNEBeam_module.cc.

std::string evgen::ProtoDUNEBeam::fAllParticlesTreeName
private

Definition at line 171 of file ProtoDUNEBeam_module.cc.

std::vector<ProtoFullSpill> evgen::ProtoDUNEBeam::fAllSpills
private

Definition at line 112 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fAllTrackID
private

Definition at line 351 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fB
private

Definition at line 402 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fBeamBend
private

Definition at line 398 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fBeamPhiShift
private

Definition at line 363 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fBeamSpillLength
private

Definition at line 381 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fBeamThetaShift
private

Definition at line 362 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fBeamX
private

Definition at line 359 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fBeamY
private

Definition at line 360 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fBeamZ
private

Definition at line 361 of file ProtoDUNEBeam_module.cc.

TVector3 evgen::ProtoDUNEBeam::fBMBasisX
private

Definition at line 370 of file ProtoDUNEBeam_module.cc.

TVector3 evgen::ProtoDUNEBeam::fBMBasisY
private

Definition at line 371 of file ProtoDUNEBeam_module.cc.

TVector3 evgen::ProtoDUNEBeam::fBMBasisZ
private

Definition at line 372 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fBPROF4Pos
private

Definition at line 375 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fBPROFEXTPos
private

Definition at line 374 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fCh_Efficiency
private

Definition at line 386 of file ProtoDUNEBeam_module.cc.

unsigned int evgen::ProtoDUNEBeam::fCurrentGoodEvent
private

Definition at line 115 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fEntryT
private

Definition at line 356 of file ProtoDUNEBeam_module.cc.

int evgen::ProtoDUNEBeam::fEventNumber
private

Definition at line 175 of file ProtoDUNEBeam_module.cc.

std::string evgen::ProtoDUNEBeam::fFileName
private

Definition at line 169 of file ProtoDUNEBeam_module.cc.

CLHEP::RandFlat evgen::ProtoDUNEBeam::fFlatRnd
private

Definition at line 167 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodBPROF1_EventID
private

Definition at line 241 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodBPROF1_PDGid
private

Definition at line 240 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodBPROF1_Px
private

Definition at line 237 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodBPROF1_Py
private

Definition at line 238 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodBPROF1_Pz
private

Definition at line 239 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodBPROF1_t
private

Definition at line 236 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodBPROF1_TrackID
private

Definition at line 242 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodBPROF1_x
private

Definition at line 233 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodBPROF1_y
private

Definition at line 234 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodBPROF1_z
private

Definition at line 235 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodBPROF2_EventID
private

Definition at line 252 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodBPROF2_PDGid
private

Definition at line 251 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodBPROF2_Px
private

Definition at line 248 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodBPROF2_Py
private

Definition at line 249 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodBPROF2_Pz
private

Definition at line 250 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodBPROF2_t
private

Definition at line 247 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodBPROF2_TrackID
private

Definition at line 253 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodBPROF2_x
private

Definition at line 244 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodBPROF2_y
private

Definition at line 245 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodBPROF2_z
private

Definition at line 246 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodBPROF3_EventID
private

Definition at line 263 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodBPROF3_PDGid
private

Definition at line 262 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodBPROF3_Px
private

Definition at line 259 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodBPROF3_Py
private

Definition at line 260 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodBPROF3_Pz
private

Definition at line 261 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodBPROF3_t
private

Definition at line 258 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodBPROF3_TrackID
private

Definition at line 264 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodBPROF3_x
private

Definition at line 255 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodBPROF3_y
private

Definition at line 256 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodBPROF3_z
private

Definition at line 257 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodBPROF4_EventID
private

Definition at line 274 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodBPROF4_PDGid
private

Definition at line 273 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodBPROF4_Px
private

Definition at line 270 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodBPROF4_Py
private

Definition at line 271 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodBPROF4_Pz
private

Definition at line 272 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodBPROF4_t
private

Definition at line 269 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodBPROF4_TrackID
private

Definition at line 275 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodBPROF4_x
private

Definition at line 266 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodBPROF4_y
private

Definition at line 267 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodBPROF4_z
private

Definition at line 268 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodBPROFEXT_EventID
private

Definition at line 285 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodBPROFEXT_PDGid
private

Definition at line 284 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodBPROFEXT_Px
private

Definition at line 281 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodBPROFEXT_Py
private

Definition at line 282 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodBPROFEXT_Pz
private

Definition at line 283 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodBPROFEXT_t
private

Definition at line 280 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodBPROFEXT_TrackID
private

Definition at line 286 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodBPROFEXT_x
private

Definition at line 277 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodBPROFEXT_y
private

Definition at line 278 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodBPROFEXT_z
private

Definition at line 279 of file ProtoDUNEBeam_module.cc.

std::vector<int> evgen::ProtoDUNEBeam::fGoodEventList
private

Definition at line 116 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodNP04front_EventID
private

Definition at line 194 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodNP04front_PDGid
private

Definition at line 193 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodNP04front_Px
private

Definition at line 190 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodNP04front_Py
private

Definition at line 191 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodNP04front_Pz
private

Definition at line 192 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodNP04front_t
private

Definition at line 189 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodNP04front_TrackID
private

Definition at line 195 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodNP04front_x
private

Definition at line 186 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodNP04front_y
private

Definition at line 187 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodNP04front_z
private

Definition at line 188 of file ProtoDUNEBeam_module.cc.

TTree* evgen::ProtoDUNEBeam::fGoodParticleTree
private

Definition at line 182 of file ProtoDUNEBeam_module.cc.

std::string evgen::ProtoDUNEBeam::fGoodParticleTreeName
private

Definition at line 170 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodTOF1_EventID
private

Definition at line 206 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodTOF1_PDGid
private

Definition at line 205 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodTOF1_Px
private

Definition at line 202 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodTOF1_Py
private

Definition at line 203 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodTOF1_Pz
private

Definition at line 204 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodTOF1_t
private

Definition at line 201 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodTOF1_TrackID
private

Definition at line 207 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodTOF1_x
private

Definition at line 198 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodTOF1_y
private

Definition at line 199 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodTOF1_z
private

Definition at line 200 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodTRIG1_EventID
private

Definition at line 218 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodTRIG1_PDGid
private

Definition at line 217 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodTRIG1_Px
private

Definition at line 214 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodTRIG1_Py
private

Definition at line 215 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodTRIG1_Pz
private

Definition at line 216 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodTRIG1_t
private

Definition at line 213 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodTRIG1_TrackID
private

Definition at line 219 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodTRIG1_x
private

Definition at line 210 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodTRIG1_y
private

Definition at line 211 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodTRIG1_z
private

Definition at line 212 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodTRIG2_EventID
private

Definition at line 229 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodTRIG2_PDGid
private

Definition at line 228 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodTRIG2_Px
private

Definition at line 225 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodTRIG2_Py
private

Definition at line 226 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodTRIG2_Pz
private

Definition at line 227 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodTRIG2_t
private

Definition at line 224 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodTRIG2_TrackID
private

Definition at line 230 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodTRIG2_x
private

Definition at line 221 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodTRIG2_y
private

Definition at line 222 of file ProtoDUNEBeam_module.cc.

Float_t evgen::ProtoDUNEBeam::fGoodTRIG2_z
private

Definition at line 223 of file ProtoDUNEBeam_module.cc.

ifdh_ns::ifdh* evgen::ProtoDUNEBeam::fIFDH
private

Definition at line 410 of file ProtoDUNEBeam_module.cc.

TFile* evgen::ProtoDUNEBeam::fInputFile
private

Definition at line 180 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fIntensity
private

Definition at line 379 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fL1
private

Definition at line 395 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fL2
private

Definition at line 396 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fL3
private

Definition at line 397 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fLB
private

Definition at line 388 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fLMag
private

Definition at line 400 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fNominalP
private

Definition at line 401 of file ProtoDUNEBeam_module.cc.

int evgen::ProtoDUNEBeam::fNP04_PDG
private

Definition at line 308 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fNP04front_p
private

Definition at line 309 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fNP04frontPos
private

Definition at line 376 of file ProtoDUNEBeam_module.cc.

int evgen::ProtoDUNEBeam::fOverlays
private

Definition at line 408 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fPDG
private

Definition at line 341 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fPos_Resolution
private

Definition at line 385 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fPx
private

Definition at line 340 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fPy
private

Definition at line 340 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fPz
private

Definition at line 340 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fReadoutWindow
private

Definition at line 380 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fReco_p
private

Definition at line 304 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fReco_tof
private

Definition at line 306 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fRecoFront_x
private

Definition at line 334 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fRecoFront_y
private

Definition at line 335 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fRecoFront_z
private

Definition at line 336 of file ProtoDUNEBeam_module.cc.

TTree* evgen::ProtoDUNEBeam::fRecoTree
private

Definition at line 288 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fRotateMonitorXZ
private

Definition at line 367 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fRotateMonitorYZ
private

Definition at line 368 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fRotateXZ
private

Definition at line 364 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fRotateYZ
private

Definition at line 365 of file ProtoDUNEBeam_module.cc.

bool evgen::ProtoDUNEBeam::fSaveRecoTree
private

Definition at line 404 of file ProtoDUNEBeam_module.cc.

int evgen::ProtoDUNEBeam::fStartEvent
private

Definition at line 178 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fT_Resolution
private

Definition at line 384 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fTrueFront_Px
private

Definition at line 330 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fTrueFront_Py
private

Definition at line 331 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fTrueFront_Pz
private

Definition at line 332 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fTrueFront_x
private

Definition at line 326 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fTrueFront_y
private

Definition at line 327 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fTrueFront_z
private

Definition at line 328 of file ProtoDUNEBeam_module.cc.

int evgen::ProtoDUNEBeam::fTrueID
private

Definition at line 343 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fX
private

Definition at line 339 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fXBPF697_f
private

Definition at line 301 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fXBPF697_p
private

Definition at line 297 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fXBPF697_rx
private

Definition at line 293 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fXBPF697_x
private

Definition at line 289 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fXBPF701_f
private

Definition at line 302 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fXBPF701_p
private

Definition at line 298 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fXBPF701_rx
private

Definition at line 294 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fXBPF701_x
private

Definition at line 290 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fXBPF702_f
private

Definition at line 303 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fXBPF702_p
private

Definition at line 299 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fXBPF702_rx
private

Definition at line 295 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fXBPF702_x
private

Definition at line 291 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fXBPF707_f
private

Definition at line 323 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fXBPF707_rx
private

Definition at line 318 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fXBPF707_x
private

Definition at line 313 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fXBPF708_f
private

Definition at line 324 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fXBPF708_ry
private

Definition at line 319 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fXBPF708_y
private

Definition at line 314 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fXBPF716_f
private

Definition at line 321 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fXBPF716_rx
private

Definition at line 316 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fXBPF716_x
private

Definition at line 311 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fXBPF717_f
private

Definition at line 322 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fXBPF717_ry
private

Definition at line 317 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fXBPF717_y
private

Definition at line 312 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fY
private

Definition at line 339 of file ProtoDUNEBeam_module.cc.

float evgen::ProtoDUNEBeam::fZ
private

Definition at line 339 of file ProtoDUNEBeam_module.cc.


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