97 _wftree =
new TTree(name.c_str(),name.c_str());
98 _wftree->Branch(
"run",&
_run,
"run/I");
99 _wftree->Branch(
"event",&
_event,
"event/I");
100 _wftree->Branch(
"event_time",&
_event_time,
"event_time/D");
101 _wftree->Branch(
"event_x",&
_event_x,
"event_x/D");
102 _wftree->Branch(
"event_y",&
_event_y,
"event_y/D");
103 _wftree->Branch(
"event_z",&
_event_z,
"event_z/D");
104 _wftree->Branch(
"event_dr",&
_event_dr,
"event_dr/D");
105 _wftree->Branch(
"event_dx",&
_event_dx,
"event_dx/D");
106 _wftree->Branch(
"event_dy",&
_event_dy,
"event_dy/D");
107 _wftree->Branch(
"event_dz",&
_event_dz,
"event_dz/D");
108 _wftree->Branch(
"tpc",&
_tpc,
"tpc/I");
109 _wftree->Branch(
"ch",&
_ch,
"ch/I");
110 _wftree->Branch(
"wf",&
_wf);
111 _wftree->Branch(
"tstart",&
_tstart,
"tstart/D");
115 std::string name = label +
"_hittree";
116 auto hittree =
new TTree(name.c_str(),name.c_str());
117 hittree->Branch(
"run",&
_run,
"run/I");
118 hittree->Branch(
"event",&
_event,
"event/I");
119 hittree->Branch(
"event_time",&
_event_time,
"event_time/D");
120 hittree->Branch(
"event_x",&
_event_x,
"event_x/D");
121 hittree->Branch(
"event_y",&
_event_y,
"event_y/D");
122 hittree->Branch(
"event_z",&
_event_z,
"event_z/D");
123 hittree->Branch(
"event_dr",&
_event_dr,
"event_dr/D");
124 hittree->Branch(
"event_dx",&
_event_dx,
"event_dx/D");
125 hittree->Branch(
"event_dy",&
_event_dy,
"event_dy/D");
126 hittree->Branch(
"event_dz",&
_event_dz,
"event_dz/D");
127 hittree->Branch(
"tpc",&
_tpc,
"tpc/I");
128 hittree->Branch(
"ch",&
_ch,
"ch/I");
129 hittree->Branch(
"amp",&
_amp,
"amp/D");
130 hittree->Branch(
"area",&
_area,
"area/D");
131 hittree->Branch(
"width",&
_width,
"width/D");
132 hittree->Branch(
"time",&
_time,
"time/D");
133 hittree->Branch(
"pe",&
_pe,
"pe/D");
137 _geotree =
new TTree(
"geotree",
"geotree");
138 std::vector<double> pmtX, pmtY, pmtZ;
139 std::vector<double> minX, minY, minZ;
140 std::vector<double> maxX, maxY, maxZ;
141 auto const geop = lar::providerFrom<geo::Geometry>();
143 for(
size_t opch=0; opch<geop->NOpChannels(); ++opch) {
144 geop->OpDetGeoFromOpChannel(opch).GetCenter(PMTxyz);
145 pmtX.push_back(PMTxyz[0]);
146 pmtY.push_back(PMTxyz[1]);
147 pmtZ.push_back(PMTxyz[2]);
149 for(
auto iter=geop->begin_TPC(); iter!=geop->end_TPC(); ++iter) {
150 auto const& tpc = (*iter);
151 minX.push_back(tpc.BoundingBox().MinX());
152 minY.push_back(tpc.BoundingBox().MinY());
153 minZ.push_back(tpc.BoundingBox().MinZ());
154 maxX.push_back(tpc.BoundingBox().MaxX());
155 maxY.push_back(tpc.BoundingBox().MaxY());
156 maxZ.push_back(tpc.BoundingBox().MaxZ());
std::string _output_fname
std::vector< std::string > _hit_label_v
std::vector< TTree * > _hittree_v