Public Member Functions | Private Attributes | List of all members
pionana::TruthAnalyzer Class Reference
Inheritance diagram for pionana::TruthAnalyzer:
art::EDAnalyzer art::detail::Analyzer art::detail::LegacyModule art::Observer art::ModuleBase

Public Member Functions

 TruthAnalyzer (fhicl::ParameterSet const &p)
 
 TruthAnalyzer (TruthAnalyzer const &)=delete
 
 TruthAnalyzer (TruthAnalyzer &&)=delete
 
TruthAnalyzeroperator= (TruthAnalyzer const &)=delete
 
TruthAnalyzeroperator= (TruthAnalyzer &&)=delete
 
void analyze (art::Event const &e) override
 
void beginJob () override
 
void reset ()
 
- Public Member Functions inherited from art::EDAnalyzer
 EDAnalyzer (fhicl::ParameterSet const &pset)
 
template<typename Config >
 EDAnalyzer (Table< Config > const &config)
 
std::string workerType () const
 
- Public Member Functions inherited from art::detail::Analyzer
virtual ~Analyzer () noexcept
 
 Analyzer (fhicl::ParameterSet const &pset)
 
template<typename Config >
 Analyzer (Table< Config > const &config)
 
void doBeginJob (SharedResources const &resources)
 
void doEndJob ()
 
void doRespondToOpenInputFile (FileBlock const &fb)
 
void doRespondToCloseInputFile (FileBlock const &fb)
 
void doRespondToOpenOutputFiles (FileBlock const &fb)
 
void doRespondToCloseOutputFiles (FileBlock const &fb)
 
bool doBeginRun (RunPrincipal &rp, ModuleContext const &mc)
 
bool doEndRun (RunPrincipal &rp, ModuleContext const &mc)
 
bool doBeginSubRun (SubRunPrincipal &srp, ModuleContext const &mc)
 
bool doEndSubRun (SubRunPrincipal &srp, ModuleContext const &mc)
 
bool doEvent (EventPrincipal &ep, ModuleContext const &mc, std::atomic< std::size_t > &counts_run, std::atomic< std::size_t > &counts_passed, std::atomic< std::size_t > &counts_failed)
 
- Public Member Functions inherited from art::Observer
 ~Observer () noexcept
 
 Observer (Observer const &)=delete
 
 Observer (Observer &&)=delete
 
Observeroperator= (Observer const &)=delete
 
Observeroperator= (Observer &&)=delete
 
void registerProducts (ProductDescriptions &, ModuleDescription const &)
 
void fillDescriptions (ModuleDescription const &)
 
fhicl::ParameterSetID selectorConfig () const
 
- Public Member Functions inherited from art::ModuleBase
virtual ~ModuleBase () noexcept
 
 ModuleBase ()
 
ModuleDescription const & moduleDescription () const
 
void setModuleDescription (ModuleDescription const &)
 
std::array< std::vector< ProductInfo >, NumBranchTypes > const & getConsumables () const
 
void sortConsumables (std::string const &current_process_name)
 
template<typename T , BranchType BT>
ViewToken< T > consumesView (InputTag const &tag)
 
template<typename T , BranchType BT>
ViewToken< T > mayConsumeView (InputTag const &tag)
 

Private Attributes

art::InputTag fGeneratorTag
 
int fView
 
art::InputTag fSimEDepTag
 
TTree * fTree
 
double traj_delta_E
 
double IDE_delta_E
 
double true_beam_endZ
 
int true_beam_PDG
 
int output_first_point
 
int event
 
int run
 
int subrun
 
double first_IDE_Z
 
double first_point_Z
 
double first_point_E
 
std::vector< double > true_traj_X
 
std::vector< double > true_traj_Y
 
std::vector< double > true_traj_Z
 
std::vector< double > true_traj_E
 

Additional Inherited Members

- Public Types inherited from art::EDAnalyzer
using WorkerType = WorkerT< EDAnalyzer >
 
using ModuleType = EDAnalyzer
 
- Protected Member Functions inherited from art::Observer
std::string const & processName () const
 
bool wantAllEvents () const noexcept
 
bool wantEvent (ScheduleID id, Event const &e) const
 
Handle< TriggerResultsgetTriggerResults (Event const &e) const
 
 Observer (fhicl::ParameterSet const &config)
 
 Observer (std::vector< std::string > const &select_paths, std::vector< std::string > const &reject_paths, fhicl::ParameterSet const &config)
 
- Protected Member Functions inherited from art::ModuleBase
ConsumesCollectorconsumesCollector ()
 
template<typename T , BranchType = InEvent>
ProductToken< T > consumes (InputTag const &)
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > consumesView (InputTag const &)
 
template<typename T , BranchType = InEvent>
void consumesMany ()
 
template<typename T , BranchType = InEvent>
ProductToken< T > mayConsume (InputTag const &)
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > mayConsumeView (InputTag const &)
 
template<typename T , BranchType = InEvent>
void mayConsumeMany ()
 

Detailed Description

Definition at line 179 of file TruthAnalyzer_module.cc.

Constructor & Destructor Documentation

pionana::TruthAnalyzer::TruthAnalyzer ( fhicl::ParameterSet const &  p)
explicit

Definition at line 219 of file TruthAnalyzer_module.cc.

220  : EDAnalyzer{p},
221  fGeneratorTag(p.get<art::InputTag>("GeneratorTag")),
222  fView(p.get<int>("View")),
223  fSimEDepTag(p.get<art::InputTag>("SimEDepTag")) {
224 }
EDAnalyzer(fhicl::ParameterSet const &pset)
Definition: EDAnalyzer.h:25
p
Definition: test.py:223
pionana::TruthAnalyzer::TruthAnalyzer ( TruthAnalyzer const &  )
delete
pionana::TruthAnalyzer::TruthAnalyzer ( TruthAnalyzer &&  )
delete

Member Function Documentation

void pionana::TruthAnalyzer::analyze ( art::Event const &  e)
overridevirtual

Implements art::EDAnalyzer.

Definition at line 226 of file TruthAnalyzer_module.cc.

227 {
228  reset();
232  const sim::ParticleList & plist = pi_serv->ParticleList();
233  auto mcTruths = e.getValidHandle<std::vector<simb::MCTruth>>(fGeneratorTag);
235  const simb::MCParticle* true_beam_particle
236  = truthUtil.GetGeantGoodParticle((*mcTruths)[0],e);
237  if (!true_beam_particle) return;
238  const simb::MCTrajectory & true_beam_trajectory = true_beam_particle->Trajectory();
239 
240  run = e.run();
241  subrun = e.subRun();
242  event = e.id().event();
243 
244  double init_KE = 0.;
245  //size_t init_pt = 0;
246  //Get the mass for the beam particle
247  int true_beam_ID = true_beam_particle->TrackId();
248  true_beam_endZ = true_beam_particle->EndPosition().Z();
249  true_beam_PDG = true_beam_particle->PdgCode();
250 
251  //std::vector<int> daughters;
252  //std::vector<std::vector<const sim::IDE *>> d_IDEs;
253  //std::vector<double> d_edep;
254  double total_d_edep = 0.;
255 
256  std::deque<int> to_check;
257  std::vector<const sim::IDE *> daughter_IDEs;
258  for (int i = 0; i < true_beam_particle->NumberDaughters(); ++i) {
259  int id = true_beam_particle->Daughter(i);
260  auto part = plist[id];
261  std::string process = part->Process();
262  if ((process.find("Ioni") == std::string::npos) &&
263  (process.find("Brem") == std::string::npos) &&
264  (process.find("annihil") == std::string::npos)) {
265  std::cout << "Skipping " << process << std::endl;
266  continue;
267  }
268  //std::cout << "Adding " << id << " " << part->PdgCode() << std::endl;
269  to_check.push_back(id);
270  }
271 
272  while (!to_check.empty()) {
273  const int id = to_check.front();
274  to_check.pop_front();
275 
276  std::vector<const sim::IDE *> ides
277  = bt_serv->TrackIdToSimIDEs_Ps(id, geo::View_t(fView));
278  daughter_IDEs.insert(daughter_IDEs.end(), ides.begin(), ides.end());
279 
280  for (size_t i = 0; i < ides.size(); ++i) {
281  total_d_edep += ides[i]->energy;
282  }
283 
284  //Get the daughters of this one
285  auto part = plist[id];
286  std::cout << id << " Has daughters: ";
287  for (int i = 0; i < part->NumberDaughters(); ++i) {
288  to_check.push_back(part->Daughter(i));
289  std::cout << part->Daughter(i) << " ";
290  //auto next_part = plist[part->Daughter(i)];
291  //std::cout << next_part->Process() << std::endl;
292  }
293  std::cout << std::endl;
294  }
295 
296  /*double mass = 139.57;
297  if( true_beam_PDG == 2212 ) mass = 938.27;
298  else if( abs(true_beam_PDG) == 211 ) mass = 139.57;
299  else if( abs(true_beam_PDG) == 11 ) mass = .511;
300  else if( abs(true_beam_PDG) == 321 ) mass = 321;
301  else if( abs(true_beam_PDG) == 13 ) mass = 105.66;*/
302 
303  std::cout << "Getting IDEs from " << fView << std::endl;
304  auto view2_IDEs = bt_serv->TrackIdToSimIDEs_Ps( true_beam_ID, geo::View_t(fView) );
305  std::sort(view2_IDEs.begin(), view2_IDEs.end(),
306  [](const sim::IDE * i1, const sim::IDE * i2) {return (i1->z < i2->z);});
307 
308  double ide_z = (view2_IDEs.size() ? view2_IDEs[0]->z : -999.);
309  first_IDE_Z = ide_z;
310  std::cout << "First IDE: " << ide_z << std::endl;
311 
312  for (size_t i = 0; i < view2_IDEs.size(); ++i) {
313  std::cout << i << " " << view2_IDEs[i]->z << std::endl;
314  }
315 
316  std::sort(daughter_IDEs.begin(), daughter_IDEs.end(),
317  [](const sim::IDE * i1, const sim::IDE * i2) {return (i1->z < i2->z);});
318  if (daughter_IDEs.size())
319  std::cout << "First daughter IDE: " << daughter_IDEs[0]->z << std::endl;
320 
321  auto true_beam_procs = true_beam_trajectory.TrajectoryProcesses();
322  std::map<size_t, unsigned char> proc_map(true_beam_procs.begin(),
323  true_beam_procs.end());
324 
325  size_t first_point_in_TPC = 0;
326  for (size_t i = 1; i < true_beam_trajectory.size(); ++i) {
327  double z0 = true_beam_trajectory.Z(i-1);
328  double x0 = true_beam_trajectory.X(i-1);
329  double y0 = true_beam_trajectory.Y(i-1);
330  geo::Point_t test_point{x0, y0, z0};
331  const TGeoMaterial * mat = geom->Material(test_point);
332  std::cout << "Point " << i-1 << " (" << x0 << ", " << y0 <<
333  ", " << z0 << ") Material " << mat->GetName() << " " <<
334  (proc_map.find(i-1) != proc_map.end() ?
335  true_beam_trajectory.KeyToProcess(proc_map[i-1]) :
336  "") << " " << 1.e3*true_beam_trajectory.E(i-1) <<
337  std::endl;
338  std::string proc_name =
339  (proc_map.find(i-1) != proc_map.end() ?
340  true_beam_trajectory.KeyToProcess(proc_map[i-1]) :
341  "");
342  std::string mat_name = mat->GetName();
343  if (mat_name == "LAr" && proc_name == "Transportation") {
344  first_point_in_TPC = i-1;
345  std::cout << "Found first point " << first_point_in_TPC << std::endl;
346  }
347  if (view2_IDEs.size()) {
348  double z1 = true_beam_trajectory.Z(i);
349  double x1 = true_beam_trajectory.X(i);
350  double y1 = true_beam_trajectory.Y(i);
351  if (z0 < ide_z && z1 > ide_z) {
352  geo::Point_t test_point_1{x1, y1, z1};
353  const TGeoMaterial * mat1 = geom->Material(test_point_1);
354  init_KE = 1.e3 * true_beam_trajectory.E(i-1);
355  std::cout << "Found matching position " << z0 << " " << ide_z <<
356  " " << z1 << " Material " << mat1->GetName() << std::endl;
357  std::cout << "init KE: " << init_KE << std::endl;
358  //init_pt = i - 1;
359 
360  std::cout << "energies: " << 1.e3 * true_beam_trajectory.E(i-1) <<
361  " " << 1.e3 * true_beam_trajectory.E(i) << std::endl;
362  std::cout << "Second to last, last point -- (Z, E): " << "(" <<
363  true_beam_trajectory.Z(true_beam_trajectory.size()-2) << ", " <<
364  1.e3*true_beam_trajectory.E(true_beam_trajectory.size()-2) << "), (" <<
365  true_beam_trajectory.Z(true_beam_trajectory.size()-1) << ", " <<
366  1.e3*true_beam_trajectory.E(true_beam_trajectory.size()-1) << ")" <<
367  std::endl;
368  std::cout << "End process: " << true_beam_particle->EndProcess() << std::endl;
369  break;
370  }
371  }
372  std::cout << std::endl;
373  }
374 
375  traj_delta_E = (true_beam_trajectory.E(first_point_in_TPC) -
376  true_beam_trajectory.E(true_beam_trajectory.size() - 2));
377  output_first_point = first_point_in_TPC;
378  first_point_Z = true_beam_trajectory.Z(first_point_in_TPC);
379  first_point_E = true_beam_trajectory.E(first_point_in_TPC);
380 
381  for (size_t i = 0; i < true_beam_trajectory.size(); ++i) {
382  std::cout << "Z, E: " << true_beam_trajectory.Z(i) << " " <<
383  true_beam_trajectory.E(i) << std::endl;
384  true_traj_X.push_back(true_beam_trajectory.X(i));
385  true_traj_Y.push_back(true_beam_trajectory.Y(i));
386  true_traj_Z.push_back(true_beam_trajectory.Z(i));
387  true_traj_E.push_back(true_beam_trajectory.E(i));
388  }
389  if (view2_IDEs.size()) {
390  std::cout << std::endl;
391  double total_edep = 0.;
392  for (size_t i = 0; i < view2_IDEs.size(); ++i) {
393  total_edep += view2_IDEs[i]->energy;
394  //std::cout << "\t" << " " << view2_IDEs[i]->trackID << " " <<
395  // view2_IDEs[i]->z << " " << view2_IDEs[i]->energy <<
396  // std::endl;
397  }
398 
399  std::cout << "Total edep: " << total_edep << std::endl;
400  std::cout << "From daughters: " << total_d_edep << std::endl;
401  std::cout << "Combined: " << total_edep + total_d_edep << std::endl;
402  IDE_delta_E = total_edep + total_d_edep;
403  std::cout << "DeltaE: " << init_KE - (1.e3*true_beam_trajectory.E(true_beam_trajectory.size()-2)) << std::endl;
404  std::cout << "IDE - traj: " << total_edep + total_d_edep - (init_KE - (1.e3*true_beam_trajectory.E(true_beam_trajectory.size()-2))) << std::endl;
405  std::cout << "Energies: " << (1.e3*true_beam_trajectory.E(0)) << " " << init_KE << " " <<
406  (1.e3*true_beam_trajectory.E(true_beam_trajectory.size()-2)) << " " << (1.e3*true_beam_trajectory.E(true_beam_trajectory.size()-1))
407  << std::endl;
408  std::cout << "PDG: " << true_beam_PDG << std::endl;
409 
410  int n_elast = 0;
411  auto true_beam_procs = true_beam_trajectory.TrajectoryProcesses();
412  for (auto it = true_beam_procs.begin();
413  it != true_beam_procs.end(); ++it) {
414  if (true_beam_trajectory.KeyToProcess(it->second) == "hadElastic") {
415  ++n_elast;
416  }
417  }
418  std::cout << "N Elastics " << n_elast << std::endl;
419  }
420 
421  try{
422  auto sim_edep_vec
423  = e.getValidHandle<std::vector<sim::SimEnergyDeposit>>(fSimEDepTag);
424  double total_sim_edep = 0.;
425  double dep_min_z = std::numeric_limits<double>::max();
426  for (const sim::SimEnergyDeposit & dep : (*sim_edep_vec)) {
427  if (dep.TrackID() != true_beam_ID) continue;
428  total_sim_edep += dep.Energy();
429  if (dep.MidPointZ() < dep_min_z) dep_min_z = dep.StartZ();
430  }
431  std::cout << "Min dep z: " << dep_min_z << std::endl;
432 
433  to_check.clear();
434  for (int i = 0; i < true_beam_particle->NumberDaughters(); ++i) {
435  int id = true_beam_particle->Daughter(i);
436  auto part = plist[id];
437  std::string process = part->Process();
438  if ((process.find("Ioni") == std::string::npos) &&
439  (process.find("Brem") == std::string::npos) &&
440  (process.find("annihil") == std::string::npos)) {
441  std::cout << "Skipping " << process << std::endl;
442  continue;
443  }
444  to_check.push_back(id);
445  }
446 
447  while (!to_check.empty()) {
448  const int id = to_check.front();
449  to_check.pop_front();
450 
451  for (const sim::SimEnergyDeposit & dep : (*sim_edep_vec)) {
452  if (dep.TrackID() != id) continue;
453  total_sim_edep += dep.Energy();
454  }
455 
456  //Get the daughters of this one
457  auto part = plist[id];
458  for (int i = 0; i < part->NumberDaughters(); ++i) {
459  to_check.push_back(part->Daughter(i));
460  }
461  }
462  std::cout << "Total Sim EDep: " << total_sim_edep << " " << true_beam_PDG << std::endl;
463 
464  size_t first_point = 0;
465  for (size_t i = 1; i < true_beam_trajectory.size(); ++i) {
466  double z0 = true_beam_trajectory.Z(i-1);
467  double x0 = true_beam_trajectory.X(i-1);
468  double y0 = true_beam_trajectory.Y(i-1);
469  geo::Point_t test_point{x0, y0, z0};
470  const TGeoMaterial * mat = geom->Material(test_point);
471  double z1 = true_beam_trajectory.Z(i);
472  std::cout << "checking " << z0 << " " << dep_min_z << " " << z1 << " " <<
473  1.e3*(true_beam_trajectory.E(i-1) -
474  true_beam_trajectory.E(true_beam_trajectory.size()-2)) <<
475  std::endl;
476  if (z0 <= dep_min_z && z1 > dep_min_z) {
477  first_point = i - 1;
478  init_KE = 1.e3 * true_beam_trajectory.E(i-1);
479  std::cout << "Found matching position " << z0 << " " << dep_min_z <<
480  " " << z1 << " " << mat->GetName() << std::endl;
481  std::cout << "init KE: " << init_KE << std::endl;
482  //init_pt = i - 1;
483 
484  std::cout << "energies: " << 1.e3 * true_beam_trajectory.E(i-1) <<
485  " " << 1.e3 * true_beam_trajectory.E(i) << std::endl;
486  std::cout << "Second to last, last point -- (Z, E): " << "(" <<
487  true_beam_trajectory.Z(true_beam_trajectory.size()-2) << ", " <<
488  1.e3*true_beam_trajectory.E(true_beam_trajectory.size()-2) << "), (" <<
489  true_beam_trajectory.Z(true_beam_trajectory.size()-1) << ", " <<
490  1.e3*true_beam_trajectory.E(true_beam_trajectory.size()-1) << ")" <<
491  std::endl;
492  break;
493  }
494  }
495  std::cout << "SimEDep Delta E: " << init_KE - 1.e3*true_beam_trajectory.E(true_beam_trajectory.size()-2) << std::endl;
496  std::cout << "SimEDep Diff: " <<
497  total_sim_edep - (init_KE - 1.e3*true_beam_trajectory.E(true_beam_trajectory.size()-2)) << " " <<
498  (total_sim_edep - (init_KE - 1.e3*true_beam_trajectory.E(true_beam_trajectory.size()-2)))/total_sim_edep << std::endl;
499 
500  std::map<size_t, double> edep_by_traj
501  = GetEDepByTraj(true_beam_particle, true_beam_ID, (*sim_edep_vec), plist);
502  for (auto it = edep_by_traj.begin(); it != edep_by_traj.end(); ++it) {
503  if (it->second == 0.) continue;
504  std::cout << it->second << " " <<
505  1.e3*(true_beam_trajectory.E(it->first) -
506  true_beam_trajectory.E(it->first + 1)) << std::endl;
507  }
508 
509  std::cout << "First Point: " << first_point << " " <<
510  true_beam_trajectory.Z(first_point) << std::endl;
511  double total = 0.;
512  for (size_t i = first_point; i < true_beam_trajectory.size() - 2; ++i) {
513  std::cout << (true_beam_trajectory.Position(i+1) -
514  true_beam_trajectory.Position(i)).Vect().Mag() << std::endl;
515  total += (true_beam_trajectory.Position(i+1) -
516  true_beam_trajectory.Position(i)).Vect().Mag();
517  }
518  std::cout << "Total len in LAr: " << total << std::endl;
519 
520  double pitch = geom->WirePitch( 2, 1, 0);
521 
522  std::vector<int> slices = MakeSlices(
523  1.e3*true_beam_trajectory.E(first_point),
524  1.e3*true_beam_trajectory.E(true_beam_trajectory.size() - 2),
525  pitch/.96,
526  true_beam_particle);
527  std::cout << "Slices: " << slices.size() << " " << slices.size() * pitch <<
528  std::endl;
529 
530  }
531  catch(const std::exception & e) {
532  std::cout << "can't get sim edep. Moving on" << std::endl;
533  }
534 
535  fTree->Fill();
536 
537 }
double Z(const size_type i) const
Definition: MCTrajectory.h:151
double X(const size_type i) const
Definition: MCTrajectory.h:149
float z
z position of ionization [cm]
Definition: SimChannel.h:117
int PdgCode() const
Definition: MCParticle.h:212
const simb::MCParticle * GetGeantGoodParticle(const simb::MCTruth &genTruth, const art::Event &evt) const
std::map< size_t, double > GetEDepByTraj(const simb::MCParticle *part, int id, const std::vector< sim::SimEnergyDeposit > &dep_vec, const sim::ParticleList &plist)
const TLorentzVector & EndPosition() const
Definition: MCParticle.h:225
double E(const size_type i) const
Definition: MCTrajectory.h:156
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
std::string string
Definition: nybbler.cc:12
const simb::MCTrajectory & Trajectory() const
Definition: MCParticle.h:253
std::string KeyToProcess(unsigned char const &key) const
std::vector< const sim::IDE * > TrackIdToSimIDEs_Ps(int const &id) const
std::vector< double > true_traj_Y
int NumberDaughters() const
Definition: MCParticle.h:217
int TrackId() const
Definition: MCParticle.h:210
int Daughter(const int i) const
Definition: MCParticle.cxx:112
std::vector< double > true_traj_X
def process(f, kind)
Definition: search.py:254
const double e
double Y(const size_type i) const
Definition: MCTrajectory.h:150
std::string EndProcess() const
Definition: MCParticle.h:216
Ionization at a point of the TPC sensitive volume.
Definition: SimChannel.h:84
static int max(int a, int b)
const TLorentzVector & Position(const size_type) const
The accessor methods described above.
ProcessMap const & TrajectoryProcesses() const
Definition: MCTrajectory.h:188
std::vector< TCSlice > slices
Definition: DataStructs.cxx:12
const sim::ParticleList & ParticleList() const
std::vector< double > true_traj_Z
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space.
Definition: geo_vectors.h:184
size_type size() const
Definition: MCTrajectory.h:166
Energy deposition in the active material.
std::vector< int > MakeSlices(double E0, double Ef, double p, const simb::MCParticle *part)
std::vector< double > true_traj_E
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
QTextStream & endl(QTextStream &s)
void pionana::TruthAnalyzer::beginJob ( )
overridevirtual

Reimplemented from art::EDAnalyzer.

Definition at line 558 of file TruthAnalyzer_module.cc.

558  {
559 
561  fTree = tfs->make<TTree>("beamana","beam analysis tree");
562 
563  fTree->Branch("traj_delta_E", &traj_delta_E);
564  fTree->Branch("IDE_delta_E", &IDE_delta_E);
565  fTree->Branch("true_beam_endZ", &true_beam_endZ);
566  fTree->Branch("true_beam_PDG", &true_beam_PDG);
567  fTree->Branch("output_first_point", &output_first_point);
568  fTree->Branch("first_point_Z", &first_point_Z);
569  fTree->Branch("first_point_E", &first_point_E);
570  fTree->Branch("event", &event);
571  fTree->Branch("run", &run);
572  fTree->Branch("subrun", &subrun);
573  fTree->Branch("first_IDE_Z", &first_IDE_Z);
574  fTree->Branch("true_traj_X", &true_traj_X);
575  fTree->Branch("true_traj_Y", &true_traj_Y);
576  fTree->Branch("true_traj_Z", &true_traj_Z);
577  fTree->Branch("true_traj_E", &true_traj_E);
578 }
std::vector< double > true_traj_Y
std::vector< double > true_traj_X
std::vector< double > true_traj_Z
std::vector< double > true_traj_E
Event finding and building.
TruthAnalyzer& pionana::TruthAnalyzer::operator= ( TruthAnalyzer const &  )
delete
TruthAnalyzer& pionana::TruthAnalyzer::operator= ( TruthAnalyzer &&  )
delete
void pionana::TruthAnalyzer::reset ( )

Definition at line 539 of file TruthAnalyzer_module.cc.

539  {
540  traj_delta_E = -999.;
541  IDE_delta_E = -999.;
542  true_beam_endZ = -999.;
543  true_beam_PDG = -999;
544  output_first_point = -999.;
545  first_point_Z = -999.;
546  first_point_E = -999.;
547  event = -999;
548  first_IDE_Z = -999.;
549  run = -999;
550  subrun = -999;
551 
552  true_traj_X.clear();
553  true_traj_Y.clear();
554  true_traj_Z.clear();
555  true_traj_E.clear();
556 }
std::vector< double > true_traj_Y
std::vector< double > true_traj_X
std::vector< double > true_traj_Z
std::vector< double > true_traj_E

Member Data Documentation

int pionana::TruthAnalyzer::event
private

Definition at line 210 of file TruthAnalyzer_module.cc.

art::InputTag pionana::TruthAnalyzer::fGeneratorTag
private

Definition at line 200 of file TruthAnalyzer_module.cc.

double pionana::TruthAnalyzer::first_IDE_Z
private

Definition at line 211 of file TruthAnalyzer_module.cc.

double pionana::TruthAnalyzer::first_point_E
private

Definition at line 212 of file TruthAnalyzer_module.cc.

double pionana::TruthAnalyzer::first_point_Z
private

Definition at line 212 of file TruthAnalyzer_module.cc.

art::InputTag pionana::TruthAnalyzer::fSimEDepTag
private

Definition at line 202 of file TruthAnalyzer_module.cc.

TTree* pionana::TruthAnalyzer::fTree
private

Definition at line 203 of file TruthAnalyzer_module.cc.

int pionana::TruthAnalyzer::fView
private

Definition at line 201 of file TruthAnalyzer_module.cc.

double pionana::TruthAnalyzer::IDE_delta_E
private

Definition at line 206 of file TruthAnalyzer_module.cc.

int pionana::TruthAnalyzer::output_first_point
private

Definition at line 209 of file TruthAnalyzer_module.cc.

int pionana::TruthAnalyzer::run
private

Definition at line 210 of file TruthAnalyzer_module.cc.

int pionana::TruthAnalyzer::subrun
private

Definition at line 210 of file TruthAnalyzer_module.cc.

double pionana::TruthAnalyzer::traj_delta_E
private

Definition at line 205 of file TruthAnalyzer_module.cc.

double pionana::TruthAnalyzer::true_beam_endZ
private

Definition at line 207 of file TruthAnalyzer_module.cc.

int pionana::TruthAnalyzer::true_beam_PDG
private

Definition at line 208 of file TruthAnalyzer_module.cc.

std::vector<double> pionana::TruthAnalyzer::true_traj_E
private

Definition at line 214 of file TruthAnalyzer_module.cc.

std::vector<double> pionana::TruthAnalyzer::true_traj_X
private

Definition at line 214 of file TruthAnalyzer_module.cc.

std::vector<double> pionana::TruthAnalyzer::true_traj_Y
private

Definition at line 214 of file TruthAnalyzer_module.cc.

std::vector<double> pionana::TruthAnalyzer::true_traj_Z
private

Definition at line 214 of file TruthAnalyzer_module.cc.


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