16 #include "art_root_io/TFileService.h" 18 #include "canvas/Persistency/Common/FindManyP.h" 24 #include "dune/Protodune/singlephase/CTB/data/pdspctb.h" 25 #include "dune/Protodune/singlephase/CRT/data/CRTTrigger.h" 54 std::vector<unsigned short>
GetModules(
int pixel);
90 std::vector<unsigned short> modules(2,-1);
103 else if (pixel == 3){
107 else if (pixel == 4){
111 else if (pixel == 5){
115 else if (pixel == 6){
119 else if (pixel == 7){
123 else if (pixel == 8){
127 else if (pixel == 9){
131 else if (pixel == 10){
135 else if (pixel == 11){
139 else if (pixel == 12){
143 else if (pixel == 13){
147 else if (pixel == 14){
151 else if (pixel == 15){
155 else if (pixel == 16){
159 else if (pixel == 17){
163 else if (pixel == 18){
167 else if (pixel == 19){
171 else if (pixel == 20){
175 else if (pixel == 21){
179 else if (pixel == 22){
183 else if (pixel == 23){
187 else if (pixel == 24){
191 else if (pixel == 25){
195 else if (pixel == 26){
199 else if (pixel == 27){
203 else if (pixel == 28){
207 else if (pixel == 29){
211 else if (pixel == 30){
215 else if (pixel == 31){
225 fTree = tfs->make<TTree>(
"crt",
"crt tree");
283 if(timeStamps.
isValid() && timeStamps->size() == 1){
289 if (trigger!=13)
return;
291 auto const& pdspctbs = *e.
getValidHandle<std::vector<raw::ctb::pdspctb>>(
"ctbrawdecoder:daq");
292 if (!pdspctbs.empty()){
293 const size_t npdspctbs = pdspctbs.size();
294 for (
size_t i=0; i<npdspctbs; ++i){
306 const std::vector<raw::ctb::ChStatus> chs = pdspctbs[i].GetChStatusAfterHLTs();
307 std::cout <<
"Number of CH Status after HLTs: " << chs.size() <<
std::endl;
308 for (
size_t j=0; j<chs.size(); ++j){
329 const auto & triggers = *e.
getValidHandle < std::vector < CRT::Trigger >> (
"crtrawdecoder");
330 for (
const auto& trigger: triggers){
333 crttime.push_back(trigger.Timestamp());
335 for (
const auto&
time : *timeStamps){
367 std::vector< art::Ptr<recob::Track> > pandoratrks;
368 auto pandoratrkHandle = e.
getHandle< std::vector<recob::Track> >(
"pandoraTrack");
372 auto pfpListHandle = e.
getHandle< std::vector<recob::PFParticle> >(
"pandora");
373 art::FindManyP<recob::PFParticle> fmpfp(pandoratrkHandle, e,
"pandoraTrack");
374 art::FindManyP<anab::T0> fmt0pandora(pfpListHandle, e,
"pandora");
376 for (
size_t i = 0; i<pandoratrks.size(); ++i){
377 auto &
trk = pandoratrks[i];
385 auto &pfps = fmpfp.at(
trk.key());
387 auto &t0s = fmt0pandora.at(pfps[0].
key());
code to link reconstructed objects back to the MC truth information
std::vector< double > trkstartx_pandora
std::vector< double > trkendy_pandora
std::vector< unsigned short > GetModules(int pixel)
std::vector< unsigned int > crtmodule
uint16_t GetFlags() const
CheckCRT(fhicl::ParameterSet const &p)
Handle< PROD > getHandle(SelectorBase const &) const
void analyze(art::Event const &e) override
EDAnalyzer(fhicl::ParameterSet const &pset)
std::vector< double > trkendy_pmtrack
std::vector< double > trkendz_pandora
std::vector< double > trkendx_pandora
std::vector< double > trkendx_pmtrack
#define DEFINE_ART_MODULE(klass)
ValidHandle< PROD > getValidHandle(InputTag const &tag) const
std::vector< double > trkstartz_pmtrack
SubRunNumber_t subRun() const
std::vector< double > t0_pmtrack
std::vector< double > trkstarty_pmtrack
std::vector< double > trkstartx_pmtrack
std::vector< double > t0_pandora
std::vector< uint32_t > crtmask
std::vector< ULong64_t > rdtime
std::vector< double > trkstarty_pandora
std::vector< double > trkstartz_pandora
std::vector< unsigned long long > crttime
Provides recob::Track data product.
EventNumber_t event() const
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
std::vector< double > trkendz_pmtrack
CheckCRT & operator=(CheckCRT const &)=delete
QTextStream & endl(QTextStream &s)
Event finding and building.