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

Public Member Functions

 Gen311 (fhicl::ParameterSet const &p)
 
virtual ~Gen311 ()
 
 Gen311 (Gen311 const &)=delete
 
 Gen311 (Gen311 &&)=delete
 
Gen311operator= (Gen311 const &)=delete
 
Gen311operator= (Gen311 &&)=delete
 
void produce (art::Event &e) override
 
void reconfigure (fhicl::ParameterSet const &p)
 
void beginJob () override
 
void beginRun (art::Run &run) 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 openDBs ()
 
void populateNShowers ()
 
void populateTOffset ()
 
bool InTPC (const simb::MCParticle particle)
 
double wrapvar (const double var, const double low, const double high)
 
double wrapvarBoxNo (const double var, const double low, const double high, int &boxno)
 
void GetSample (simb::MCTruth &)
 

Private Attributes

int fShowerInputs =0
 Number of shower inputs to process from. More...
 
std::vector< double > fNShowersPerEvent
 Number of showers to put in each event of duration fSampleTime; one per showerinput. More...
 
std::vector< int > fMaxShowers
 
double fShowerBounds [6] ={0.,0.,0.,0.,0.,0.}
 Boundaries of area over which showers are to be distributed. More...
 
double fToffset_corsika =0.
 Timing offset to account for propagation time through atmosphere, populated from db. More...
 
ifdh_ns::ifdh * fIFDH =0
 (optional) flux file handling More...
 
double fProjectToHeight =0.
 Height to which particles will be projected [cm]. More...
 
std::vector< std::stringfShowerInputFiles
 Set of CORSIKA shower data files to use. More...
 
std::vector< double > fShowerFluxConstants
 Set of flux constants to be associated with each shower data file. More...
 
double fSampleTime =0.
 Duration of sample [s]. More...
 
double fToffset =0.
 Time offset of sample, defaults to zero (no offset) [s]. More...
 
std::vector< double > fBuffBox
 Buffer box extensions to cryostat in each direction (6 of them: x_lo,x_hi,y_lo,y_hi,z_lo,z_hi) [cm]. More...
 
double fShowerAreaExtension =0.
 Extend distribution of corsika particles in x,z by this much (e.g. 1000 will extend 10 m in -x, +x, -z, and +z) [cm]. More...
 
sqlite3fdb [5]
 Pointers to sqlite3 database object, max of 5. More...
 
double fRandomYZShift =0.
 Each shower will be shifted by a random amount in xz so that showers won't repeatedly sample the same space [cm]. More...
 
std::vector< double > fActiveVolumeCut
 Active volume cut. More...
 
std::vector< double > fLeadingParticlesList
 
bool fUseIFDH
 < List of pdg codes for particles that can be potentially used as triggers More...
 
int fRun
 
int fEvent
 
double fTheta
 
double fPhi
 
double fMomX
 
double fMomY
 
double fMomZ
 
double fMomT
 
double fStartX
 
double fStartY
 
double fStartZ
 
TTree * fTree
 
art::ServiceHandle< geo::Geometrygeom
 
CLHEP::HepRandomEngine & fGenEngine
 
CLHEP::HepRandomEngine & fPoisEngine
 

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 55 of file Gen311_module.cc.

Constructor & Destructor Documentation

evgendp::Gen311::Gen311 ( fhicl::ParameterSet const &  p)
explicit

Definition at line 247 of file Gen311_module.cc.

248  : EDProducer{p},
249  fProjectToHeight(p.get< double >("ProjectToHeight",0.)),
250  fShowerInputFiles(p.get< std::vector< std::string > >("ShowerInputFiles")),
251  fShowerFluxConstants(p.get< std::vector< double > >("ShowerFluxConstants")),
252  fSampleTime(p.get< double >("SampleTime",0.)),
253  fToffset(p.get< double >("TimeOffset",0.)),
254  fBuffBox(p.get< std::vector< double > >("BufferBox",{0.0, 0.0, 0.0, 0.0, 0.0, 0.0})),
255  fShowerAreaExtension(p.get< double >("ShowerAreaExtension",0.)),
256  fRandomYZShift(p.get< double >("RandomYZShift",0.)),
257  fActiveVolumeCut(p.get< std::vector< double > >("ActiveVolumeCut")),
258  fLeadingParticlesList(p.get< std::vector< double > >("LeadingParticlesList")),
259  fUseIFDH(p.get< bool >("UseIFDH")),
260  // create a default random engine; obtain the random seed from NuRandomService,
261  // unless overridden in configuration with key "Seed"
263  ->createEngine(*this, "HepJamesRandom", "gen", p, { "Seed", "SeedGenerator" })),
265  ->createEngine(*this, "HepJamesRandom", "pois", p, "SeedPoisson"))
266  {
267 
268  if(fShowerInputFiles.size() != fShowerFluxConstants.size() || fShowerInputFiles.size()==0 || fShowerFluxConstants.size()==0)
269  throw cet::exception("Gen311") << "ShowerInputFiles and ShowerFluxConstants have different or invalid sizes!"<<"\n";
271 
272  if(fSampleTime==0.) throw cet::exception("Gen311") << "SampleTime not set!";
273 
274  if(fProjectToHeight==0.) mf::LogInfo("Gen311")<<"Using 0. for fProjectToHeight!"
275  ;
276 
277  this->reconfigure(p);
278 
279  this->openDBs();
280  this->populateNShowers();
281  this->populateTOffset();
282 
283  produces< std::vector<simb::MCTruth> >();
284  produces< sumdata::RunData, art::InRun >();
285  }
CLHEP::HepRandomEngine & fPoisEngine
base_engine_t & createEngine(seed_t seed)
std::vector< double > fActiveVolumeCut
Active volume cut.
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
EDProducer(fhicl::ParameterSet const &pset)
Definition: EDProducer.h:20
std::vector< double > fShowerFluxConstants
Set of flux constants to be associated with each shower data file.
double fSampleTime
Duration of sample [s].
void reconfigure(fhicl::ParameterSet const &p)
int fShowerInputs
Number of shower inputs to process from.
double fProjectToHeight
Height to which particles will be projected [cm].
CLHEP::HepRandomEngine & fGenEngine
p
Definition: test.py:223
std::vector< std::string > fShowerInputFiles
Set of CORSIKA shower data files to use.
double fRandomYZShift
Each shower will be shifted by a random amount in xz so that showers won&#39;t repeatedly sample the same...
std::vector< double > fBuffBox
Buffer box extensions to cryostat in each direction (6 of them: x_lo,x_hi,y_lo,y_hi,z_lo,z_hi) [cm].
double fShowerAreaExtension
Extend distribution of corsika particles in x,z by this much (e.g. 1000 will extend 10 m in -x...
bool fUseIFDH
< List of pdg codes for particles that can be potentially used as triggers
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
double fToffset
Time offset of sample, defaults to zero (no offset) [s].
std::vector< double > fLeadingParticlesList
evgendp::Gen311::~Gen311 ( )
virtual

Definition at line 287 of file Gen311_module.cc.

287  {
288  for(int i=0; i<fShowerInputs; i++){
289  sqlite3_close(fdb[i]);
290  }
291  //cleanup temp files
292  fIFDH->cleanup();
293  }
ifdh_ns::ifdh * fIFDH
(optional) flux file handling
sqlite3 * fdb[5]
Pointers to sqlite3 database object, max of 5.
int fShowerInputs
Number of shower inputs to process from.
evgendp::Gen311::Gen311 ( Gen311 const &  )
delete
evgendp::Gen311::Gen311 ( Gen311 &&  )
delete

Member Function Documentation

void evgendp::Gen311::beginJob ( )
overridevirtual

Reimplemented from art::EDProducer.

Definition at line 300 of file Gen311_module.cc.

300  {
301 
302 
304 
305  fTree = tfs->make<TTree>("entries", "entries tree");
306  fTree->Branch("Run", &fRun, "Run/I");
307  fTree->Branch("Event", &fEvent, "Event/I");
308  fTree->Branch("Theta", &fTheta, "Theta/D");
309  fTree->Branch("Phi", &fPhi, "Phi/D");
310  fTree->Branch("MomX", &fMomX, "MomX/D");
311  fTree->Branch("MomY", &fMomY, "MomY/D");
312  fTree->Branch("MomZ", &fMomZ, "MomZ/D");
313  fTree->Branch("MomT", &fMomT, "MomT/D");
314  fTree->Branch("StartX", &fStartX, "StartX/D");
315  fTree->Branch("StartY", &fStartY, "StartY/D");
316  fTree->Branch("StartZ", &fStartZ, "StartZ/D");
317 
318  }
void evgendp::Gen311::beginRun ( art::Run run)
overridevirtual

Reimplemented from art::EDProducer.

Definition at line 320 of file Gen311_module.cc.

320  {
321  // grab the geometry object to see what geometry we are using
323  std::unique_ptr<sumdata::RunData> runcol(new sumdata::RunData(geo->DetectorName()));
324  run.put(std::move(runcol));
325  return;
326  }
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 evgendp::Gen311::GetSample ( simb::MCTruth mctruth)
private

Definition at line 617 of file Gen311_module.cc.

617  {
618  //for each input, randomly pull fNShowersPerEvent[i] showers from the Particles table
619  //and randomly place them in time (between -fSampleTime/2 and fSampleTime/2)
620  //wrap their positions based on the size of the area under consideration
621  //based on http://nusoft.fnal.gov/larsoft/doxsvn/html/CRYHelper_8cxx_source.html (Sample)
622 
623  //query from sqlite db with select * from particles where shower in (select id from showers ORDER BY substr(id*0.51123124141,length(id)+2) limit 100000) ORDER BY substr(shower*0.51123124141,length(shower)+2);
624  //where 0.51123124141 is a random seed to allow randomly selecting rows and should be randomly generated for each query
625  //the inner order by is to select randomly from the possible shower id's
626  //the outer order by is to make sure the shower numbers are ordered randomly (without this, the showers always come out ordered by shower number
627  //and 100000 is the number of showers to be selected at random and needs to be less than the number of showers in the showers table
628 
629  //dummy holder for particles object
630  std::map< int, std::vector<simb::MCParticle> > ParticleMap;
631  std::map< int, int > ShowerTrkIDMap;
632 
633  //define the trigger object
634  Trigger trg;
635  trg.SetCryoBuffer( fBuffBox );
636  trg.SetTPCBuffer( fActiveVolumeCut );
637 
638  //TDatabasePDG is for looking up particle masses
639  static TDatabasePDG* pdgt = TDatabasePDG::Instance();
640 
641  //db variables
642  sqlite3_stmt *statement;
643  const TString kStatement("select shower,pdg,px,py,pz,x,z,t,e from particles where shower in (select id from showers ORDER BY substr(id*%f,length(id)+2) limit %d) ORDER BY substr(shower*%f,length(shower)+2)");
644 
645  CLHEP::RandFlat flat(fGenEngine);
646  CLHEP::RandPoissonQ randpois(fPoisEngine);
647 
648  // get geometry and figure where to project particles to, based on CRYHelper
649  //art::ServiceHandle<geo::Geometry> geom;
650  double x1, x2;
651  double y1, y2;
652  double z1, z2;
653  geom->WorldBox(&x1, &x2, &y1, &y2, &z1, &z2);
654 
655  // make the world box slightly smaller so that the projection to
656  // the edge avoids possible rounding errors later on with Geant4
657  double fBoxDelta=1.e-5;
658 
659  geom->WorldBox(&y1, &y2, &x1, &x2, &z1, &z2);
660  y1 += fBoxDelta;
661  y2 -= fBoxDelta;
662  x1 += fBoxDelta;
663  x2 = fProjectToHeight;
664  z1 += fBoxDelta;
665  z2 -= fBoxDelta;
666 
667  //populate mctruth
668  int ntotalCtr=0; //count number of particles added to mctruth
669  //int lastShower=0; //keep track of last shower id so that t can be randomized on every new shower
670  int nShowerCntr=0; //keep track of how many showers are left to be added to mctruth
671  int nShowerQry=0; //number of showers to query from db
672  int shower,pdg;
673  double px,py,pz,etot, y=0,z,t; //tParticleTime,,showerTime=0.,showerTimex=0.,showerTimez=0.,showerXOffset=0.,showerZOffset=0.,t;
674  for(int i=0; i<fShowerInputs; i++){
675  nShowerCntr=randpois.fire(fNShowersPerEvent[i]);
676  mf::LogInfo("Gen311") << " Shower input " << i << " with mean " << fNShowersPerEvent[i] << " generating " << nShowerCntr;
677 
678  while(nShowerCntr>0){
679  //how many showers should we query?
680  if(nShowerCntr>fMaxShowers[i]){
681  nShowerQry=fMaxShowers[i]; //take the group size
682  }else{
683  nShowerQry=nShowerCntr; //take the rest that are needed
684  }
685  //build and do query to get nshowers
686  double thisrnd=flat(); //need a new random number for each query
687  TString kthisStatement=TString::Format(kStatement.Data(),thisrnd,nShowerQry,thisrnd);
688  MF_LOG_DEBUG("Gen311")<<"Executing: "<<kthisStatement;
689  if ( sqlite3_prepare(fdb[i], kthisStatement.Data(), -1, &statement, 0 ) == SQLITE_OK ){
690  int res=0;
691  //loop over database rows, pushing particles into mctruth object
692  while(1){
693  res = sqlite3_step(statement);
694  if ( res == SQLITE_ROW ){
695  shower=sqlite3_column_int(statement,0);
696 
697  pdg=sqlite3_column_int(statement,1);
698  //get mass for this particle
699  double m = 0.; // in GeV
700  TParticlePDG* pdgp = pdgt->GetParticle(pdg);
701  if (pdgp) m = pdgp->Mass();
702 
703  //get momentum components
704  //NR rotation from CORSIKA ref system to LArSoft ref system:
705  //LArsoft: px, py, pz;
706  //uBoone px', py', pz'; << from the sqlite database instances
707  // px = py'
708  // py = pz'
709  // pz = px'
710  px = sqlite3_column_double(statement,3);
711  py = sqlite3_column_double(statement,4);
712  pz = sqlite3_column_double(statement,2);
713  etot=sqlite3_column_double(statement,8);
714  y = sqlite3_column_double(statement,6);
715  z = sqlite3_column_double(statement,5);
716  t = sqlite3_column_double(statement,7); //time offset, includes propagation time from top of atmosphere
717 
718  TLorentzVector pos(fShowerBounds[1], y, z,t);// time needs to be in ns to match GENIE, etc
719  TLorentzVector mom(px,py,pz,etot);
720 
721  simb::MCParticle p(ntotalCtr,pdg,"primary",-200,m,1);
722  p.AddTrajectoryPoint(pos,mom);
723 
724  //if it is muon, fill up the list of possible triggers
726  pdgIt = find( fLeadingParticlesList.begin(), fLeadingParticlesList.end(), p.PdgCode() );
727  if( pdgIt != fLeadingParticlesList.end() ){ trg.AddMuon( p ); }
728 
729  ParticleMap[ shower ].push_back(p);
730  ShowerTrkIDMap[ ntotalCtr ] = shower; //<< use the unique trackID to trace the source shower back
731 
732  ntotalCtr++;
733  }else if ( res == SQLITE_DONE ){
734  break;
735  }else{
736  throw cet::exception("Gen311") << "Unexpected sqlite3_step return value: (" <<res<<"); "<<"ERROR:"<<sqlite3_errmsg(fdb[i])<<"\n";
737  }
738  }
739  }else{
740  throw cet::exception("Gen311") << "Error preparing statement: (" <<kthisStatement<<"); "<<"ERROR:"<<sqlite3_errmsg(fdb[i])<<"\n";
741  }
742  nShowerCntr=nShowerCntr-nShowerQry;
743  }
744  } //end loop over showers
745 
746  trg.MakeTrigger(fGenEngine); //<<--Select a muon to use as trigger
747 
748  double showerTime=0, showerTimey=0, showerTimez=0, showerYOffset=0, showerZOffset=0;
749  int boxnoY=0, boxnoZ=0;
750 
751  for( auto ParticleMapIt : ParticleMap ){
752 
753  if( ParticleMapIt.first == ShowerTrkIDMap[ trg.GetTriggerId() ] ){
754 
755  showerTime =1e9*trg.GetTriggerOffsetT(); //converting from s to ns
756  showerTimey=1e9*trg.GetTriggerOffsetT();
757  showerTimez=1e9*trg.GetTriggerOffsetT();
758 
759  //and a random offset in both z and x controlled by the fRandomYZShift parameter
760  showerYOffset=1e9*trg.GetTriggerOffsetY();
761  showerZOffset=1e9*trg.GetTriggerOffsetZ();
762 
763  }else{
764 
765  showerTime =1e9*(flat()*fSampleTime); //converting from s to ns
766  showerTimey=1e9*(flat()*fSampleTime); //converting from s to ns
767  showerTimez=1e9*(flat()*fSampleTime); //converting from s to ns
768  //and a random offset in both z and x controlled by the fRandomYZShift parameter
769  showerYOffset=flat()*fRandomYZShift - (fRandomYZShift/2);
770  showerZOffset=flat()*fRandomYZShift - (fRandomYZShift/2);
771  }
772 
773  for( auto particleIt : ParticleMapIt.second ){
774 
775  simb::MCParticle particle(particleIt.TrackId(),particleIt.PdgCode(),"primary",-200,particleIt.Mass(),1);
776 
777  double x0[3]={0.};
778  double xyzo[3]={0.};
779  double dx[3]={0.};
780 
781  if( particleIt.TrackId() == trg.GetTriggerId() ){
782 
783  x0[0] = trg.GetTriggerPos().X();
784  x0[1] = trg.GetTriggerPos().Y();
785  x0[2] = trg.GetTriggerPos().Z();
786  dx[0] = trg.GetTriggerMom().X();
787  dx[1] = trg.GetTriggerMom().Y();
788  dx[2] = trg.GetTriggerMom().Z();
789 
790  t = trg.GetTriggerPos().T();
791 
792  }else{
793 
794  y = wrapvarBoxNo(particleIt.Position().Y()+showerYOffset,fShowerBounds[2],fShowerBounds[3],boxnoY);
795  z = wrapvarBoxNo(particleIt.Position().Z()+showerZOffset,fShowerBounds[4],fShowerBounds[5],boxnoZ);
796 
797  t=particleIt.Position().T()+showerTime+(1e9*fToffset)-fToffset_corsika + showerTimey*boxnoY + showerTimez*boxnoZ;
798  t=wrapvar(t,(1e9*fToffset),1e9*(fToffset+fSampleTime));
799 
800  x0[0]= fShowerBounds[1];
801  x0[1]= y;
802  x0[2]= z;
803  dx[0]= particleIt.Momentum().X();
804  dx[1]= particleIt.Momentum().Y();
805  dx[2]= particleIt.Momentum().Z();
806 
807  }
808 
809  trg.ProjectToBoxEdge(x0, dx, x1, x2, y1, y2, z1, z2, xyzo);
810  TLorentzVector pos(xyzo[0],xyzo[1],xyzo[2], t);
811  TLorentzVector mom(dx[0],dx[1],dx[2], particleIt.Momentum().T() );
812  particle.AddTrajectoryPoint( pos, mom );
813 
814  mctruth.Add( particle );
815  } //end loop over particles
816  }//loop over showers
817  } //end GetSample
CLHEP::HepRandomEngine & fPoisEngine
intermediate_table::iterator iterator
Format
Definition: utils.h:7
double wrapvarBoxNo(const double var, const double low, const double high, int &boxno)
std::vector< double > fActiveVolumeCut
Active volume cut.
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
double fShowerBounds[6]
Boundaries of area over which showers are to be distributed.
void WorldBox(double *xlo, double *xhi, double *ylo, double *yhi, double *zlo, double *zhi) const
Fills the arguments with the boundaries of the world.
double wrapvar(const double var, const double low, const double high)
double fSampleTime
Duration of sample [s].
struct sqlite3_stmt sqlite3_stmt
std::vector< double > fNShowersPerEvent
Number of showers to put in each event of duration fSampleTime; one per showerinput.
sqlite3 * fdb[5]
Pointers to sqlite3 database object, max of 5.
int fShowerInputs
Number of shower inputs to process from.
double fProjectToHeight
Height to which particles will be projected [cm].
double T(const int i=0) const
Definition: MCParticle.h:224
CLHEP::HepRandomEngine & fGenEngine
p
Definition: test.py:223
std::vector< int > fMaxShowers
double fToffset_corsika
Timing offset to account for propagation time through atmosphere, populated from db.
double fRandomYZShift
Each shower will be shifted by a random amount in xz so that showers won&#39;t repeatedly sample the same...
void Add(simb::MCParticle const &part)
Definition: MCTruth.h:80
std::vector< double > fBuffBox
Buffer box extensions to cryostat in each direction (6 of them: x_lo,x_hi,y_lo,y_hi,z_lo,z_hi) [cm].
#define MF_LOG_DEBUG(id)
art::ServiceHandle< geo::Geometry > geom
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
double fToffset
Time offset of sample, defaults to zero (no offset) [s].
std::vector< double > fLeadingParticlesList
bool evgendp::Gen311::InTPC ( const simb::MCParticle  particle)
private
void evgendp::Gen311::openDBs ( )
private

Definition at line 329 of file Gen311_module.cc.

329  {
330  //choose files based on fShowerInputFiles, copy them with ifdh, open them
331  //sqlite3_stmt *statement;
332  CLHEP::RandFlat flat(fGenEngine);
333 
334  if(fUseIFDH){
335  //setup ifdh object
336  if ( ! fIFDH ) fIFDH = new ifdh_ns::ifdh;
337  const char* ifdh_debug_env = std::getenv("IFDH_DEBUG_LEVEL");
338  if ( ifdh_debug_env ) {
339  mf::LogInfo("CORSIKAGendp") << "IFDH_DEBUG_LEVEL: " << ifdh_debug_env<<"\n";
340  fIFDH->set_debug(ifdh_debug_env);
341  }
342  }
343 
344  //setup ifdh object
345  if ( ! fIFDH ) fIFDH = new ifdh_ns::ifdh;
346  const char* ifdh_debug_env = std::getenv("IFDH_DEBUG_LEVEL");
347  if ( ifdh_debug_env ) {
348  mf::LogInfo("CORSIKAGendp") << "IFDH_DEBUG_LEVEL: " << ifdh_debug_env<<"\n";
349  fIFDH->set_debug(ifdh_debug_env);
350  }
351 
352  std::vector<std::pair<std::string,long>> selectedflist;
353  for(int i=0; i<fShowerInputs; i++){
354  if(fShowerInputFiles[i].find("*")==std::string::npos){
355  //if there are no wildcards, don't call findMatchingFiles
356  selectedflist.push_back(std::make_pair(fShowerInputFiles[i],0));
357  mf::LogInfo("Gen311") << "Selected"<<selectedflist.back().first<<"\n";
358  }else{
359  //read all the file mathching the pattern
360  std::vector<std::pair<std::string,long>> flist;
361  std::string path(gSystem->DirName(fShowerInputFiles[i].c_str()));
362  std::string pattern(gSystem->BaseName(fShowerInputFiles[i].c_str()));
363 
364  if(fUseIFDH){
365  //acess the files using ifdh
366  flist = fIFDH->findMatchingFiles(path,pattern);
367  }else{
368  //access the files using drent
369  auto wildcardPosition = pattern.find("*");
370  pattern = pattern.substr( 0, wildcardPosition );
371 
372  DIR *dir;
373  struct dirent *ent;
374  int index=0;
375  if ((dir = opendir( path.c_str() )) != NULL) {
376  while ((ent = readdir (dir)) != NULL) {
377  index++;
378  std::pair<std::string,long> name;
379  std::string parsename(ent->d_name);
380 
381  if( parsename.substr(0, wildcardPosition) == pattern ){
382  name.first= path+"/"+parsename;
383  name.second = index;
384  flist.push_back( name );
385  }
386  }
387  closedir (dir);
388  }else {
389  throw cet::exception("Gen311") << "Can't open directory with pattern: "<<path<<":"<<pattern<<std::endl;
390  }
391  }
392 
393  unsigned int selIndex=-1;
394  if(flist.size()==1){ //0th element is the search path:pattern
395  selIndex=0;
396  }else if(flist.size()>1){
397  selIndex= (unsigned int) (flat()*(flist.size()-1)+0.5); //rnd with rounding, dont allow picking the 0th element
398  }else{
399  throw cet::exception("Gen311") << "No files returned for path:pattern: "<<path<<":"<<pattern<<std::endl;
400  }
401  selectedflist.push_back(flist[selIndex]);
402  mf::LogInfo("Gen311") << "For "<<fShowerInputFiles[i]<<":"<<pattern
403  <<"\nFound "<< flist.size() << " candidate files"
404  <<"\nChoosing file number "<< selIndex << "\n"
405  <<"\nSelected "<<selectedflist.back().first<<"\n";
406  }
407  }
408 
409  //open the files in fShowerInputFilesLocalPaths with sqlite3
410  std::vector<std::string> locallist;
411  for(unsigned int i=0; i<selectedflist.size(); i++){
412  mf::LogInfo("Gen311")
413  << "Fetching: "<<selectedflist[i].first<<" "<<selectedflist[i].second<<"\n";
414  std::string fetchedfile(selectedflist[i].first);
415  MF_LOG_DEBUG("Gen311") << "Fetched; local path: "<<fetchedfile;
416  locallist.push_back(fetchedfile);
417  }
418 
419  for(unsigned int i=0; i<locallist.size(); i++){
420  //prepare and execute statement to attach db file
421  int res=sqlite3_open(locallist[i].c_str(),&fdb[i]);
422  if (res!= SQLITE_OK)
423  throw cet::exception("Gen311") << "Error opening db: (" <<locallist[i].c_str()<<") ("<<res<<"): " << sqlite3_errmsg(fdb[i]) << "; memory used:<<"<<sqlite3_memory_used()<<"/"<<sqlite3_memory_highwater(0)<<"\n";
424  else
425  mf::LogInfo("Gen311")<<"Attached db "<< locallist[i]<<"\n";
426  }
427  }//end openDBs
static QCString name
Definition: declinfo.cpp:673
std::string string
Definition: nybbler.cc:12
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
string dir
ifdh_ns::ifdh * fIFDH
(optional) flux file handling
sqlite3 * fdb[5]
Pointers to sqlite3 database object, max of 5.
int fShowerInputs
Number of shower inputs to process from.
std::string getenv(std::string const &name)
Definition: getenv.cc:15
CLHEP::HepRandomEngine & fGenEngine
std::vector< std::string > fShowerInputFiles
Set of CORSIKA shower data files to use.
std::string pattern
Definition: regex_t.cc:35
#define MF_LOG_DEBUG(id)
bool fUseIFDH
< List of pdg codes for particles that can be potentially used as triggers
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
QTextStream & endl(QTextStream &s)
Gen311& evgendp::Gen311::operator= ( Gen311 const &  )
delete
Gen311& evgendp::Gen311::operator= ( Gen311 &&  )
delete
void evgendp::Gen311::populateNShowers ( )
private

Definition at line 531 of file Gen311_module.cc.

531  {
532  //populate vector of the number of showers per event based on:
533  //AREA the showers are being distributed over
534  //TIME of the event (fSampleTime)
535  //flux constants that determine the overall normalizations (fShowerFluxConstants)
536  //Energy range over which the sample was generated (ERANGE_*)
537  //power spectrum over which the sample was generated (ESLOPE)
538 
539 
540  //compute shower area based on the maximal x,z dimensions of cryostat boundaries + fShowerAreaExtension
541  //art::ServiceHandle<geo::Geometry> geom;
542  for(unsigned int c = 0; c < geom->Ncryostats(); ++c){
543  double bounds[6] = {0.};
544  geom->CryostatBoundaries(bounds, c);
545  for (unsigned int bnd = 0; bnd<6; bnd++){
546  mf::LogVerbatim("Gen311")<<"Cryo Boundary: "<<bnd<<"="<<bounds[bnd]<<" ( + Buffer="<<fBuffBox[bnd]<<")\n";
547  if(fabs(bounds[bnd])>fabs(fShowerBounds[bnd])){
548  fShowerBounds[bnd]=bounds[bnd];
549  }
550  }
551  }
552  //add on fShowerAreaExtension without being clever
557 
558  double showersArea=(fShowerBounds[3]/100-fShowerBounds[2]/100)*(fShowerBounds[5]/100-fShowerBounds[4]/100);
559 
560  mf::LogInfo("Gen311")
561  << "Area extended by : "<<fShowerAreaExtension
562  <<"\nShowers to be distributed betweeen: y="<<fShowerBounds[2]<<","<<fShowerBounds[3]
563  <<" & z="<<fShowerBounds[4]<<","<<fShowerBounds[5]
564  <<"\nShowers to be distributed with random YZ shift: "<<fRandomYZShift<<" cm"
565  <<"\nShowers to be distributed over area: "<<showersArea<<" m^2"
566  <<"\nShowers to be distributed over time: "<<fSampleTime<<" s"
567  <<"\nShowers to be distributed with time offset: "<<fToffset<<" s"
568  <<"\nShowers to be distributed at x: "<<fShowerBounds[1]<<" cm"
569  ;
570 
571  //db variables
572  sqlite3_stmt *statement;
573  const std::string kStatement("select erange_high,erange_low,eslope,nshow from input");
574  double upperLimitOfEnergyRange=0.,lowerLimitOfEnergyRange=0.,energySlope=0.,oneMinusGamma=0.,EiToOneMinusGamma=0.,EfToOneMinusGamma=0.;
575 
576  for(int i=0; i<fShowerInputs; i++){
577  //build and do query to get run info from databases
578  // double thisrnd=flat();//need a new random number for each query
579  if ( sqlite3_prepare(fdb[i], kStatement.c_str(), -1, &statement, 0 ) == SQLITE_OK ){
580  int res=0;
581  res = sqlite3_step(statement);
582  if ( res == SQLITE_ROW ){
583  upperLimitOfEnergyRange=sqlite3_column_double(statement,0);
584  lowerLimitOfEnergyRange=sqlite3_column_double(statement,1);
585  energySlope = sqlite3_column_double(statement,2);
586  fMaxShowers.push_back(sqlite3_column_int(statement,3));
587  oneMinusGamma = 1 + energySlope;
588  EiToOneMinusGamma = pow(lowerLimitOfEnergyRange, oneMinusGamma);
589  EfToOneMinusGamma = pow(upperLimitOfEnergyRange, oneMinusGamma);
590  mf::LogVerbatim("Gen311")<<"For showers input "<< i<<" found e_hi="<<upperLimitOfEnergyRange<<", e_lo="<<lowerLimitOfEnergyRange<<", slope="<<energySlope<<", k="<<fShowerFluxConstants[i]<<"\n";
591  }else{
592  throw cet::exception("Gen311") << "Unexpected sqlite3_step return value: (" <<res<<"); "<<"ERROR:"<<sqlite3_errmsg(fdb[i])<<"\n";
593  }
594  }else{
595  throw cet::exception("Gen311") << "Error preparing statement: (" <<kStatement<<"); "<<"ERROR:"<<sqlite3_errmsg(fdb[i])<<"\n";
596  }
597 
598  //this is computed, how?
599  double NShowers=( M_PI * showersArea * fShowerFluxConstants[i] * (EfToOneMinusGamma - EiToOneMinusGamma) / oneMinusGamma )*fSampleTime;
600  fNShowersPerEvent.push_back(NShowers);
601  mf::LogVerbatim("Gen311")<<"For showers input "<< i
602  <<" the number of showers per event is "<<(int)NShowers<<"\n";
603  }
604  }
MaybeLogger_< ELseverityLevel::ELsev_info, true > LogVerbatim
std::string string
Definition: nybbler.cc:12
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
double fShowerBounds[6]
Boundaries of area over which showers are to be distributed.
constexpr T pow(T x)
Definition: pow.h:72
std::vector< double > fShowerFluxConstants
Set of flux constants to be associated with each shower data file.
struct sqlite3_stmt sqlite3_stmt
double fSampleTime
Duration of sample [s].
unsigned int Ncryostats() const
Returns the number of cryostats in the detector.
void CryostatBoundaries(double *boundaries, geo::CryostatID const &cid) const
Returns the boundaries of the specified cryostat.
std::vector< double > fNShowersPerEvent
Number of showers to put in each event of duration fSampleTime; one per showerinput.
sqlite3 * fdb[5]
Pointers to sqlite3 database object, max of 5.
int fShowerInputs
Number of shower inputs to process from.
std::vector< int > fMaxShowers
BoundingBox bounds(int x, int y, int w, int h)
Definition: main.cpp:37
#define M_PI
Definition: includeROOT.h:54
double fRandomYZShift
Each shower will be shifted by a random amount in xz so that showers won&#39;t repeatedly sample the same...
std::vector< double > fBuffBox
Buffer box extensions to cryostat in each direction (6 of them: x_lo,x_hi,y_lo,y_hi,z_lo,z_hi) [cm].
double fShowerAreaExtension
Extend distribution of corsika particles in x,z by this much (e.g. 1000 will extend 10 m in -x...
art::ServiceHandle< geo::Geometry > geom
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
double fToffset
Time offset of sample, defaults to zero (no offset) [s].
void evgendp::Gen311::populateTOffset ( )
private

Definition at line 504 of file Gen311_module.cc.

504  {
505  //populate TOffset_corsika by finding minimum ParticleTime from db file
506 
507  sqlite3_stmt *statement;
508  const std::string kStatement("select min(t) from particles");
509  double t=0.;
510 
511  for(int i=0; i<fShowerInputs; i++){
512  //build and do query to get run min(t) from each db
513  if ( sqlite3_prepare(fdb[i], kStatement.c_str(), -1, &statement, 0 ) == SQLITE_OK ){
514  int res=0;
515  res = sqlite3_step(statement);
516  if ( res == SQLITE_ROW ){
517  t=sqlite3_column_double(statement,0);
518  mf::LogInfo("Gen311")<<"For showers input "<< i<<" found particles.min(t)="<<t<<"\n";
519  if (i==0 || t<fToffset_corsika) fToffset_corsika=t;
520  }else{
521  throw cet::exception("Gen311") << "Unexpected sqlite3_step return value: (" <<res<<"); "<<"ERROR:"<<sqlite3_errmsg(fdb[i])<<"\n";
522  }
523  }else{
524  throw cet::exception("Gen311") << "Error preparing statement: (" <<kStatement<<"); "<<"ERROR:"<<sqlite3_errmsg(fdb[i])<<"\n";
525  }
526  }
527 
528  mf::LogInfo("Gen311")<<"Found corsika timeoffset [ns]: "<< fToffset_corsika<<"\n";
529  }
std::string string
Definition: nybbler.cc:12
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
struct sqlite3_stmt sqlite3_stmt
sqlite3 * fdb[5]
Pointers to sqlite3 database object, max of 5.
int fShowerInputs
Number of shower inputs to process from.
double fToffset_corsika
Timing offset to account for propagation time through atmosphere, populated from db.
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
void evgendp::Gen311::produce ( art::Event e)
overridevirtual

Implements art::EDProducer.

Definition at line 1144 of file Gen311_module.cc.

1144  {
1145  //Fetch the particle generated by GetParticle
1146 
1147  fRun = e.id().run();
1148  fEvent = e.id().event();
1149 
1150  std::unique_ptr< std::vector<simb::MCTruth> > truthcol(new std::vector<simb::MCTruth>);
1151 
1153 
1154  simb::MCTruth truth;
1155  truth.SetOrigin(simb::kCosmicRay);
1156 
1157  simb::MCTruth pretruth;
1158 
1159  GetSample(pretruth);
1160  mf::LogInfo("CORSIKAGendp")<<"GetSample number of particles returned: "<<pretruth.NParticles()<<"\n";
1161  // loop over particles in the truth object
1162 
1163  //add a buffer box around the cryostat bounds to increase the acceptance and account for scattering
1164  //By default, the buffer box has zero size
1165 
1166  for(int i = 0; i < pretruth.NParticles(); ++i){
1167  simb::MCParticle particle = pretruth.GetParticle(i);
1168 
1169  TLorentzVector v4 = particle.Position();
1170  const TLorentzVector& p4 = particle.Momentum();
1171  double x0[3] = {v4.X(), v4.Y(), v4.Z() };
1172  double dx[3] = {p4.Px(), p4.Py(), p4.Pz()};
1173  // now check if the particle goes through any cryostat in the detector
1174  // if so, add it to the truth object.
1175  for(unsigned int c = 0; c < geom->Ncryostats(); ++c){
1176  double bounds[6] = {0.};
1177  geom->CryostatBoundaries(bounds, c);
1178 
1179  //add a buffer box around the cryostat bounds to increase the acceptance and account for scattering
1180  //By default, the buffer box has zero size
1181  for (unsigned int cb=0; cb<6; cb++){
1182  bounds[cb] = bounds[cb]+fBuffBox[cb];
1183  }
1184 
1185  //calculate the intersection point with each cryostat surface
1186  bool intersects_cryo = false;
1187  for (int bnd=0; bnd!=6; ++bnd) {
1188  if (bnd<2) {
1189  double p2[3] = {bounds[bnd], x0[1] + (dx[1]/dx[0])*(bounds[bnd] - x0[0]), x0[2] + (dx[2]/dx[0])*(bounds[bnd] - x0[0])};
1190  if ( p2[1] >= bounds[2] && p2[1] <= bounds[3] &&
1191  p2[2] >= bounds[4] && p2[2] <= bounds[5] ) {
1192  intersects_cryo = true;
1193  break;
1194  }
1195  }
1196  else if (bnd>=2 && bnd<4) {
1197  double p2[3] = {x0[0] + (dx[0]/dx[1])*(bounds[bnd] - x0[1]), bounds[bnd], x0[2] + (dx[2]/dx[1])*(bounds[bnd] - x0[1])};
1198  if ( p2[0] >= bounds[0] && p2[0] <= bounds[1] &&
1199  p2[2] >= bounds[4] && p2[2] <= bounds[5] ) {
1200  intersects_cryo = true;
1201  break;
1202  }
1203  }
1204  else if (bnd>=4) {
1205  double p2[3] = {x0[0] + (dx[0]/dx[2])*(bounds[bnd] - x0[2]), x0[1] + (dx[1]/dx[2])*(bounds[bnd] - x0[2]), bounds[bnd]};
1206  if ( p2[0] >= bounds[0] && p2[0] <= bounds[1] &&
1207  p2[1] >= bounds[2] && p2[1] <= bounds[3] ) {
1208  intersects_cryo = true;
1209  break;
1210  }
1211  }
1212  }
1213 
1214  if (intersects_cryo){
1215  truth.Add(particle);
1216  break; //leave loop over cryostats to avoid adding particle multiple times
1217  }// end if particle goes into a cryostat
1218  }// end loop over cryostats in the detector
1219 
1220  }// loop on particles
1221 
1222  mf::LogInfo("Gen311")<<"Number of particles from getsample crossing cryostat + bounding box: "<<truth.NParticles()<<"\n";
1223 
1224  truthcol->push_back(truth);
1225  e.put(std::move(truthcol));
1226 
1227  return;
1228  }
const TLorentzVector & Position(const int i=0) const
Definition: MCParticle.h:219
void SetOrigin(simb::Origin_t origin)
Definition: MCTruth.h:82
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
int NParticles() const
Definition: MCTruth.h:75
unsigned int Ncryostats() const
Returns the number of cryostats in the detector.
RunNumber_t run() const
Definition: EventID.h:98
void CryostatBoundaries(double *boundaries, geo::CryostatID const &cid) const
Returns the boundaries of the specified cryostat.
def move(depos, offset)
Definition: depos.py:107
ProductID put(std::unique_ptr< PROD > &&edp, std::string const &instance={})
Definition: DataViewImpl.h:686
BoundingBox bounds(int x, int y, int w, int h)
Definition: main.cpp:37
void GetSample(simb::MCTruth &)
const simb::MCParticle & GetParticle(int i) const
Definition: MCTruth.h:76
void Add(simb::MCParticle const &part)
Definition: MCTruth.h:80
std::vector< double > fBuffBox
Buffer box extensions to cryostat in each direction (6 of them: x_lo,x_hi,y_lo,y_hi,z_lo,z_hi) [cm].
const TLorentzVector & Momentum(const int i=0) const
Definition: MCParticle.h:220
EventNumber_t event() const
Definition: EventID.h:116
art::ServiceHandle< geo::Geometry > geom
Event generator information.
Definition: MCTruth.h:32
EventID id() const
Definition: Event.cc:34
Cosmic rays.
Definition: MCTruth.h:24
void evgendp::Gen311::reconfigure ( fhicl::ParameterSet const &  p)

Definition at line 295 of file Gen311_module.cc.

295  {
296 
297  return;
298  }
double evgendp::Gen311::wrapvar ( const double  var,
const double  low,
const double  high 
)
private

Definition at line 606 of file Gen311_module.cc.

606  {
607  //wrap variable so that it's always between low and high
608  return (var - (high - low) * floor(var/(high-low))) + low;
609  }
int var
Definition: 018_def.c:9
double evgendp::Gen311::wrapvarBoxNo ( const double  var,
const double  low,
const double  high,
int &  boxno 
)
private

Definition at line 611 of file Gen311_module.cc.

611  {
612  //wrap variable so that it's always between low and high
613  boxno=int(floor(var/(high-low)));
614  return (var - (high - low) * floor(var/(high-low))) + low;
615  }
int var
Definition: 018_def.c:9

Member Data Documentation

std::vector<double> evgendp::Gen311::fActiveVolumeCut
private

Active volume cut.

Definition at line 91 of file Gen311_module.cc.

std::vector<double> evgendp::Gen311::fBuffBox
private

Buffer box extensions to cryostat in each direction (6 of them: x_lo,x_hi,y_lo,y_hi,z_lo,z_hi) [cm].

Definition at line 87 of file Gen311_module.cc.

sqlite3* evgendp::Gen311::fdb[5]
private

Pointers to sqlite3 database object, max of 5.

Definition at line 89 of file Gen311_module.cc.

int evgendp::Gen311::fEvent
private

Definition at line 96 of file Gen311_module.cc.

CLHEP::HepRandomEngine& evgendp::Gen311::fGenEngine
private

Definition at line 110 of file Gen311_module.cc.

ifdh_ns::ifdh* evgendp::Gen311::fIFDH =0
private

(optional) flux file handling

Definition at line 79 of file Gen311_module.cc.

std::vector< double > evgendp::Gen311::fLeadingParticlesList
private

Definition at line 92 of file Gen311_module.cc.

std::vector<int> evgendp::Gen311::fMaxShowers
private

Definition at line 76 of file Gen311_module.cc.

double evgendp::Gen311::fMomT
private

Definition at line 103 of file Gen311_module.cc.

double evgendp::Gen311::fMomX
private

Definition at line 100 of file Gen311_module.cc.

double evgendp::Gen311::fMomY
private

Definition at line 101 of file Gen311_module.cc.

double evgendp::Gen311::fMomZ
private

Definition at line 102 of file Gen311_module.cc.

std::vector<double> evgendp::Gen311::fNShowersPerEvent
private

Number of showers to put in each event of duration fSampleTime; one per showerinput.

Definition at line 75 of file Gen311_module.cc.

double evgendp::Gen311::fPhi
private

Definition at line 99 of file Gen311_module.cc.

CLHEP::HepRandomEngine& evgendp::Gen311::fPoisEngine
private

Definition at line 111 of file Gen311_module.cc.

double evgendp::Gen311::fProjectToHeight =0.
private

Height to which particles will be projected [cm].

Definition at line 82 of file Gen311_module.cc.

double evgendp::Gen311::fRandomYZShift =0.
private

Each shower will be shifted by a random amount in xz so that showers won't repeatedly sample the same space [cm].

Definition at line 90 of file Gen311_module.cc.

int evgendp::Gen311::fRun
private

Definition at line 95 of file Gen311_module.cc.

double evgendp::Gen311::fSampleTime =0.
private

Duration of sample [s].

Definition at line 85 of file Gen311_module.cc.

double evgendp::Gen311::fShowerAreaExtension =0.
private

Extend distribution of corsika particles in x,z by this much (e.g. 1000 will extend 10 m in -x, +x, -z, and +z) [cm].

Definition at line 88 of file Gen311_module.cc.

double evgendp::Gen311::fShowerBounds[6] ={0.,0.,0.,0.,0.,0.}
private

Boundaries of area over which showers are to be distributed.

Definition at line 77 of file Gen311_module.cc.

std::vector< double > evgendp::Gen311::fShowerFluxConstants
private

Set of flux constants to be associated with each shower data file.

Definition at line 84 of file Gen311_module.cc.

std::vector< std::string > evgendp::Gen311::fShowerInputFiles
private

Set of CORSIKA shower data files to use.

Definition at line 83 of file Gen311_module.cc.

int evgendp::Gen311::fShowerInputs =0
private

Number of shower inputs to process from.

Definition at line 74 of file Gen311_module.cc.

double evgendp::Gen311::fStartX
private

Definition at line 104 of file Gen311_module.cc.

double evgendp::Gen311::fStartY
private

Definition at line 105 of file Gen311_module.cc.

double evgendp::Gen311::fStartZ
private

Definition at line 106 of file Gen311_module.cc.

double evgendp::Gen311::fTheta
private

Definition at line 98 of file Gen311_module.cc.

double evgendp::Gen311::fToffset =0.
private

Time offset of sample, defaults to zero (no offset) [s].

Definition at line 86 of file Gen311_module.cc.

double evgendp::Gen311::fToffset_corsika =0.
private

Timing offset to account for propagation time through atmosphere, populated from db.

Definition at line 78 of file Gen311_module.cc.

TTree* evgendp::Gen311::fTree
private

Definition at line 107 of file Gen311_module.cc.

bool evgendp::Gen311::fUseIFDH
private

< List of pdg codes for particles that can be potentially used as triggers

< use ifdh protocol

Definition at line 93 of file Gen311_module.cc.

art::ServiceHandle<geo::Geometry> evgendp::Gen311::geom
private

Definition at line 109 of file Gen311_module.cc.


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