Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
dprf::ChannelPlots Class Reference
Inheritance diagram for dprf::ChannelPlots:
art::EDAnalyzer art::EventObserverBase art::Consumer art::EngineCreator

Classes

struct  ViewH
 

Public Types

using WorkerType = WorkerT< EDAnalyzer >
 
using ModuleType = EDAnalyzer
 

Public Member Functions

 ChannelPlots (fhicl::ParameterSet const &p)
 
 ~ChannelPlots ()
 
void beginRun (const art::Run &run)
 
virtual void analyze (art::Event const &)
 
void endJob ()
 
std::string workerType () const
 
bool modifiesEvent () const
 
void registerProducts (MasterProductRegistry &, ProductDescriptions &, ModuleDescription const &)
 
std::string const & processName () const
 
bool wantAllEvents () const
 
bool wantEvent (Event const &e)
 
fhicl::ParameterSetID selectorConfig () const
 
art::Handle< art::TriggerResultsgetTriggerResults (Event const &e) const
 
template<typename T , BranchType = InEvent>
ProductToken< Tconsumes (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ProductToken< Tconsumes (InputTag const &it)
 
template<typename T , BranchType = InEvent>
void consumesMany ()
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > consumesView (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ViewToken< TconsumesView (InputTag const &it)
 
template<typename T , BranchType = InEvent>
ProductToken< TmayConsume (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ProductToken< TmayConsume (InputTag const &it)
 
template<typename T , BranchType = InEvent>
void mayConsumeMany ()
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > mayConsumeView (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ViewToken< TmayConsumeView (InputTag const &it)
 
base_engine_tcreateEngine (seed_t seed)
 
base_engine_tcreateEngine (seed_t seed, std::string const &kind_of_engine_to_make)
 
base_engine_tcreateEngine (seed_t seed, std::string const &kind_of_engine_to_make, label_t const &engine_label)
 
seed_t get_seed_value (fhicl::ParameterSet const &pset, char const key[]="seed", seed_t const implicit_seed=-1)
 

Static Public Member Functions

static cet::exempt_ptr< Consumernon_module_context ()
 

Protected Member Functions

CurrentProcessingContext const * currentContext () const
 
detail::CachedProducts & cachedProducts ()
 
void validateConsumedProduct (BranchType const bt, ProductInfo const &pi)
 
void prepareForJob (fhicl::ParameterSet const &pset)
 
void showMissingConsumes () const
 

Private Types

enum  _cutlevel { kAll, kPass, kNumLevel }
 
typedef enum dprf::ChannelPlots::_cutlevel Cuts_t
 
typedef std::map< unsigned int, RawFebPlots * > FebPlotGroup
 
typedef std::map< unsigned int, FebPlotGroupFebPlotSet
 

Private Member Functions

void FillFebRawPlots (FebPlotSet &, art::Ptr< rawdata::RawDigit >)
 
bool TrackOK (art::Ptr< rb::Track >)
 
std::string HRFebToStringLabel (unsigned int, int, unsigned int &, unsigned int &, unsigned int &, unsigned int &)
 
void ResetEventPlots ()
 
void FillEventPlots ()
 

Private Attributes

const fhicl::ParameterSetfPSet
 
const std::vector< unsigned intfHumanReadableFEBs
 
const unsigned int fMinPlaneTrack
 
const unsigned int fMinCellTrack
 
const unsigned int fMinCellTrackView
 
const std::string fRawDigitLabel
 
const std::string fCellHitLabel
 
const std::string fTrackLabel
 
std::map< unsigned int, ViewHfHBookedChanCP
 
TH2F * fHRawDigits [geo::kXorY][kNumLevel]
 
TH1F * fHExtentPlaneTrk [kNumLevel]
 
TH1F * fHNCellTrk [kNumLevel]
 
TH1F * fHNCellViewTrk [geo::kXorY][kNumLevel]
 
FebPlotSet fFebRawAll
 
FebPlotSet fFebRawOnTrack
 

Detailed Description

Definition at line 37 of file ChannelPlots_module.cc.

Member Typedef Documentation

typedef std::map< unsigned int, RawFebPlots* > dprf::ChannelPlots::FebPlotGroup
private

Definition at line 65 of file ChannelPlots_module.cc.

typedef std::map< unsigned int, FebPlotGroup > dprf::ChannelPlots::FebPlotSet
private

Definition at line 66 of file ChannelPlots_module.cc.

Definition at line 39 of file EDAnalyzer.h.

Definition at line 38 of file EDAnalyzer.h.

Member Enumeration Documentation

Enumerator
kAll 
kPass 
kNumLevel 

Definition at line 54 of file ChannelPlots_module.cc.

Constructor & Destructor Documentation

dprf::ChannelPlots::ChannelPlots ( fhicl::ParameterSet const &  p)
explicit

Definition at line 89 of file ChannelPlots_module.cc.

89  :
90  EDAnalyzer(pset),
91  fPSet(pset),
92  fHumanReadableFEBs(pset.get< std::vector< unsigned int > >("FEBs")),
93  fMinPlaneTrack(pset.get< unsigned int >("MinPlaneTrack")),
94  fMinCellTrack(pset.get< unsigned int >("MinCellTrack")),
95  fMinCellTrackView(pset.get< unsigned int >("MinCellTrackView")),
96  fRawDigitLabel(pset.get< std::string >("RawDigitLabel")),
97  fCellHitLabel(pset.get< std::string >("CellHitLabel")),
98  fTrackLabel(pset.get< std::string >("TrackLabel"))
99  {
100  }
const std::string fRawDigitLabel
const unsigned int fMinCellTrack
const std::vector< unsigned int > fHumanReadableFEBs
const std::string fTrackLabel
EDAnalyzer(Table< Config > const &config)
Definition: EDAnalyzer.h:100
const unsigned int fMinCellTrackView
const unsigned int fMinPlaneTrack
const fhicl::ParameterSet & fPSet
const std::string fCellHitLabel
enum BeamMode string
dprf::ChannelPlots::~ChannelPlots ( )

Definition at line 102 of file ChannelPlots_module.cc.

103  {
104  }

Member Function Documentation

void dprf::ChannelPlots::analyze ( art::Event const &  evt)
virtual

Implements art::EDAnalyzer.

Definition at line 244 of file ChannelPlots_module.cc.

References ana::assert(), getBrightness::cell, rb::Cluster::Cell(), febshutoff_auto::chan, visualisationForPaperMasterPlot::cmap, rawdata::RawDigit::DaqChannel(), daqchannelmap::DAQChannelMap::encodeLChan(), fCellHitLabel, fFebRawAll, fFebRawOnTrack, fHRawDigits, FillEventPlots(), FillFebRawPlots(), fRawDigitLabel, fTrackLabel, geom(), art::DataViewImpl::getByLabel(), daqchannelmap::DAQChannelMap::getCell(), daqchannelmap::DAQChannelMap::getPlane(), makeTrainCVSamples::int, kAll, kPass, cmap::dataprov::CMap::Map(), rb::Cluster::NCell(), geo::GeometryBase::Plane(), NDAPDHVSetting::plane, ResetEventPlots(), make_root_from_grid_output::tr, track, TrackOK(), POTSpillRate::view, and geo::PlaneGeo::View().

245  {
246 
247  ResetEventPlots();
248 
249  // look for RawDigits. Don't continue if none
251  try {
252  evt.getByLabel(fRawDigitLabel,digs);
253  }
254  catch (...) {
255  mf::LogWarning("CPLTWarn") << "Failed to find a RawDigit, bail";
256  return ;
257  }
258 
261 
262  // make "all hits" plots
263  for (unsigned int id=0; id<digs->size(); id++)
264  {
265 
266  art::Ptr<rawdata::RawDigit> dig(digs,id);
267  unsigned int chan=dig->DaqChannel();
268 
269  // fill general plots
270  // need to use "offline" view, not online....
271  daqchannelmap::lchan logchan = cmap->Map()->encodeLChan(chan);
272  const unsigned int plannum = cmap->Map()->getPlane(logchan);
273  const geo::PlaneGeo* plane = geom->Plane(plannum);
274  const unsigned int view = (unsigned int)plane->View();
275 
276 
277  fHRawDigits[view][kAll]->Fill(plannum, cmap->Map()->getCell(logchan));
278 
280 
281 
282  }// digit id
283 
284  // look for Tracks. OK to return w/out error if none
286  try {
287  evt.getByLabel(fTrackLabel,tracks);
288  }
289  catch (...) {
290  FillEventPlots();
291  return ;
292  }
293 
294  // can it exist but have zero size?
295  if (!tracks->size()) {
296  FillEventPlots();
297  return;
298  }
299 
300  // get the CellHits, so we can find RawHits on tracks
302  try {
303  evt.getByLabel(fCellHitLabel,cells);
304  }
305  catch (...) {
306  mf::LogError("CPLTWarn") << "\nFound Tracks but no CellHits!\n";
307  assert(0);
308  }
309 
310  for(unsigned int tr = 0; tr < tracks->size(); tr++)
311  {
312  art::Ptr<rb::Track> track(tracks,tr);
313 
314  // does the track have a decent number of hits and planes in each view?
315 
316  if (TrackOK(track)) {
317  // loop over CellHits on tracks
318  for (unsigned int ic=0; ic<track->NCell(); ic++)
319  {
320  art::Ptr<rb::CellHit> cell = track->Cell(ic);
321  const unsigned int chan = cell->DaqChannel();
322  daqchannelmap::lchan logchan = cmap->Map()->encodeLChan(chan);
323  const unsigned int plannum = cmap->Map()->getPlane(logchan);
324  const geo::PlaneGeo* plane = geom->Plane(plannum);
325  unsigned int view=(unsigned int)plane->View();
326 
327  fHRawDigits[view][kPass]->Fill(cmap->Map()->getPlane(logchan),
328  cmap->Map()->getCell(logchan));
329 
331  }//cell
332  } // track is OK
333 
334  } // tracks
335 
336  FillEventPlots();
337 
338  } //ana
const std::string fRawDigitLabel
Definition: event.h:19
const daqchannelmap::DAQChannelMap * Map() const
Definition: CMap.h:57
const PlaneGeo * Plane(unsigned int i) const
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
cell_t getCell(lchan logicalchan) const
Decode the cell number from an lchan.
lchan encodeLChan(int detId, plane_t plane, cell_t cell) const
View_t View() const
Which coordinate does this plane measure.
Definition: PlaneGeo.h:53
uint32_t DaqChannel() const
Definition: RawDigit.h:85
const std::string fTrackLabel
Geometry information for a single readout plane.
Definition: PlaneGeo.h:36
int evt
TH2F * fHRawDigits[geo::kXorY][kNumLevel]
void FillFebRawPlots(FebPlotSet &, art::Ptr< rawdata::RawDigit >)
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
void geom(int which=0)
Definition: geom.C:163
plane_t getPlane(lchan logicalchan) const
Decode the plane number from an lchan.
assert(nhit_max >=nhit_nbins)
const std::string fCellHitLabel
Float_t track
Definition: plot.C:35
Definition: fwd.h:28
bool TrackOK(art::Ptr< rb::Track >)
void dprf::ChannelPlots::beginRun ( const art::Run run)

Definition at line 106 of file ChannelPlots_module.cc.

References febshutoff_auto::chan, visualisationForPaperMasterPlot::cmap, om::cout, cut, fillBadChanDBTables::det, geo::GeometryBase::DetId(), geo2elec::diblock, daqchannelmap::DAQChannelMap::encodeDChan(), daqchannelmap::DAQChannelMap::encodeLChan(), allTimeWatchdog::endl, fFebRawAll, fFebRawOnTrack, fHBookedChanCP, fHExtentPlaneTrk, fHNCellTrk, fHNCellViewTrk, fHRawDigits, fHumanReadableFEBs, Fill(), fPSet, geom(), daqchannelmap::DAQChannelMap::getCell(), daqchannelmap::DAQChannelMap::getPlane(), geo::GeometryBase::GetPlanesByView(), hadd_reco_validation::group, analysePickle::hist, hists, dprf::ChannelPlots::ViewH::hists, HRFebToStringLabel(), makeTrainCVSamples::int, kAll, kNumLevel, geo::kX, geo::kXorY, geo::kY, label, art::TFileDirectory::make(), cmap::dataprov::CMap::Map(), geo::PlaneGeo::Ncells(), geo::GeometryBase::NPlanes(), daqchannelmap::NUM_PIXELS, geo::GeometryBase::Plane(), NDAPDHVSetting::plane, string, POTSpillRate::view, and geo::PlaneGeo::View().

107  {
108 
109  // std::cout<< "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ geo::kXorY = " << "Here1" << std::endl;
110 
111  // if(fHBookedChanCP.empty()) return; // Don't create them all twice
112 
116 
117 
118 
119  for (unsigned int ichan=0; ichan<fHumanReadableFEBs.size(); ichan++) {
120  const int det=geom->DetId();
121 
122  // std::cout<< "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ geo::kXorY = " << "Here1" << std::endl;
123 
124 
125  unsigned int group,diblock,ldcm,lfeb;
127  group,diblock,ldcm,lfeb);
128  const daqchannelmap::dchan chan = cmap->Map()->encodeDChan(det,diblock,ldcm,lfeb,0);
129 
130  bool detailed=true; //need to put in config...
131 
132  (fFebRawAll[group])[chan]=
133  new RawFebPlots(label,"All",detailed,fPSet);
134  (fFebRawOnTrack[group])[chan]=
135  new RawFebPlots(label,"OnTracks",detailed,fPSet);
136 
137  //book and fill histogram showing which channels were booked
138  if (fHBookedChanCP.find(group) == fHBookedChanCP.end())
139  {
140  ViewH hist={{0,0}};
141  for (unsigned int iv=geo::kX; iv<geo::kXorY; iv++)
142  {
143 
145  std::string viewName(view == geo::kX ? "X" : "Y");
146  const std::set<unsigned int>& planes=geom->GetPlanesByView(view);
147  const geo::PlaneGeo* plane=(geom->Plane(*(planes.begin())));
148  //(fHBookedChanCP[group])[iv]=
149  hist.hists[iv]=
150  tfs->make<TH2F>(Form("HBookedChanCP_%s_%d",viewName.c_str(),group),
151  Form("Booked Channel, %s, group %d",viewName.c_str(),group),
152  geom->NPlanes()+1,-.5,geom->NPlanes()+.5,
153  plane->Ncells()+1,-.5,plane->Ncells()+.5);
154  }
155  fHBookedChanCP.insert(std::pair<unsigned int, ViewH>
156  (group,hist));
157  }
158 
159 
160  for (unsigned int ipix=0;
161  ipix<daqchannelmap::NUM_PIXELS; ipix++) {
162  const unsigned int chan = cmap->Map()->encodeDChan(det,diblock,ldcm,lfeb,ipix);
163  const daqchannelmap::lchan logchan = cmap->Map()->encodeLChan(chan);
164  const unsigned int plannum = cmap->Map()->getPlane(logchan);
165  const geo::PlaneGeo* plane = geom->Plane(plannum);
166  const unsigned int view=(unsigned int)plane->View();
167 
168  (fHBookedChanCP[group]).hists[view]
169  ->Fill(cmap->Map()->getPlane(logchan),
170  cmap->Map()->getCell(logchan));
171  }//pixels
172 
173  }//booked channels
174 
175  // book general hit histograms
176  std::cout<< "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ geo::kXorY = " << "Here" << std::endl;
177 
178  for (unsigned int iv=geo::kX; iv<geo::kXorY; iv++)
179  {
180  std::cout<< "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ LOOPING $$$$$$$$ "<< std::endl;
181 
182  geo::View_t view=(geo::View_t)iv;
183  std::string viewName(view == geo::kX ? "X" : "Y");
184  const std::set<unsigned int>& planes=geom->GetPlanesByView(view);
185  const geo::PlaneGeo* plane=(geom->Plane(*(planes.begin())));
186 
187  for (unsigned int cut=kAll; cut<kNumLevel; cut++) {
188  //for (Cuts_t cut=kAll; cut<kNumLevel; cut++) {
189  std::string cutname(cut==kAll ? "All" : "On Good Tracks");
190  fHRawDigits[iv][cut]=
191  tfs->make<TH2F>(Form("HRawDigits_%s_%d",viewName.c_str(),cut),
192  Form("Raw Digits, %s, %s",viewName.c_str(),cutname.c_str()),
193  geom->NPlanes()+1,-.5,geom->NPlanes()+.5,
194  plane->Ncells()+1,-.5,plane->Ncells()+.5);
195 
196  }//Cut levels
197 
198  }//view
199 
200  // book track cut histograms
201  for (unsigned int cut=kAll; cut<kNumLevel; cut++) {
202  std::string cutname(cut==kAll ? "All Tracks" : "Good Tracks");
204  tfs->make<TH1F>(Form("HExtentPlaneTrk_%d",cut),
205  Form("Track Extent, Planes, %s",cutname.c_str()),
206  geom->NPlanes()+1,-.5,geom->NPlanes()+.5);
207  fHNCellTrk[cut]=
208  tfs->make<TH1F>(Form("HNCellTrk_%d",cut),
209  Form("Track Number of Cells, %s",cutname.c_str()),
210  geom->NPlanes()+1,-.5,geom->NPlanes()+.5);
212  tfs->make<TH1F>(Form("HNCellViewTrk_X_%d",cut),
213  Form("Track Number of Cells, X, %s",cutname.c_str()),
214  geom->NPlanes()+1,-.5,geom->NPlanes()+.5);
216  tfs->make<TH1F>(Form("HNCellViewTrk_Y_%d",cut),
217  Form("Track Number of Cells, Y, %s",cutname.c_str()),
218  geom->NPlanes()+1,-.5,geom->NPlanes()+.5);
219  }// track cuts
220 
221  }
diblock
print "ROW IS " print row
Definition: geo2elec.py:31
X or Y views.
Definition: PlaneGeo.h:30
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
Vertical planes which measure X.
Definition: PlaneGeo.h:28
unsigned int Ncells() const
Number of cells in this plane.
Definition: PlaneGeo.h:43
TH1F * fHNCellTrk[kNumLevel]
const daqchannelmap::DAQChannelMap * Map() const
Definition: CMap.h:57
const PlaneGeo * Plane(unsigned int i) const
TString hists[nhists]
Definition: bdt_com.C:3
cell_t getCell(lchan logicalchan) const
Decode the cell number from an lchan.
lchan encodeLChan(int detId, plane_t plane, cell_t cell) const
Horizontal planes which measure Y.
Definition: PlaneGeo.h:29
const char * label
const std::vector< unsigned int > fHumanReadableFEBs
std::string HRFebToStringLabel(unsigned int, int, unsigned int &, unsigned int &, unsigned int &, unsigned int &)
View_t View() const
Which coordinate does this plane measure.
Definition: PlaneGeo.h:53
correl_yv Fill(-(dy[iP-1][iC-1]), hyv->GetBinContent(iP, iC))
novadaq::cnv::DetId DetId() const
Prefer ds::DetectorService::DetId() instead.
Definition: GeometryBase.h:243
Geometry information for a single readout plane.
Definition: PlaneGeo.h:36
OStream cout
Definition: OStream.cxx:6
TH2F * fHRawDigits[geo::kXorY][kNumLevel]
const Cut cut
Definition: exporter_fd.C:30
std::map< unsigned int, ViewH > fHBookedChanCP
T * make(ARGS...args) const
const std::set< unsigned int > & GetPlanesByView(View_t v=kXorY) const
void geom(int which=0)
Definition: geom.C:163
const fhicl::ParameterSet & fPSet
TH1F * fHNCellViewTrk[geo::kXorY][kNumLevel]
plane_t getPlane(lchan logicalchan) const
Decode the plane number from an lchan.
dchan encodeDChan(int detID, diblock_t diblock, dcm_id_t dcm, feb_t feb, pixel_t pixel) const
unsigned int NPlanes() const
uint32_t dchan
< DAQ Channel Map Package
TH1F * fHExtentPlaneTrk[kNumLevel]
enum BeamMode string
detail::CachedProducts& art::EventObserverBase::cachedProducts ( )
inlineprotectedinherited

Definition at line 79 of file EventObserverBase.h.

References art::EventObserverBase::selectors_.

80  {
81  return selectors_;
82  }
detail::CachedProducts selectors_
template<typename T , BranchType = InEvent>
ProductToken<T> art::Consumer::consumes ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ProductToken<T> art::Consumer::consumes ( InputTag const &  it)
inherited

Definition at line 146 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

147 {
148  if (!moduleContext_)
149  return ProductToken<T>::invalid();
150 
151  consumables_[BT].emplace_back(ConsumableType::Product,
152  TypeID{typeid(T)},
153  it.label(),
154  it.instance(),
155  it.process());
156  return ProductToken<T>{it};
157 }
set< int >::iterator it
static ProductToken< T > invalid()
Definition: ProductToken.h:47
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
template<typename T , art::BranchType BT>
void art::Consumer::consumesMany ( )
inherited

Definition at line 161 of file Consumer.h.

References T.

162 {
163  if (!moduleContext_)
164  return;
165 
166  consumables_[BT].emplace_back(ConsumableType::Many, TypeID{typeid(T)});
167 }
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::Consumer::consumesView ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ViewToken<T> art::Consumer::consumesView ( InputTag const &  it)
inherited

Definition at line 171 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

172 {
173  if (!moduleContext_)
174  return ViewToken<T>::invalid();
175 
176  consumables_[BT].emplace_back(ConsumableType::ViewElement,
177  TypeID{typeid(T)},
178  it.label(),
179  it.instance(),
180  it.process());
181  return ViewToken<T>{it};
182 }
set< int >::iterator it
static ViewToken< Element > invalid()
Definition: ProductToken.h:75
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
base_engine_t& art::EngineCreator::createEngine ( seed_t  seed)
inherited
base_engine_t& art::EngineCreator::createEngine ( seed_t  seed,
std::string const &  kind_of_engine_to_make 
)
inherited
base_engine_t& art::EngineCreator::createEngine ( seed_t  seed,
std::string const &  kind_of_engine_to_make,
label_t const &  engine_label 
)
inherited
CurrentProcessingContext const* art::EDAnalyzer::currentContext ( ) const
protectedinherited
void dprf::ChannelPlots::endJob ( )
virtual

Reimplemented from art::EDAnalyzer.

Definition at line 222 of file ChannelPlots_module.cc.

223  {
224  }
void dprf::ChannelPlots::FillEventPlots ( )
private

Definition at line 390 of file ChannelPlots_module.cc.

References febshutoff_auto::end, fFebRawAll, and fFebRawOnTrack.

Referenced by analyze().

391  {
392  // Fill the "per-event" plots
393  FebPlotSet::iterator siter=fFebRawAll.begin();
394  for (;siter!=fFebRawAll.end();siter++) {
395  FebPlotGroup::iterator giter=(siter->second).begin();
396  for (;giter!=(siter->second).end();giter++)
397  (giter->second)->FinishEvent();
398  }
399 
400  siter=fFebRawOnTrack.begin();
401  for (;siter!=fFebRawOnTrack.end();siter++) {
402  FebPlotGroup::iterator giter=(siter->second).begin();
403  for (;giter!=(siter->second).end();giter++)
404  (giter->second)->FinishEvent();
405  }
406  }
void dprf::ChannelPlots::FillFebRawPlots ( FebPlotSet plots,
art::Ptr< rawdata::RawDigit dig 
)
private

Definition at line 340 of file ChannelPlots_module.cc.

References rawdata::RawDigit::ADC(), febshutoff_auto::chan, visualisationForPaperMasterPlot::cmap, rawdata::RawDigit::DaqChannel(), geom(), daqchannelmap::DAQChannelMap::getPixel(), cmap::dataprov::CMap::Map(), and daqchannelmap::MASK_PIXELID.

Referenced by analyze().

342  {
343 
344  //Fill all FebRawPlots for this channel, in all groups
347 
348  unsigned int chan=dig->DaqChannel();
349 
350  //key for the FEB is pixel 0 dchan for that FEB.
351  unsigned int lookupchan=chan &
353 
354  //loop over groups, and fill histograms if this channel is booked
355  for (FebPlotSet::iterator iter=plots.begin(); iter!=plots.end(); iter++)
356  {
357 
358  //unsigned int group=iter->first;
359  if (iter->second.find(lookupchan) != iter->second.end()) {
360  iter->second[lookupchan]->AddHit(dig->ADC(),
361  cmap->Map()->getPixel(chan));
362  }
363  } // groups
364  } // FillFebRawPlots
APD Pixel Number (8bit), valid range 0-31.
const daqchannelmap::DAQChannelMap * Map() const
Definition: CMap.h:57
uint32_t DaqChannel() const
Definition: RawDigit.h:85
const std::vector< Plot > plots
pixel_t getPixel(dchan daqchan) const
Decode the pixel id from a dchan.
int16_t ADC(uint32_t i) const
Definition: RawDigit.cxx:58
void geom(int which=0)
Definition: geom.C:163
seed_t art::EngineCreator::get_seed_value ( fhicl::ParameterSet const &  pset,
char const  key[] = "seed",
seed_t const  implicit_seed = -1 
)
inherited
art::Handle<art::TriggerResults> art::EventObserverBase::getTriggerResults ( Event const &  e) const
inlineinherited

Definition at line 61 of file EventObserverBase.h.

References art::detail::CachedProducts::getOneTriggerResults(), and art::EventObserverBase::selectors_.

62  {
64  }
detail::CachedProducts selectors_
art::Handle< art::TriggerResults > getOneTriggerResults(Event const &) const
Float_t e
Definition: plot.C:35
std::string dprf::ChannelPlots::HRFebToStringLabel ( unsigned int  hrfeb,
int  det,
unsigned int group,
unsigned int diblock,
unsigned int ldcm,
unsigned int lfeb 
)
private

Definition at line 227 of file ChannelPlots_module.cc.

References label, and string.

Referenced by beginRun().

231  {
232  // return a useful label from a human-readable FEB id. And return
233  // other useful info
234  group= (hrfeb/1000000)%100;
235  diblock=(hrfeb/ 10000)%100;
236  ldcm= (hrfeb/ 100)%100;
237  lfeb= (hrfeb/ 1)%100;
238 
239  std::string label(Form("g%d_%d_%2.2d_%2.2d_%2.2d",group,det,diblock,ldcm,lfeb));
240  return label;
241 
242  }
diblock
print "ROW IS " print row
Definition: geo2elec.py:31
const char * label
enum BeamMode string
template<typename T , BranchType = InEvent>
ProductToken<T> art::Consumer::mayConsume ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ProductToken<T> art::Consumer::mayConsume ( InputTag const &  it)
inherited

Definition at line 189 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

190 {
191  if (!moduleContext_)
192  return ProductToken<T>::invalid();
193 
194  consumables_[BT].emplace_back(ConsumableType::Product,
195  TypeID{typeid(T)},
196  it.label(),
197  it.instance(),
198  it.process());
199  return ProductToken<T>{it};
200 }
set< int >::iterator it
static ProductToken< T > invalid()
Definition: ProductToken.h:47
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
template<typename T , art::BranchType BT>
void art::Consumer::mayConsumeMany ( )
inherited

Definition at line 204 of file Consumer.h.

References T.

205 {
206  if (!moduleContext_)
207  return;
208 
209  consumables_[BT].emplace_back(ConsumableType::Many, TypeID{typeid(T)});
210 }
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::Consumer::mayConsumeView ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ViewToken<T> art::Consumer::mayConsumeView ( InputTag const &  it)
inherited

Definition at line 214 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

215 {
216  if (!moduleContext_)
217  return ViewToken<T>::invalid();
218 
219  consumables_[BT].emplace_back(ConsumableType::ViewElement,
220  TypeID{typeid(T)},
221  it.label(),
222  it.instance(),
223  it.process());
224  return ViewToken<T>{it};
225 }
set< int >::iterator it
static ViewToken< Element > invalid()
Definition: ProductToken.h:75
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
bool art::EventObserverBase::modifiesEvent ( ) const
inlineinherited

Definition at line 25 of file EventObserverBase.h.

26  {
27  return false;
28  }
static cet::exempt_ptr<Consumer> art::Consumer::non_module_context ( )
staticinherited
void art::Consumer::prepareForJob ( fhicl::ParameterSet const &  pset)
protectedinherited
std::string const& art::EventObserverBase::processName ( ) const
inlineinherited
void art::EventObserverBase::registerProducts ( MasterProductRegistry ,
ProductDescriptions ,
ModuleDescription const &   
)
inlineinherited

Definition at line 33 of file EventObserverBase.h.

References string.

36  {}
void dprf::ChannelPlots::ResetEventPlots ( )
private

Definition at line 407 of file ChannelPlots_module.cc.

References DEFINE_ART_MODULE(), febshutoff_auto::end, fFebRawAll, and fFebRawOnTrack.

Referenced by analyze().

408  {
409  // Reset the "per-event" counters
410  FebPlotSet::iterator siter=fFebRawAll.begin();
411  for (;siter!=fFebRawAll.end();siter++) {
412  FebPlotGroup::iterator giter=(siter->second).begin();
413  for (;giter!=(siter->second).end();giter++)
414  (giter->second)->Reset();
415  }
416 
417  siter=fFebRawOnTrack.begin();
418  for (;siter!=fFebRawOnTrack.end();siter++) {
419  FebPlotGroup::iterator giter=(siter->second).begin();
420  for (;giter!=(siter->second).end();giter++)
421  (giter->second)->Reset();
422  }
423  }
fhicl::ParameterSetID art::EventObserverBase::selectorConfig ( ) const
inlineinherited

Definition at line 56 of file EventObserverBase.h.

References art::EventObserverBase::selector_config_id_.

57  {
58  return selector_config_id_;
59  }
fhicl::ParameterSetID selector_config_id_
void art::Consumer::showMissingConsumes ( ) const
protectedinherited

Referenced by art::RootOutput::endJob().

bool dprf::ChannelPlots::TrackOK ( art::Ptr< rb::Track track)
private

Definition at line 366 of file ChannelPlots_module.cc.

References rb::Cluster::ExtentPlane(), fHExtentPlaneTrk, fHNCellTrk, fHNCellViewTrk, fMinCellTrack, fMinCellTrackView, fMinPlaneTrack, kAll, kPass, geo::kX, geo::kY, rb::Cluster::NCell(), rb::Cluster::NXCell(), and rb::Cluster::NYCell().

Referenced by analyze().

367  {
368  //some histos to monitor the cuts
369  fHExtentPlaneTrk[kAll]->Fill(track->ExtentPlane());
370  fHNCellTrk[kAll]->Fill(track->NCell());
371  fHNCellViewTrk[geo::kX][kAll]->Fill(track->NXCell());
372  fHNCellViewTrk[geo::kY][kAll]->Fill(track->NYCell());
373 
374  // enough planes (extent)
375  if (track->ExtentPlane() < fMinPlaneTrack) return false;
376 
377  // enough cells
378  if (track->NCell() < fMinCellTrack) return false;
379 
380  // enough cells in each view
381  if (track->NXCell() < fMinCellTrackView ||
382  track->NYCell() < fMinCellTrackView ) return false;
383 
384  fHExtentPlaneTrk[kPass]->Fill(track->ExtentPlane());
385  fHNCellTrk[kPass]->Fill(track->NCell());
386  fHNCellViewTrk[geo::kX][kPass]->Fill(track->NXCell());
387  fHNCellViewTrk[geo::kY][kPass]->Fill(track->NYCell());
388  return true;
389  }
unsigned int NCell(geo::View_t view) const
Number of cells in view view.
Definition: Cluster.cxx:134
Vertical planes which measure X.
Definition: PlaneGeo.h:28
TH1F * fHNCellTrk[kNumLevel]
const unsigned int fMinCellTrack
Horizontal planes which measure Y.
Definition: PlaneGeo.h:29
unsigned int NYCell() const
Number of cells in the y-view.
Definition: Cluster.h:108
const unsigned int fMinCellTrackView
unsigned int NXCell() const
Number of cells in the x-view.
Definition: Cluster.h:106
const unsigned int fMinPlaneTrack
unsigned int ExtentPlane(geo::View_t view=geo::kXorY) const
Definition: Cluster.h:250
TH1F * fHNCellViewTrk[geo::kXorY][kNumLevel]
TH1F * fHExtentPlaneTrk[kNumLevel]
void art::Consumer::validateConsumedProduct ( BranchType const  bt,
ProductInfo const &  pi 
)
protectedinherited
bool art::EventObserverBase::wantAllEvents ( ) const
inlineinherited

Definition at line 46 of file EventObserverBase.h.

References art::EventObserverBase::wantAllEvents_.

Referenced by art::RootOutput::RootOutput().

47  {
48  return wantAllEvents_;
49  }
bool art::EventObserverBase::wantEvent ( Event const &  e)
inlineinherited

Definition at line 51 of file EventObserverBase.h.

References art::EventObserverBase::selectors_, and art::detail::CachedProducts::wantEvent().

52  {
53  return selectors_.wantEvent(e);
54  }
detail::CachedProducts selectors_
Float_t e
Definition: plot.C:35
bool wantEvent(Event const &)
std::string art::EDAnalyzer::workerType ( ) const
inlineinherited

Definition at line 109 of file EDAnalyzer.h.

References art::EDAnalyzer::currentContext().

110  {
111  return "WorkerT<EDAnalyzer>";
112  }

Member Data Documentation

const std::string dprf::ChannelPlots::fCellHitLabel
private

Definition at line 53 of file ChannelPlots_module.cc.

Referenced by analyze().

FebPlotSet dprf::ChannelPlots::fFebRawAll
private

Definition at line 68 of file ChannelPlots_module.cc.

Referenced by analyze(), beginRun(), FillEventPlots(), and ResetEventPlots().

FebPlotSet dprf::ChannelPlots::fFebRawOnTrack
private

Definition at line 69 of file ChannelPlots_module.cc.

Referenced by analyze(), beginRun(), FillEventPlots(), and ResetEventPlots().

std::map<unsigned int, ViewH> dprf::ChannelPlots::fHBookedChanCP
private

Definition at line 59 of file ChannelPlots_module.cc.

Referenced by beginRun().

TH1F* dprf::ChannelPlots::fHExtentPlaneTrk[kNumLevel]
private

Definition at line 61 of file ChannelPlots_module.cc.

Referenced by beginRun(), and TrackOK().

TH1F* dprf::ChannelPlots::fHNCellTrk[kNumLevel]
private

Definition at line 62 of file ChannelPlots_module.cc.

Referenced by beginRun(), and TrackOK().

TH1F* dprf::ChannelPlots::fHNCellViewTrk[geo::kXorY][kNumLevel]
private

Definition at line 63 of file ChannelPlots_module.cc.

Referenced by beginRun(), and TrackOK().

TH2F* dprf::ChannelPlots::fHRawDigits[geo::kXorY][kNumLevel]
private

Definition at line 60 of file ChannelPlots_module.cc.

Referenced by analyze(), and beginRun().

const std::vector< unsigned int > dprf::ChannelPlots::fHumanReadableFEBs
private

Definition at line 51 of file ChannelPlots_module.cc.

Referenced by beginRun().

const unsigned int dprf::ChannelPlots::fMinCellTrack
private

Definition at line 52 of file ChannelPlots_module.cc.

Referenced by TrackOK().

const unsigned int dprf::ChannelPlots::fMinCellTrackView
private

Definition at line 52 of file ChannelPlots_module.cc.

Referenced by TrackOK().

const unsigned int dprf::ChannelPlots::fMinPlaneTrack
private

Definition at line 52 of file ChannelPlots_module.cc.

Referenced by TrackOK().

const fhicl::ParameterSet& dprf::ChannelPlots::fPSet
private

Definition at line 50 of file ChannelPlots_module.cc.

Referenced by beginRun().

const std::string dprf::ChannelPlots::fRawDigitLabel
private

Definition at line 53 of file ChannelPlots_module.cc.

Referenced by analyze().

const std::string dprf::ChannelPlots::fTrackLabel
private

Definition at line 53 of file ChannelPlots_module.cc.

Referenced by analyze().


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