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

Public Types

using WorkerType = WorkerT< EDAnalyzer >
 
using ModuleType = EDAnalyzer
 

Public Member Functions

 SigVsBkgSimCompare (fhicl::ParameterSet const &p)
 
void analyze (art::Event const &e) override
 
void beginJob () override
 
void endJob () override
 
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

art::InputTag _InputShwrLabel
 
unsigned int _SampleType
 
TH1D * EnergyRatioFromVertexX
 
TH1D * EnergyRatioFromVertexY
 
TH1D * EnergyRatioFromVertexZ
 
TH1D * TimingCorrelation
 
TH1D * DistanceFromReconVertexToTrueVertex
 
TH1D * ZErrorFromReconVertexToTrueVertex
 
TH2D * OrientationFromReconVertexToTrueVertex
 
TH1D * PolarAngleFromReconVertexToTrueVertex
 
TH1D * AzimuthalAngleFromReconVertexToTrueVertex
 
std::vector< std::tuple< double, double, double > > HitsXView
 
std::vector< std::tuple< double, double, double > > HitsYView
 

Detailed Description

Definition at line 51 of file SigVsBkgSimCompare_module.cc.

Member Typedef Documentation

Definition at line 39 of file EDAnalyzer.h.

Definition at line 38 of file EDAnalyzer.h.

Constructor & Destructor Documentation

nnbar::SigVsBkgSimCompare::SigVsBkgSimCompare ( fhicl::ParameterSet const &  p)
explicit

Definition at line 100 of file SigVsBkgSimCompare_module.cc.

References _InputShwrLabel, _SampleType, and fhicl::ParameterSet::get().

101  : EDAnalyzer(p) {
102  _InputShwrLabel = "shower";
103  _SampleType = p.get<unsigned int>("SampleType");
104 }
const char * p
Definition: xmltok.h:285
EDAnalyzer(Table< Config > const &config)
Definition: EDAnalyzer.h:100

Member Function Documentation

void nnbar::SigVsBkgSimCompare::analyze ( art::Event const &  e)
overridevirtual

Implements art::EDAnalyzer.

Definition at line 161 of file SigVsBkgSimCompare_module.cc.

References _InputShwrLabel, art::PtrVector< T >::begin(), om::cout, art::PtrVector< T >::end(), allTimeWatchdog::endl, art::fill_ptr_vector(), art::DataViewImpl::getByLabel(), HitsXView, and HitsYView.

161  {
163  std::vector<art::Ptr<simb::MCTruth>> mctruths;
164  if (e.getByLabel("generator", MCTruthHandle))
165  art::fill_ptr_vector(mctruths, MCTruthHandle);
166 
167  /*
168  double trueVertexX, trueVertexY, trueVertexZ, trueVertexT;
169  for (std::vector<art::Ptr<simb::MCTruth>>::iterator mctruthItr =
170  mctruths.begin();
171  mctruthItr != mctruths.end(); ++mctruthItr) {
172  auto mctruth = *mctruthItr;
173  auto particle = (*mctruth).GetParticle(0);
174  trueVertexX = particle.Vx();
175  trueVertexY = particle.Vy();
176  trueVertexZ = particle.Vz();
177  trueVertexT = particle.T();
178  }
179  */
180 
182  std::vector<art::Ptr<rb::Cluster>> clusters;
183  if (e.getByLabel(_InputShwrLabel, clusterHandle))
184  art::fill_ptr_vector(clusters, clusterHandle);
185 
186  unsigned int clusterIdx = 0;
187  for (std::vector<art::Ptr<rb::Cluster>>::iterator clusterItr =
188  clusters.begin();
189  clusterItr != clusters.end(); ++clusterItr) {
190  auto cluster = *clusterItr;
191 
192  art::PtrVector<rb::CellHit> allCells = (*cluster).AllCells();
193 
194  unsigned int countHits = 0;
195  for (art::PtrVector<rb::CellHit>::iterator itrCell = allCells.begin();
196  itrCell != allCells.end(); itrCell++) {
197  countHits++;
198  }
199  if (countHits == 0) {
200  std::cout << "countHits: " << countHits << std::endl << std::endl << std::endl << std::endl << std::endl << std::endl << std::endl << std::endl;
201  }
202 /*
203  // CONSIDERING THE ENERGY DISTRIBUTION TOPOLOGY
204  double totalE = (*cluster).TotalGeV();
205  double totalEX = 0.;
206  double totalEY = 0.;
207  double totalEnergyOfHitsAboveVertexX = 0.;
208  double totalEnergyOfHitsAboveVertexY = 0.;
209  double totalEnergyOfHitsAboveVertexZ = 0.;
210 
211  // Consider timing correlation
212  std::multimap<double, double> distanceToVertex_relTimingToVertex_Map;
213  unsigned int hitIdx = 0;
214 
215  // Compare distance between true vertex and reconstructed vertex
216  std::multimap<double, double> HitsZ, HitsX, HitsY;
217 
218  for (art::PtrVector<rb::CellHit>::iterator itrCell = allCells.begin();
219  itrCell != allCells.end(); itrCell++) {
220  if ((*itrCell)->View() == geo::View_t::kXorY) continue;
221 
222  bool cIsYView = (*itrCell)->View() == geo::View_t::kY ? true : false;
223  rb::RecoHit recoHit = (*cluster).RecoHit(*itrCell);
224  if (!recoHit.IsCalibrated()) continue;
225 
226  double cX = recoHit.X();
227  double cY = recoHit.Y();
228  double cZ = recoHit.Z();
229  double cT = recoHit.T();
230  double cE = recoHit.GeV();
231 
232  HitsZ.insert(std::pair<double, double>(cZ, cE));
233  if (!cIsYView) {
234  HitsX.insert(std::pair<double, double>(cX, cE));
235  totalEX += cE;
236  } else {
237  HitsY.insert(std::pair<double, double>(cY, cE));
238  totalEY += cE;
239  }
240 
241  if (!cIsYView) {
242  if (cX > trueVertexX) totalEnergyOfHitsAboveVertexX += cE;
243  } else {
244  if (cY > trueVertexY) totalEnergyOfHitsAboveVertexY += cE;
245  }
246  if (cZ > trueVertexZ) totalEnergyOfHitsAboveVertexZ += cE;
247 
248  // COUNTING THE NUMBER OF PRONGS
249  if (!cIsYView) {
250  HitsXView.push_back(std::make_tuple(cZ, cX, cE));
251  } else {
252  HitsYView.push_back(std::make_tuple(cZ, cY, cE));
253  }
254 
255  hitIdx++;
256  }
257 
258  // Compare distance between true vertex and reconstructed vertex
259  double lowerBoundOfMedianZVertex = 0.;
260  double upperBoundOfMedianZVertex = 0.;
261  double halfOfTotalE = 0.;
262  for (auto hit = HitsZ.begin(); hit != HitsZ.end(); hit++) {
263  halfOfTotalE += (*hit).second;
264  if (halfOfTotalE < totalE / 2) {
265  lowerBoundOfMedianZVertex = (*hit).first;
266  upperBoundOfMedianZVertex = (*(hit++)).first;
267  hit--;
268  }
269  }
270  double reconVertexZ =
271  (lowerBoundOfMedianZVertex + upperBoundOfMedianZVertex) / 2.;
272 
273  double lowerBoundOfMedianXVertex = 0.;
274  double upperBoundOfMedianXVertex = 0.;
275  double halfOfTotalEX = 0.;
276  for (auto hit = HitsX.begin(); hit != HitsX.end(); hit++) {
277  halfOfTotalEX += (*hit).second;
278  if (halfOfTotalEX < totalEX / 2) {
279  lowerBoundOfMedianXVertex = (*hit).first;
280  upperBoundOfMedianXVertex = (*(hit++)).first;
281  hit--;
282  }
283  }
284  double reconVertexX =
285  (lowerBoundOfMedianXVertex + upperBoundOfMedianXVertex) / 2.;
286 
287  double lowerBoundOfMedianYVertex = 0.;
288  double upperBoundOfMedianYVertex = 0.;
289  double halfOfTotalEY = 0.;
290  for (auto hit = HitsY.begin(); hit != HitsY.end(); hit++) {
291  halfOfTotalEY += (*hit).second;
292  if (halfOfTotalEY < totalEY / 2) {
293  lowerBoundOfMedianYVertex = (*hit).first;
294  upperBoundOfMedianYVertex = (*(hit++)).first;
295  hit--;
296  }
297  }
298  double reconVertexY =
299  (lowerBoundOfMedianYVertex + upperBoundOfMedianYVertex) / 2.;
300 
301  for (art::PtrVector<rb::CellHit>::iterator itrCell = allCells.begin();
302  itrCell != allCells.end(); itrCell++) {
303  if ((*itrCell)->View() == geo::View_t::kXorY) continue;
304 
305  rb::RecoHit recoHit = (*cluster).RecoHit(*itrCell);
306  if (!recoHit.IsCalibrated()) continue;
307 
308  double cX = recoHit.X();
309  double cY = recoHit.Y();
310  double cZ = recoHit.Z();
311  double cT = recoHit.T();
312 
313  // Consider timing correlation
314  // Timing correlation with recon vertex
315  double distanceToVertex = TMath::Sqrt(TMath::Power(cX - reconVertexX, 2) +
316  TMath::Power(cY - reconVertexY, 2) +
317  TMath::Power(cZ - reconVertexZ, 2));
318  double relTimingToVertex = cT;
319  distanceToVertex_relTimingToVertex_Map.insert(
320  std::pair<double, double>(distanceToVertex, relTimingToVertex));
321  }
322 
323  //--------------------------------------------------------------------------
324  // Consider timing correlation
325  // Recon Vertex
326  const unsigned int mapSize = distanceToVertex_relTimingToVertex_Map.size();
327  unsigned int countElem = 0;
328  double *distanceToVertex_array = new double[10];
329  double *relTimingToVertex_array = new double[10];
330  for (auto &elem : distanceToVertex_relTimingToVertex_Map) {
331  if (4 < countElem && countElem < mapSize - 5) continue;
332  *(distanceToVertex_array + countElem) = elem.first;
333  *(relTimingToVertex_array + countElem) = elem.second;
334  countElem++;
335  }
336  // The timing of reconstructed vertex is calculated as the mean timing of
337  // the 5 hits nearest to the vertex.
338  // So this loop find that average timing.
339  double reconVertexT = 0.;
340  for (unsigned int j = 0; j < 5; j++) {
341  reconVertexT += *(relTimingToVertex_array + j);
342  }
343  reconVertexT = reconVertexT / 5;
344  for (unsigned int j = 0; j < 5; j++) {
345  *(relTimingToVertex_array + countElem) =
346  *(relTimingToVertex_array + countElem) - reconVertexT;
347  }
348  TGraph *timingCorrelation =
349  new TGraph(10, distanceToVertex_array, relTimingToVertex_array);
350  double correlationFactor = timingCorrelation->GetCorrelationFactor();
351  TimingCorrelation->Fill(correlationFactor);
352 
353  //--------------------------------------------------------------------------
354 
355  double diff_true_recon_vertex_x = reconVertexX - trueVertexX;
356  double diff_true_recon_vertex_y = reconVertexY - trueVertexY;
357  double diff_true_recon_vertex_z = reconVertexZ - trueVertexZ;
358  double distFromReconVertToTrueVert =
359  TMath::Sqrt(TMath::Power(diff_true_recon_vertex_x, 2) +
360  TMath::Power(diff_true_recon_vertex_y, 2) +
361  TMath::Power(diff_true_recon_vertex_z, 2));
362  double thetaOrientationFromReconVertToTrueVert =
363  TMath::ATan(diff_true_recon_vertex_y / diff_true_recon_vertex_x);
364  double phiOrientationFromReconVertToTrueVert =
365  TMath::ACos(diff_true_recon_vertex_z / distFromReconVertToTrueVert);
366  DistanceFromReconVertexToTrueVertex->Fill(distFromReconVertToTrueVert);
367  OrientationFromReconVertexToTrueVertex->Fill(
368  phiOrientationFromReconVertToTrueVert,
369  thetaOrientationFromReconVertToTrueVert);
370  PolarAngleFromReconVertexToTrueVertex->Fill(
371  phiOrientationFromReconVertToTrueVert);
372  AzimuthalAngleFromReconVertexToTrueVertex->Fill(
373  thetaOrientationFromReconVertToTrueVert);
374 
375  // CONSIDERING THE ENERGY DISTRIBUTION TOPOLOGY
376  EnergyRatioFromVertexX->Fill(totalEnergyOfHitsAboveVertexX / totalE);
377  EnergyRatioFromVertexY->Fill(totalEnergyOfHitsAboveVertexY / totalE);
378  EnergyRatioFromVertexZ->Fill(totalEnergyOfHitsAboveVertexZ / totalE);
379 
380  // Filling analysis tree
381  // _tRunNumber = e.run();
382  // _tSubrunNumber = e.subRun();
383  // _tEventNumber = e.id().event();
384  // _tSliceNumber = std::distance(clusters.begin(), clusterItr);
385  // _tSampleType = _SampleType;
386  // double totVisEX =
387  // nnbar::NNbarUtilities::totalVisibleEnergyInView(*cluster, geo::kX);
388  // double totVisEY =
389  // nnbar::NNbarUtilities::totalVisibleEnergyInView(*cluster, geo::kY);
390  // _tTotalVisibleEnergy = totVisEX + totVisEY;
391 
392  ZErrorFromReconVertexToTrueVertex->Fill(
393  TMath::Abs(diff_true_recon_vertex_z));
394 
395  // _tTemporalClusterExpand = nnbar::NNbarUtilities::temporalExpand(*cluster);
396  // _tTotalHitCountInXView =
397  // nnbar::NNbarUtilities::hitCountInView(*cluster, geo::kX);
398  // _tTotalHitCountInYView =
399  // nnbar::NNbarUtilities::hitCountInView(*cluster, geo::kY);
400  // _tHitCountXYDifference = _tTotalHitCountInYView - _tTotalHitCountInXView;
401  // _tAverageEnergyPerHitXView = totVisEX / _tTotalHitCountInXView;
402  // _tAverageEnergyPerHitYView = totVisEY / _tTotalHitCountInYView;
403  // _tHitVsVertexTimingCorrelation = correlationFactor;
404  // _tReconVertexX = reconVertexX;
405  // _tReconVertexY = reconVertexY;
406  // _tReconVertexZ = reconVertexZ;
407  // _tReconVertexT = reconVertexT;
408  // if (_tSampleType != 0) {
409  // _tTrueVertexX = trueVertexX;
410  // _tTrueVertexY = trueVertexY;
411  // _tTrueVertexZ = trueVertexZ;
412  // _tTrueVertexT = trueVertexT;
413  // } else {
414  // _tTrueVertexX = -1.0E9;
415  // _tTrueVertexY = -1.0E9;
416  // _tTrueVertexZ = -1.0E9;
417  // _tTrueVertexT = -1.0E9;
418  // }
419  // _VariableTree->Fill();
420 */
421  clusterIdx++;
422  }
423 
424  HitsXView.clear();
425  HitsYView.clear();
426 }
iterator begin()
Definition: PtrVector.h:223
std::vector< std::tuple< double, double, double > > HitsYView
std::vector< std::tuple< double, double, double > > HitsXView
iterator end()
Definition: PtrVector.h:237
data_t::iterator iterator
Definition: PtrVector.h:60
OStream cout
Definition: OStream.cxx:6
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
Definition: Ptr.h:464
Float_t e
Definition: plot.C:35
void nnbar::SigVsBkgSimCompare::beginJob ( )
overridevirtual

Reimplemented from art::EDAnalyzer.

Definition at line 106 of file SigVsBkgSimCompare_module.cc.

References AzimuthalAngleFromReconVertexToTrueVertex, DistanceFromReconVertexToTrueVertex, EnergyRatioFromVertexX, EnergyRatioFromVertexY, EnergyRatioFromVertexZ, art::TFileDirectory::make(), OrientationFromReconVertexToTrueVertex, PolarAngleFromReconVertexToTrueVertex, TimingCorrelation, and ZErrorFromReconVertexToTrueVertex.

106  {
108 
109  // _VariableTree =
110  // tfs->make<TTree>("VariableTree", "NNbar Analysis Variable Tree");
111  // _VariableTree->Branch("RunNumber", &_tRunNumber);
112  // _VariableTree->Branch("SubrunNumber", &_tSubrunNumber);
113  // _VariableTree->Branch("EventNumber", &_tEventNumber);
114  // _VariableTree->Branch("SliceNumber", &_tSliceNumber);
115  // _VariableTree->Branch("SampleType", &_tSampleType);
116  // _VariableTree->Branch("TotalVisibleEnergy", &_tTotalVisibleEnergy);
117  // _VariableTree->Branch("TotalHitCountInXView", &_tTotalHitCountInXView);
118  // _VariableTree->Branch("TotalHitCountInYView", &_tTotalHitCountInYView);
119  // _VariableTree->Branch("HitCountXYDifference", &_tHitCountXYDifference);
120  // _VariableTree->Branch("TemporalClusterExpand", &_tTemporalClusterExpand);
121  // _VariableTree->Branch("AverageEnergyPerHitXView",
122  // &_tAverageEnergyPerHitXView);
123  // _VariableTree->Branch("AverageEnergyPerHitYView",
124  // &_tAverageEnergyPerHitYView);
125  // _VariableTree->Branch("HitVsVertexTimingCorrelation",
126  // &_tHitVsVertexTimingCorrelation);
127  // _VariableTree->Branch("TrueVertexX", &_tTrueVertexX);
128  // _VariableTree->Branch("TrueVertexY", &_tTrueVertexY);
129  // _VariableTree->Branch("TrueVertexZ", &_tTrueVertexZ);
130  // _VariableTree->Branch("TrueVertexT", &_tTrueVertexT);
131  // _VariableTree->Branch("ReconVertexX", &_tReconVertexX);
132  // _VariableTree->Branch("ReconVertexY", &_tReconVertexY);
133  // _VariableTree->Branch("ReconVertexZ", &_tReconVertexZ);
134  // _VariableTree->Branch("ReconVertexT", &_tReconVertexT);
135 
137  tfs->make<TH1D>("EnergyRatioFromVertexX", ";Energy Ratio;", 100, 0, 1);
139  tfs->make<TH1D>("EnergyRatioFromVertexY", ";Energy Ratio;", 100, 0, 1);
141  tfs->make<TH1D>("EnergyRatioFromVertexZ", ";Energy Ratio;", 100, 0, 1);
142 
143  TimingCorrelation = tfs->make<TH1D>(
144  "TimingCorrelation", ";Timing Correlation Factor;", 100, -1.5, 1.5);
145 
147  tfs->make<TH1D>("DistanceFromReconVertexToTrueVertex",
148  ";Vertex Error (cm);", 100, 0, 200);
150  tfs->make<TH1D>("ZErrorFromReconVertexToTrueVertex",
151  ";Vertex Z Error (cm);", 100, 0, 200);
153  tfs->make<TH2D>("OrientationFromReconVertexToTrueVertex", ";#phi;#theta",
154  50, -TMath::Pi(), TMath::Pi(), 50, 0, TMath::Pi());
155  PolarAngleFromReconVertexToTrueVertex = tfs->make<TH1D>(
156  "PolarAngleFromReconVertexToTrueVertex", ";#phi;", 50, -1, 7);
158  "AzimuthalAngleFromReconVertexToTrueVertex", ";#theta;", 50, -2, 2);
159 }
T * make(ARGS...args) 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 nnbar::SigVsBkgSimCompare::endJob ( )
overridevirtual

Reimplemented from art::EDAnalyzer.

Definition at line 428 of file SigVsBkgSimCompare_module.cc.

References AzimuthalAngleFromReconVertexToTrueVertex, make_mec_shifts_plots::canvas, DEFINE_ART_MODULE(), DistanceFromReconVertexToTrueVertex, EnergyRatioFromVertexX, EnergyRatioFromVertexY, EnergyRatioFromVertexZ, PolarAngleFromReconVertexToTrueVertex, TimingCorrelation, and ZErrorFromReconVertexToTrueVertex.

428  {
429  TCanvas *canvas = new TCanvas("canvas", "Canvas", 2400, 800);
430  canvas->Divide(3, 1);
431  canvas->cd(1);
432  EnergyRatioFromVertexX->SetTitle("x");
433  EnergyRatioFromVertexX->Draw();
434  canvas->cd(2);
435  EnergyRatioFromVertexY->SetTitle("y");
436  EnergyRatioFromVertexY->Draw();
437  canvas->cd(3);
438  EnergyRatioFromVertexZ->SetTitle("z");
439  EnergyRatioFromVertexZ->Draw();
440  canvas->SaveAs(Form("EnergyVsTopology.pdf"));
441 
442  TCanvas *canvas_timing =
443  new TCanvas("canvas_timing", "Canvas Timing", 1200, 1200);
444  TimingCorrelation->GetXaxis()->SetTitle("Timing Correlation Factor");
445  TimingCorrelation->GetXaxis()->CenterTitle();
446  TimingCorrelation->GetYaxis()->SetTitle("");
447  TimingCorrelation->GetYaxis()->CenterTitle();
448  TimingCorrelation->Draw("HIST");
449  canvas_timing->SaveAs(Form("TimingCorrelation.pdf"));
450 
451  TCanvas *canvas_vertex_error =
452  new TCanvas("canvas_vertex_error", "Canvas Vertex Error", 2400, 800);
453  canvas_vertex_error->Divide(3, 1);
454  canvas_vertex_error->cd(1);
455  DistanceFromReconVertexToTrueVertex->GetXaxis()->SetTitle(
456  "#deltar_{equale-(v)} (cm)");
457  DistanceFromReconVertexToTrueVertex->GetXaxis()->CenterTitle();
458  DistanceFromReconVertexToTrueVertex->GetYaxis()->SetTitle("");
459  DistanceFromReconVertexToTrueVertex->GetYaxis()->CenterTitle();
461  canvas_vertex_error->cd(2);
462  PolarAngleFromReconVertexToTrueVertex->GetXaxis()->SetTitle(
463  "#phi_{equale-(v)} (rad)");
464  PolarAngleFromReconVertexToTrueVertex->GetXaxis()->CenterTitle();
465  PolarAngleFromReconVertexToTrueVertex->GetYaxis()->SetTitle("");
466  PolarAngleFromReconVertexToTrueVertex->GetYaxis()->CenterTitle();
468  canvas_vertex_error->cd(3);
469  AzimuthalAngleFromReconVertexToTrueVertex->GetXaxis()->SetTitle(
470  "#theta_{equale-(v)} (rad)");
471  AzimuthalAngleFromReconVertexToTrueVertex->GetXaxis()->CenterTitle();
472  AzimuthalAngleFromReconVertexToTrueVertex->GetYaxis()->SetTitle("");
473  AzimuthalAngleFromReconVertexToTrueVertex->GetYaxis()->CenterTitle();
475  canvas_vertex_error->SaveAs(Form("VertexError.pdf"));
476 
477  TCanvas *canvas_zvertex_error =
478  new TCanvas("canvas_zvertex_error", "Canvas Z Vertex Error", 2400, 1200);
479  ZErrorFromReconVertexToTrueVertex->GetXaxis()->SetTitle(
480  "#deltaz_{equale-(v)} (cm)");
481  ZErrorFromReconVertexToTrueVertex->GetXaxis()->CenterTitle();
482  ZErrorFromReconVertexToTrueVertex->GetYaxis()->SetTitle("");
483  ZErrorFromReconVertexToTrueVertex->GetYaxis()->CenterTitle();
484  ZErrorFromReconVertexToTrueVertex->Draw("HIST");
485  canvas_zvertex_error->SaveAs(Form("ZVertexError.pdf"));
486 }
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 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

art::InputTag nnbar::SigVsBkgSimCompare::_InputShwrLabel
private

Definition at line 59 of file SigVsBkgSimCompare_module.cc.

Referenced by analyze(), and SigVsBkgSimCompare().

unsigned int nnbar::SigVsBkgSimCompare::_SampleType
private

Definition at line 60 of file SigVsBkgSimCompare_module.cc.

Referenced by SigVsBkgSimCompare().

TH1D* nnbar::SigVsBkgSimCompare::AzimuthalAngleFromReconVertexToTrueVertex
private

Definition at line 95 of file SigVsBkgSimCompare_module.cc.

Referenced by beginJob(), and endJob().

TH1D* nnbar::SigVsBkgSimCompare::DistanceFromReconVertexToTrueVertex
private

Definition at line 91 of file SigVsBkgSimCompare_module.cc.

Referenced by beginJob(), and endJob().

TH1D* nnbar::SigVsBkgSimCompare::EnergyRatioFromVertexX
private

Definition at line 85 of file SigVsBkgSimCompare_module.cc.

Referenced by beginJob(), and endJob().

TH1D* nnbar::SigVsBkgSimCompare::EnergyRatioFromVertexY
private

Definition at line 86 of file SigVsBkgSimCompare_module.cc.

Referenced by beginJob(), and endJob().

TH1D* nnbar::SigVsBkgSimCompare::EnergyRatioFromVertexZ
private

Definition at line 87 of file SigVsBkgSimCompare_module.cc.

Referenced by beginJob(), and endJob().

std::vector<std::tuple<double, double, double> > nnbar::SigVsBkgSimCompare::HitsXView
private

Definition at line 97 of file SigVsBkgSimCompare_module.cc.

Referenced by analyze().

std::vector<std::tuple<double, double, double> > nnbar::SigVsBkgSimCompare::HitsYView
private

Definition at line 97 of file SigVsBkgSimCompare_module.cc.

Referenced by analyze().

TH2D* nnbar::SigVsBkgSimCompare::OrientationFromReconVertexToTrueVertex
private

Definition at line 93 of file SigVsBkgSimCompare_module.cc.

Referenced by beginJob().

TH1D* nnbar::SigVsBkgSimCompare::PolarAngleFromReconVertexToTrueVertex
private

Definition at line 94 of file SigVsBkgSimCompare_module.cc.

Referenced by beginJob(), and endJob().

TH1D* nnbar::SigVsBkgSimCompare::TimingCorrelation
private

Definition at line 89 of file SigVsBkgSimCompare_module.cc.

Referenced by beginJob(), and endJob().

TH1D* nnbar::SigVsBkgSimCompare::ZErrorFromReconVertexToTrueVertex
private

Definition at line 92 of file SigVsBkgSimCompare_module.cc.

Referenced by beginJob(), and endJob().


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