44 std::vector<unsigned int> AuxDetChanNumber;
45 AuxDetChanNumber.reserve(
size(InputHitVector));
48 for(
auto const&
hit : InputHitVector)
52 = std::find(AuxDetChanNumber.begin(), AuxDetChanNumber.end(),
hit.GetID());
54 if(Chanitr == AuxDetChanNumber.end()){
56 AuxDetChanNumber.push_back(
hit.GetID());
61 return AuxDetChanNumber;
69 std::vector<sim::AuxDetIDE> IDEvector;
72 size_t ad_id_no = 9999;
73 size_t ad_sen_id_no = 9999;
75 for (
auto const& auxDetHit : InputHitVector)
78 double xcoordinate = (auxDetHit.GetEntryX() + auxDetHit.GetExitX())/2.0;
79 double ycoordinate = (auxDetHit.GetEntryY() + auxDetHit.GetExitY())/2.0;
80 double zcoordinate = (auxDetHit.GetEntryZ() + auxDetHit.GetExitZ())/2.0;
81 double worldPos[3] = {xcoordinate,ycoordinate,zcoordinate};
83 if(auxDetHit.GetID() == inputchannel)
88 = std::find(IDEvector.begin(), IDEvector.end(), tempIDE);
90 if(IDEitr != IDEvector.end()){
92 IDEitr->energyDeposited += tempIDE.energyDeposited;
93 IDEitr->exitX = tempIDE.exitX;
94 IDEitr->exitY = tempIDE.exitY;
95 IDEitr->exitZ = tempIDE.exitZ;
96 IDEitr->exitT = tempIDE.exitT;
97 IDEitr->exitMomentumX = tempIDE.exitMomentumX;
98 IDEitr->exitMomentumY = tempIDE.exitMomentumY;
99 IDEitr->exitMomentumZ = tempIDE.exitMomentumZ;
121 std::vector<sim::AuxDetSimChannel> auxDetVector;
122 auxDetVector.reserve(
size(auxDetChannels));
124 for (
auto const channelNum : auxDetChannels) {
void FindAuxDetSensitiveAtPosition(geo::Point_t const &point, std::size_t &adg, std::size_t &sv, double tolerance=0) const
Fills the indices of the sensitive auxiliary detector at location.
unsigned int GetTrackID() const
sim::AuxDetIDE toAuxDetIDE(sim::AuxDetHit const &InputHit) const
sim::AuxDetSimChannel GetAuxDetSimChannelByNumber(const std::vector< sim::AuxDetHit > &InputHitVector, unsigned int inputchannel) const
int trackID
Geant4 supplied track ID.
float exitMomentumZ
Exit Z-Momentum of particle.
std::vector< unsigned int > GetAuxDetChannels(const std::vector< sim::AuxDetHit > &InputHitVector) const
float GetExitMomentumY() const
float exitY
Exit position Y of particle.
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Collection of particles crossing one auxiliary detector cell.
art::ServiceHandle< geo::Geometry const > fGeo
float entryT
Entry time of particle.
std::vector< sim::AuxDetSimChannel > GetAuxDetSimChannels(const std::vector< sim::AuxDetHit > &InputHitVector) const
float exitMomentumX
Exit X-Momentum of particle.
float exitT
Exit time of particle.
float GetEnergyDeposited() const
float exitZ
Exit position Z of particle.
float entryZ
Entry position Z of particle.
float exitX
Exit position X of particle.
Detector simulation of raw signals on wires.
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.
float GetExitMomentumX() const
MC truth information to make RawDigits and do back tracking.
float exitMomentumY
Exit Y-Momentum of particle.
float GetExitMomentumZ() const