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

Public Types

using WorkerType = WorkerT< EDAnalyzer >
 
using ModuleType = EDAnalyzer
 

Public Member Functions

 SupernovaAna (fhicl::ParameterSet const &p)
 
 SupernovaAna (SupernovaAna const &)=delete
 
 SupernovaAna (SupernovaAna &&)=delete
 
SupernovaAnaoperator= (SupernovaAna const &)=delete
 
SupernovaAnaoperator= (SupernovaAna &&)=delete
 
void analyze (art::Event const &e) override
 
void beginJob ()
 
void endJob ()
 
void FillPlaneSeperations (art::Ptr< rb::Cluster > &aSlice, int &min_cell_sep, double &min_plane_sep, double &min_sep)
 
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 Attributes

std::string fCellHitsLabel
 Label of module making the cell hits. More...
 
std::string fSlicerLabel
 Instance label making the slices. More...
 
bool fVerbose
 Verbose output. More...
 
int nEvent = 0
 
TH1F * hNSlices
 
TH1F * hSlicesNHits
 
TH1F * hSlicesSumADC
 
TH1F * hSlicesMeanADC
 
TH1F * hSlicesMinInPlaneSeperation
 
TH1F * hSlicesMinCrossPlaneSeperation
 
TH1F * hSlicesMinSeperation
 
TH1F * hNNoiseSlices
 
TH1F * hNoiseSlicesNHits
 
TH1F * hNoiseSlicesSumADC
 
TH1F * hNoiseSlicesMeanADC
 
TH1F * hNoiseSlicesMinInPlaneSeperation
 
TH1F * hNoiseSlicesMinCrossPlaneSeperation
 
TH1F * hNoiseSlicesMinSeperation
 
TH1F * h_t_SumADC
 
TH1F * h_t_Nhits
 
TH1F * h_t_MeanADC
 
TH1F * h_t_NSlices
 
TH1F * h_t_SliceNHits
 
TH1F * h_t_SliceMeanHits
 
TH1F * h_t_NNoiseSlices
 
TH1F * h_t_NoiseNHits
 
TH1F * h_t_NoiseMeanHits
 
TH2F * hADC_vs_mb
 
TH2F * hSlice_hits_vs_mb
 
TH2F * hMeanADC_vs_Slice_hits
 
TH2F * hNoiseSlice_hits_vs_mb
 
TH2F * hNoiseMeanADC_vs_Slice_hits
 

Detailed Description

Definition at line 38 of file SupernovaAna_module.cc.

Member Typedef Documentation

Definition at line 39 of file EDAnalyzer.h.

Definition at line 38 of file EDAnalyzer.h.

Constructor & Destructor Documentation

sn::SupernovaAna::SupernovaAna ( fhicl::ParameterSet const &  p)
explicit

Definition at line 99 of file SupernovaAna_module.cc.

References om::cout, allTimeWatchdog::endl, fCellHitsLabel, fSlicerLabel, fVerbose, h_t_MeanADC, h_t_Nhits, h_t_NNoiseSlices, h_t_NoiseMeanHits, h_t_NoiseNHits, h_t_NSlices, h_t_SliceMeanHits, h_t_SliceNHits, h_t_SumADC, hADC_vs_mb, hMeanADC_vs_Slice_hits, hNNoiseSlices, hNoiseMeanADC_vs_Slice_hits, hNoiseSlice_hits_vs_mb, hNoiseSlicesMeanADC, hNoiseSlicesMinCrossPlaneSeperation, hNoiseSlicesMinInPlaneSeperation, hNoiseSlicesMinSeperation, hNoiseSlicesNHits, hNoiseSlicesSumADC, hNSlices, hSlice_hits_vs_mb, hSlicesMeanADC, hSlicesMinCrossPlaneSeperation, hSlicesMinInPlaneSeperation, hSlicesMinSeperation, hSlicesNHits, hSlicesSumADC, and art::TFileDirectory::make().

99  : EDAnalyzer(p),
100  fCellHitsLabel (p.get<std::string >("CellHitsLabel")),
101  fSlicerLabel (p.get<std::string >("SlicerLabel")),
102  fVerbose (p.get<bool >("verbose"))
103 {
104  std::cout << "--- sn::SupernovaAna instantiate" << std::endl;
105  std::cout << "\t CellHitModuleLabel: " << fCellHitsLabel << std::endl;
106  std::cout << "\t SlicerLabel: " << fSlicerLabel << std::endl;
107  std::cout << "\t verbose: " << fVerbose << std::endl;
108 
110  hNSlices= tfs->make<TH1F>("NSlices", ";NSlices;Entries",200,0,7000);
111  hSlicesNHits= tfs->make<TH1F>("SlicesNHits", ";SlicesNHits;Entries",500,0,500);
112  hSlicesSumADC= tfs->make<TH1F>("SlicesSumADC", ";SlicesSumADC;Entries",400,0,20000);
113  hSlicesMeanADC= tfs->make<TH1F>("SlicesMeanADC", ";SlicesMeanADC;Entries",410,0.5,4100.5);
114  hSlicesMinInPlaneSeperation= tfs->make<TH1F>("SlicesMinInPlaneSeperation", ";hSlicesMinInPlaneSeperation;;Entries",22,-0.5,20.5);
115  hSlicesMinCrossPlaneSeperation= tfs->make<TH1F>("SlicesMinCrossPlaneSeperation", ";hSlicesMinCrossPlaneSeperation;Entries",200,-0.5,20.5);
116  hSlicesMinSeperation= tfs->make<TH1F>("SlicesMinSeperation", ";hSlicesMinSeperation;Entries",200,-0.5,20.5);
117 
118  hNNoiseSlices= tfs->make<TH1F>("NNoiseSlices", ";NSlices;Entries",200,0,7000);
119  hNoiseSlicesNHits= tfs->make<TH1F>("NoiseSlicesNHits", ";SlicesNHits;Entries",200,0,200);
120  hNoiseSlicesSumADC= tfs->make<TH1F>("NoiseSlicesSumADC", ";SlicesSumADC;Entries",200,0,10000);
121  hNoiseSlicesMeanADC= tfs->make<TH1F>("NoiseSlicesMeanADC", ";SlicesMeanADC;Entries",410,0.5,4100.5);
122  hNoiseSlicesMinInPlaneSeperation= tfs->make<TH1F>("NoiseSlicesMinInPlaneSeperation", ";hSlicesMinInPlaneSeperation;;Entries",11,-0.5,10.5);
123  hNoiseSlicesMinCrossPlaneSeperation= tfs->make<TH1F>("NoiseSlicesMinCrossPlaneSeperation", ";hSlicesMinCrossPlaneSeperation;Entries",100,-0.5,10.5);
124  hNoiseSlicesMinSeperation= tfs->make<TH1F>("NoiseSlicesMinSeperation", ";hSlicesMinSeperation;Entries",100,-0.5,10.5);
125 
126  // time dependent
127  h_t_SumADC = tfs->make<TH1F>("t_SumADC", "SumADC;Event;SumADC", 400,-.5,399.5);
128  h_t_Nhits = tfs->make<TH1F>("t_Nhits", "Nhits;Event;Nhits", 400,-.5,399.5);
129  h_t_MeanADC= tfs->make<TH1F>("t_MeanADC", "MeanADC;Event;MeanADC",400,-.5,399.5);
130  h_t_NSlices= tfs->make<TH1F>("t_NSlices", "NSlices;Event;NSlices",400,-.5,399.5);
131  h_t_SliceNHits= tfs->make<TH1F>("t_SliceNHits", "SliceNHits;Event;NSliceHits",400,-.5,399.5);
132  h_t_SliceMeanHits= tfs->make<TH1F>("t_SliceMeanHits", "SliceMeanHits;Event;SliceMeanHits",400,-.5,399.5);
133  h_t_NNoiseSlices= tfs->make<TH1F>("t_NNoiseSlices", "NNoiseSlices;Event;NNoiseSlices",400,-.5,399.5);
134  h_t_NoiseNHits= tfs->make<TH1F>("t_NoiseNHits", "NoiseNHits;Event;NoiseNHits",400,-.5,399.5);
135  h_t_NoiseMeanHits= tfs->make<TH1F>("t_NoiseMeanHits", "NoiseMeanHits;Event;NoiseMeanHits",400,-.5,399.5);
136 
137  hADC_vs_mb = tfs->make<TH2F>("ADC_vs_mb", "ADC_vs_mb;mb;ADC;entries",400,-.5,399.5,410,0.5,4100.5);
138 
139  hSlice_hits_vs_mb = tfs->make<TH2F>("Slice_hits_vs_mb", "Slice_hits_vs_mb;mb;Slice Hits;entries",400,-.5,399.5,101,-0.5,100.5);
140  hMeanADC_vs_Slice_hits = tfs->make<TH2F>("MeanADC_vs_Slice_hits", "MeanADC_vs_Slice_hits;MeanADC;Slice Hits;entries",410,0.5,4100.5,101,-0.5,100.5);
141 
142  hNoiseSlice_hits_vs_mb = tfs->make<TH2F>("NoiseSlice_hits_vs_mb", "NoiseSlice_hits_vs_mb;mb;Noise Slice Hits;entries",200,-.5,199.5,101,-0.5,100.5);
143  hNoiseMeanADC_vs_Slice_hits = tfs->make<TH2F>("NoiseMeanADC_vs_Slice_hits", "NoiseMeanADC_vs_Slice_hits;MeanADC;Slice Hits;entries",410,0.5,4100.5,101,-0.5,100.5);
144 }
const char * p
Definition: xmltok.h:285
std::string fSlicerLabel
Instance label making the slices.
TH1F * hNoiseSlicesMinInPlaneSeperation
TH1F * hSlicesMinCrossPlaneSeperation
bool fVerbose
Verbose output.
EDAnalyzer(Table< Config > const &config)
Definition: EDAnalyzer.h:100
OStream cout
Definition: OStream.cxx:6
T * make(ARGS...args) const
TH1F * hNoiseSlicesMinCrossPlaneSeperation
std::string fCellHitsLabel
Label of module making the cell hits.
enum BeamMode string
sn::SupernovaAna::SupernovaAna ( SupernovaAna const &  )
delete
sn::SupernovaAna::SupernovaAna ( SupernovaAna &&  )
delete

Member Function Documentation

void sn::SupernovaAna::analyze ( art::Event const &  e)
overridevirtual

Implements art::EDAnalyzer.

Definition at line 160 of file SupernovaAna_module.cc.

References rawdata::RawDigit::ADC(), getBrightness::cell, rawdata::RawDigit::Channel(), visualisationForPaperMasterPlot::cmap, om::cout, allTimeWatchdog::endl, art::EventID::event(), fCellHitsLabel, FillPlaneSeperations(), fSlicerLabel, fVerbose, art::DataViewImpl::getByLabel(), cmap::dataprov::CMap::GetCell(), cmap::dataprov::CMap::GetPlane(), daqchannelmap::DAQChannelMap::getView(), h_t_MeanADC, h_t_Nhits, h_t_NNoiseSlices, h_t_NoiseMeanHits, h_t_NoiseNHits, h_t_NSlices, h_t_SliceMeanHits, h_t_SliceNHits, h_t_SumADC, hADC_vs_mb, hits(), hMeanADC_vs_Slice_hits, hNNoiseSlices, hNoiseMeanADC_vs_Slice_hits, hNoiseSlice_hits_vs_mb, hNoiseSlicesMeanADC, hNoiseSlicesMinCrossPlaneSeperation, hNoiseSlicesMinInPlaneSeperation, hNoiseSlicesMinSeperation, hNoiseSlicesNHits, hNoiseSlicesSumADC, hNSlices, hSlice_hits_vs_mb, hSlicesMeanADC, hSlicesMinCrossPlaneSeperation, hSlicesMinInPlaneSeperation, hSlicesMinSeperation, hSlicesNHits, hSlicesSumADC, art::Event::id(), makeTrainCVSamples::int, rb::Cluster::IsNoise(), cmap::dataprov::CMap::Map(), rb::Cluster::NCell(), nEvent, NDAPDHVSetting::plane, string, rawdata::RawDigit::TDC(), rb::Cluster::TotalADC(), POTSpillRate::view, and daqchannelmap::X_VIEW.

161 {
162  std::cout << "--- sn::SupernovaAna analyzer. Event: "
163  << e.id().event()
164  << ", event counter: " << nEvent
165  << std::endl;
166 
167  ++nEvent;
168 
170 
171  // Get Cell Hits
173  e.getByLabel(fCellHitsLabel, hits);
174 
175  const unsigned int nHits = hits->size();
176 
177  if (fVerbose) std::cout << "\tgot " << nHits << " cell hits" << std::endl;
178 
179  int sum_adc = 0;
180  int min_TDC = 0;
181  int max_TDC = 0;
182 
183  if (nHits > 0){
184  min_TDC = hits->at(0).TDC();
185  max_TDC = hits->at(0).TDC();
186  }
187 
188  int min_x = 999;
189  int max_x = 0;
190  int min_y = 999;
191  int max_y = 0;
192  int min_z = 999;
193  int max_z = 0;
194 
195  // Loop over Cell Hits
196  for(unsigned int hitIdx = 0; hitIdx < nHits; ++hitIdx){
197  const rb::CellHit* aHit = &(*hits)[hitIdx];
198 
199  if (aHit->TDC() < min_TDC) min_TDC = aHit->TDC();
200  if (aHit->TDC() > max_TDC) max_TDC = aHit->TDC();
201 
202  // Get plane/cell from cmap
203  const int plane = cmap->GetPlane(aHit);
204  const int cell = cmap->GetCell(aHit);
205 
206  // Set max/min plane
207  if (plane < min_z) min_z = plane;
208  if (plane > max_z) max_z = plane;
209 
210  // Set max/min cell
211  std::string view = "y";
212  if (cmap->Map()->getView(aHit->Channel()) == daqchannelmap::X_VIEW){
213  view = "x";
214  if (cell < min_x) min_x = cell;
215  if (cell > max_x) max_x = cell;
216  } else {
217  if (cell < min_y) min_y = cell;
218  if (cell > max_y) max_y = cell;
219  }
220 
221  sum_adc = sum_adc + int(aHit->ADC());
222  hADC_vs_mb->Fill(nEvent,aHit->ADC());
223  } // End of loop on cell hits
224 
225  if (fVerbose){
226  std::cout << "\tTDC: " << min_TDC
227  << " -> " << max_TDC
228  << ", dTDC: "<< max_TDC - min_TDC
229  << std::endl;
230  std::cout << "\tX: " << min_x
231  << " -> " << max_x
232  << ", Y: " << min_y
233  << " -> " << max_y
234  << ", Z: " << min_z
235  << " -> " << max_z
236  <<std::endl;
237  std::cout << "\tADC sum: " << sum_adc << std::endl;
238  } // End of if on verbose
239 
240  h_t_SumADC->SetBinContent(nEvent,sum_adc);
241  h_t_Nhits->SetBinContent(nEvent,nHits);
242 
243  if (nHits > 0){
244  h_t_MeanADC->SetBinContent(nEvent, (float(sum_adc) / nHits));
245  } else {
246  h_t_MeanADC->SetBinContent(nEvent, 0);
247  }
248 
249 
250  // Slices
252  e.getByLabel(fSlicerLabel, slices);
253 
254  double nNoiseSlices = 0.;
255  double nNoiseHits = 0.;
256  double nHitsInSlices = 0.;
257 
258  const unsigned int nSlices = slices->size();
259 
260  for(unsigned int sliceIdx = 0; sliceIdx < nSlices; ++sliceIdx){
261  art::Ptr<rb::Cluster> aSlice(slices, sliceIdx);
262 
263  int min_cell_sep = 999;
264  double min_plane_sep = 999;
265  double min_sep = 999;
266 
267  if(aSlice->IsNoise()){
268  ++nNoiseSlices;
269  nNoiseHits += aSlice->NCell();
270 
271  hNoiseSlice_hits_vs_mb->Fill(nEvent, aSlice->NCell());
272  hNoiseMeanADC_vs_Slice_hits->Fill((aSlice->TotalADC() / (double)aSlice->NCell()), aSlice->NCell());
273  hNoiseSlicesNHits->Fill(aSlice->NCell());
274  hNoiseSlicesSumADC->Fill(aSlice->TotalADC());
275  hNoiseSlicesMeanADC->Fill((aSlice->TotalADC() / (double)aSlice->NCell()));
276  //FillPlaneSeperations(aSlice, min_cell_sep, min_plane_sep, min_sep);
277  hNoiseSlicesMinInPlaneSeperation->Fill(min_cell_sep);
278  hNoiseSlicesMinCrossPlaneSeperation->Fill(min_plane_sep);
279  hNoiseSlicesMinSeperation->Fill(min_sep);
280  } else {
281  nHitsInSlices += aSlice->NCell();
282 
283  hSlice_hits_vs_mb->Fill(nEvent, aSlice->NCell());
284  hMeanADC_vs_Slice_hits->Fill((aSlice->TotalADC() / (double)aSlice->NCell()), aSlice->NCell());
285  hSlicesNHits->Fill(aSlice->NCell());
286  hSlicesSumADC->Fill(aSlice->TotalADC());
287  hSlicesMeanADC->Fill((aSlice->TotalADC() / (double)aSlice->NCell()));
288  FillPlaneSeperations(aSlice, min_cell_sep, min_plane_sep, min_sep);
289  hSlicesMinInPlaneSeperation->Fill(min_cell_sep);
290  hSlicesMinCrossPlaneSeperation->Fill(min_plane_sep);
291  hSlicesMinSeperation->Fill(min_sep);
292  }
293  } // End loop on slices
294 
295  if (fVerbose){
296  std::cout << "\tSlices: " << nSlices << std::endl;
297  std::cout << "\tNoise slices: " << nNoiseSlices << std::endl;
298  std::cout << "\tMean hits: " << nNoiseHits / nNoiseSlices << std::endl;
299  std::cout << "\tNon-noise slices: " << nSlices - nNoiseSlices << std::endl;
300  std::cout << "\tMean hits: " << nHitsInSlices / (nSlices - nNoiseSlices) << std::endl;
301  } // End of if on verbose
302 
303  // Slices
304  hNSlices->Fill(nSlices - nNoiseSlices);
305  h_t_NSlices->SetBinContent(nEvent, nSlices - nNoiseSlices);
306  h_t_SliceNHits->SetBinContent(nEvent, nHitsInSlices);
307  if( (nSlices - nNoiseSlices) > 0 ){
308  h_t_SliceMeanHits->SetBinContent(nEvent, nHitsInSlices/(nSlices - nNoiseSlices));
309  } else {
310  h_t_SliceMeanHits->SetBinContent(nEvent, 0);
311  }
312 
313  // Noise slice
314  hNNoiseSlices->Fill(nNoiseSlices);
315  h_t_NNoiseSlices->SetBinContent(nEvent, nNoiseSlices);
316  h_t_NoiseNHits->SetBinContent(nEvent, nNoiseHits);
317  if (nNoiseSlices > 0){
318  h_t_NoiseMeanHits->SetBinContent(nEvent, nNoiseHits / nNoiseSlices);
319  } else {
320  h_t_NoiseMeanHits->SetBinContent(nEvent, 0);
321  }
322 
323 }
int32_t TDC() const
The time of the last baseline sample.
Definition: RawDigit.h:94
virtual DetView_TYPE getView(dchan daqchan) const =0
Which view (X or Y) does this daq channel readout?
std::string fSlicerLabel
Instance label making the slices.
TH1F * hNoiseSlicesMinInPlaneSeperation
const daqchannelmap::DAQChannelMap * Map() const
Definition: CMap.h:57
TH1F * hSlicesMinCrossPlaneSeperation
bool fVerbose
Verbose output.
void hits()
Definition: readHits.C:15
Identifier for the X measuring view of the detector (top)
unsigned short GetPlane(const rawdata::RawDigit *dig)
Definition: CMap.cxx:285
OStream cout
Definition: OStream.cxx:6
A rawdata::RawDigit with channel information decoded.
Definition: CellHit.h:27
int16_t ADC(uint32_t i) const
Definition: RawDigit.cxx:58
TH1F * hNoiseSlicesMinCrossPlaneSeperation
uint32_t Channel() const
Definition: RawDigit.h:84
unsigned short GetCell(const rawdata::RawDigit *dig)
Definition: CMap.cxx:327
void FillPlaneSeperations(art::Ptr< rb::Cluster > &aSlice, int &min_cell_sep, double &min_plane_sep, double &min_sep)
Float_t e
Definition: plot.C:35
std::string fCellHitsLabel
Label of module making the cell hits.
enum BeamMode string
void sn::SupernovaAna::beginJob ( )
virtual

Reimplemented from art::EDAnalyzer.

Definition at line 147 of file SupernovaAna_module.cc.

References om::cout, and allTimeWatchdog::endl.

148 {
149  std::cout << "--- sn::SupernovaAna begin job" << std::endl;
150 }
OStream cout
Definition: OStream.cxx:6
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 sn::SupernovaAna::endJob ( )
virtual

Reimplemented from art::EDAnalyzer.

Definition at line 153 of file SupernovaAna_module.cc.

References om::cout, allTimeWatchdog::endl, and nEvent.

154 {
155  std::cout << "--- sn::SupernovaAna end job" << std::endl;
156  std::cout << "\tevents: " << nEvent << std::endl;
157 }
OStream cout
Definition: OStream.cxx:6
void sn::SupernovaAna::FillPlaneSeperations ( art::Ptr< rb::Cluster > &  aSlice,
int min_cell_sep,
double &  min_plane_sep,
double &  min_sep 
)

Definition at line 326 of file SupernovaAna_module.cc.

References rb::CellHit::Cell(), rb::Cluster::Cell(), DEFINE_ART_MODULE(), stan::math::fabs(), MECModelEnuComparisons::i, calib::j, rb::Cluster::NCell(), rb::CellHit::Plane(), util::pythag(), sep, and rb::CellHit::View().

Referenced by analyze().

328 {
329  // Loop over the hits and find the minimum seperation for each
330  for(unsigned int i = 0; i < aSlice->NCell(); ++i){
331  const art::Ptr<rb::CellHit>& ihit = aSlice->Cell(i);
332  for (unsigned int j = (i + 1); j < (aSlice->NCell() - 1); ++j){
333  const art::Ptr<rb::CellHit>& jhit = aSlice->Cell(j);
334  if (ihit->Plane() == jhit->Plane()){
335  int sep = fabs(ihit->Cell() - jhit->Cell());
336  if (sep < min_cell_sep){
337  min_cell_sep = sep;
338  //min_cell_index = j;
339  }
340  if (sep < min_sep){
341  min_sep = sep;
342  //min_index = j;
343  }
344  } else {
345  if (ihit->View() == jhit->View()){
346  double p_s = ihit->Plane() - jhit->Plane();
347  double c_s = ihit->Cell() - jhit->Cell();
348  double sep = util::pythag(p_s, c_s);
349  if (sep < min_plane_sep){
350  min_plane_sep = sep;
351  //min_plane_index = j;
352  }
353  if (sep < min_sep){
354  min_sep = sep;
355  //min_index = j;
356  }
357  }
358  }
359  } // End of inner loop
360  } // End of outer loop
361 }
unsigned int NCell(geo::View_t view) const
Number of cells in view view.
Definition: Cluster.cxx:134
fvar< T > fabs(const fvar< T > &x)
Definition: fabs.hpp:15
unsigned short Plane() const
Definition: CellHit.h:39
geo::View_t View() const
Definition: CellHit.h:41
unsigned short Cell() const
Definition: CellHit.h:40
const double j
Definition: BetheBloch.cxx:29
const char sep
art::Ptr< rb::CellHit > Cell(geo::View_t view, unsigned int viewIdx) const
Get the ith cell from view view.
Definition: Cluster.cxx:145
double pythag(double x, double y)
2D Euclidean distance
Definition: MathUtil.h:29
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
SupernovaAna& sn::SupernovaAna::operator= ( SupernovaAna const &  )
delete
SupernovaAna& sn::SupernovaAna::operator= ( SupernovaAna &&  )
delete
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  {}
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

std::string sn::SupernovaAna::fCellHitsLabel
private

Label of module making the cell hits.

Definition at line 56 of file SupernovaAna_module.cc.

Referenced by analyze(), and SupernovaAna().

std::string sn::SupernovaAna::fSlicerLabel
private

Instance label making the slices.

Definition at line 57 of file SupernovaAna_module.cc.

Referenced by analyze(), and SupernovaAna().

bool sn::SupernovaAna::fVerbose
private

Verbose output.

Definition at line 58 of file SupernovaAna_module.cc.

Referenced by analyze(), and SupernovaAna().

TH1F* sn::SupernovaAna::h_t_MeanADC
private

Definition at line 82 of file SupernovaAna_module.cc.

Referenced by analyze(), and SupernovaAna().

TH1F* sn::SupernovaAna::h_t_Nhits
private

Definition at line 81 of file SupernovaAna_module.cc.

Referenced by analyze(), and SupernovaAna().

TH1F* sn::SupernovaAna::h_t_NNoiseSlices
private

Definition at line 86 of file SupernovaAna_module.cc.

Referenced by analyze(), and SupernovaAna().

TH1F* sn::SupernovaAna::h_t_NoiseMeanHits
private

Definition at line 88 of file SupernovaAna_module.cc.

Referenced by analyze(), and SupernovaAna().

TH1F* sn::SupernovaAna::h_t_NoiseNHits
private

Definition at line 87 of file SupernovaAna_module.cc.

Referenced by analyze(), and SupernovaAna().

TH1F* sn::SupernovaAna::h_t_NSlices
private

Definition at line 83 of file SupernovaAna_module.cc.

Referenced by analyze(), and SupernovaAna().

TH1F* sn::SupernovaAna::h_t_SliceMeanHits
private

Definition at line 85 of file SupernovaAna_module.cc.

Referenced by analyze(), and SupernovaAna().

TH1F* sn::SupernovaAna::h_t_SliceNHits
private

Definition at line 84 of file SupernovaAna_module.cc.

Referenced by analyze(), and SupernovaAna().

TH1F* sn::SupernovaAna::h_t_SumADC
private

Definition at line 80 of file SupernovaAna_module.cc.

Referenced by analyze(), and SupernovaAna().

TH2F* sn::SupernovaAna::hADC_vs_mb
private

Definition at line 91 of file SupernovaAna_module.cc.

Referenced by analyze(), and SupernovaAna().

TH2F* sn::SupernovaAna::hMeanADC_vs_Slice_hits
private

Definition at line 93 of file SupernovaAna_module.cc.

Referenced by analyze(), and SupernovaAna().

TH1F* sn::SupernovaAna::hNNoiseSlices
private

Definition at line 71 of file SupernovaAna_module.cc.

Referenced by analyze(), and SupernovaAna().

TH2F* sn::SupernovaAna::hNoiseMeanADC_vs_Slice_hits
private

Definition at line 95 of file SupernovaAna_module.cc.

Referenced by analyze(), and SupernovaAna().

TH2F* sn::SupernovaAna::hNoiseSlice_hits_vs_mb
private

Definition at line 94 of file SupernovaAna_module.cc.

Referenced by analyze(), and SupernovaAna().

TH1F* sn::SupernovaAna::hNoiseSlicesMeanADC
private

Definition at line 74 of file SupernovaAna_module.cc.

Referenced by analyze(), and SupernovaAna().

TH1F* sn::SupernovaAna::hNoiseSlicesMinCrossPlaneSeperation
private

Definition at line 76 of file SupernovaAna_module.cc.

Referenced by analyze(), and SupernovaAna().

TH1F* sn::SupernovaAna::hNoiseSlicesMinInPlaneSeperation
private

Definition at line 75 of file SupernovaAna_module.cc.

Referenced by analyze(), and SupernovaAna().

TH1F* sn::SupernovaAna::hNoiseSlicesMinSeperation
private

Definition at line 77 of file SupernovaAna_module.cc.

Referenced by analyze(), and SupernovaAna().

TH1F* sn::SupernovaAna::hNoiseSlicesNHits
private

Definition at line 72 of file SupernovaAna_module.cc.

Referenced by analyze(), and SupernovaAna().

TH1F* sn::SupernovaAna::hNoiseSlicesSumADC
private

Definition at line 73 of file SupernovaAna_module.cc.

Referenced by analyze(), and SupernovaAna().

TH1F* sn::SupernovaAna::hNSlices
private

Definition at line 64 of file SupernovaAna_module.cc.

Referenced by analyze(), and SupernovaAna().

TH2F* sn::SupernovaAna::hSlice_hits_vs_mb
private

Definition at line 92 of file SupernovaAna_module.cc.

Referenced by analyze(), and SupernovaAna().

TH1F* sn::SupernovaAna::hSlicesMeanADC
private

Definition at line 67 of file SupernovaAna_module.cc.

Referenced by analyze(), and SupernovaAna().

TH1F* sn::SupernovaAna::hSlicesMinCrossPlaneSeperation
private

Definition at line 69 of file SupernovaAna_module.cc.

Referenced by analyze(), and SupernovaAna().

TH1F* sn::SupernovaAna::hSlicesMinInPlaneSeperation
private

Definition at line 68 of file SupernovaAna_module.cc.

Referenced by analyze(), and SupernovaAna().

TH1F* sn::SupernovaAna::hSlicesMinSeperation
private

Definition at line 70 of file SupernovaAna_module.cc.

Referenced by analyze(), and SupernovaAna().

TH1F* sn::SupernovaAna::hSlicesNHits
private

Definition at line 65 of file SupernovaAna_module.cc.

Referenced by analyze(), and SupernovaAna().

TH1F* sn::SupernovaAna::hSlicesSumADC
private

Definition at line 66 of file SupernovaAna_module.cc.

Referenced by analyze(), and SupernovaAna().

int sn::SupernovaAna::nEvent = 0
private

Definition at line 61 of file SupernovaAna_module.cc.

Referenced by analyze(), and endJob().


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