117 std::unique_ptr< std::vector<triggersim::BasicTrigger> > triggers(
new std::vector<triggersim::BasicTrigger>);
120 auto rawdigits =
event.getValidHandle<std::vector<raw::RawDigit> >(
fRawDigitLabel);
121 if ( rawdigits.failedToGet() )
125 auto waveforms =
event.getValidHandle<std::vector<raw::OpDetWaveform> >(
fOpDetWaveLabel);
126 if ( rawdigits.failedToGet() )
136 if (particle->
Process() !=
"primary")
continue;
137 std::cout <<
"-- Particle with TrackID " << particle->
TrackId() <<
", which was a " << particle->
PdgCode() <<
" was a primary and had initial energy " << particle->
E()
145 std::cout <<
"\nLet's trigger on the whole event...." <<
std::endl;
152 triggers->push_back( my_ev_trig );
154 std::cout <<
"I have now left my trigger, it's decision was " << EvTrigDec <<
".\n" <<
std::endl;
159 std::cout <<
"\nLet's trigger on the TPC info...." <<
std::endl;
166 triggers->push_back( my_tpc_trig );
168 std::cout <<
"I have now left my trigger, it's decision was " << TPCTrigDec <<
".\n" <<
std::endl;
173 std::cout <<
"\nLet's trigger on the OpDetWaveform info...." <<
std::endl;
180 triggers->push_back( my_pd_trig );
182 std::cout <<
"I have now left my trigger, it's decision was " << PDTrigDec <<
".\n" <<
std::endl;
188 std::cout <<
"\nLet's trigger on the TPC and OpDetWaveform info...." <<
std::endl;
195 triggers->push_back( my_tpc_pd_trig );
197 std::cout <<
"I have now left my trigger, it's decision was " << TPC_PD_TrigDec <<
".\n" <<
std::endl;
203 std::cout <<
"\nLet's trigger on the triggers I've just made...." <<
std::endl;
210 triggers->push_back( my_trig_trig );
212 std::cout <<
"I have now left my trigger, it's decision was " << Trig_TrigDec <<
".\n" <<
std::endl;
double E(const int i=0) const
unsigned int NumberTrajectoryPoints() const
bool TriggerOnTPC(std::vector< raw::RawDigit > rawTPC)
std::string fOpDetWaveLabel
std::string Process() const
int NumberDaughters() const
bool TriggerOnPD(std::vector< raw::OpDetWaveform > rawPD)
bool TriggerOnTPC_PD(std::vector< raw::RawDigit > rawTPC, std::vector< raw::OpDetWaveform > rawPD)
const sim::ParticleList & ParticleList() const
bool TriggerOnWholeEvent(art::Event &event)
std::string fRawDigitLabel
bool TriggerOnTriggers(std::vector< triggersim::BasicTrigger > triggerVec)
QTextStream & endl(QTextStream &s)
const unsigned int kNuBeam
art::ServiceHandle< cheat::ParticleInventoryService > pi_serv