97   double momentum = particle.P();
 
   98   double momLimit = 0.05;
 
   99   if(momentum < momLimit) 
return false;
 
  100   if(pdg == 13) 
return true;
 
  101   if(pdg == 11) 
return true;
 
  102   if(pdg == 2212) 
return true;
 
  103   if(pdg == 211) 
return true;
 
  104   if(pdg == 321) 
return true;
 
  111   TList *outline = 
new TList;
 
  112   TPolyLine3D *
p1 = 
new TPolyLine3D(4);
 
  113   TPolyLine3D *p2 = 
new TPolyLine3D(4);
 
  114   TPolyLine3D *p3 = 
new TPolyLine3D(4);
 
  115   TPolyLine3D *p4 = 
new TPolyLine3D(4);
 
  116   p1->SetLineColor(colour);
 
  125   TPolyLine3D::DrawOutlineCube(outline, rmin, rmax);
 
  134                            const art::Event& event){
 
  136   TCanvas *c1 = 
new TCanvas(
"c1",
"",700,700);
 
  187     auto crtDataHandle = 
event.getValidHandle<std::vector<sbnd::crt::CRTData>>(
fCRTDataLabel);
 
  190     for(
auto const& data : (*crtDataHandle)){
 
  211       if(
fPrint) 
std::cout<<
"->True ID: "<<trueId<<
", channel = "<<data.Channel()<<
", tagger = " 
  221     auto crtHitHandle = 
event.getValidHandle<std::vector<sbn::crt::CRTHit>>(
fCRTHitLabel);
 
  222     for(
auto const& 
hit : (*crtHitHandle)){
 
  225       double time = (double)(
int)
hit.ts1_ns * 1
e-3;
 
  232       double rmin[3] = {
hit.x_pos - 
hit.x_err,
 
  235       double rmax[3] = {
hit.x_pos + 
hit.x_err,
 
  241                           <<
hit.y_pos<<
", "<<
hit.z_pos<<
"), time = "<<time<<
"\n";
 
  250     auto crtTrackHandle = 
event.getValidHandle<std::vector<sbn::crt::CRTTrack>>(
fCRTTrackLabel);
 
  251     for(
auto const& 
track : (*crtTrackHandle)){
 
  254       double time = (double)(
int)
track.ts1_ns * 1
e-3; 
 
  261       TPolyLine3D *line = 
new TPolyLine3D(2);
 
  266       if(
track.complete) line->Draw();
 
  270         if(start.Y() < end.Y()) std::swap(start, end);
 
  271         TVector3 diff = (end - start).Unit();
 
  273         line->SetPoint(0, start.X(), start.Y(), start.Z());
 
  274         line->SetPoint(1, newEnd.X(), newEnd.Y(), newEnd.Z());
 
  280                           <<
", "<<
track.y2_pos<<
", "<<
track.z2_pos<<
"), time = "<<time<<
"\n";
 
  289     auto tpcTrackHandle = 
event.getValidHandle<std::vector<recob::Track>>(
fTPCTrackLabel);
 
  290     art::FindManyP<recob::Hit> findManyHits(tpcTrackHandle, event, 
fTPCTrackLabel);
 
  291     for(
auto const& 
track : (*tpcTrackHandle)){
 
  294       std::vector<art::Ptr<recob::Hit>> hits = findManyHits.at(
track.ID());
 
  298       size_t npts = 
track.NumberTrajectoryPoints();
 
  299       TPolyLine3D *line = 
new TPolyLine3D(npts);
 
  304       for(
size_t i = 0; i < npts; i++){
 
  305         auto& pos = 
track.LocationAtPoint(i);
 
  308         if(!
track.HasValidPoint(i)) 
continue;
 
  317         line->SetPoint(ipt, pos.X(), pos.Y(), pos.Z());
 
  324       if(
fPrint) 
std::cout<<
"->True ID: "<<trueId<<
", start = ("<<start.X()<<
", "<<start.Y()<<
", " 
  325                           <<start.Z()<<
"), end = ("<<
end.X()<<
", "<<
end.Y()<<
", "<<
end.Z()<<
")\n";
 
  334     auto particleHandle = 
event.getValidHandle<std::vector<simb::MCParticle>>(
fSimLabel);
 
  336     for(
auto const& part : (*particleHandle)){
 
  342       double time = part.T() * 1
e-3;
 
  351       size_t npts = part.NumberTrajectoryPoints();
 
  352       TPolyLine3D *line = 
new TPolyLine3D(npts);
 
  357       for(
size_t i = 0; i < npts; i++){
 
  361         if(pos.X() < crtLims[0] || pos.X() > crtLims[3] || pos.Y() < crtLims[1] 
 
  362            || pos.Y() > crtLims[4] || pos.Z() < crtLims[2] || pos.Z() > crtLims[5]) 
continue;
 
  370         line->SetPoint(ipt, pos.X(), pos.Y(), pos.Z());
 
  377       if(
fPrint) 
std::cout<<
"->True ID: "<<part.TrackId()<<
", start = ("<<start.X()<<
", "<<start.Y()<<
", " 
  378                           <<start.Z()<<
"), end = ("<<
end.X()<<
", "<<
end.Y()<<
", "<<
end.Z()<<
")\n";
 
  382   c1->SaveAs(
"crtEventDisplay.root");
 
art::InputTag fTPCTrackLabel
void Draw(detinfo::DetectorClocksData const &clockData, const art::Event &event)
bool IsVisible(const simb::MCParticle &particle)
fhicl::Atom< bool > DrawTpcTracks
fhicl::Atom< int > TpcColour
fhicl::Atom< double > IncompleteTrackLength
size_t NumModules() const 
fhicl::Atom< int > TpcTrackColour
CRTEventDisplay(const Config &config)
CRTTaggerGeo GetTagger(std::string taggerName) const 
fhicl::Atom< double > MinTime
double fIncompleteTrackLength
fhicl::Atom< bool > DrawTaggers
fhicl::Atom< int > CrtDataColour
fhicl::Atom< int > TaggerColour
process_name use argoneut_mc_hitfinder track
int TrueIdFromTotalEnergy(const art::Event &event, const sbnd::crt::CRTData &data)
fhicl::Atom< int > CrtHitColour
CRTModuleGeo GetModule(std::string moduleName) const 
fhicl::Atom< bool > DrawCrtTracks
void reconfigure(const Config &config)
fhicl::Atom< int > TrueTrackColour
void DrawCube(TCanvas *c1, double *rmin, double *rmax, int colour)
fhicl::Atom< bool > Print
CRTBackTracker fCrtBackTrack
fhicl::Atom< bool > DrawTpc
std::string ChannelToStripName(size_t channel) const 
auto end(FixedBins< T, C > const &) noexcept
fhicl::Atom< art::InputTag > TPCTrackLabel
fhicl::Atom< art::InputTag > CRTDataLabel
CRTStripGeo GetStrip(std::string stripName) const 
fhicl::Atom< bool > DrawTrueTracks
int TrueParticleIDFromTotalRecoHits(detinfo::DetectorClocksData const &clockData, const std::vector< art::Ptr< recob::Hit > > &hits, bool rollup_unsaved_ids=1)
fhicl::Atom< int > TrueID
size_t NumTaggers() const 
fhicl::Atom< double > MaxTime
fhicl::Atom< double > LineWidth
fhicl::Atom< art::InputTag > SimLabel
fhicl::Atom< double > ClockSpeedCRT
art::InputTag fCRTTrackLabel
void SetDrawCrtTracks(bool tf)
fhicl::Table< CRTBackTracker::Config > CrtBackTrack
void SetDrawTpcTracks(bool tf)
bool fDrawIncompleteTracks
void SetDrawTaggers(bool tf)
art::InputTag fCRTDataLabel
fhicl::Atom< bool > UseTrueID
Contains all timing reference information for the detector. 
void SetDrawTrueTracks(bool tf)
fhicl::Atom< bool > DrawModules
fhicl::Atom< int > CrtTrackColour
art::InputTag fCRTHitLabel
fhicl::Atom< bool > DrawCrtData
bool EntersVolume(const simb::MCParticle &particle)
stream1 can override from command line with o or output services user sbnd
void SetDrawCrtHits(bool tf)
std::vector< double > CRTLimits() const 
fhicl::Atom< bool > DrawIncompleteTracks
fhicl::Atom< art::InputTag > CRTHitLabel
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space. 
fhicl::Atom< bool > DrawCrtHits
void SetDrawCrtData(bool tf)
fhicl::Atom< art::InputTag > CRTTrackLabel
physics associatedGroupsWithLeft p1
BEGIN_PROLOG could also be cout