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() )
124 std::cout <<
"Let's get some rawdigit stuff...Size " << rawdigits->size() <<
" rawdigits[0]->samples() " << (*rawdigits)[0].Samples() <<
std::endl;
127 auto waveforms =
event.getValidHandle<std::vector<raw::OpDetWaveform> >(
fOpDetWaveLabel);
128 if ( rawdigits.failedToGet() )
138 if (particle->
Process() !=
"primary")
continue;
139 std::cout <<
"-- Particle with TrackID " << particle->
TrackId() <<
", which was a " << particle->
PdgCode() <<
" was a primary and had initial energy " << particle->
E()
147 std::cout <<
"\nLet's trigger on the whole event...." <<
std::endl;
154 triggers->push_back( my_ev_trig );
156 std::cout <<
"I have now left my trigger, it's decision was " << EvTrigDec <<
".\n" <<
std::endl;
161 std::cout <<
"\nLet's trigger on the TPC info...." <<
std::endl;
168 triggers->push_back( my_tpc_trig );
170 std::cout <<
"I have now left my trigger, it's decision was " << TPCTrigDec <<
".\n" <<
std::endl;
175 std::cout <<
"\nLet's trigger on the OpDetWaveform info...." <<
std::endl;
182 triggers->push_back( my_pd_trig );
184 std::cout <<
"I have now left my trigger, it's decision was " << PDTrigDec <<
".\n" <<
std::endl;
190 std::cout <<
"\nLet's trigger on the TPC and OpDetWaveform info...." <<
std::endl;
197 triggers->push_back( my_tpc_pd_trig );
199 std::cout <<
"I have now left my trigger, it's decision was " << TPC_PD_TrigDec <<
".\n" <<
std::endl;
205 std::cout <<
"\nLet's trigger on the triggers I've just made...." <<
std::endl;
212 triggers->push_back( my_trig_trig );
214 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
std::string fRawDigitLabel
bool TriggerOnTPC(std::vector< raw::RawDigit > rawTPC)
art::ServiceHandle< cheat::ParticleInventoryService > pi_serv
bool TriggerOnTriggers(std::vector< triggersim::BasicTrigger > triggerVec)
std::string Process() const
int NumberDaughters() const
const sim::ParticleList & ParticleList() const
bool TriggerOnTPC_PD(std::vector< raw::RawDigit > rawTPC, std::vector< raw::OpDetWaveform > rawPD)
bool TriggerOnPD(std::vector< raw::OpDetWaveform > rawPD)
QTextStream & endl(QTextStream &s)
const unsigned int kNuBeam
std::string fOpDetWaveLabel
bool TriggerOnWholeEvent(art::Event &event)