8 class SimEnergyDeposit;
12 namespace fhicl {
class ParameterSet; }
46 timeStart = timeEnd = timeMax = 0;
57 { _x =
x; _y =
y; _z =
z; }
62 if(_x < rhs.
_x)
return true;
63 if(rhs.
_x < _x)
return false;
64 if(_y < rhs.
_y)
return true;
65 if(rhs.
_y < _y)
return false;
66 if(_z < rhs.
_z)
return true;
67 if(rhs.
_z < _z)
return false;
84 std::vector<deposit> deps {};
93 pos(p),
pid(pi), deps(num_planes) { deps[id].energy=
e; deps[id].charge=
c;}
104 void MakeMCEdep(
const std::vector<sim::SimChannel>& schArray);
106 void MakeMCEdep(
const std::vector<sim::SimEnergyDeposit>& sedArray);
109 {
return (_track_index.find(track_id) != _track_index.end()); }
114 auto iter = _track_index.find(track_id);
115 return (iter == _track_index.end() ? -1 : (
int)((*iter).second));
119 const std::vector<sim::MCEdep>& GetEdepArrayAt(
size_t edep_index)
const;
123 {
return _track_index; }
127 _track_index.clear();
128 std::vector<std::vector<sim::MCEdep>>().
swap(_mc_edeps);
129 std::map<unsigned int,size_t>().
swap(_track_index);
133 std::vector<sim::MCEdep>& __GetEdepArray__(
unsigned int track_id);
MCEdep(sim::UniquePosition p, geo::PlaneID pi, size_t num_planes, float e, float c, size_t id)
bool operator<(const UniquePosition &rhs) const
The data type to uniquely identify a Plane.
std::map< geo::PlaneID, size_t > createPlaneIndexMap()
int TrackToEdepIndex(unsigned int track_id) const
Converts a track ID to MCEdep array index. Returns -1 if no corresponding array found ...
void swap(Handle< T > &a, Handle< T > &b)
bool ExistTrack(const unsigned int track_id) const
Code to link reconstructed objects back to the MC truth information.
Definition of data types for geometry description.
std::vector< std::vector< sim::MCEdep > > _mc_edeps
deposit(float e, float c)
UniquePosition(double x=0, double y=0, double z=0)
std::map< unsigned int, size_t > _track_index
const std::map< unsigned int, size_t > TrackIndexMap() const
Returns a map of track id <-> MCEdep vector index.