103 std::vector< art::Ptr<gar::rec::CaloHit> > artHits;
111 std::vector<const gar::rec::CaloHit*> splitHits =
fSSAAlgo->getSplitHits();
113 std::vector<const gar::rec::CaloHit*> unsplitHits =
fSSAAlgo->getUnSplitHits();
116 std::unique_ptr< std::vector<gar::rec::CaloHit> > HitCol(
new std::vector<gar::rec::CaloHit>);
120 for(
auto const &it : splitHits) {
123 float energy = it->Energy();
124 std::pair<float, float>
time = it->Time();
126 const float *
pos = it->Position();
127 float newpos[3] = { pos[0], pos[1], pos[2] };
128 float newtime = time.first;
129 unsigned int layer = it->Layer();
130 const std::array<double, 3> point = { pos[0], pos[1], pos[2] };
136 rec::CaloHit
hit(energy, newtime, newpos, cellID, layer);
137 HitCol->emplace_back(
hit);
142 for(
auto const &it : unsplitHits) {
145 float energy = it->Energy();
146 std::pair<float, float> time = it->Time();
148 const float *pos = it->Position();
149 float newpos[3] = { pos[0], pos[1], pos[2] };
150 float newtime = time.first;
151 unsigned int layer = it->Layer();
152 const std::array<double, 3> point = { pos[0], pos[1], pos[2] };
157 newpos[0] = strip_pos[0];
158 newpos[1] = strip_pos[1];
159 newpos[2] = strip_pos[2];
163 rec::CaloHit
hit(energy, newtime, newpos, cellID, layer);
165 HitCol->emplace_back(
hit);
172 std::vector<const gar::rec::CaloHit*> stripEndsHits =
fSSAAlgo->getStripEndsHits();
173 for(
auto const &it : stripEndsHits)
174 HitCol->emplace_back(*it);
176 std::vector<const gar::rec::CaloHit*> stripInterHits =
fSSAAlgo->getIntersectionHits();
177 for(
auto const &it : stripInterHits)
178 HitCol->emplace_back(*it);
std::array< double, 3 > CalculateStripHitPosition(float x, float y, float z, std::pair< float, float > time, raw::CellID_t cID)
std::string fInstanceName
product instance name
const geo::GeometryCore * fGeo
pointer to the geometry
std::unique_ptr< rec::alg::StripSplitterAlg > fSSAAlgo
void CollectHits(const art::Event &evt, const std::string &label, const std::string &instance, std::vector< art::Ptr< gar::rec::CaloHit > > &hitVector)
bool isTile(const std::array< double, 3 > &point, const gar::raw::CellID_t &cID) const
ProductID put(std::unique_ptr< PROD > &&edp, std::string const &instance={})
float CorrectStripHitTime(float x, float y, float z, std::pair< float, float > hitTime, raw::CellID_t cID)
Detector simulation of raw signals on wires.
std::string fCaloHitLabel
label to find the right reco calo hits