Definition at line 34 of file CheckMCParticle_module.cc.
larg4::CheckMCParticle::CheckMCParticle |
( |
fhicl::ParameterSet const & |
p | ) |
|
|
explicit |
void larg4::CheckMCParticle::analyze |
( |
const art::Event & |
event | ) |
|
|
overrideprivate |
Definition at line 57 of file CheckMCParticle_module.cc.
61 auto allDropped =
event.getMany<std::map<int,std::set<int>>>();
63 for (
auto const& maps : allDropped ) {
64 for (
auto const&
element : *maps ) {
66 std::set<int> droppedset=
element.second;
67 std::cout<<
" droppedid size: "<< droppedset.size()<<std::endl;
68 for(
auto const& droppedid : droppedset )
77 auto allGens =
event.getMany<std::vector<simb::MCParticle>>();
78 for (
auto const& gens : allGens) {
81 for (
auto const& genpart : *gens) {
82 if (genpart.Mother()==0) {
83 cout <<
"Primary momentum: " << genpart.P();
84 cout <<
" position: " << genpart.Vx()<<
" "<< genpart.Vy()<<
" "<< genpart.Vz() << endl;
86 cout <<
"Part id: " << genpart.TrackId();
87 cout <<
" PDG id: " << genpart.PdgCode();
88 cout <<
" Status Code: " << genpart.StatusCode();
89 cout <<
" Mother: " << genpart.Mother();
90 cout <<
" Creation Process: "<<genpart.Process();
91 cout <<
" End Process: "<<genpart.EndProcess();
96 cout <<
" Nr. of Daughters: " << genpart.NumberDaughters();
97 cout <<
" FirstDaughter:" << genpart.FirstDaughter()<<endl;
99 for (
int i=0;i<genpart.NumberDaughters();i++)
101 cout << genpart.Daughter(i)<<
",";
BEGIN_PROLOG could also be cout
void larg4::CheckMCParticle::beginJob |
( |
| ) |
|
|
overrideprivate |
Definition at line 51 of file CheckMCParticle_module.cc.
53 art::ServiceHandle<art::TFileService const>
tfs;
54 _hnParts = tfs->make<TH1F>(
"hnParts",
"Number of generated Particles", 100, 0., 2000.);
art::ServiceHandle< art::TFileService > tfs
TH1F* larg4::CheckMCParticle::_hnParts {nullptr} |
|
private |
std::string const larg4::CheckMCParticle::_myName |
|
private |
The documentation for this class was generated from the following file: