Public Member Functions | List of all members
gar::evd::AnalysisBaseDrawer Class Reference

Aid in the rendering of AnalysisBase objects. More...

#include <AnalysisBaseDrawer.h>

Public Member Functions

 AnalysisBaseDrawer ()
 
 ~AnalysisBaseDrawer ()
 
void DrawDeDx (const art::Event &evt, evdb::View2D *view)
 
void DrawKineticEnergy (const art::Event &evt, evdb::View2D *view)
 

Detailed Description

Aid in the rendering of AnalysisBase objects.

Definition at line 30 of file AnalysisBaseDrawer.h.

Constructor & Destructor Documentation

gar::evd::AnalysisBaseDrawer::AnalysisBaseDrawer ( )

Definition at line 50 of file AnalysisBaseDrawer.cxx.

51  {
52 
53  }
gar::evd::AnalysisBaseDrawer::~AnalysisBaseDrawer ( )

Definition at line 56 of file AnalysisBaseDrawer.cxx.

57  {
58 
59  }

Member Function Documentation

void gar::evd::AnalysisBaseDrawer::DrawDeDx ( const art::Event evt,
evdb::View2D *  view 
)

Definition at line 62 of file AnalysisBaseDrawer.cxx.

64  {
67 
68  for(size_t imod = 0; imod < recoOpt->fTrackLabels.size(); ++imod) {
69 
70  //Get Track collection
71  std::string which = recoOpt->fTrackLabels[imod];
72  auto trackListHandle = evt.getValidHandle<std::vector<rec::Track> >(which);
73  std::vector<art::Ptr<rec::Track> > tracklist;
74  art::fill_ptr_vector(tracklist, trackListHandle);
75 
76  }
77  }
std::vector< art::InputTag > fTrackLabels
module labels that produced tracks
std::string string
Definition: nybbler.cc:12
ValidHandle< PROD > getValidHandle(InputTag const &tag) const
Definition: DataViewImpl.h:441
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
Definition: Ptr.h:297
void gar::evd::AnalysisBaseDrawer::DrawKineticEnergy ( const art::Event evt,
evdb::View2D *  view 
)

Definition at line 80 of file AnalysisBaseDrawer.cxx.

82  {
85 
86  //add some legend-like labels with appropriate grayscale
87  TLatex& proton_tex = view->AddLatex(2.0, 180.0, "proton");
88  TLatex& kaon_tex = view->AddLatex(2.0, 165.0, "kaon" );
89  TLatex& pion_tex = view->AddLatex(2.0, 150.0, "pion" );
90  TLatex& muon_tex = view->AddLatex(2.0, 135.0, "muon" );
91  proton_tex.SetTextColor(kBlack);
92  kaon_tex .SetTextColor(kGray+2);
93  pion_tex .SetTextColor(kGray+1);
94  muon_tex .SetTextColor(kGray);
95  proton_tex.SetTextSize (0.075);
96  kaon_tex .SetTextSize (0.075);
97  pion_tex .SetTextSize (0.075);
98  muon_tex .SetTextSize (0.075);
99 
100  //int color = 1;
101 
102  //now get the actual data
103  for(size_t imod = 0; imod < recoOpt->fTrackLabels.size(); ++imod) {
104  //Get Track collection
105  std::string which = recoOpt->fTrackLabels[imod];
106  auto trackListHandle = evt.getValidHandle<std::vector<rec::Track> >(which);
107  std::vector<art::Ptr<rec::Track> > tracklist;
108  art::fill_ptr_vector(tracklist, trackListHandle);
109 
110  //Loop over Tracks
111  //for(size_t trkIter = 0; trkIter < tracklist.size(); ++trkIter){
112  // color = trkIter%evd::kNCOLS;
113  //}
114  }
115 
116  }
std::vector< art::InputTag > fTrackLabels
module labels that produced tracks
std::string string
Definition: nybbler.cc:12
ValidHandle< PROD > getValidHandle(InputTag const &tag) const
Definition: DataViewImpl.h:441
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
Definition: Ptr.h:297

The documentation for this class was generated from the following files: