126 std::unique_ptr< vector<CRTHit> > CRTHitcol(
new vector<CRTHit>);
127 std::unique_ptr< art::Assns<CRTHit, CRTData> > Hitassn(
new art::Assns<CRTHit, CRTData>);
128 art::PtrMaker<sbn::crt::CRTHit> makeHitPtr(event);
133 art::Handle< std::vector<CRTData>> crtListHandle;
134 vector<art::Ptr<CRTData> > crtList;
137 art::fill_ptr_vector(crtList, crtListHandle);
142 art::Handle<sbn::ExtraTriggerInfo> trigger_handle;
144 if( trigger_handle.isValid() )
147 mf::LogError(
"CRTSimHitProducer") <<
"No raw::Trigger associated to label: " <<
fTriggerLabel.label() <<
"\n" ;
152 mf::LogInfo(
"CRTSimHitProducer")
153 <<
"Number of SiPM hits = "<<crtList.size();
156 mf::LogInfo(
"CRTSimHitProducer")
157 <<
"Number of SiPM hits = "<<crtList.size();
164 mf::LogInfo(
"CRTSimHitProducer")
165 <<
"Number of CRTHit,data indices pairs = " << crtHitPairs.size();
167 for(
auto const& crtHitPair : crtHitPairs){
169 CRTHitcol->push_back(crtHitPair.first);
170 art::Ptr<CRTHit> hitPtr = makeHitPtr(CRTHitcol->size()-1);
173 for(
auto const& data_i : crtHitPair.second){
175 Hitassn->addSingle(hitPtr, crtList[data_i]);
179 event.put(std::move(CRTHitcol));
180 event.put(std::move(Hitassn));
182 mf::LogInfo(
"CRTSimHitProducer")
183 <<
"Number of CRT hits produced = "<<nHits;
art::InputTag fCrtModuleLabel
name of crt producer
uint64_t m_trigger_timestamp
art::InputTag fTriggerLabel
name of trigger producer
vector< art::Ptr< CRTData > > PreselectCRTData(const vector< art::Ptr< CRTData >> &crtList, uint64_t trigger_timestamp)
BEGIN_PROLOG could also be cout
vector< pair< CRTHit, vector< int > > > CreateCRTHits(vector< art::Ptr< CRTData >> crtList, uint64_t trigger_timestamp)