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

Public Types

using WorkerType = WorkerT< EDAnalyzer >
 
using ModuleType = EDAnalyzer
 

Public Member Functions

 BPFdEdxHistoMaker (fhicl::ParameterSet const &pset)
 
 ~BPFdEdxHistoMaker ()
 
void analyze (const art::Event &evt)
 
void reconfigure (const fhicl::ParameterSet &pset)
 
void beginJob ()
 
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 Attributes

const art::ProductToken< std::vector< rb::Cluster > > fSlicerToken
 
std::string fProngLabel
 
std::string fProngInstance
 
std::string fTrackLabel
 
double fdxTOL
 cut off value for dx, if dx is less than this, don't compute dE/dx More...
 
bool fSmooth
 Smooth the likelihood histos at the end? More...
 
unsigned int fNsmooth
 number of bins on either side of the current bin to smooth over More...
 
bool fNormalize
 Normalize the likelihood histos at the end? More...
 
TH2F * fdEdxVSbgMu [2][2]
 Computed dE/dx for cell hits (vs. beta*gamma) for the muon assupmtion. More...
 
TH2F * fdEdxVSbgPi [2][2]
 Computed dE/dx for cell hits (vs. beta*gamma) for the pion assupmtion. More...
 
TH2F * fdEdxVSbgPr [2][2]
 Computed dE/dx for cell hits (vs. beta*gamma) for the proton assupmtion. More...
 
bpfit::dEdxCalculator fdEdxCalc
 helper class for computing dEdx values More...
 

Detailed Description

Definition at line 45 of file BPFdEdxHistoMaker_module.cc.

Member Typedef Documentation

Definition at line 39 of file EDAnalyzer.h.

Definition at line 38 of file EDAnalyzer.h.

Constructor & Destructor Documentation

bpfit::BPFdEdxHistoMaker::BPFdEdxHistoMaker ( fhicl::ParameterSet const &  pset)
explicit

Definition at line 80 of file BPFdEdxHistoMaker_module.cc.

References reconfigure().

81  : EDAnalyzer(pset),
82  fSlicerToken(consumes<std::vector<rb::Cluster>>(pset.get<std::string>("SlicerLabel"))),
83  fdEdxCalc()
84  {
85  this->reconfigure(pset);
86  }
void reconfigure(const fhicl::ParameterSet &pset)
const art::ProductToken< std::vector< rb::Cluster > > fSlicerToken
EDAnalyzer(Table< Config > const &config)
Definition: EDAnalyzer.h:100
bpfit::dEdxCalculator fdEdxCalc
helper class for computing dEdx values
ProductToken< T > consumes(InputTag const &)
enum BeamMode string
bpfit::BPFdEdxHistoMaker::~BPFdEdxHistoMaker ( )

Definition at line 89 of file BPFdEdxHistoMaker_module.cc.

90  {
91  //======================================================================
92  // Clean up any memory allocated by your module... ...if you dare...
93  //======================================================================
94  }

Member Function Documentation

void bpfit::BPFdEdxHistoMaker::analyze ( const art::Event evt)

Definition at line 282 of file BPFdEdxHistoMaker_module.cc.

References a, bpfit::dEdxCalculator::computeDEDX(), om::cout, dE, DEFINE_ART_MODULE(), dx, fdEdxCalc, fdEdxVSbgMu, fdEdxVSbgPi, fdEdxVSbgPr, fdxTOL, Fill(), fProngInstance, fProngLabel, fSlicerToken, fTrackLabel, geom(), art::DataViewImpl::getByToken(), bpfit::dEdxCalculator::getResults(), test_ParserArtEvents::log, w, W, and submit_syst::x.

283  {
284 
285  // get the slices
287  evt.getByToken(fSlicerToken, slices);
288 
289  // create the FindMany object for getting prongs
291 
292  // make a geometry service handle
294 
295  // make a calibrator service handle
297 
298 
299 
300  // loop over all slices and get the fuzzyk 3D prongs
301  for(unsigned int islice = 0; islice < slices->size(); ++islice) {
302 
303  // As usual, skip the noise slice...
304  if((*slices)[islice].IsNoise()) continue;
305 
306  // NOTE: Currently, the fundamental object of analysis is the slice.
307  // If in the future we change things so that the fundamental object
308  // of analysis becomes the vertex, then we will have to get prongs
309  // associated with the vertex instead.
310 
311  // get the 3D prongs associated with this slice
312  std::vector< art::Ptr< rb::Prong > > prongs;
313  if(prongFMP.isValid()) prongs = prongFMP.at(islice);
314 
315  // create the FindMany object for getting tracks
316  art::FindManyP<rb::Track> trackFMP(prongs, evt, fTrackLabel);
317 
318  // loop over all prongs and get the tracks
319  for(unsigned int iprong = 0; iprong < prongs.size(); ++iprong) {
320 
321  // get the tracks associated with this prong
322  std::vector< art::Ptr< rb::Track > > tracks;
323  if(trackFMP.isValid()) tracks = trackFMP.at(iprong);
324 
325  // create the FindMany object for getting FitSum objects
326  art::FindManyP<rb::FitSum> fitsumFMP(tracks, evt, fTrackLabel);
327 
328  // Loop over all tracks...
329  for(unsigned int itrack = 0; itrack < tracks.size(); ++itrack) {
330 
331  // get the FitSum object associated with this track
332  std::vector< art::Ptr< rb::FitSum > > fitsums;
333  if(fitsumFMP.isValid()) fitsums = fitsumFMP.at(itrack);
334 
335  // There can be only one!!!
336  // (something went really wrong with BPF if there's not one and
337  // only one of these per track.)
338  if(fitsums.size() != 1) abort();
339 
340  // Note to the user:
341  // It is intended that this program only runs over a sample of
342  // muons that have been tracked only under the muon assumption. I
343  // haven't forced that asumption here.
344 
345  //
346  // Perform the dE/dx calculations with the helper class.
347  //
348  fdEdxCalc.computeDEDX(tracks[itrack],fitsums[0]->PDG());
349 
350  std::vector<double> dE;
351  std::vector<double> dx;
352  std::vector<double> W;
353  std::vector<double> BG;
354  std::vector<double> s; // this is a throw away variable...
355 
356  fdEdxCalc.getResults(dE,dx,W,BG,s,fdxTOL);
357 
358  for(unsigned int a = 0; a < dE.size(); ++a) {
359 
360  unsigned int w = 0;
361  unsigned int x = 0;
362 
363  if(W[a] > 0.0) w = 1;
364  if(dx[a] > 8.0) x = 1;
365 
366  if(fitsums[0]->PDG() == 13)
367  fdEdxVSbgMu[w][x]->Fill(log(BG[a]),dE[a]/dx[a]);
368  else if(fitsums[0]->PDG() == 211)
369  fdEdxVSbgPi[w][x]->Fill(log(BG[a]),dE[a]/dx[a]);
370  else if(fitsums[0]->PDG() == 2212)
371  fdEdxVSbgPr[w][x]->Fill(log(BG[a]),dE[a]/dx[a]);
372  else {
373  std::cout << "\n\nERROR: PDG code " << fitsums[0]->PDG()
374  << " is not supported! Aborting...\n\n";
375  abort();
376  }
377  }
378 
379  } // end loop over tracks (itrack)
380 
381  } // end loop over prongs (iprong)
382 
383  } // end loop over slices (islice)
384 
385  return;
386 
387  }
TH2F * fdEdxVSbgPr[2][2]
Computed dE/dx for cell hits (vs. beta*gamma) for the proton assupmtion.
const art::ProductToken< std::vector< rb::Cluster > > fSlicerToken
void computeDEDX(art::Ptr< rb::Track > &track, int pdg=13)
Compute dE/dx for all cells along this track and the fitsum object that went with it...
double dE
double fdxTOL
cut off value for dx, if dx is less than this, don&#39;t compute dE/dx
const XML_Char * s
Definition: expat.h:262
double dx[NP][NC]
correl_yv Fill(-(dy[iP-1][iC-1]), hyv->GetBinContent(iP, iC))
const double a
bpfit::dEdxCalculator fdEdxCalc
helper class for computing dEdx values
OStream cout
Definition: OStream.cxx:6
void geom(int which=0)
Definition: geom.C:163
TH2F * fdEdxVSbgPi[2][2]
Computed dE/dx for cell hits (vs. beta*gamma) for the pion assupmtion.
bool getByToken(ProductToken< PROD > const &token, Handle< PROD > &result) const
Definition: DataViewImpl.h:387
Float_t w
Definition: plot.C:20
#define W(x)
void getResults(std::vector< double > &dEtemp, std::vector< double > &dxtemp, std::vector< double > &Wtemp, std::vector< double > &bgtemp, std::vector< double > &stemp, double dxTol)
Return the results of the dE/dx calculation.
TH2F * fdEdxVSbgMu[2][2]
Computed dE/dx for cell hits (vs. beta*gamma) for the muon assupmtion.
void bpfit::BPFdEdxHistoMaker::beginJob ( )
virtual

Reimplemented from art::EDAnalyzer.

Definition at line 109 of file BPFdEdxHistoMaker_module.cc.

References fdEdxVSbgMu, fdEdxVSbgPi, fdEdxVSbgPr, art::TFileDirectory::make(), w, and submit_syst::x.

110  {
112 
113  //
114  // Book the NTuples and histograms...
115  //
116 
117  // We are dividing the dE/dx info from cell hits into multiple histograms
118  // based on whether or not the track is steep (large dx) and whether the
119  // cell hit is near to (W <= 0.0) or far from (W > 0.0) the readout. This
120  // is to reflect the fact that the dE/dx calculations might be slightly
121  // different depending on these conditions.
122 
123  // A note on naming of the histos below:
124  //
125  // * {Mu,Pi,Pr} obviously refers to the particle assumption
126  // * W{0,1} refers to whether the track W values was <= 0 (W0) or > 0 (W1)
127  // * X{0,1} refers to whether the dx value was <= 8 cm (X0) or > 8 cm (X1)
128 
129  for(unsigned int w = 0; w < 2; ++w) {
130  for(unsigned int x = 0; x < 2; ++x) {
131 
132  char histoname[30];
133 
134  sprintf(histoname, "fdEdxVSbgMu_W%.1u_X%.1u", w, x);
135  fdEdxVSbgMu[w][x] = tfs->make<TH2F>(histoname,
136  "dE/dx vs. #beta#gamma (muon track assumption);ln(#beta#gamma);dE/dx [GeV/cm]",
137  160,-2.0,6.0,400,0.0,0.04);
138 
139  sprintf(histoname, "fdEdxVSbgPi_W%.1u_X%.1u", w, x);
140  fdEdxVSbgPi[w][x] = tfs->make<TH2F>(histoname,
141  "dE/dx vs. #beta#gamma (pion track assumption);ln(#beta#gamma);dE/dx [GeV/cm]",
142  160,-2.0,6.0,400,0.0,0.04);
143 
144  sprintf(histoname, "fdEdxVSbgPr_W%.1u_X%.1u", w, x);
145  fdEdxVSbgPr[w][x] = tfs->make<TH2F>(histoname,
146  "dE/dx vs. #beta#gamma (proton track assumption);ln(#beta#gamma);dE/dx [GeV/cm]",
147  160,-2.0,6.0,400,0.0,0.04);
148 
149 
150  } // end loop over x
151  } // end loop over w
152 
153  }
TH2F * fdEdxVSbgPr[2][2]
Computed dE/dx for cell hits (vs. beta*gamma) for the proton assupmtion.
T * make(ARGS...args) const
TH2F * fdEdxVSbgPi[2][2]
Computed dE/dx for cell hits (vs. beta*gamma) for the pion assupmtion.
Float_t w
Definition: plot.C:20
TH2F * fdEdxVSbgMu[2][2]
Computed dE/dx for cell hits (vs. beta*gamma) for the muon assupmtion.
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 bpfit::BPFdEdxHistoMaker::endJob ( )
virtual

Reimplemented from art::EDAnalyzer.

Definition at line 156 of file BPFdEdxHistoMaker_module.cc.

References fdEdxVSbgMu, fdEdxVSbgPi, fdEdxVSbgPr, fNormalize, fNsmooth, fSmooth, MECModelEnuComparisons::i, febshutoff_auto::integral, calib::j, SetBinContent(), w, and submit_syst::x.

157  {
158 
159  //
160  // Apply simple smoothing if requested.
161  //
162  // The smoothing is simple: set each bin to the average of that bin
163  // with the bin immedately above and below. Do NOT include the
164  // overflow bins in the smoothing.
165  //
166 
167  if(fSmooth) {
168 
169  unsigned int NXbins = 0.0;
170  unsigned int NYbins = 0.0;
171  double ave = 0.0;
172 
173  for(unsigned int w = 0; w < 2; ++w) {
174  for(unsigned int x = 0; x < 2; ++x) {
175 
176  // muon histos
177  NXbins = fdEdxVSbgMu[w][x]->GetNbinsX();
178  NYbins = fdEdxVSbgMu[w][x]->GetNbinsY();
179  for(unsigned int i = 1; i <= NXbins; ++i) {
180  for(unsigned int j = 1+fNsmooth; j+fNsmooth <= NYbins; ++j) {
181  ave = 0.0;
182  for(unsigned int s = j-fNsmooth; s <= j+fNsmooth; ++s)
183  ave += fdEdxVSbgMu[w][x]->GetBinContent(i,s);
184  ave = ave/(2*fNsmooth+1);
185  fdEdxVSbgMu[w][x]->SetBinContent(i,j,ave);
186  }
187  }
188 
189  // pion histos
190  NXbins = fdEdxVSbgPi[w][x]->GetNbinsX();
191  NYbins = fdEdxVSbgPi[w][x]->GetNbinsY();
192  for(unsigned int i = 1; i <= NXbins; ++i) {
193  for(unsigned int j = 1+fNsmooth; j+fNsmooth <= NYbins; ++j) {
194  ave = 0.0;
195  for(unsigned int s = j-fNsmooth; s <= j+fNsmooth; ++s)
196  ave += fdEdxVSbgPi[w][x]->GetBinContent(i,s);
197  ave = ave/(2*fNsmooth+1);
198  fdEdxVSbgPi[w][x]->SetBinContent(i,j,ave);
199  }
200  }
201 
202  // proton histos
203  NXbins = fdEdxVSbgPr[w][x]->GetNbinsX();
204  NYbins = fdEdxVSbgPr[w][x]->GetNbinsY();
205  for(unsigned int i = 1; i <= NXbins; ++i) {
206  for(unsigned int j = 1+fNsmooth; j+fNsmooth <= NYbins; ++j) {
207  ave = 0.0;
208  for(unsigned int s = j-fNsmooth; s <= j+fNsmooth; ++s)
209  ave += fdEdxVSbgPr[w][x]->GetBinContent(i,s);
210  ave = ave/(2*fNsmooth+1);
211  fdEdxVSbgPr[w][x]->SetBinContent(i,j,ave);
212  }
213  }
214 
215  } // end loop over x
216  } // end loop over w
217 
218  } // end smoothing
219 
220 
221 
222  //
223  // Normalize the likelihood histos if requested.
224  //
225  // The normalization is so that the area of each vertical stip
226  // (one bin wide) is 1.0. Since each bin represents a probability,
227  // we will include the overflow bins in the normalization.
228  //
229 
230  if(fNormalize) {
231 
232  unsigned int NXbins = 0.0;
233  unsigned int NYbins = 0.0;
234 
235  for(unsigned int w = 0; w < 2; ++w) {
236  for(unsigned int x = 0; x < 2; ++x) {
237 
238  // muon histos
239  NXbins = fdEdxVSbgMu[w][x]->GetNbinsX();
240  NYbins = fdEdxVSbgMu[w][x]->GetNbinsY();
241  for(unsigned int i = 0; i <= NXbins+1; ++i) {
242  float integral = 0.0;
243  for(unsigned int j = 0; j <= NYbins+1; ++j)
244  integral += fdEdxVSbgMu[w][x]->GetBinContent(i,j);
245  if(integral == 0.0) continue;
246  for(unsigned int j = 0; j <= NYbins+1; ++j)
247  fdEdxVSbgMu[w][x]->SetBinContent(i,j,fdEdxVSbgMu[w][x]->GetBinContent(i,j)/integral);
248  }
249 
250  // pion histos
251  NXbins = fdEdxVSbgPi[w][x]->GetNbinsX();
252  NYbins = fdEdxVSbgPi[w][x]->GetNbinsY();
253  for(unsigned int i = 0; i <= NXbins+1; ++i) {
254  float integral = 0.0;
255  for(unsigned int j = 0; j <= NYbins+1; ++j)
256  integral += fdEdxVSbgPi[w][x]->GetBinContent(i,j);
257  if(integral == 0.0) continue;
258  for(unsigned int j = 0; j <= NYbins+1; ++j)
259  fdEdxVSbgPi[w][x]->SetBinContent(i,j,fdEdxVSbgPi[w][x]->GetBinContent(i,j)/integral);
260  }
261 
262  // proton histos
263  NXbins = fdEdxVSbgPr[w][x]->GetNbinsX();
264  NYbins = fdEdxVSbgPr[w][x]->GetNbinsY();
265  for(unsigned int i = 0; i <= NXbins+1; ++i) {
266  float integral = 0.0;
267  for(unsigned int j = 0; j <= NYbins+1; ++j)
268  integral += fdEdxVSbgPr[w][x]->GetBinContent(i,j);
269  if(integral == 0.0) continue;
270  for(unsigned int j = 0; j <= NYbins+1; ++j)
271  fdEdxVSbgPr[w][x]->SetBinContent(i,j,fdEdxVSbgPr[w][x]->GetBinContent(i,j)/integral);
272  }
273 
274  } // end loop over x
275  } // end loop over w
276 
277  } // end normalization
278 
279  }
TH2F * fdEdxVSbgPr[2][2]
Computed dE/dx for cell hits (vs. beta*gamma) for the proton assupmtion.
const XML_Char * s
Definition: expat.h:262
bool fNormalize
Normalize the likelihood histos at the end?
const double j
Definition: BetheBloch.cxx:29
cout<< "--"<< endl;for(Int_t iP=1;iP<=hyz->GetNbinsX();iP++){for(Int_t iC=1;iC<=hyz->GetNbinsY();iC++){if(hyv->GetBinContent(iP, iC)>-999){goal_hyv-> SetBinContent(iP, iC,-(dy[iP-1][iC-1]))
bool fSmooth
Smooth the likelihood histos at the end?
TH2F * fdEdxVSbgPi[2][2]
Computed dE/dx for cell hits (vs. beta*gamma) for the pion assupmtion.
Float_t w
Definition: plot.C:20
TH2F * fdEdxVSbgMu[2][2]
Computed dE/dx for cell hits (vs. beta*gamma) for the muon assupmtion.
unsigned int fNsmooth
number of bins on either side of the current bin to smooth over
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 bpfit::BPFdEdxHistoMaker::reconfigure ( const fhicl::ParameterSet pset)

Definition at line 97 of file BPFdEdxHistoMaker_module.cc.

References fdxTOL, fNormalize, fNsmooth, fProngInstance, fProngLabel, fSmooth, fTrackLabel, fhicl::ParameterSet::get(), and string.

Referenced by BPFdEdxHistoMaker().

98  {
99  fProngLabel = pset.get<std::string> ("ProngLabel");
100  fProngInstance = pset.get<std::string> ("ProngInstance");
101  fTrackLabel = pset.get<std::string> ("TrackLabel");
102  fdxTOL = pset.get<double> ("dxTOL");
103  fSmooth = pset.get<bool> ("Smooth");
104  fNsmooth = pset.get<unsigned int>("Nsmooth");
105  fNormalize = pset.get<bool> ("Normalize");
106  }
double fdxTOL
cut off value for dx, if dx is less than this, don&#39;t compute dE/dx
T get(std::string const &key) const
Definition: ParameterSet.h:231
bool fNormalize
Normalize the likelihood histos at the end?
bool fSmooth
Smooth the likelihood histos at the end?
unsigned int fNsmooth
number of bins on either side of the current bin to smooth over
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

bpfit::dEdxCalculator bpfit::BPFdEdxHistoMaker::fdEdxCalc
private

helper class for computing dEdx values

Definition at line 70 of file BPFdEdxHistoMaker_module.cc.

Referenced by analyze().

TH2F* bpfit::BPFdEdxHistoMaker::fdEdxVSbgMu[2][2]
private

Computed dE/dx for cell hits (vs. beta*gamma) for the muon assupmtion.

Definition at line 66 of file BPFdEdxHistoMaker_module.cc.

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

TH2F* bpfit::BPFdEdxHistoMaker::fdEdxVSbgPi[2][2]
private

Computed dE/dx for cell hits (vs. beta*gamma) for the pion assupmtion.

Definition at line 67 of file BPFdEdxHistoMaker_module.cc.

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

TH2F* bpfit::BPFdEdxHistoMaker::fdEdxVSbgPr[2][2]
private

Computed dE/dx for cell hits (vs. beta*gamma) for the proton assupmtion.

Definition at line 68 of file BPFdEdxHistoMaker_module.cc.

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

double bpfit::BPFdEdxHistoMaker::fdxTOL
private

cut off value for dx, if dx is less than this, don't compute dE/dx

Definition at line 61 of file BPFdEdxHistoMaker_module.cc.

Referenced by analyze(), and reconfigure().

bool bpfit::BPFdEdxHistoMaker::fNormalize
private

Normalize the likelihood histos at the end?

Definition at line 64 of file BPFdEdxHistoMaker_module.cc.

Referenced by endJob(), and reconfigure().

unsigned int bpfit::BPFdEdxHistoMaker::fNsmooth
private

number of bins on either side of the current bin to smooth over

Definition at line 63 of file BPFdEdxHistoMaker_module.cc.

Referenced by endJob(), and reconfigure().

std::string bpfit::BPFdEdxHistoMaker::fProngInstance
private

Definition at line 58 of file BPFdEdxHistoMaker_module.cc.

Referenced by analyze(), and reconfigure().

std::string bpfit::BPFdEdxHistoMaker::fProngLabel
private

Definition at line 57 of file BPFdEdxHistoMaker_module.cc.

Referenced by analyze(), and reconfigure().

const art::ProductToken<std::vector<rb::Cluster> > bpfit::BPFdEdxHistoMaker::fSlicerToken
private

Definition at line 56 of file BPFdEdxHistoMaker_module.cc.

Referenced by analyze().

bool bpfit::BPFdEdxHistoMaker::fSmooth
private

Smooth the likelihood histos at the end?

Definition at line 62 of file BPFdEdxHistoMaker_module.cc.

Referenced by endJob(), and reconfigure().

std::string bpfit::BPFdEdxHistoMaker::fTrackLabel
private

Definition at line 59 of file BPFdEdxHistoMaker_module.cc.

Referenced by analyze(), and reconfigure().


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