20 #include "art_root_io/TFileService.h" 31 #include "nug4/ParticleNavigation/ParticleList.h" 115 fHTree = tfs->make<TTree>(
"HTree",
"HTree");
147 fHTree->Branch(
"Htp0", fTimep0,
"Htp0[HNp0]/F");
156 fHTree->Branch(
"HMCXYZp0",
fXYZp0,
"HMCXYZp0[HN3p0]/F");
157 fHTree->Branch(
"HMCXYZp1",
fXYZp1,
"HMCXYZp1[HN3p1]/F");
158 fHTree->Branch(
"HMCXYZp2",
fXYZp2,
"HMCXYZp2[HN3p2]/F");
178 throw cet::exception(
"HitFinderAna: ") <<
"Not for use on Data yet...\n";
188 sim::ParticleList
const& _particleList = pi_serv->
ParticleList();
194 std::map<geo::PlaneID, std::vector<art::Ptr<recob::Hit>>> planeIDToHits;
195 for (
size_t h = 0;
h < hitHandle->size(); ++
h)
196 planeIDToHits[hitHandle->at(
h).WireID().planeID()].push_back(
199 for (
auto mapitr : planeIDToHits) {
208 auto itr = mapitr.second.begin();
209 while (itr != mapitr.second.end()) {
214 std::vector<sim::TrackIDE> trackides = bt_serv->
HitToTrackIDEs(clockData, *itr);
216 std::vector<double> xyz = bt_serv->
HitToXYZ(clockData, *itr);
223 for (
unsigned int kk = 0; kk < 3; ++kk) {
227 while (idesitr != trackides.end()) {
229 if (_particleList.find((*idesitr).trackID) != _particleList.end()) {
240 else if (pid.
Plane == 1 &&
fNp1 < 9000) {
245 for (
unsigned int kk = 0; kk < 3; ++kk) {
249 while (idesitr != trackides.end()) {
251 if (_particleList.find((*idesitr).trackID) != _particleList.end()) {
261 else if (pid.
Plane == 2 &&
fNp2 < 9000) {
266 for (
unsigned int kk = 0; kk < 3; ++kk) {
270 while (idesitr != trackides.end()) {
272 if (_particleList.find((*idesitr).trackID) != _particleList.end()) {
def analyze(root, level, gtrees, gbranches, doprint)
double E(const int i=0) const
std::vector< sim::TrackIDE > HitToTrackIDEs(detinfo::DetectorClocksData const &clockData, recob::Hit const &hit) const
The data type to uniquely identify a Plane.
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.
art framework interface to geometry description
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
#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
Declaration of signal hit object.
#define MF_LOG_VERBATIM(category)
void analyze(const art::Event &evt)
read/write access to event
EventNumber_t event() const
LArSoft geometry interface.
cet::coded_exception< error, detail::translate > exception