SEvent/ScintillatorSimData.cc
Go to the documentation of this file.
1 #include <sevt/ScintillatorSimData.h>
2 #include <utl/Particle.h>
3 
4 using namespace utl;
5 using namespace sevt;
6 using namespace std;
7 
8 
9 void
10 ScintillatorSimData::CountParticle(const utl::Particle& particle)
11 {
12  ++fTotalParticleCount;
13  /* Should return enum, not int. Perhaps modification of GetType() member
14  function of Particle class warranted */
15  const int type = particle.GetType();
16  if (type == utl::Particle::eMuon || type == utl::Particle::eAntiMuon)
17  ++fNumberOfMuons;
18  else if (type == utl::Particle::eElectron || type == utl::Particle::ePositron)
19  ++fNumberOfElectrons;
20  else if (type == utl::Particle::ePhoton)
21  ++fNumberOfPhotons;
22 }
Describes a particle for Simulation.
Definition: Particle.h:26
struct particle_info particle[80]
int GetType() const
Definition: Particle.h:101

, generated on Tue Sep 26 2023.