All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
larg4::CheckSimEnergyDeposit Class Reference
Inheritance diagram for larg4::CheckSimEnergyDeposit:

Public Member Functions

 CheckSimEnergyDeposit (fhicl::ParameterSet const &p)
 

Private Member Functions

void beginJob () override
 
void analyze (const art::Event &event) override
 

Private Attributes

TH1F * _hnHits {nullptr}
 
TH1F * _hEdep {nullptr}
 
TH1F * _hnumPhotons {nullptr}
 
TH1F * _hLandauPhotons {nullptr}
 
TH1F * _hLandauEdep {nullptr}
 
TH1F * _hSteplength {nullptr}
 
TNtuple * _ntuple {nullptr}
 

Detailed Description

Definition at line 27 of file CheckSimEnergyDeposit_module.cc.

Constructor & Destructor Documentation

larg4::CheckSimEnergyDeposit::CheckSimEnergyDeposit ( fhicl::ParameterSet const &  p)
explicit

Definition at line 45 of file CheckSimEnergyDeposit_module.cc.

45  :
46  art::EDAnalyzer(p)
47 {}
pdgs p
Definition: selectors.fcl:22

Member Function Documentation

void larg4::CheckSimEnergyDeposit::analyze ( const art::Event &  event)
overrideprivate

Definition at line 62 of file CheckSimEnergyDeposit_module.cc.

63 {
64  auto allSims = event.getMany<sim::SimEnergyDepositCollection>();
65  for (auto const& sims : allSims) {
66  double sumPhotons=0.0;
67  double sumE = 0.0;
68  _hnHits->Fill(sims->size());
69  for (auto const& hit : *sims) {
70  // sum up energy deposit in a 1cm slice of liquid Argon.
71  if (std::abs(hit.EndZ())<0.5) {
72  sumPhotons= sumPhotons + hit.NumPhotons();
73  sumE= sumE +hit.Energy();
74  }
75  _hnumPhotons->Fill( hit.NumPhotons());
76  _hEdep->Fill( hit.Energy()); // energy deposit in MeV
77  _hSteplength->Fill( hit.StepLength()); // step length in cm
78  }
79  _hLandauPhotons->Fill(sumPhotons);
80  _hLandauEdep->Fill(sumE);
81  }
82 } // end analyze
process_name hit
Definition: cheaterreco.fcl:51
T abs(T value)
std::vector< SimEnergyDeposit > SimEnergyDepositCollection
void larg4::CheckSimEnergyDeposit::beginJob ( )
overrideprivate

Definition at line 49 of file CheckSimEnergyDeposit_module.cc.

50 {
51  art::ServiceHandle<art::TFileService const> tfs;
52  _hnHits = tfs->make<TH1F>("hnHits", "Number of SimEnergyDeposits", 300, 0, 0);
53  _hEdep = tfs->make<TH1F>("hEdep", "Energy deposition in SimEnergyDeposits", 100,0.,0.02);
54  _hnumPhotons = tfs->make<TH1F>("hnumPhotons", "number of photons per SimEnergyDeposit", 100,0.,500.);
55  _hLandauPhotons= tfs->make<TH1F>("hLandauPhotons", "number of photons/cm", 100,0.,2000000.);
56  _hLandauEdep= tfs->make<TH1F>("hLandauEdep", "Edep/cm", 100,0.,10.);
57  _hSteplength= tfs->make<TH1F>("hSteplength", "geant 4 step length", 100,0.,0.05);
58  _ntuple = tfs->make<TNtuple>("ntuple","Demo ntuple",
59  "Event:Edep:em_Edep:nonem_Edep:xpos:ypos:zpos:time");
60 } // end beginJob
art::ServiceHandle< art::TFileService > tfs

Member Data Documentation

TH1F* larg4::CheckSimEnergyDeposit::_hEdep {nullptr}
private

Definition at line 37 of file CheckSimEnergyDeposit_module.cc.

TH1F* larg4::CheckSimEnergyDeposit::_hLandauEdep {nullptr}
private

Definition at line 40 of file CheckSimEnergyDeposit_module.cc.

TH1F* larg4::CheckSimEnergyDeposit::_hLandauPhotons {nullptr}
private

Definition at line 39 of file CheckSimEnergyDeposit_module.cc.

TH1F* larg4::CheckSimEnergyDeposit::_hnHits {nullptr}
private

Definition at line 36 of file CheckSimEnergyDeposit_module.cc.

TH1F* larg4::CheckSimEnergyDeposit::_hnumPhotons {nullptr}
private

Definition at line 38 of file CheckSimEnergyDeposit_module.cc.

TH1F* larg4::CheckSimEnergyDeposit::_hSteplength {nullptr}
private

Definition at line 41 of file CheckSimEnergyDeposit_module.cc.

TNtuple* larg4::CheckSimEnergyDeposit::_ntuple {nullptr}
private

Definition at line 42 of file CheckSimEnergyDeposit_module.cc.


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