Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
opdet::SimPhotonCounter Class Reference

#include <SimPhotonCounter.h>

Inheritance diagram for opdet::SimPhotonCounter:
art::EDAnalyzer art::detail::Analyzer art::detail::LegacyModule art::Observer art::ModuleBase

Public Member Functions

 SimPhotonCounter ()
 
 SimPhotonCounter (size_t s, float t_p1, float t_p2, float t_l1, float t_l2, float min_w=0, float max_w=1e6, float e=1.0)
 
 SimPhotonCounter (float t_p1, float t_p2, float t_l1, float t_l2, float min_w, float max_w, const std::vector< float > &eV)
 
void SetVectorSize (size_t s)
 
size_t GetVectorSize () const
 
void SetWavelengthRanges (float min_w, float max_w)
 
float MinWavelength () const
 
float MaxWavelength () const
 
void SetTimeRanges (float t_p1, float t_p2, float t_l1, float t_l2)
 
float MinPromptTime () const
 
float MaxPromptTime () const
 
float MinLateTime () const
 
float MaxLateTime () const
 
void SetQE (size_t i, float e)
 
float QE (size_t i) const
 
void SetQEVector (const std::vector< float > &eV)
 
std::vector< float > const & QEVector () const
 
void AddOnePhoton (size_t i_opdet, const sim::OnePhoton &photon)
 
void AddSimPhotons (const sim::SimPhotons &photons)
 
void ClearVectors ()
 
const std::vector< float > & PromptPhotonVector () const
 
const std::vector< float > & LatePhotonVector () const
 
float PromptPhotonVector (size_t i) const
 
float LatePhotonVector (size_t i) const
 
std::vector< float > TotalPhotonVector () const
 
float TotalPhotonVector (size_t i) const
 
float PromptPhotonTotal () const
 
float LatePhotonTotal () const
 
float PhotonTotal () const
 
void Print ()
 
 SimPhotonCounter (const fhicl::ParameterSet &)
 
void analyze (art::Event const &)
 
void beginJob ()
 
void endJob ()
 
- Public Member Functions inherited from art::EDAnalyzer
 EDAnalyzer (fhicl::ParameterSet const &pset)
 
template<typename Config >
 EDAnalyzer (Table< Config > const &config)
 
std::string workerType () const
 
- Public Member Functions inherited from art::detail::Analyzer
virtual ~Analyzer () noexcept
 
 Analyzer (fhicl::ParameterSet const &pset)
 
template<typename Config >
 Analyzer (Table< Config > const &config)
 
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::Observer
 ~Observer () noexcept
 
 Observer (Observer const &)=delete
 
 Observer (Observer &&)=delete
 
Observeroperator= (Observer const &)=delete
 
Observeroperator= (Observer &&)=delete
 
void registerProducts (ProductDescriptions &, ModuleDescription const &)
 
void fillDescriptions (ModuleDescription const &)
 
fhicl::ParameterSetID selectorConfig () const
 
- 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

float Wavelength (const sim::OnePhoton &ph)
 
void storeVisibility (int channel, int nDirectPhotons, int nReflectedPhotons, double reflectedT0=0.0) const
 
bool isVisible (double wavelength) const
 Returns if we label as "visibile" a photon with specified wavelength [nm]. More...
 

Private Attributes

std::vector< float > _photonVector_prompt
 
std::vector< float > _photonVector_late
 
float _min_prompt_time
 
float _max_prompt_time
 
float _min_late_time
 
float _max_late_time
 
std::vector< float > _qeVector
 
float _min_wavelength
 
float _max_wavelength
 
TTree * fThePhotonTreeAll
 
TTree * fThePhotonTreeDetected
 
TTree * fTheOpDetTree
 
TTree * fTheEventTree
 
std::vector< std::stringfInputModule
 
int fVerbosity
 
bool fMakeDetectedPhotonsTree
 
bool fMakeAllPhotonsTree
 
bool fMakeOpDetsTree
 
bool fMakeOpDetEventsTree
 
TVector3 initialPhotonPosition
 
TVector3 finalPhotonPosition
 
Float_t fWavelength
 
Float_t fTime
 
Int_t fCountOpDetAll
 
Int_t fCountOpDetDetected
 
Int_t fCountOpDetReflDetected
 
Float_t fT0_vis
 
Int_t fCountEventAll
 
Int_t fCountEventDetected
 
Int_t fEventID
 
Int_t fOpChannel
 
bool fMakeLightAnalysisTree
 
std::vector< std::vector< std::vector< double > > > fSignals_vuv
 
std::vector< std::vector< std::vector< double > > > fSignals_vis
 
TTree * fLightAnalysisTree = nullptr
 
int fRun
 
int fTrackID
 
int fpdg
 
int fmotherTrackID
 
double fEnergy
 
double fdEdx
 
std::vector< double > fPosition0
 
std::vector< std::vector< double > > fstepPositions
 
std::vector< double > fstepTimes
 
std::vector< std::vector< double > > fSignalsvuv
 
std::vector< std::vector< double > > fSignalsvis
 
std::string fProcess
 
cheat::ParticleInventoryService const * pi_serv = nullptr
 
phot::PhotonVisibilityService const * fPVS = nullptr
 
bool const fUseLitePhotons
 

Static Private Attributes

static constexpr double kVisibleThreshold = 200.0
 Threshold used to resolve between visible and ultraviolet light. More...
 
static constexpr double kVisibleWavelength = 450.0
 Value used when a typical visible light wavelength is needed. More...
 
static constexpr double kVUVWavelength = 128.0
 Value used when a typical ultraviolet light wavelength is needed. More...
 

Additional Inherited Members

- Public Types inherited from art::EDAnalyzer
using WorkerType = WorkerT< EDAnalyzer >
 
using ModuleType = EDAnalyzer
 
- Protected Member Functions inherited from art::Observer
std::string const & processName () const
 
bool wantAllEvents () const noexcept
 
bool wantEvent (ScheduleID id, Event const &e) const
 
Handle< TriggerResultsgetTriggerResults (Event const &e) const
 
 Observer (fhicl::ParameterSet const &config)
 
 Observer (std::vector< std::string > const &select_paths, std::vector< std::string > const &reject_paths, fhicl::ParameterSet const &config)
 
- 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 17 of file SimPhotonCounter.h.

Constructor & Destructor Documentation

opdet::SimPhotonCounter::SimPhotonCounter ( )
inline

Definition at line 20 of file SimPhotonCounter.h.

20 {}
opdet::SimPhotonCounter::SimPhotonCounter ( size_t  s,
float  t_p1,
float  t_p2,
float  t_l1,
float  t_l2,
float  min_w = 0,
float  max_w = 1e6,
float  e = 1.0 
)

Definition at line 7 of file SimPhotonCounter.cxx.

12 {
13 
14  SetWavelengthRanges(min_w,max_w);
15  SetTimeRanges(t_p1,t_p2,t_l1,t_l2);
16 
17  _photonVector_prompt=std::vector<float>(s);
18  _photonVector_late=std::vector<float>(s);
19  _qeVector = std::vector<float>(s,e);
20 
21 }
void SetTimeRanges(float t_p1, float t_p2, float t_l1, float t_l2)
std::vector< float > _photonVector_prompt
const double e
std::vector< float > _qeVector
std::vector< float > _photonVector_late
void SetWavelengthRanges(float min_w, float max_w)
static QCString * s
Definition: config.cpp:1042
opdet::SimPhotonCounter::SimPhotonCounter ( float  t_p1,
float  t_p2,
float  t_l1,
float  t_l2,
float  min_w,
float  max_w,
const std::vector< float > &  eV 
)

Definition at line 23 of file SimPhotonCounter.cxx.

27 {
28  SetWavelengthRanges(min_w,max_w);
29  SetTimeRanges(t_p1,t_p2,t_l1,t_l2);
30 
31  _photonVector_prompt=std::vector<float>(eV.size());
32  _photonVector_late=std::vector<float>(eV.size());
33  _qeVector = eV;
34 
35 }
void SetTimeRanges(float t_p1, float t_p2, float t_l1, float t_l2)
std::vector< float > _photonVector_prompt
static constexpr double eV
Definition: Units.h:127
std::vector< float > _qeVector
std::vector< float > _photonVector_late
void SetWavelengthRanges(float min_w, float max_w)
opdet::SimPhotonCounter::SimPhotonCounter ( const fhicl::ParameterSet )

Member Function Documentation

void opdet::SimPhotonCounter::AddOnePhoton ( size_t  i_opdet,
const sim::OnePhoton photon 
)

Definition at line 63 of file SimPhotonCounter.cxx.

64 {
65  if(i_opdet > GetVectorSize())
66  throw std::runtime_error("ERROR in SimPhotonCounter: Opdet requested out of range!");
67 
68  if(Wavelength(photon) < _min_wavelength || Wavelength(photon) > _max_wavelength) return;
69 
70  if(photon.Time > _min_prompt_time && photon.Time <= _max_prompt_time)
71  _photonVector_prompt[i_opdet] += _qeVector[i_opdet];
72  else if(photon.Time > _min_late_time && photon.Time < _max_late_time)
73  _photonVector_late[i_opdet] += _qeVector[i_opdet];
74 
75 }
std::vector< float > _photonVector_prompt
float Wavelength(const sim::OnePhoton &ph)
std::vector< float > _qeVector
std::vector< float > _photonVector_late
size_t GetVectorSize() const
void opdet::SimPhotonCounter::AddSimPhotons ( const sim::SimPhotons photons)

Definition at line 77 of file SimPhotonCounter.cxx.

78 {
79  for(size_t i_ph=0; i_ph < photons.size(); i_ph++)
80  AddOnePhoton(photons.OpChannel(),photons[i_ph]);
81 }
int OpChannel() const
Returns the optical channel number this object is associated to.
Definition: SimPhotons.h:254
void AddOnePhoton(size_t i_opdet, const sim::OnePhoton &photon)
void opdet::SimPhotonCounter::analyze ( art::Event const &  evt)
virtual

Implements art::EDAnalyzer.

Definition at line 307 of file SimPhotonCounter_module.cc.

308  {
309 
310  // Lookup event ID from event
311  art::EventNumber_t event = evt.id().event();
312  fEventID=Int_t(event);
313 
314  // Service for determining opdet responses
316 
317  // get the geometry to be able to figure out signal types and chan -> plane mappings
319 
320  // GEANT4 info on the particles (only used if making light analysis tree)
321  std::vector<simb::MCParticle> const* mcpartVec = nullptr;
322 
323  //-------------------------initializing light tree vectors------------------------
324  std::vector<double> totalEnergy_track;
325  fstepPositions.clear();
326  fstepTimes.clear();
328  //mcpartVec = evt.getPointerByLabel<std::vector<simb::MCParticle>>("largeant");
329  mcpartVec = evt.getHandle<std::vector<simb::MCParticle>>("largeant").product();
330 
331  size_t maxNtracks = 1000U; // mcpartVec->size(); --- { to be fixed soon! ]
332  fSignals_vuv.clear();
333  fSignals_vuv.resize(maxNtracks);
334  fSignals_vis.clear();
335  fSignals_vis.resize(maxNtracks);
336  for(size_t itrack=0; itrack!=maxNtracks; itrack++) {
337  fSignals_vuv[itrack].resize(geo->NOpChannels());
338  fSignals_vis[itrack].resize(geo->NOpChannels());
339  }
340  totalEnergy_track.resize(maxNtracks, 0.);
341  //-------------------------stimation of dedx per trackID----------------------
342  //get the list of particles from this event
343  const sim::ParticleList* plist = pi_serv? &(pi_serv->ParticleList()): nullptr;
344 
345  // loop over all sim::SimChannels in the event and make sure there are no
346  // sim::IDEs with trackID values that are not in the sim::ParticleList
347  std::vector<const sim::SimChannel*> sccol;
348  //evt.getView(fG4ModuleLabel, sccol);
349  for(auto const& mod : fInputModule){
350  evt.getView(mod, sccol);
351  double totalCharge=0.0;
352  double totalEnergy=0.0;
353  //loop over the sim channels collection
354  for(size_t sc = 0; sc < sccol.size(); ++sc){
355  double numIDEs=0.0;
356  double scCharge=0.0;
357  double scEnergy=0.0;
358  const auto & tdcidemap = sccol[sc]->TDCIDEMap();
359  //loop over all of the tdc IDE map objects
360  for(auto mapitr = tdcidemap.begin(); mapitr != tdcidemap.end(); mapitr++){
361  const std::vector<sim::IDE> idevec = (*mapitr).second;
362  numIDEs += idevec.size();
363  //go over all of the IDEs in a given simchannel
364  for(size_t iv = 0; iv < idevec.size(); ++iv){
365  if (plist) {
366  if(plist->find( idevec[iv].trackID ) == plist->end()
367  && idevec[iv].trackID != sim::NoParticleId)
368  {
369  mf::LogWarning("LArG4Ana") << idevec[iv].trackID << " is not in particle list";
370  }
371  }
372  if(idevec[iv].trackID < 0) continue;
373  totalCharge +=idevec[iv].numElectrons;
374  scCharge += idevec[iv].numElectrons;
375  totalEnergy +=idevec[iv].energy;
376  scEnergy += idevec[iv].energy;
377 
378  totalEnergy_track[idevec[iv].trackID] += idevec[iv].energy/3.;
379  }
380  }
381  }
382  }
383  }//End of if(fMakeLightAnalysisTree)
384 
385 
386  if(!fUseLitePhotons)
387  {
388 
389  //Reset counters
390  fCountEventAll=0;
392 
393  //Get *ALL* SimPhotonsCollection from Event
394  //std::vector< art::Handle< std::vector< sim::SimPhotons > > > photon_handles;
395  //evt.getManyByType(photon_handles);
396  auto photon_handles = evt.getMany<std::vector<sim::SimPhotons>>();
397  if (photon_handles.size() == 0)
398  throw art::Exception(art::errors::ProductNotFound)<<"sim SimPhotons retrieved and you requested them.";
399 
400  for(auto const& mod : fInputModule){
401  // sim::SimPhotonsCollection TheHitCollection = sim::SimListUtils::GetSimPhotonsCollection(evt,mod);
402  //switching off to add reading in of labelled collections: Andrzej, 02/26/19
403 
404  for (auto const& ph_handle: photon_handles) {
405  // Do some checking before we proceed
406  if (!ph_handle.isValid()) continue;
407  if (ph_handle.provenance()->moduleLabel() != mod) continue; //not the most efficient way of doing this, but preserves the logic of the module. Andrzej
408 
409  bool Reflected = (ph_handle.provenance()->productInstanceName() == "Reflected");
410 
411  if((*ph_handle).size()>0)
412  {
414  //resetting the signalt to save in the analysis tree per event
415  const int maxNtracks = 1000;
416  for(size_t itrack=0; itrack!=maxNtracks; itrack++) {
417  for(size_t pmt_i=0; pmt_i!=geo->NOpChannels(); pmt_i++) {
418  fSignals_vuv[itrack][pmt_i].clear();
419  fSignals_vis[itrack][pmt_i].clear();
420  }
421  }
422  }
423  }
424 
425 
426  // if(fVerbosity > 0) std::cout<<"Found OpDet hit collection of size "<< TheHitCollection.size()<<std::endl;
427  if(fVerbosity > 0) std::cout<<"Found OpDet hit collection of size "<< (*ph_handle).size()<<std::endl;
428 
429  if((*ph_handle).size()>0)
430  {
431  // for(sim::SimPhotonsCollection::const_iterator itOpDet=TheHitCollection.begin(); itOpDet!=TheHitCollection.end(); itOpDet++)
432  for(auto const& itOpDet: (*ph_handle) )
433  {
434  //Reset Counters
435  fCountOpDetAll=0;
438  //Reset t0 for visible light
439  fT0_vis = 999.;
440 
441  //Get data from HitCollection entry
442  fOpChannel=itOpDet.OpChannel();
443  const sim::SimPhotons& TheHit=itOpDet;
444 
445  //std::cout<<"OpDet " << fOpChannel << " has size " << TheHit.size()<<std::endl;
446 
447  // Loop through OpDet phots.
448  // Note we make the screen output decision outside the loop
449  // in order to avoid evaluating large numbers of unnecessary
450  // if conditions.
451 
452 
453  for(const sim::OnePhoton& Phot: TheHit)
454  {
455  // Calculate wavelength in nm
456  fWavelength= odresponse->wavelength(Phot.Energy);
457 
458  //Get arrival time from phot
459  fTime= Phot.Time;
460 
461  // special case for LibraryBuildJob: no working "Reflected" handle and all photons stored in single object - must sort using wavelength instead
462  if(fPVS->IsBuildJob() && !Reflected) {
463  // all photons contained in object with Reflected = false flag
464  // Increment per OpDet counters and fill per phot trees
465  fCountOpDetAll++;
468  fThePhotonTreeAll->Fill();
469  }
470  }
471 
472  if(odresponse->detected(fOpChannel, Phot))
473  {
475  //only store direct direct light
476  if(!isVisible(fWavelength))
478  // reflected and shifted light is in visible range
479  else if(fPVS->StoreReflected()) {
481  // find the first visible arrival time
482  if(fPVS->StoreReflT0() && fTime < fT0_vis)
483  fT0_vis = fTime;
484  }
485  if(fVerbosity > 3)
486  std::cout<<"OpDetResponseInterface PerPhoton : Event "<<fEventID<<" OpChannel " <<fOpChannel << " Wavelength " << fWavelength << " Detected 1 "<<std::endl;
487  }
488  else {
489  if(fVerbosity > 3)
490  std::cout<<"OpDetResponseInterface PerPhoton : Event "<<fEventID<<" OpChannel " <<fOpChannel << " Wavelength " << fWavelength << " Detected 0 "<<std::endl;
491  }
492 
493  } // if build library and not reflected
494 
495  else {
496  // store in appropriate trees using "Reflected" handle and fPVS->StoreReflected() flag
497  // Increment per OpDet counters and fill per phot trees
498  fCountOpDetAll++;
500  if (!Reflected || (fPVS->StoreReflected() && Reflected)) {
501  fThePhotonTreeAll->Fill();
502  }
503  }
504 
505  if(odresponse->detected(fOpChannel, Phot))
506  {
508  //only store direct direct light
509  if(!Reflected)
511  // reflected and shifted light is in visible range
512  else if(fPVS->StoreReflected() && Reflected ) {
514  // find the first visible arrival time
515  if(fPVS->StoreReflT0() && fTime < fT0_vis)
516  fT0_vis = fTime;
517  }
518  if(fVerbosity > 3)
519  std::cout<<"OpDetResponseInterface PerPhoton : Event "<<fEventID<<" OpChannel " <<fOpChannel << " Wavelength " << fWavelength << " Detected 1 "<<std::endl;
520  }
521  else {
522  if(fVerbosity > 3)
523  std::cout<<"OpDetResponseInterface PerPhoton : Event "<<fEventID<<" OpChannel " <<fOpChannel << " Wavelength " << fWavelength << " Detected 0 "<<std::endl;
524  }
525  }
526  } // for each photon in collection
527 
528 
529 
530  // If this is a library building job, fill relevant entry
531  if(fPVS->IsBuildJob() && !Reflected) // for library build job, both componenents stored in first object with Reflected = false
532  {
534  }
535 
536  // Incremenent per event and fill Per OpDet trees
537  if(fMakeOpDetsTree) fTheOpDetTree->Fill();
540 
541  // Give per OpDet output
542  if(fVerbosity >2) std::cout<<"OpDetResponseInterface PerOpDet : Event "<<fEventID<<" OpDet " << fOpChannel << " All " << fCountOpDetAll << " Det " <<fCountOpDetDetected<<std::endl;
543  }
544 
545  // Fill per event tree
547 
548  // Give per event output
549  if(fVerbosity >1) std::cout<<"OpDetResponseInterface PerEvent : Event "<<fEventID<<" All " << fCountOpDetAll << " Det " <<fCountOpDetDetected<<std::endl;
550 
551  }
552  else
553  {
554  // if empty OpDet hit collection,
555  // add an empty record to the per event tree
557  }
559  assert(mcpartVec);
560  assert(fLightAnalysisTree);
561 
562  std::cout<<"Filling the analysis tree"<<std::endl;
563  //---------------Filling the analysis tree-----------:
564  fRun = evt.run();
565  std::vector<double> this_xyz;
566 
567  //loop over the particles
568  for(simb::MCParticle const& pPart: *mcpartVec){
569 
570  if(pPart.Process() == "primary")
571  fEnergy = pPart.E();
572 
573  //resetting the vectors
574  fstepPositions.clear();
575  fstepTimes.clear();
576  fSignalsvuv.clear();
577  fSignalsvis.clear();
578  fdEdx = -1.;
579  //filling the tree fields
580  fTrackID = pPart.TrackId();
581  fpdg = pPart.PdgCode();
582  fmotherTrackID = pPart.Mother();
583  fdEdx = totalEnergy_track[fTrackID];
586  fProcess = pPart.Process();
587  //filling the center positions of each step
588  for(size_t i_s=1; i_s < pPart.NumberTrajectoryPoints(); i_s++){
589  this_xyz.clear();
590  this_xyz.resize(3);
591  this_xyz[0] = pPart.Position(i_s).X();
592  this_xyz[1] = pPart.Position(i_s).Y();
593  this_xyz[2] = pPart.Position(i_s).Z();
594  fstepPositions.push_back(this_xyz);
595  fstepTimes.push_back(pPart.Position(i_s).T());
596  }
597  //filling the tree per track
598  fLightAnalysisTree->Fill();
599  }
600  } // if fMakeLightAnalysisTree
601  }
602  }
603  }
604  if (fUseLitePhotons)
605  {
606 
607  //Get *ALL* SimPhotonsCollection from Event
608  //std::vector< art::Handle< std::vector< sim::SimPhotonsLite > > > photon_handles;
609  //evt.getManyByType(photon_handles);
610  auto photon_handles = evt.getMany<std::vector<sim::SimPhotonsLite>>();
611  if (photon_handles.size() == 0)
612  throw art::Exception(art::errors::ProductNotFound)<<"sim SimPhotons retrieved and you requested them.";
613 
614  //Get SimPhotonsLite from Event
615  for(auto const& mod : fInputModule){
616  //art::Handle< std::vector<sim::SimPhotonsLite> > photonHandle;
617  //evt.getByLabel(mod, photonHandle);
618 
619  // Loop over direct/reflected photons
620  for (auto const& ph_handle: photon_handles) {
621  // Do some checking before we proceed
622  if (!ph_handle.isValid()) continue;
623  if (ph_handle.provenance()->moduleLabel() != mod) continue; //not the most efficient way of doing this, but preserves the logic of the module. Andrzej
624 
625  bool Reflected = (ph_handle.provenance()->productInstanceName() == "Reflected");
626 
627  //Reset counters
628  fCountEventAll=0;
630 
631  if(fVerbosity > 0) std::cout<<"Found OpDet hit collection of size "<< (*ph_handle).size()<<std::endl;
632 
633 
634  if((*ph_handle).size()>0)
635  {
636 
637  for ( auto const& photon : (*ph_handle) )
638  {
639  //Get data from HitCollection entry
640  fOpChannel=photon.OpChannel;
641  std::map<int, int> PhotonsMap = photon.DetectedPhotons;
642 
643  //Reset Counters
644  fCountOpDetAll=0;
647 
648  for(auto it = PhotonsMap.begin(); it!= PhotonsMap.end(); it++)
649  {
650  // Calculate wavelength in nm
651  if (Reflected) {
653  }
654  else {
655  fWavelength= kVUVWavelength; // original
656  }
657 
658  //Get arrival time from phot
659  fTime= it->first;
660  //std::cout<<"Arrival time: " << fTime<<std::endl;
661 
662  for(int i = 0; i < it->second ; i++)
663  {
664  // Increment per OpDet counters and fill per phot trees
665  fCountOpDetAll++;
667 
668  if(odresponse->detectedLite(fOpChannel))
669  {
671  // direct light
672  if (!Reflected){
674  }
675  else if (Reflected) {
677  }
678  if(fVerbosity > 3)
679  std::cout<<"OpDetResponseInterface PerPhoton : Event "<<fEventID<<" OpChannel " <<fOpChannel << " Wavelength " << fWavelength << " Detected 1 "<<std::endl;
680  }
681  else
682  if(fVerbosity > 3)
683  {
684  std::cout<<"OpDetResponseInterface PerPhoton : Event "<<fEventID<<" OpChannel " <<fOpChannel << " Wavelength " << fWavelength << " Detected 0 "<<std::endl;
685  }
686  }
687  }
688 
689 
690 
691  // Incremenent per event and fill Per OpDet trees
692  if(fMakeOpDetsTree) fTheOpDetTree->Fill();
695 
696  if (fPVS->IsBuildJob())
698 
699 
700  // Give per OpDet output
701  if(fVerbosity >2) std::cout<<"OpDetResponseInterface PerOpDet : Event "<<fEventID<<" OpDet " << fOpChannel << " All " << fCountOpDetAll << " Det " <<fCountOpDetDetected<<std::endl;
702  }
703  // Fill per event tree
705 
706  // Give per event output
707  if(fVerbosity >1) std::cout<<"OpDetResponseInterface PerEvent : Event "<<fEventID<<" All " << fCountOpDetAll << " Det " <<fCountOpDetDetected<<std::endl;
708 
709  }
710  else
711  {
712  // if empty OpDet hit collection,
713  // add an empty record to the per event tree
715  }
716  }
717  }
718  }
719  } // SimPhotonCounter::analyze()
std::vector< std::vector< double > > fstepPositions
unsigned int event
Definition: DataStructs.h:636
unsigned int run
Definition: DataStructs.h:637
void storeVisibility(int channel, int nDirectPhotons, int nReflectedPhotons, double reflectedT0=0.0) const
All information of a photon entering the sensitive optical detector volume.
Definition: SimPhotons.h:64
phot::PhotonVisibilityService const * fPVS
std::vector< std::vector< double > > fSignalsvuv
virtual bool detected(int OpChannel, const sim::OnePhoton &Phot, int &newOpChannel) const
static constexpr double kVUVWavelength
Value used when a typical ultraviolet light wavelength is needed.
unsigned int NOpChannels() const
Number of electronics channels for all the optical detectors.
std::vector< double > fstepTimes
std::vector< std::string > fInputModule
bool isVisible(double wavelength) const
Returns if we label as "visibile" a photon with specified wavelength [nm].
static const int NoParticleId
Definition: sim.h:28
virtual bool detectedLite(int OpChannel, int &newOpChannel) const
const sim::ParticleList & ParticleList() const
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
Collection of photons which recorded on one channel.
Definition: SimPhotons.h:136
std::vector< std::vector< std::vector< double > > > fSignals_vis
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
IDNumber_t< Level::Event > EventNumber_t
Definition: IDNumber.h:118
static constexpr double kVisibleThreshold
Threshold used to resolve between visible and ultraviolet light.
std::vector< std::vector< double > > fSignalsvis
TCEvent evt
Definition: DataStructs.cxx:7
virtual float wavelength(double energy) const
LArSoft geometry interface.
Definition: ChannelGeo.h:16
std::vector< std::vector< std::vector< double > > > fSignals_vuv
QTextStream & endl(QTextStream &s)
Event finding and building.
cheat::ParticleInventoryService const * pi_serv
void opdet::SimPhotonCounter::beginJob ( )
virtual

Reimplemented from art::EDAnalyzer.

Definition at line 205 of file SimPhotonCounter_module.cc.

206  {
207  // Get file service to store trees
210 
211  std::cout<<"Optical Channels positions: "<<geo->Cryostat(0).NOpDet()<<std::endl;
212  for(int ch=0; ch!=int(geo->Cryostat(0).NOpDet()); ch++) {
213  double OpDetCenter[3];
214  geo->OpDetGeoFromOpDet(ch).GetCenter(OpDetCenter);
215  std::cout<<ch<<" "<<OpDetCenter[0]<<" "<<OpDetCenter[1]<<" "<<OpDetCenter[2]<<std::endl;
216  }
217 
218  double CryoBounds[6];
219  geo->CryostatBoundaries(CryoBounds);
220  std::cout<<"Cryo Boundaries"<<std::endl;
221  std::cout<<"Xmin: "<<CryoBounds[0]<<" Xmax: "<<CryoBounds[1]<<" Ymin: "<<CryoBounds[2]
222  <<" Ymax: "<<CryoBounds[3]<<" Zmin: "<<CryoBounds[4]<<" Zmax: "<<CryoBounds[5]<<std::endl;
223 
224  try {
226  }
227  catch (art::Exception const& e) {
228  if (e.categoryCode() != art::errors::ServiceNotFound) throw;
229  mf::LogError("SimPhotonCounter")
230  << "ParticleInventoryService service is not configured!"
231  " Please add it in the job configuration."
232  " In the meanwhile, some checks to particles will be skipped."
233  ;
234  }
235 
236  // Create and assign branch addresses to required tree
238  {
239  fThePhotonTreeAll = tfs->make<TTree>("AllPhotons","AllPhotons");
240  fThePhotonTreeAll->Branch("EventID", &fEventID, "EventID/I");
241  fThePhotonTreeAll->Branch("Wavelength", &fWavelength, "Wavelength/F");
242  fThePhotonTreeAll->Branch("OpChannel", &fOpChannel, "OpChannel/I");
243  fThePhotonTreeAll->Branch("Time", &fTime, "Time/F");
244  }
245 
247  {
248  fThePhotonTreeDetected = tfs->make<TTree>("DetectedPhotons","DetectedPhotons");
249  fThePhotonTreeDetected->Branch("EventID", &fEventID, "EventID/I");
250  fThePhotonTreeDetected->Branch("Wavelength", &fWavelength, "Wavelength/F");
251  fThePhotonTreeDetected->Branch("OpChannel", &fOpChannel, "OpChannel/I");
252  fThePhotonTreeDetected->Branch("Time", &fTime, "Time/F");
253  }
254 
255  if(fMakeOpDetsTree)
256  {
257  fTheOpDetTree = tfs->make<TTree>("OpDets","OpDets");
258  fTheOpDetTree->Branch("EventID", &fEventID, "EventID/I");
259  fTheOpDetTree->Branch("OpChannel", &fOpChannel, "OpChannel/I");
260  fTheOpDetTree->Branch("CountAll", &fCountOpDetAll, "CountAll/I");
261  fTheOpDetTree->Branch("CountDetected", &fCountOpDetDetected, "CountDetected/I");
262  if(fPVS->StoreReflected())
263  fTheOpDetTree->Branch("CountReflDetected", &fCountOpDetReflDetected, "CountReflDetected/I");
264  fTheOpDetTree->Branch("Time", &fTime, "Time/F");
265  }
266 
268  {
269  fTheEventTree = tfs->make<TTree>("OpDetEvents","OpDetEvents");
270  fTheEventTree->Branch("EventID", &fEventID, "EventID/I");
271  fTheEventTree->Branch("CountAll", &fCountEventAll, "CountAll/I");
272  fTheEventTree->Branch("CountDetected",&fCountEventDetected,"CountDetected/I");
273  if(fPVS->StoreReflected())
274  fTheOpDetTree->Branch("CountReflDetected", &fCountOpDetReflDetected, "CountReflDetected/I");
275 
276  }
277 
278  //generating the tree for the light analysis:
280  {
281  fLightAnalysisTree = tfs->make<TTree>("LightAnalysis","LightAnalysis");
282  fLightAnalysisTree->Branch("RunNumber",&fRun);
283  fLightAnalysisTree->Branch("EventID",&fEventID);
284  fLightAnalysisTree->Branch("TrackID",&fTrackID);
285  fLightAnalysisTree->Branch("PdgCode",&fpdg);
286  fLightAnalysisTree->Branch("MotherTrackID",&fmotherTrackID);
287  fLightAnalysisTree->Branch("Energy",&fEnergy);
288  fLightAnalysisTree->Branch("dEdx",&fdEdx);
289  fLightAnalysisTree->Branch("StepPositions",&fstepPositions);
290  fLightAnalysisTree->Branch("StepTimes",&fstepTimes);
291  fLightAnalysisTree->Branch("SignalsVUV",&fSignalsvuv);
292  fLightAnalysisTree->Branch("SignalsVisible",&fSignalsvis);
293  fLightAnalysisTree->Branch("Process",&fProcess);
294  }
295 
296  }
std::vector< std::vector< double > > fstepPositions
OpDetGeo const & OpDetGeoFromOpDet(unsigned int OpDet) const
Returns the geo::OpDetGeo object for the given detector number.
phot::PhotonVisibilityService const * fPVS
void GetCenter(double *xyz, double localz=0.0) const
Definition: OpDetGeo.cxx:40
std::vector< std::vector< double > > fSignalsvuv
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
void CryostatBoundaries(double *boundaries, geo::CryostatID const &cid) const
Returns the boundaries of the specified cryostat.
std::vector< double > fstepTimes
const double e
CryostatGeo const & Cryostat(geo::CryostatID const &cryoid) const
Returns the specified cryostat.
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
unsigned int NOpDet() const
Number of optical detectors in this TPC.
Definition: CryostatGeo.h:361
std::vector< std::vector< double > > fSignalsvis
LArSoft geometry interface.
Definition: ChannelGeo.h:16
QTextStream & endl(QTextStream &s)
cheat::ParticleInventoryService const * pi_serv
void opdet::SimPhotonCounter::ClearVectors ( )

Definition at line 83 of file SimPhotonCounter.cxx.

84 {
85  for(size_t i=0; i<GetVectorSize(); i++){
86  _photonVector_prompt[i]=0.0;
87  _photonVector_late[i]=0.0;
88  }
89 }
std::vector< float > _photonVector_prompt
std::vector< float > _photonVector_late
size_t GetVectorSize() const
void opdet::SimPhotonCounter::endJob ( )
virtual

Reimplemented from art::EDAnalyzer.

Definition at line 299 of file SimPhotonCounter_module.cc.

300  {
301  if(fPVS->IsBuildJob())
302  {
304  }
305  }
phot::PhotonVisibilityService const * fPVS
size_t opdet::SimPhotonCounter::GetVectorSize ( ) const
inline

Definition at line 27 of file SimPhotonCounter.h.

27 { return _photonVector_prompt.size(); }
std::vector< float > _photonVector_prompt
bool opdet::SimPhotonCounter::isVisible ( double  wavelength) const
inlineprivate

Returns if we label as "visibile" a photon with specified wavelength [nm].

Definition at line 163 of file SimPhotonCounter_module.cc.

164  { return fWavelength < kVisibleThreshold; }
static constexpr double kVisibleThreshold
Threshold used to resolve between visible and ultraviolet light.
float opdet::SimPhotonCounter::LatePhotonTotal ( ) const
inline

Definition at line 63 of file SimPhotonCounter.h.

64  { return std::accumulate(_photonVector_late.begin(),_photonVector_late.end(),0.0); }
std::vector< float > _photonVector_late
const std::vector<float>& opdet::SimPhotonCounter::LatePhotonVector ( ) const
inline

Definition at line 53 of file SimPhotonCounter.h.

53 { return _photonVector_late; }
std::vector< float > _photonVector_late
float opdet::SimPhotonCounter::LatePhotonVector ( size_t  i) const
inline

Definition at line 55 of file SimPhotonCounter.h.

55 { return _photonVector_late.at(i); }
std::vector< float > _photonVector_late
float opdet::SimPhotonCounter::MaxLateTime ( ) const
inline

Definition at line 39 of file SimPhotonCounter.h.

39 { return _max_late_time; }
float opdet::SimPhotonCounter::MaxPromptTime ( ) const
inline

Definition at line 37 of file SimPhotonCounter.h.

37 { return _max_prompt_time; }
float opdet::SimPhotonCounter::MaxWavelength ( ) const
inline

Definition at line 32 of file SimPhotonCounter.h.

32 { return _max_wavelength; }
float opdet::SimPhotonCounter::MinLateTime ( ) const
inline

Definition at line 38 of file SimPhotonCounter.h.

38 { return _min_late_time; }
float opdet::SimPhotonCounter::MinPromptTime ( ) const
inline

Definition at line 36 of file SimPhotonCounter.h.

36 { return _min_prompt_time; }
float opdet::SimPhotonCounter::MinWavelength ( ) const
inline

Definition at line 31 of file SimPhotonCounter.h.

31 { return _min_wavelength; }
float opdet::SimPhotonCounter::PhotonTotal ( ) const
inline

Definition at line 65 of file SimPhotonCounter.h.

65 { return (PromptPhotonTotal()+LatePhotonTotal()); }
float PromptPhotonTotal() const
float LatePhotonTotal() const
void opdet::SimPhotonCounter::Print ( void  )

Definition at line 101 of file SimPhotonCounter.cxx.

102 {
103  std::cout << "Vector size: " << GetVectorSize() << std::endl;
104  std::cout << "Time cut ranges: ("
105  << MinPromptTime() << "," << MaxPromptTime() << ") , ("
106  << MinLateTime() << "," << MaxLateTime() << ")" << std::endl;
107  std::cout << "\t" << "i : QE / Prompt / Late / Total" << std::endl;
108  for(size_t i=0; i<GetVectorSize(); i++)
109  std::cout << "\t" << i << ": " << _qeVector[i] << " / " << _photonVector_prompt[i] << " / " << _photonVector_late[i] << " / " << TotalPhotonVector(i) << std::endl;
110 
111 }
float MinPromptTime() const
float MinLateTime() const
std::vector< float > _photonVector_prompt
std::vector< float > TotalPhotonVector() const
float MaxPromptTime() const
float MaxLateTime() const
std::vector< float > _qeVector
std::vector< float > _photonVector_late
size_t GetVectorSize() const
QTextStream & endl(QTextStream &s)
float opdet::SimPhotonCounter::PromptPhotonTotal ( ) const
inline

Definition at line 61 of file SimPhotonCounter.h.

62  { return std::accumulate(_photonVector_prompt.begin(),_photonVector_prompt.end(),0.0); }
std::vector< float > _photonVector_prompt
const std::vector<float>& opdet::SimPhotonCounter::PromptPhotonVector ( ) const
inline

Definition at line 52 of file SimPhotonCounter.h.

52 { return _photonVector_prompt; }
std::vector< float > _photonVector_prompt
float opdet::SimPhotonCounter::PromptPhotonVector ( size_t  i) const
inline

Definition at line 54 of file SimPhotonCounter.h.

54 { return _photonVector_prompt.at(i); }
std::vector< float > _photonVector_prompt
float opdet::SimPhotonCounter::QE ( size_t  i) const
inline

Definition at line 42 of file SimPhotonCounter.h.

42 { return _qeVector.at(i); }
std::vector< float > _qeVector
std::vector<float> const& opdet::SimPhotonCounter::QEVector ( ) const
inline

Definition at line 46 of file SimPhotonCounter.h.

46 { return _qeVector; }
std::vector< float > _qeVector
void opdet::SimPhotonCounter::SetQE ( size_t  i,
float  e 
)
inline

Definition at line 41 of file SimPhotonCounter.h.

41 { _qeVector.at(i) = e; }
const double e
std::vector< float > _qeVector
void opdet::SimPhotonCounter::SetQEVector ( const std::vector< float > &  eV)
inline

Definition at line 44 of file SimPhotonCounter.h.

45  { SetVectorSize(eV.size()); _qeVector = eV; }
void SetVectorSize(size_t s)
static constexpr double eV
Definition: Units.h:127
std::vector< float > _qeVector
void opdet::SimPhotonCounter::SetTimeRanges ( float  t_p1,
float  t_p2,
float  t_l1,
float  t_l2 
)

Definition at line 54 of file SimPhotonCounter.cxx.

55 {
56  if(t_p2<t_p1 || t_l2<t_l1 || t_p2>t_l1 )
57  throw std::runtime_error("ERROR in SimPhotonCounter: bad time ranges");
58 
59  _min_prompt_time = t_p1; _max_prompt_time = t_p2;
60  _min_late_time = t_l1; _max_late_time = t_l2;
61 }
void opdet::SimPhotonCounter::SetVectorSize ( size_t  s)
inline

Definition at line 25 of file SimPhotonCounter.h.

26  { _photonVector_prompt.resize(s); _photonVector_late.resize(s); _qeVector.resize(s); }
std::vector< float > _photonVector_prompt
std::vector< float > _qeVector
std::vector< float > _photonVector_late
static QCString * s
Definition: config.cpp:1042
void opdet::SimPhotonCounter::SetWavelengthRanges ( float  min_w,
float  max_w 
)

Definition at line 37 of file SimPhotonCounter.cxx.

38 {
39  if(min_w >= max_w)
40  throw std::runtime_error("ERROR in SimPhotonCounter: bad wavelength range");
41 
42  _min_wavelength = min_w;
43  _max_wavelength = max_w;
44 }
void opdet::SimPhotonCounter::storeVisibility ( int  channel,
int  nDirectPhotons,
int  nReflectedPhotons,
double  reflectedT0 = 0.0 
) const
private

Definition at line 723 of file SimPhotonCounter_module.cc.

727  {
730 
731  // ask PhotonVisibilityService which voxel was being served,
732  // and how many photons where there generated (yikes!!);
733  // this value was put there by LightSource (yikes!!)
734  int VoxID;
735  double NProd;
736  fPVS->RetrieveLightProd(VoxID, NProd);
737 
738  pvs.SetLibraryEntry(VoxID, channel, double(nDirectPhotons)/NProd);
739 
740  //store reflected light
741  if(fPVS->StoreReflected()) {
742  pvs.SetLibraryEntry(VoxID, channel, double(nReflectedPhotons)/NProd, true);
743 
744  //store reflected first arrival time
745  if (fPVS->StoreReflT0())
746  pvs.SetLibraryReflT0Entry(VoxID, channel, reflectedT0);
747 
748  } // if reflected
749 
750  } // SimPhotonCounter::storeVisibility()
void RetrieveLightProd(int &VoxID, double &N) const
phot::PhotonVisibilityService const * fPVS
uint8_t channel
Definition: CRTFragment.hh:201
void SetLibraryReflT0Entry(int VoxID, int OpChannel, float value)
void SetLibraryEntry(int VoxID, OpDetID_t libOpChannel, float N, bool wantReflected=false)
std::vector< float > opdet::SimPhotonCounter::TotalPhotonVector ( ) const

Definition at line 91 of file SimPhotonCounter.cxx.

91  {
92 
93  std::vector<float> totalPhotonVector(GetVectorSize());
94  std::transform(PromptPhotonVector().begin(),PromptPhotonVector().end(),
96  totalPhotonVector.begin(),
97  std::plus<float>());
98  return totalPhotonVector;
99 }
end
while True: pbar.update(maxval-len(onlies[E][S])) #print iS, "/", len(onlies[E][S]) found = False for...
const std::vector< float > & PromptPhotonVector() const
const std::vector< float > & LatePhotonVector() const
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.
Definition: StdUtils.h:72
size_t GetVectorSize() const
float opdet::SimPhotonCounter::TotalPhotonVector ( size_t  i) const
inline

Definition at line 58 of file SimPhotonCounter.h.

59  { return (PromptPhotonVector(i)+LatePhotonVector(i)); }
const std::vector< float > & PromptPhotonVector() const
const std::vector< float > & LatePhotonVector() const
float opdet::SimPhotonCounter::Wavelength ( const sim::OnePhoton ph)
private

Definition at line 46 of file SimPhotonCounter.cxx.

47 {
48  if(ph.Energy < std::numeric_limits<float>::epsilon())
49  throw std::runtime_error("ERROR in SimPhotonCounter: photon energy is zero.");
50 
51  return 0.00124 / ph.Energy;
52 }
float Energy
Scintillation photon energy [GeV].
Definition: SimPhotons.h:82

Member Data Documentation

float opdet::SimPhotonCounter::_max_late_time
private

Definition at line 77 of file SimPhotonCounter.h.

float opdet::SimPhotonCounter::_max_prompt_time
private

Definition at line 75 of file SimPhotonCounter.h.

float opdet::SimPhotonCounter::_max_wavelength
private

Definition at line 81 of file SimPhotonCounter.h.

float opdet::SimPhotonCounter::_min_late_time
private

Definition at line 76 of file SimPhotonCounter.h.

float opdet::SimPhotonCounter::_min_prompt_time
private

Definition at line 74 of file SimPhotonCounter.h.

float opdet::SimPhotonCounter::_min_wavelength
private

Definition at line 80 of file SimPhotonCounter.h.

std::vector<float> opdet::SimPhotonCounter::_photonVector_late
private

Definition at line 72 of file SimPhotonCounter.h.

std::vector<float> opdet::SimPhotonCounter::_photonVector_prompt
private

Definition at line 71 of file SimPhotonCounter.h.

std::vector<float> opdet::SimPhotonCounter::_qeVector
private

Definition at line 78 of file SimPhotonCounter.h.

Int_t opdet::SimPhotonCounter::fCountEventAll
private

Definition at line 129 of file SimPhotonCounter_module.cc.

Int_t opdet::SimPhotonCounter::fCountEventDetected
private

Definition at line 130 of file SimPhotonCounter_module.cc.

Int_t opdet::SimPhotonCounter::fCountOpDetAll
private

Definition at line 124 of file SimPhotonCounter_module.cc.

Int_t opdet::SimPhotonCounter::fCountOpDetDetected
private

Definition at line 125 of file SimPhotonCounter_module.cc.

Int_t opdet::SimPhotonCounter::fCountOpDetReflDetected
private

Definition at line 126 of file SimPhotonCounter_module.cc.

double opdet::SimPhotonCounter::fdEdx
private

Definition at line 143 of file SimPhotonCounter_module.cc.

double opdet::SimPhotonCounter::fEnergy
private

Definition at line 143 of file SimPhotonCounter_module.cc.

Int_t opdet::SimPhotonCounter::fEventID
private

Definition at line 133 of file SimPhotonCounter_module.cc.

TVector3 opdet::SimPhotonCounter::finalPhotonPosition
private

Definition at line 116 of file SimPhotonCounter_module.cc.

std::vector<std::string> opdet::SimPhotonCounter::fInputModule
private

Definition at line 101 of file SimPhotonCounter_module.cc.

TTree* opdet::SimPhotonCounter::fLightAnalysisTree = nullptr
private

Definition at line 141 of file SimPhotonCounter_module.cc.

bool opdet::SimPhotonCounter::fMakeAllPhotonsTree
private

Definition at line 106 of file SimPhotonCounter_module.cc.

bool opdet::SimPhotonCounter::fMakeDetectedPhotonsTree
private

Definition at line 105 of file SimPhotonCounter_module.cc.

bool opdet::SimPhotonCounter::fMakeLightAnalysisTree
private

Definition at line 137 of file SimPhotonCounter_module.cc.

bool opdet::SimPhotonCounter::fMakeOpDetEventsTree
private

Definition at line 108 of file SimPhotonCounter_module.cc.

bool opdet::SimPhotonCounter::fMakeOpDetsTree
private

Definition at line 107 of file SimPhotonCounter_module.cc.

int opdet::SimPhotonCounter::fmotherTrackID
private

Definition at line 142 of file SimPhotonCounter_module.cc.

Int_t opdet::SimPhotonCounter::fOpChannel
private

Definition at line 134 of file SimPhotonCounter_module.cc.

int opdet::SimPhotonCounter::fpdg
private

Definition at line 142 of file SimPhotonCounter_module.cc.

std::vector<double> opdet::SimPhotonCounter::fPosition0
private

Definition at line 144 of file SimPhotonCounter_module.cc.

std::string opdet::SimPhotonCounter::fProcess
private

Definition at line 149 of file SimPhotonCounter_module.cc.

phot::PhotonVisibilityService const* opdet::SimPhotonCounter::fPVS = nullptr
private

Definition at line 152 of file SimPhotonCounter_module.cc.

int opdet::SimPhotonCounter::fRun
private

Definition at line 142 of file SimPhotonCounter_module.cc.

std::vector<std::vector<std::vector<double> > > opdet::SimPhotonCounter::fSignals_vis
private

Definition at line 139 of file SimPhotonCounter_module.cc.

std::vector<std::vector<std::vector<double> > > opdet::SimPhotonCounter::fSignals_vuv
private

Definition at line 138 of file SimPhotonCounter_module.cc.

std::vector<std::vector<double> > opdet::SimPhotonCounter::fSignalsvis
private

Definition at line 148 of file SimPhotonCounter_module.cc.

std::vector<std::vector<double> > opdet::SimPhotonCounter::fSignalsvuv
private

Definition at line 147 of file SimPhotonCounter_module.cc.

std::vector<std::vector<double> > opdet::SimPhotonCounter::fstepPositions
private

Definition at line 145 of file SimPhotonCounter_module.cc.

std::vector<double> opdet::SimPhotonCounter::fstepTimes
private

Definition at line 146 of file SimPhotonCounter_module.cc.

Float_t opdet::SimPhotonCounter::fT0_vis
private

Definition at line 127 of file SimPhotonCounter_module.cc.

TTree* opdet::SimPhotonCounter::fTheEventTree
private

Definition at line 96 of file SimPhotonCounter_module.cc.

TTree* opdet::SimPhotonCounter::fTheOpDetTree
private

Definition at line 95 of file SimPhotonCounter_module.cc.

TTree* opdet::SimPhotonCounter::fThePhotonTreeAll
private

Definition at line 93 of file SimPhotonCounter_module.cc.

TTree* opdet::SimPhotonCounter::fThePhotonTreeDetected
private

Definition at line 94 of file SimPhotonCounter_module.cc.

Float_t opdet::SimPhotonCounter::fTime
private

Definition at line 122 of file SimPhotonCounter_module.cc.

int opdet::SimPhotonCounter::fTrackID
private

Definition at line 142 of file SimPhotonCounter_module.cc.

bool const opdet::SimPhotonCounter::fUseLitePhotons
private

Definition at line 154 of file SimPhotonCounter_module.cc.

int opdet::SimPhotonCounter::fVerbosity
private

Definition at line 103 of file SimPhotonCounter_module.cc.

Float_t opdet::SimPhotonCounter::fWavelength
private

Definition at line 121 of file SimPhotonCounter_module.cc.

TVector3 opdet::SimPhotonCounter::initialPhotonPosition
private

Definition at line 115 of file SimPhotonCounter_module.cc.

constexpr double opdet::SimPhotonCounter::kVisibleThreshold = 200.0
staticprivate

Threshold used to resolve between visible and ultraviolet light.

Definition at line 83 of file SimPhotonCounter_module.cc.

constexpr double opdet::SimPhotonCounter::kVisibleWavelength = 450.0
staticprivate

Value used when a typical visible light wavelength is needed.

Definition at line 86 of file SimPhotonCounter_module.cc.

constexpr double opdet::SimPhotonCounter::kVUVWavelength = 128.0
staticprivate

Value used when a typical ultraviolet light wavelength is needed.

Definition at line 89 of file SimPhotonCounter_module.cc.

cheat::ParticleInventoryService const* opdet::SimPhotonCounter::pi_serv = nullptr
private

Definition at line 151 of file SimPhotonCounter_module.cc.


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