Public Member Functions | Private Attributes | List of all members
larg4::AuxDetReadout Class Reference

#include <AuxDetReadout.h>

Inheritance diagram for larg4::AuxDetReadout:

Public Member Functions

 AuxDetReadout (std::string const &name, unsigned int adNum, unsigned int svNum)
 
virtual ~AuxDetReadout ()
 
virtual void Initialize (G4HCofThisEvent *)
 
virtual void EndOfEvent (G4HCofThisEvent *)
 
virtual void clear ()
 
virtual G4bool ProcessHits (G4Step *, G4TouchableHistory *)
 
virtual void AddParticleStep (int inputTrackID, float inputEnergyDeposited, float inputEntryX, float inputEntryY, float inputEntryZ, float inputEntryT, float inputExitX, float inputExitY, float inputExitZ, float inputExitT, float inputExitMomentumX, float inputExitMomentumY, float inputExitMomentumZ)
 
virtual void DrawAll ()
 
virtual void PrintAll ()
 
sim::AuxDetSimChannel const GetAuxDetSimChannel () const
 

Private Attributes

art::ServiceHandle< geo::Geometry const > fGeoHandle
 Handle to the Geometry service. More...
 
uint32_t fAuxDet
 which AuxDet this AuxDetReadout corresponds to More...
 
uint32_t fAuxDetSensitive
 which sensitive volume of the AuxDet this AuxDetReadout corresponds to More...
 
sim::AuxDetSimChannel fAuxDetSimChannel
 Contains the sim::AuxDetSimChannel for this AuxDet. More...
 
std::vector< sim::AuxDetIDEfAuxDetIDEs
 list of IDEs in one channel More...
 

Detailed Description

Definition at line 27 of file AuxDetReadout.h.

Constructor & Destructor Documentation

larg4::AuxDetReadout::AuxDetReadout ( std::string const &  name,
unsigned int  adNum,
unsigned int  svNum 
)

Definition at line 19 of file AuxDetReadout.cxx.

22  : G4VSensitiveDetector(name)
23  , fAuxDet(adNum)
24  , fAuxDetSensitive(svNum)
25  {
26  }
static QCString name
Definition: declinfo.cpp:673
uint32_t fAuxDet
which AuxDet this AuxDetReadout corresponds to
Definition: AuxDetReadout.h:77
uint32_t fAuxDetSensitive
which sensitive volume of the AuxDet this AuxDetReadout corresponds to
Definition: AuxDetReadout.h:78
larg4::AuxDetReadout::~AuxDetReadout ( )
virtual

Definition at line 29 of file AuxDetReadout.cxx.

29 {}

Member Function Documentation

void larg4::AuxDetReadout::AddParticleStep ( int  inputTrackID,
float  inputEnergyDeposited,
float  inputEntryX,
float  inputEntryY,
float  inputEntryZ,
float  inputEntryT,
float  inputExitX,
float  inputExitY,
float  inputExitZ,
float  inputExitT,
float  inputExitMomentumX,
float  inputExitMomentumY,
float  inputExitMomentumZ 
)
virtual

Definition at line 96 of file AuxDetReadout.cxx.

109  {
110 
111  sim::AuxDetIDE auxDetIDE;
112  auxDetIDE.trackID = inputTrackID;
113  auxDetIDE.energyDeposited = inputEnergyDeposited;
114  auxDetIDE.entryX = inputEntryX;
115  auxDetIDE.entryY = inputEntryY;
116  auxDetIDE.entryZ = inputEntryZ;
117  auxDetIDE.entryT = inputEntryT;
118  auxDetIDE.exitX = inputExitX;
119  auxDetIDE.exitY = inputExitY;
120  auxDetIDE.exitZ = inputExitZ;
121  auxDetIDE.exitT = inputExitT;
122  auxDetIDE.exitMomentumX = inputExitMomentumX;
123  auxDetIDE.exitMomentumY = inputExitMomentumY;
124  auxDetIDE.exitMomentumZ = inputExitMomentumZ;
125 
127  = std::find(fAuxDetIDEs.begin(), fAuxDetIDEs.end(), auxDetIDE);
128 
129  if(IDEitr != fAuxDetIDEs.end()){ //If trackID is already in the map, update it
130 
131  IDEitr->energyDeposited += inputEnergyDeposited;
132  IDEitr->exitX = inputExitX;
133  IDEitr->exitY = inputExitY;
134  IDEitr->exitZ = inputExitZ;
135  IDEitr->exitT = inputExitT;
136  IDEitr->exitMomentumX = inputExitMomentumX;
137  IDEitr->exitMomentumY = inputExitMomentumY;
138  IDEitr->exitMomentumZ = inputExitMomentumZ;
139  }
140  else{ //if trackID is not in the set yet, add it
141  fAuxDetIDEs.push_back(std::move(auxDetIDE));
142  }//else
143  }//AddParticleStep
intermediate_table::iterator iterator
int trackID
Geant4 supplied track ID.
float exitMomentumZ
Exit Z-Momentum of particle.
float exitY
Exit position Y of particle.
float entryT
Entry time of particle.
def move(depos, offset)
Definition: depos.py:107
float exitMomentumX
Exit X-Momentum of particle.
float exitT
Exit time of particle.
float exitZ
Exit position Z of particle.
float entryZ
Entry position Z of particle.
float exitX
Exit position X of particle.
float energyDeposited
total energy deposited for this track ID and time
float entryX
Entry position X of particle.
float entryY
Entry position Y of particle.
MC truth information to make RawDigits and do back tracking.
std::vector< sim::AuxDetIDE > fAuxDetIDEs
list of IDEs in one channel
Definition: AuxDetReadout.h:80
float exitMomentumY
Exit Y-Momentum of particle.
void larg4::AuxDetReadout::clear ( )
virtual

Definition at line 42 of file AuxDetReadout.cxx.

43  {
44  fAuxDetIDEs.clear();
45  }
std::vector< sim::AuxDetIDE > fAuxDetIDEs
list of IDEs in one channel
Definition: AuxDetReadout.h:80
void larg4::AuxDetReadout::DrawAll ( )
virtual

Definition at line 147 of file AuxDetReadout.cxx.

147 {}
void larg4::AuxDetReadout::EndOfEvent ( G4HCofThisEvent *  )
virtual

Definition at line 37 of file AuxDetReadout.cxx.

38  {
40  }
Collection of particles crossing one auxiliary detector cell.
uint32_t fAuxDet
which AuxDet this AuxDetReadout corresponds to
Definition: AuxDetReadout.h:77
def move(depos, offset)
Definition: depos.py:107
sim::AuxDetSimChannel fAuxDetSimChannel
Contains the sim::AuxDetSimChannel for this AuxDet.
Definition: AuxDetReadout.h:79
std::vector< sim::AuxDetIDE > fAuxDetIDEs
list of IDEs in one channel
Definition: AuxDetReadout.h:80
uint32_t fAuxDetSensitive
which sensitive volume of the AuxDet this AuxDetReadout corresponds to
Definition: AuxDetReadout.h:78
sim::AuxDetSimChannel const larg4::AuxDetReadout::GetAuxDetSimChannel ( ) const
inline

Definition at line 73 of file AuxDetReadout.h.

73 { return fAuxDetSimChannel; };
sim::AuxDetSimChannel fAuxDetSimChannel
Contains the sim::AuxDetSimChannel for this AuxDet.
Definition: AuxDetReadout.h:79
void larg4::AuxDetReadout::Initialize ( G4HCofThisEvent *  )
virtual

Definition at line 33 of file AuxDetReadout.cxx.

34  {}
void larg4::AuxDetReadout::PrintAll ( )
virtual

Definition at line 148 of file AuxDetReadout.cxx.

148 {}
G4bool larg4::AuxDetReadout::ProcessHits ( G4Step *  step,
G4TouchableHistory *   
)
virtual

Definition at line 50 of file AuxDetReadout.cxx.

51  {
52  // collect the info for this step
53 
54  const int trackID = ParticleListAction::GetCurrentTrackID();
55 
56  G4double energyDeposited = step->GetTotalEnergyDeposit()/CLHEP::GeV;
57 
58  G4ThreeVector startG4(step->GetPreStepPoint()->GetPosition() );
59  double startWorld[3] = {startG4.getX()/CLHEP::cm,
60  startG4.getY()/CLHEP::cm,
61  startG4.getZ()/CLHEP::cm};
62 
63  double startTime = step->GetPreStepPoint()->GetGlobalTime()/CLHEP::ns;
64 
65  G4ThreeVector stopG4( step->GetPostStepPoint()->GetPosition());
66  double stopWorld[3] = {stopG4.getX()/CLHEP::cm,
67  stopG4.getY()/CLHEP::cm,
68  stopG4.getZ()/CLHEP::cm};
69 
70  G4ThreeVector stopG4Momentum( step->GetPostStepPoint()->GetMomentum());
71  double stopWorldMomVector[3] = {stopG4Momentum.getX()/CLHEP::GeV,
72  stopG4Momentum.getY()/CLHEP::GeV,
73  stopG4Momentum.getZ()/CLHEP::GeV};
74 
75  double stopTime = step->GetPostStepPoint()->GetGlobalTime()/CLHEP::ns;
76 
77  this->AddParticleStep( trackID,
78  energyDeposited,
79  startWorld[0],
80  startWorld[1],
81  startWorld[2],
82  startTime,
83  stopWorld[0],
84  stopWorld[1],
85  stopWorld[2],
86  stopTime,
87  stopWorldMomVector[0],
88  stopWorldMomVector[1],
89  stopWorldMomVector[2]
90  );
91 
92  return true;
93  }
static constexpr double cm
Definition: Units.h:68
static constexpr double GeV
Definition: Units.h:28
virtual void AddParticleStep(int inputTrackID, float inputEnergyDeposited, float inputEntryX, float inputEntryY, float inputEntryZ, float inputEntryT, float inputExitX, float inputExitY, float inputExitZ, float inputExitT, float inputExitMomentumX, float inputExitMomentumY, float inputExitMomentumZ)
QAsciiDict< Entry > ns

Member Data Documentation

uint32_t larg4::AuxDetReadout::fAuxDet
private

which AuxDet this AuxDetReadout corresponds to

Definition at line 77 of file AuxDetReadout.h.

std::vector<sim::AuxDetIDE> larg4::AuxDetReadout::fAuxDetIDEs
private

list of IDEs in one channel

Definition at line 80 of file AuxDetReadout.h.

uint32_t larg4::AuxDetReadout::fAuxDetSensitive
private

which sensitive volume of the AuxDet this AuxDetReadout corresponds to

Definition at line 78 of file AuxDetReadout.h.

sim::AuxDetSimChannel larg4::AuxDetReadout::fAuxDetSimChannel
private

Contains the sim::AuxDetSimChannel for this AuxDet.

Definition at line 79 of file AuxDetReadout.h.

art::ServiceHandle<geo::Geometry const> larg4::AuxDetReadout::fGeoHandle
private

Handle to the Geometry service.

Definition at line 73 of file AuxDetReadout.h.


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