20 #include "art_root_io/TFileService.h" 114 fHTree = tfs->make<TTree>(
"HTree",
"HTree");
146 fHTree->Branch(
"Htp0", fTimep0,
"Htp0[HNp0]/F");
155 fHTree->Branch(
"HMCXYZp0",
fXYZp0,
"HMCXYZp0[HN3p0]/F");
156 fHTree->Branch(
"HMCXYZp1",
fXYZp1,
"HMCXYZp1[HN3p1]/F");
157 fHTree->Branch(
"HMCXYZp2",
fXYZp2,
"HMCXYZp2[HN3p2]/F");
176 throw cet::exception(
"HitFinderAna: ") <<
"Not for use on Data yet...\n";
192 std::map<geo::PlaneID, std::vector<art::Ptr<recob::Hit>>> planeIDToHits;
193 for (
size_t h = 0; h < hitHandle->size(); ++h)
194 planeIDToHits[hitHandle->at(h).WireID().planeID()].push_back(
197 for (
auto mapitr : planeIDToHits) {
206 auto itr = mapitr.second.begin();
207 while (itr != mapitr.second.end()) {
212 std::vector<sim::TrackIDE> trackides = bt_serv->
HitToTrackIDEs(clockData, *itr);
214 std::vector<double> xyz = bt_serv->
HitToXYZ(clockData, *itr);
221 for (
unsigned int kk = 0; kk < 3; ++kk) {
225 while (idesitr != trackides.end()) {
227 if (_particleList.
find((*idesitr).trackID) != _particleList.
end()) {
238 else if (pid.
Plane == 1 &&
fNp1 < 9000) {
243 for (
unsigned int kk = 0; kk < 3; ++kk) {
247 while (idesitr != trackides.end()) {
249 if (_particleList.
find((*idesitr).trackID) != _particleList.
end()) {
259 else if (pid.
Plane == 2 &&
fNp2 < 9000) {
264 for (
unsigned int kk = 0; kk < 3; ++kk) {
268 while (idesitr != trackides.end()) {
270 if (_particleList.
find((*idesitr).trackID) != _particleList.
end()) {
double E(const int i=0) const
std::vector< sim::TrackIDE > HitToTrackIDEs(detinfo::DetectorClocksData const &clockData, recob::Hit const &hit) const
Declaration of signal hit object.
The data type to uniquely identify a Plane.
mapped_type at(const key_type &key)
std::string fFFTHitFinderModuleLabel
std::string fLArG4ModuleLabel
std::vector< double > HitToXYZ(detinfo::DetectorClocksData const &clockData, const recob::Hit &hit) const
Base class for creation of raw signals on wires.
iterator find(const key_type &key)
#define DEFINE_ART_MODULE(klass)
T get(std::string const &key) const
PlaneID_t Plane
Index of the plane within its TPC.
Detector simulation of raw signals on wires.
const sim::ParticleList & ParticleList() const
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
#define MF_LOG_VERBATIM(category)
void analyze(const art::Event &evt)
read/write access to event
EventNumber_t event() const
Particle list in DetSim contains Monte Carlo particle information.
Namespace collecting geometry-related classes utilities.
art framework interface to geometry description
cet::coded_exception< error, detail::translate > exception