Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
chaninfo::CosmicEff Class Reference

Calculate efficiency for cosmic rays to identify bad channels. More...

Inheritance diagram for chaninfo::CosmicEff:
art::EDAnalyzer art::EventObserverBase art::Consumer art::EngineCreator

Public Types

using WorkerType = WorkerT< EDAnalyzer >
 
using ModuleType = EDAnalyzer
 

Public Member Functions

 CosmicEff (const fhicl::ParameterSet &pset)
 
virtual ~CosmicEff ()
 
virtual void analyze (const art::Event &evt)
 
virtual void reconfigure (const fhicl::ParameterSet &pset)
 
virtual void beginRun (const art::Run &run)
 
virtual 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
 

Protected Attributes

std::string fTrackLabel
 
TH2F * fHits
 
TH2F * fMiss
 
TH2F * fHitsXYLoose
 
TH2F * fMissXYLoose
 
TH2F * fHitsXYTight
 
TH2F * fMissXYTight
 
TH2F * fHitsZLoose
 
TH2F * fMissZLoose
 
TH2F * fHitsZTight
 
TH2F * fMissZTight
 

Detailed Description

Calculate efficiency for cosmic rays to identify bad channels.

Definition at line 32 of file CosmicEff_module.cc.

Member Typedef Documentation

Definition at line 39 of file EDAnalyzer.h.

Definition at line 38 of file EDAnalyzer.h.

Constructor & Destructor Documentation

chaninfo::CosmicEff::CosmicEff ( const fhicl::ParameterSet pset)
explicit

Definition at line 57 of file CosmicEff_module.cc.

References reconfigure().

58  : EDAnalyzer(pset), fHits(0) // This one indicates all the others are uninitialized too
59  {
60  reconfigure(pset);
61  }
virtual void reconfigure(const fhicl::ParameterSet &pset)
EDAnalyzer(Table< Config > const &config)
Definition: EDAnalyzer.h:100
chaninfo::CosmicEff::~CosmicEff ( )
virtual

Definition at line 64 of file CosmicEff_module.cc.

65  {
66  }

Member Function Documentation

void chaninfo::CosmicEff::analyze ( const art::Event evt)
virtual

Definition at line 101 of file CosmicEff_module.cc.

References getBrightness::cell, rb::CellHit::Cell(), rb::Cluster::Cell(), geo::GeometryBase::CountCellsOnLineFast(), fHits, fHitsXYLoose, fHitsXYTight, fHitsZLoose, fHitsZTight, fMiss, fMissXYLoose, fMissXYTight, fMissZLoose, fMissZTight, fTrackLabel, geom(), art::Ptr< T >::get(), art::DataViewImpl::getByLabel(), it, getGoodRuns4SAM::n, rb::Cluster::NCell(), geo::GeometryBase::NextPlaneInView(), rb::Cluster::NXCell(), rb::Cluster::NYCell(), rb::CellHit::Plane(), NDAPDHVSetting::plane, rb::Prong::Start(), rb::Track::Stop(), track, POTSpillRate::view, and rb::CellHit::View().

102  {
104 
106  evt.getByLabel(fTrackLabel, trks);
107  if(trks->empty()) return;
108 
109  const unsigned int trkMax = trks->size();
110 
111  for(unsigned int trkIdx = 0; trkIdx < trkMax; ++trkIdx){
112  art::Ptr<rb::Track> track(trks, trkIdx);
113 
114  rb::HitMap hmap(track.get());
115 
116  // Which cells does this track's trajectory pass through?
117  std::vector<geo::OfflineChan> xhits, yhits;
118  geom->CountCellsOnLineFast(track->Start(), track->Stop(), xhits, yhits);
119 
120  // If there's enough hits in this view, then count how many tracks were
121  // hit when they should be and how many were missed.
122  if(track->NXCell() > 2){
123  for(unsigned int n = 0; n < xhits.size(); ++n){
124  const unsigned int plane = xhits[n].Plane();
125  const unsigned int cell = xhits[n].Cell();
126  if(hmap.CellExists(plane, cell)){
127  fHits->Fill(plane, cell);
128  }
129  else{
130  fMiss->Fill(plane, cell);
131  }
132  }
133  }
134  if(track->NYCell() > 2){
135  for(unsigned int n = 0; n < yhits.size(); ++n){
136  const unsigned int plane = yhits[n].Plane();
137  const unsigned int cell = yhits[n].Cell();
138  if(hmap.CellExists(plane, cell)){
139  fHits->Fill(plane, cell);
140  }
141  else{
142  fMiss->Fill(plane, cell);
143  }
144  }
145  }
146 
147  // Min/Max cell number of hits on this plane
148  std::map<int, int> minsXY, maxsXY;
149  // Channels that have a hit below/above them
150  std::set<geo::OfflineChan> belows, aboves;
151  // Min/max plane number by view and cell index
152  std::map<int, int> minsZ[2], maxsZ[2];
153  // Channels that have a hit upstream/downstream of them
154  std::set<geo::OfflineChan> lefts, rights;
155 
156  for(unsigned int chitIdx = 0; chitIdx < track->NCell(); ++chitIdx){
157  const art::Ptr<rb::CellHit>& chit = track->Cell(chitIdx);
158  const int plane = chit->Plane();
159  const int cell = chit->Cell();
160  const geo::View_t view = chit->View();
161 
162  // Have to be more careful on min because value defaults to zero
163  if(minsXY.find(plane) == minsXY.end() || cell < minsXY[plane])
164  minsXY[plane] = cell;
165  if(cell > maxsXY[plane]) maxsXY[plane] = cell;
166 
167  if(minsZ[view].find(cell) == minsZ[view].end() || plane < minsZ[view][cell])
168  minsZ[view][cell] = plane;
169  if(plane > maxsZ[view][cell]) maxsZ[view][cell] = plane;
170 
171  belows.insert(geo::OfflineChan(plane, cell+1));
172  aboves.insert(geo::OfflineChan(plane, cell-1));
173 
174  const int nextplane = geom->NextPlaneInView(plane, +1);
175  lefts.insert(geo::OfflineChan(nextplane, cell));
176  const int prevplane = geom->NextPlaneInView(plane, -1);
177  rights.insert(geo::OfflineChan(prevplane, cell));
178  } // end for chitIdx
179 
180  for(std::map<int, int>::iterator it = minsXY.begin(); it != minsXY.end(); ++it){
181  const int plane = it->first;
182  const int from = it->second;
183  const int to = maxsXY[plane];
184 
185  // Expect a hit if there is a hit above and below somewhere on this plane
186  for(int cell = from+1; cell <= to-1; ++cell){
187  if(hmap.CellExists(plane, cell))
188  fHitsXYLoose->Fill(plane, cell);
189  else
190  fMissXYLoose->Fill(plane, cell);
191  }
192  } // end for it
193 
194  for(int view = 0; view < 2; ++view){
195  for(std::map<int, int>::iterator it = minsZ[view].begin(); it != minsZ[view].end(); ++it){
196  const int cell = it->first;
197  const int from = it->second;
198  const int to = maxsZ[view][cell];
199 
200  if(to == from) continue;
201 
202  // Except a hit if there's one on an earlier and later plane
203  int plane = geom->NextPlaneInView(from, +1);
204  while(plane != to){
205  if(hmap.CellExists(plane, cell))
206  fHitsZLoose->Fill(plane, cell);
207  else
208  fMissZLoose->Fill(plane, cell);
209 
210  plane = geom->NextPlaneInView(plane, +1);
211  }
212  } // end for it
213  } // end for view
214 
215  for(std::set<geo::OfflineChan>::iterator it = belows.begin(); it != belows.end(); ++it){
216  const int plane = it->Plane();
217  const int cell = it->Cell();
218  if(!aboves.count(geo::OfflineChan(plane, cell))) continue;
219 
220  // Expect a hit if both our neighbours are hit
221  if(hmap.CellExists(plane, cell))
222  fHitsXYTight->Fill(plane, cell);
223  else
224  fMissXYTight->Fill(plane, cell);
225  }
226 
227  for(std::set<geo::OfflineChan>::iterator it = lefts.begin(); it != lefts.end(); ++it){
228  const int plane = it->Plane();
229  const int cell = it->Cell();
230  if(!rights.count(geo::OfflineChan(plane, cell))) continue;
231 
232  // Expect a hit if both our neighbouring planes are hit here
233  if(hmap.CellExists(plane, cell))
234  fHitsZTight->Fill(plane, cell);
235  else
236  fMissZTight->Fill(plane, cell);
237  }
238  } // end for trkIdx
239  }
set< int >::iterator it
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
unsigned short Plane() const
Definition: CellHit.h:39
geo::View_t View() const
Definition: CellHit.h:41
Definition: event.h:19
void CountCellsOnLineFast(double x1, double y1, double z1, double x2, double y2, double z2, std::vector< OfflineChan > &Xhitsonline, std::vector< OfflineChan > &Yhitsonline)
Make list of cells in each view traversed by a line segment.
Provides efficient lookup of CellHits by plane and cell number.
Definition: HitMap.h:22
unsigned short Cell() const
Definition: CellHit.h:40
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
Definition: DataViewImpl.h:344
const unsigned int NextPlaneInView(unsigned int p, int d=+1) const
A (plane, cell) pair.
Definition: OfflineChan.h:17
void geom(int which=0)
Definition: geom.C:163
Float_t track
Definition: plot.C:35
void chaninfo::CosmicEff::beginRun ( const art::Run run)
virtual

Definition at line 75 of file CosmicEff_module.cc.

References fHits, fHitsXYLoose, fHitsXYTight, fHitsZLoose, fHitsZTight, fMiss, fMissXYLoose, fMissXYTight, fMissZLoose, fMissZTight, geom(), art::TFileDirectory::make(), std::max(), makeBrightnessMap::maxCell, geo::PlaneGeo::Ncells(), geo::GeometryBase::NPlanes(), and geo::GeometryBase::Plane().

76  {
77  if(fHits) return; // Only make the plots once
78 
81 
82  // Make histograms big enough to hold all detector cells
83  const unsigned int maxCell = std::max(geom->Plane(0)->Ncells(), geom->Plane(1)->Ncells());
84  fHits = tfs->make<TH2F>("hits", ";Plane;Cell", geom->NPlanes(), 0, geom->NPlanes(), maxCell, 0, maxCell);
85  fMiss = tfs->make<TH2F>("miss", ";Plane;Cell", geom->NPlanes(), 0, geom->NPlanes(), maxCell, 0, maxCell);
86 
87  fHitsXYLoose = tfs->make<TH2F>("hitsXYLoose", ";Plane;Cell", geom->NPlanes(), 0, geom->NPlanes(), maxCell, 0, maxCell);
88  fMissXYLoose = tfs->make<TH2F>("missXYLoose", ";Plane;Cell", geom->NPlanes(), 0, geom->NPlanes(), maxCell, 0, maxCell);
89 
90  fHitsXYTight = tfs->make<TH2F>("hitsXYTight", ";Plane;Cell", geom->NPlanes(), 0, geom->NPlanes(), maxCell, 0, maxCell);
91  fMissXYTight = tfs->make<TH2F>("missXYTight", ";Plane;Cell", geom->NPlanes(), 0, geom->NPlanes(), maxCell, 0, maxCell);
92 
93  fHitsZLoose = tfs->make<TH2F>("hitsZLoose", ";Plane;Cell", geom->NPlanes(), 0, geom->NPlanes(), maxCell, 0, maxCell);
94  fMissZLoose = tfs->make<TH2F>("missZLoose", ";Plane;Cell", geom->NPlanes(), 0, geom->NPlanes(), maxCell, 0, maxCell);
95 
96  fHitsZTight = tfs->make<TH2F>("hitsZTight", ";Plane;Cell", geom->NPlanes(), 0, geom->NPlanes(), maxCell, 0, maxCell);
97  fMissZTight = tfs->make<TH2F>("missZTight", ";Plane;Cell", geom->NPlanes(), 0, geom->NPlanes(), maxCell, 0, maxCell);
98  }
T max(const caf::Proxy< T > &a, T b)
unsigned int Ncells() const
Number of cells in this plane.
Definition: PlaneGeo.h:43
const PlaneGeo * Plane(unsigned int i) const
T * make(ARGS...args) const
void geom(int which=0)
Definition: geom.C:163
unsigned int NPlanes() const
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 chaninfo::CosmicEff::endJob ( )
virtual

Reimplemented from art::EDAnalyzer.

Definition at line 242 of file CosmicEff_module.cc.

References plot_validation_datamc::c, DEFINE_ART_MODULE(), fMiss, fMissXYLoose, fMissXYTight, fMissZLoose, fMissZTight, util::frac(), geom(), chaninfo::BadChanList::IsBad(), art::TFileDirectory::make(), std::max(), makeBrightnessMap::maxCell, geo::PlaneGeo::Ncells(), geo::GeometryBase::NPlanes(), geo::GeometryBase::Plane(), proj, PandAna.Demos.pi0_spectra::tot, X, submit_syst::x, Y, and submit_syst::y.

243  {
247 
248  // Store what the occupancy cuts think about the channels
249  const unsigned int maxCell = std::max(geom->Plane(0)->Ncells(), geom->Plane(1)->Ncells());
250  TH2* hKnown = tfs->make<TH2F>("known", ";Plane;Cell", geom->NPlanes(), 0, geom->NPlanes(), maxCell, 0, maxCell);
251  // TH2* hOccs = tfs->make<TH2F>("occs", ";Plane;Cell", geom->NPlanes(), 0, geom->NPlanes(), maxCell, 0, maxCell);
252  for(unsigned int p = 0; p < geom->NPlanes(); ++p){
253  for(unsigned int c = 0; c < geom->Plane(p)->Ncells(); ++c){
254  if(bcl->IsBad(p, c)){
255  hKnown->Fill(p, c);
256  }
257  // hOccs->Fill(p, c, bcl->GetOccupancy(p, c));
258  }
259  }
260 
261  // Make sums, ratios, and projections of what we already have:
262 
263  TH2F* tot = tfs->make<TH2F>(*fHits);
264  tot->SetName("tot");
265  tot->Add(fMiss);
266 
267  TH2F* totXYLoose = tfs->make<TH2F>(*fHitsXYLoose);
268  totXYLoose->SetName("totXYLoose");
269  totXYLoose->Add(fMissXYLoose);
270 
271  TH2F* totXYTight = tfs->make<TH2F>(*fHitsXYTight);
272  totXYTight->SetName("totXYTight");
273  totXYTight->Add(fMissXYTight);
274 
275  TH2F* totZLoose = tfs->make<TH2F>(*fHitsZLoose);
276  totZLoose->SetName("totZLoose");
277  totZLoose->Add(fMissZLoose);
278 
279  TH2F* totZTight = tfs->make<TH2F>(*fHitsZTight);
280  totZTight->SetName("totZTight");
281  totZTight->Add(fMissZTight);
282 
283  TH2F* frac = tfs->make<TH2F>(*fMiss);
284  frac->SetName("frac");
285  frac->Divide(tot);
286 
287  TH2F* fracXYLoose = tfs->make<TH2F>(*fMissXYLoose);
288  fracXYLoose->SetName("fracXYLoose");
289  fracXYLoose->Divide(totXYLoose);
290 
291  TH2F* fracXYTight = tfs->make<TH2F>(*fMissXYTight);
292  fracXYTight->SetName("fracXYTight");
293  fracXYTight->Divide(totXYTight);
294 
295  TH2F* fracZLoose = tfs->make<TH2F>(*fMissZLoose);
296  fracZLoose->SetName("fracZLoose");
297  fracZLoose->Divide(totZLoose);
298 
299  TH2F* fracZTight = tfs->make<TH2F>(*fMissZTight);
300  fracZTight->SetName("fracZTight");
301  fracZTight->Divide(totZTight);
302 
303  TH1F* proj = tfs->make<TH1F>("proj", "", 101, 0, 1.01);
304  TH1F* projXYLoose = tfs->make<TH1F>("projXYLoose", "", 101, 0, 1.01);
305  TH1F* projXYTight = tfs->make<TH1F>("projXYTight", "", 101, 0, 1.01);
306  TH1F* projZLoose = tfs->make<TH1F>("projZLoose", "", 101, 0, 1.01);
307  TH1F* projZTight = tfs->make<TH1F>("projZTight", "", 101, 0, 1.01);
308 
309  // Projections don't include channels already known to be bad.
310 
311  const int X = frac->GetNbinsX()+1;
312  const int Y = frac->GetNbinsY()+1;
313  for(int x = 1; x < X; ++x){
314  for(int y = 1; y < Y; ++y){
315  const bool isBad = hKnown->GetBinContent(x, y);
316 
317  if(isBad){
318  frac->SetBinContent(x, y, 0);
319  fracXYLoose->SetBinContent(x, y, 0);
320  fracXYTight->SetBinContent(x, y, 0);
321  fracZLoose->SetBinContent(x, y, 0);
322  fracZTight->SetBinContent(x, y, 0);
323  continue;
324  }
325 
326  const double fr = frac->GetBinContent(x, y);
327  if(tot->GetBinContent(x, y)) proj->Fill(fr);
328 
329  const double frLoXY = fracXYLoose->GetBinContent(x, y);
330  if(totXYLoose->GetBinContent(x, y)) projXYLoose->Fill(frLoXY);
331 
332  const double frTiXY = fracXYTight->GetBinContent(x, y);
333  if(totXYTight->GetBinContent(x, y)) projXYTight->Fill(frTiXY);
334 
335  const double frLoZ = fracZLoose->GetBinContent(x, y);
336  if(totZLoose->GetBinContent(x, y)) projZLoose->Fill(frLoZ);
337 
338  const double frTiZ = fracZTight->GetBinContent(x, y);
339  if(totZTight->GetBinContent(x, y)) projZTight->Fill(frTiZ);
340  } // end for Y
341  } // end for X
342  }
T max(const caf::Proxy< T > &a, T b)
const char * p
Definition: xmltok.h:285
unsigned int Ncells() const
Number of cells in this plane.
Definition: PlaneGeo.h:43
const PlaneGeo * Plane(unsigned int i) const
Float_t Y
Definition: plot.C:38
double frac(double x)
Fractional part.
T * make(ARGS...args) const
Float_t proj
Definition: plot.C:35
void geom(int which=0)
Definition: geom.C:163
unsigned int NPlanes() const
Float_t X
Definition: plot.C:38
bool IsBad(int plane, int cell)
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
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 chaninfo::CosmicEff::reconfigure ( const fhicl::ParameterSet pset)
virtual

Definition at line 69 of file CosmicEff_module.cc.

References fTrackLabel, fhicl::ParameterSet::get(), and string.

Referenced by CosmicEff().

70  {
71  fTrackLabel = pset.get<std::string>("TrackLabel");
72  }
T get(std::string const &key) const
Definition: ParameterSet.h:231
enum BeamMode string
void art::EventObserverBase::registerProducts ( MasterProductRegistry ,
ProductDescriptions ,
ModuleDescription const &   
)
inlineinherited

Definition at line 33 of file EventObserverBase.h.

References string.

36  {}
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().

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

TH2F* chaninfo::CosmicEff::fHits
protected

Definition at line 47 of file CosmicEff_module.cc.

Referenced by analyze(), and beginRun().

TH2F* chaninfo::CosmicEff::fHitsXYLoose
protected

Definition at line 48 of file CosmicEff_module.cc.

Referenced by analyze(), and beginRun().

TH2F* chaninfo::CosmicEff::fHitsXYTight
protected

Definition at line 49 of file CosmicEff_module.cc.

Referenced by analyze(), and beginRun().

TH2F* chaninfo::CosmicEff::fHitsZLoose
protected

Definition at line 50 of file CosmicEff_module.cc.

Referenced by analyze(), and beginRun().

TH2F* chaninfo::CosmicEff::fHitsZTight
protected

Definition at line 51 of file CosmicEff_module.cc.

Referenced by analyze(), and beginRun().

TH2F * chaninfo::CosmicEff::fMiss
protected

Definition at line 47 of file CosmicEff_module.cc.

Referenced by analyze(), beginRun(), and endJob().

TH2F * chaninfo::CosmicEff::fMissXYLoose
protected

Definition at line 48 of file CosmicEff_module.cc.

Referenced by analyze(), beginRun(), and endJob().

TH2F * chaninfo::CosmicEff::fMissXYTight
protected

Definition at line 49 of file CosmicEff_module.cc.

Referenced by analyze(), beginRun(), and endJob().

TH2F * chaninfo::CosmicEff::fMissZLoose
protected

Definition at line 50 of file CosmicEff_module.cc.

Referenced by analyze(), beginRun(), and endJob().

TH2F * chaninfo::CosmicEff::fMissZTight
protected

Definition at line 51 of file CosmicEff_module.cc.

Referenced by analyze(), beginRun(), and endJob().

std::string chaninfo::CosmicEff::fTrackLabel
protected

Definition at line 45 of file CosmicEff_module.cc.

Referenced by analyze(), and reconfigure().


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