All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
icaruscode/icaruscode/CRT/CRTTrackProducer_module.cc
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////////////////
2 // Class: CRTSimpleTrackProducer
3 // Module Type: producer
4 // File: CRTSimpleTrackProducer_module.cc
5 // Description: Module for constructiong over-simplified CRT tracks.
6 // Copied from CRTTrackProducer by David Lorca Galindo
7 // Edited by Michelle Stancari April 3, 2018
8 // Added some SBND specific stuff - Tom Brooks
9 // Ported to and modified for use with icaruscode by Chris.Hilgenberg@colostate.edu
10 ////////////////////////////////////////////////////////////////////////////////////
11 
12 #include "art/Framework/Core/EDProducer.h"
13 #include "art/Framework/Core/ModuleMacros.h"
14 #include "art/Framework/Principal/Event.h"
15 #include "art/Framework/Principal/Handle.h"
16 #include "art/Framework/Principal/Run.h"
17 #include "art/Framework/Principal/SubRun.h"
18 #include "canvas/Utilities/InputTag.h"
19 #include "canvas/Persistency/Common/FindManyP.h"
20 #include "canvas/Persistency/Common/Ptr.h"
21 #include "canvas/Persistency/Common/PtrVector.h"
22 #include "fhiclcpp/ParameterSet.h"
23 #include "messagefacility/MessageLogger/MessageLogger.h"
24 #include "art_root_io/TFileService.h"
25 #include "art/Persistency/Common/PtrMaker.h"
30 #include "TTree.h"
31 #include "TVector3.h"
32 #include <iostream>
33 #include <stdio.h>
34 #include <sstream>
35 #include <vector>
36 #include <map>
37 #include <utility>
38 #include <cmath>
39 #include <memory>
40 #include <numeric> // std::accumulate
41 
42 using std::string;
43 using std::vector;
44 using std::pair;
45 using std::map;
46 
47 namespace icarus {
48 namespace crt {
49 
50  class CRTTrackProducer : public art::EDProducer {
51  public:
52 
53  explicit CRTTrackProducer(fhicl::ParameterSet const & p);
54 
55  // The destructor generated by the compiler is fine for classes
56  // without bare pointers or other resource use.
57  // Plugins should not be copied or assigned.
58  CRTTrackProducer(CRTTrackProducer const &) = delete;
60  CRTTrackProducer & operator = (CRTTrackProducer const &) = delete;
62 
63  // Required functions.
64  void produce(art::Event & e) override;
65 
66  // Selected optional functions.
67  void beginJob() override;
68  void endJob() override;
69 
70  private:
71 
72  // Declare member data here.
74  //string fDataLabelTZeros;
79  }; // class CRTTrackProducer
80 
81  // Function to calculate average and rms from a vector of values
82  void vmanip(vector<float> v, float* ave, float* rms);
83 
84  // Average crt hit structure
85  struct CRTavehit{
86 
87  uint32_t ts0_ns;
88  uint16_t ts0_ns_err;
89  int32_t ts1_ns;
90  uint16_t ts1_ns_err;
91 
92  float x_pos;
93  float x_err;
94  float y_pos;
95  float y_err;
96  float z_pos;
97  float z_err;
98  float pe;
99  int plane;
100  string tagger;
101  } tempah;
102 
103  // Function to make filling average hit easier
104  CRTavehit fillme(uint32_t i, uint16_t j, int32_t k, uint16_t l, float a,
105  float b, float c, float d, float e, float f, float g,
106  int p, string t);
107 
108  // Function to copy average hits
110 
111  // Function to make creating CRTTracks easier
112  sbn::crt::CRTTrack shcut(CRTavehit ppA,CRTavehit ppb, uint32_t time0s,uint16_t terr);
113 
114  // Constructor
115  CRTTrackProducer::CRTTrackProducer(fhicl::ParameterSet const & p)
116  : EDProducer{p}, trackAlg(p.get<fhicl::ParameterSet>("TrackAlg"))
117  {
118  // Initialize member data here.
119  fDataLabelHits = p.get<string>("DataLabelHits"); // CRTHit producer module name
120  // fDataLabelTZeros = p.get<string>("DataLabelTZeros"); // CRTTzero producer module name
121  fStoreTrack = p.get<int> ("StoreTrack"); // method 1 = all, method 2 = ave, method 3 = pure, method 4 = top plane
122  fTrackMethodType = p.get<int> ("TrackMethodType"); // Print stuff
123  fUseTopPlane = p.get<bool> ("UseTopPlane"); // Use hits from the top plane (SBND specific)
124 
125  // Call appropriate produces<>() functions here.
126  if(fStoreTrack == 1){
127  produces< vector<sbn::crt::CRTTrack> >();
128  produces< art::Assns<sbn::crt::CRTTrack , sbn::crt::CRTHit> >();
129  }
130 
131  } // CRTTrackProducer()
132 
133  void CRTTrackProducer::produce(art::Event & evt)
134  {
135  // For validation
136  int nTrack = 0;
137  int nCompTrack = 0;
138  int nIncTrack = 0;
139 
140  // CRTTrack collection on this event
141  std::unique_ptr<vector<sbn::crt::CRTTrack> > CRTTrackCol(new vector<sbn::crt::CRTTrack>);
142  std::unique_ptr< art::Assns<sbn::crt::CRTTrack, sbn::crt::CRTHit> > Trackassn( new art::Assns<sbn::crt::CRTTrack, sbn::crt::CRTHit>);
143  art::PtrMaker<sbn::crt::CRTTrack> makeTrackPtr(evt);
144 
145  // Implementation of required member function here.
146  art::Handle< vector<sbn::crt::CRTHit> > rawHandle;
147  evt.getByLabel(fDataLabelHits, rawHandle); //what is the product instance name? no BernZMQ
148 
149  // Check to make sure the data we asked for is valid
150  if(!rawHandle.isValid()){
151  mf::LogWarning("CRTTrackProducer")
152  <<"No CRTHits from producer module "<<fDataLabelHits;
153  return;
154  }
155 
156  // Track method 4 = SBND method with top plane (doesn't use CRTTzero)
157  if(fTrackMethodType == 4){
158 
159  //Get the CRT hits from the event
160  vector<art::Ptr<sbn::crt::CRTHit> > hitlist;
161 
162  if (evt.getByLabel(fDataLabelHits, rawHandle))
163  art::fill_ptr_vector(hitlist, rawHandle);
164 
165  map<art::Ptr<sbn::crt::CRTHit>, int> hitIds;
166 
167  for(size_t i = 0; i<hitlist.size(); i++){
168  hitIds[hitlist[i]] = i;
169  }
170 
171  vector<vector<art::Ptr<sbn::crt::CRTHit>>> CRTTzeroVect = trackAlg.CreateCRTTzeros(hitlist);
172 
173  // Loop over tzeros
174  for(size_t i = 0; i<CRTTzeroVect.size(); i++){
175 
176  //loop over hits for this tzero, sort by tagger
177  //map<string, vector<art::Ptr<sbn::crt::CRTHit>>> hits;
178  map<int, vector<art::Ptr<sbn::crt::CRTHit>>> hits;
179 
180  for (size_t ah = 0; ah< CRTTzeroVect[i].size(); ++ah){
181 
182  //string ip = CRTTzeroVect[i][ah]->tagger;
183  int ip = CRTTzeroVect[i][ah]->plane;
184  hits[ip].push_back(CRTTzeroVect[i][ah]);
185  } // loop over hits
186 
187  //loop over planes and calculate average hits
188  vector<pair<sbn::crt::CRTHit, vector<int>>> allHits;
189 
190  for (auto &keyVal : hits){
191 
192  // string ip = keyVal.first;
193  int ip = keyVal.first;
194  vector<pair<sbn::crt::CRTHit, vector<int>>> ahits = trackAlg.AverageHits(hits[ip], hitIds);
195 
196  allHits.insert(allHits.end(), ahits.begin(), ahits.end());
197 
198  /*
199  if(fUseTopPlane && ip == "volTaggerTopHigh_0"){
200  allHits.insert(allHits.end(), ahits.begin(), ahits.end());
201  }
202 
203  else if(ip != "volTaggerTopHigh_0"){
204  allHits.insert(allHits.end(), ahits.begin(), ahits.end());
205  }
206  */
207  }
208 
209  //Create tracks with hits at the same tzero
210  vector<pair<sbn::crt::CRTTrack, vector<int>>> trackCandidates = trackAlg.CreateTracks(allHits);
211  nTrack += trackCandidates.size();
212 
213  for(size_t j = 0; j < trackCandidates.size(); j++){
214 
215  CRTTrackCol->emplace_back(trackCandidates[j].first);
216  art::Ptr<sbn::crt::CRTTrack> trackPtr = makeTrackPtr(CRTTrackCol->size()-1);
217 
218  for (size_t ah = 0; ah< CRTTzeroVect[i].size(); ++ah){
219  Trackassn->addSingle(trackPtr, CRTTzeroVect[i][ah]);
220  }
221 
222  if(trackCandidates[j].first.complete)
223  nCompTrack++;
224  else
225  nIncTrack++;
226  }
227  }
228 
229  }//end if sbnd option
230 
231  /*
232  //Older track reconstruction methods from MicroBooNE
233  else{
234  //Get list of tzeros
235  // std::vector<crt::CRTHit> const& CRTHitCollection(*rawHandle);
236  art::Handle< vector<sbn::crt::CRTTzero> > rawHandletzero;
237  evt.getByLabel(fDataLabelTZeros, rawHandletzero); //what is the product instance name? no BernZMQ
238 
239  //check to make sure the data we asked for is valid
240  if(!rawHandletzero.isValid()){
241  mf::LogWarning("CRTTrackProducer")
242  <<"No CRTTzeros from producer module "<<fDataLabelTZeros;
243  return;
244  }
245 
246  vector<art::Ptr<sbn::crt::CRTTzero> > tzerolist;
247  if (evt.getByLabel(fDataLabelTZeros,rawHandletzero))
248  art::fill_ptr_vector(tzerolist, rawHandletzero);
249 
250  art::FindManyP<sbn::crt::CRTHit> fmht(rawHandletzero, evt, fDataLabelTZeros);
251 
252  //loop over tzeros
253  for(size_t tzIter = 0; tzIter < tzerolist.size(); ++tzIter){
254 
255  //count planes with hits for this tzero
256  int np =0 ; //int ipflag[7] = {}; // CHANGED FROM 4 TO 7
257  int tothits =0;
258  for (int ip=0;ip<7;++ip) { // CHANGED FROM 4 TO 7
259  if (tzerolist[tzIter]->nhits[ip]>0){
260  np++;
261  //ipflag[ip]=1;
262  tothits+=tzerolist[tzIter]->nhits[ip];
263  }
264  }
265 
266  if (np<2) continue;
267  vector<art::Ptr<sbn::crt::CRTHit> > hitlist=fmht.at(tzIter);
268  //for(size_t hit_i = 0; hit_i < hitlist.size(); hit
269  if (fTrackMethodType==1) {
270  double time_s_A = hitlist[0]->ts0_s;
271 
272  // find pairs of hits in different planes
273  for (size_t ah = 0; ah< hitlist.size()-1; ++ah){
274  sbn::crt::CRTHit temphit=*hitlist[ah];
275  CRTavehit Ahit = copyme(temphit);
276  int planeA = hitlist[ah]->plane;
277 
278  for (size_t bh = ah+1; bh< hitlist.size(); ++bh){
279  int planeB = hitlist[bh]->plane;
280 
281  if (planeB!=planeA && !((planeA==3&&planeB==4)||(planeA==4&&planeB==3))) { // make a track
282  temphit=*hitlist[bh];
283  CRTavehit Bhit = copyme(temphit);
284  sbn::crt::CRTTrack CRTcanTrack=shcut(Ahit,Bhit,time_s_A,0);
285  CRTTrackCol->emplace_back(CRTcanTrack);
286  }
287 
288  }
289 
290  }
291 
292  }
293 
294  else if ((fTrackMethodType==2) || (fTrackMethodType==3 && np==2 && tothits==2)) {
295 
296  //loop over hits and get average x,y,z,pe for each plane CHANGED FROM 4 TO 7
297  vector<float> thittime0[7];
298  vector<float> thittime1[7];
299  vector<float> tx[7];
300  vector<float> ty[7];
301  vector<float> tz[7];
302  vector<float> pe[7];
303 
304  double time_s_A = hitlist[0]->ts0_s;
305  // double time_s_err = hitlist[0]->ts0_s_err;
306  double time_s_err = 0.;
307  double time1_ns_A = hitlist[0]->ts1_ns;
308  double time0_ns_A = hitlist[0]->ts0_ns;
309 
310  //loop over hits for this tzero, sort by plane
311  for (size_t ah = 0; ah< hitlist.size(); ++ah){
312  int ip = hitlist[ah]->plane;
313  thittime0[ip].push_back(hitlist[ah]->ts0_ns-time0_ns_A);
314  thittime1[ip].push_back(hitlist[ah]->ts1_ns-time1_ns_A);
315  tx[ip].push_back(hitlist[ah]->x_pos);
316  ty[ip].push_back(hitlist[ah]->y_pos);
317  tz[ip].push_back(hitlist[ah]->z_pos);
318  pe[ip].push_back(hitlist[ah]->peshit);
319  } // loop over hits
320 
321  CRTavehit aveHits[7];
322  //loop over planes and calculate average hits
323  for (int ip = 0; ip < 7; ip++){
324  if (tx[ip].size()>0){
325  uint32_t at0; int32_t at1; uint16_t rt0,rt1;
326  float totpe=0.0;
327  float avet1=0.0; float rmst1 =0.0;
328  float avet0=0.0; float rmst0 =0.0;
329  float avex=0.0; float rmsx =0.0;
330  float avey=0.0; float rmsy =0.0;
331  float avez=0.0; float rmsz =0.0;
332  vmanip(thittime0[ip],&avet0,&rmst0);
333  vmanip(thittime1[ip],&avet1,&rmst1);
334  at0 = (uint32_t)(avet0+time0_ns_A); rt0 = (uint16_t)rmst0;
335  at1 = (int32_t)(avet1+time1_ns_A); rt1 = (uint16_t)rmst1;
336  vmanip(tx[ip],&avex,&rmsx);
337  vmanip(ty[ip],&avey,&rmsy);
338  vmanip(tz[ip],&avez,&rmsz);
339  totpe=std::accumulate(pe[ip].begin(), pe[ip].end(), 0.0);
340  CRTavehit aveHit = fillme(at0,rt0,at1,rt1,avex,rmsx,avey,rmsy,avez,rmsz,totpe,ip,"");
341  aveHits[ip] = aveHit;
342  }
343  else {
344  CRTavehit aveHit = fillme(0,0,0,0,-99999,-99999,-99999,-99999,-99999,-99999,-99999,ip,"");
345  aveHits[ip] = aveHit;
346  }
347  }
348 
349  // find pairs of hits in different planes
350  for (size_t ah = 0; ah< 6; ++ah){
351  CRTavehit Ahit = aveHits[ah];
352  if( Ahit.x_pos==-99999 ) continue;
353 
354  for (size_t bh = ah+1; bh< 7; ++bh){
355  if ( aveHits[bh].x_pos==-99999 ) continue;
356 
357  if (ah!=bh && !(ah==3&&bh==4)) { // make a track
358  CRTavehit Bhit = aveHits[bh];
359  sbn::crt::CRTTrack CRTcanTrack=shcut(Ahit,Bhit,time_s_A,time_s_err);
360  CRTTrackCol->emplace_back(CRTcanTrack);
361  nTrack++;
362  }
363 
364  }
365 
366  }
367 
368  }
369 
370  }// loop over tzeros
371  }//uBooNE method
372  */
373  //store track collection into event
374  if(fStoreTrack == 1){
375  evt.put(std::move(CRTTrackCol));
376  evt.put(std::move(Trackassn));
377  }
378  mf::LogInfo("CRTTrackProducer")
379  <<"Number of tracks = "<<nTrack<<"\n"
380  <<"Number of complete tracks = "<<nCompTrack<<"\n"
381  <<"Number of incomplete tracks = "<<nIncTrack;
382 
383  } // CRTTrackProducer::produce()
384 
386  {
387  } // CRTTrackProducer::beginJob()
388 
390  {
391  } // CRTTrackProducer::endJob()
392 
393  // Function to calculate the mean and rms from a vector of values
394  void vmanip(std::vector<float> v, float* ave, float* rms)
395  {
396  *ave=0.0; *rms =0.0;
397  if (v.size()>0) {
398  // find the mean and *rms of all the vector elements
399  double sum = std::accumulate(v.begin(), v.end(), 0.0);
400  double mean = sum / v.size();
401  *ave=mean;
402 
403  if (v.size()>1) {
404  double sq_sum = std::inner_product(v.begin(), v.end(), v.begin(), 0.0);
405  double stdev = std::sqrt(sq_sum / v.size() - mean * mean);
406  *rms=stdev;
407  }
408  }
409  } // vmanip()
410 
411  // Function to make creating average crt hits easier
412  CRTavehit fillme(uint32_t ts0_ns, uint16_t ts0_ns_err, int32_t ts1_ns, uint16_t ts1_ns_err,
413  float x_pos, float x_err, float y_pos, float y_err, float z_pos, float z_err,
414  float pe, int plane, string tagger)
415  {
416  CRTavehit h;
417  h.ts0_ns = ts0_ns;
418  h.ts0_ns_err = ts0_ns_err;
419  h.ts1_ns = ts1_ns;
420  h.ts1_ns_err = ts1_ns_err;
421 
422  h.x_pos = x_pos;
423  h.x_err = x_err;
424  h.y_pos = y_pos;
425  h.y_err = y_err;
426  h.z_pos = z_pos;
427  h.z_err = z_err;
428  h.pe = pe;
429  h.plane = plane;
430  h.tagger = tagger;
431  return(h);
432  } // fillme()
433 
434  // Function to copy average CRT hits
436  {
437  CRTavehit h;
438  h.ts0_ns = myhit.ts0_ns;
439  h.ts0_ns_err = 0;
440  h.ts1_ns = myhit.ts1_ns;;
441  h.ts1_ns_err = 0;
442  h.x_pos = myhit.x_pos;
443  h.x_err = myhit.x_err;
444  h.y_pos = myhit.y_pos;
445  h.y_err = myhit.y_err;
446  h.z_pos = myhit.z_pos;
447  h.z_err = myhit.z_err;
448  h.pe = myhit.peshit;
449  h.plane = myhit.plane;
450  h.tagger = myhit.tagger;
451  return(h);
452  } // copyme()
453 
454  // Function to make CRTTrack
455  sbn::crt::CRTTrack shcut(CRTavehit ppA, CRTavehit ppB, uint32_t time0s, uint16_t terr)
456  {
457  sbn::crt::CRTTrack newtr;
458  newtr.ts0_s = time0s;
459  newtr.ts0_s_err = terr;
460  newtr.ts0_ns_h1 = ppA.ts0_ns;
461  newtr.ts0_ns_err_h1 = ppA.ts0_ns_err;
462  newtr.ts0_ns_h2 = ppB.ts0_ns;
463  newtr.ts0_ns_err_h2 = ppB.ts0_ns_err;
464  newtr.ts0_ns = (uint32_t)(0.5*(ppA.ts0_ns+ppB.ts0_ns));
465  newtr.ts0_ns_err = (uint16_t)(0.5*sqrt(ppA.ts0_ns_err*ppA.ts0_ns_err+ppB.ts0_ns_err*ppB.ts0_ns_err));
466  newtr.ts1_ns = (int32_t)(0.5*(ppA.ts1_ns+ppB.ts1_ns));
467  newtr.ts1_ns_err = (uint16_t)(0.5*sqrt(ppA.ts0_ns_err*ppA.ts0_ns_err+ppB.ts0_ns_err*ppB.ts0_ns_err));
468  newtr.peshit = ppA.pe+ppB.pe;
469  newtr.x1_pos = ppA.x_pos;
470  newtr.x1_err = ppA.x_err;
471  newtr.y1_pos = ppA.y_pos;
472  newtr.y1_err = ppA.y_err;
473  newtr.z1_pos = ppA.z_pos;
474  newtr.z1_err = ppA.z_err;
475  newtr.x2_pos = ppB.x_pos;
476  newtr.x2_err = ppB.x_err;
477  newtr.y2_pos = ppB.y_pos;
478  newtr.y2_err = ppB.y_err;
479  newtr.z2_pos = ppB.z_pos;
480  newtr.z2_err = ppB.z_err;
481  float deltax = ppA.x_pos-ppB.x_pos;
482  float deltay = ppA.y_pos-ppB.y_pos;
483  float deltaz = ppA.z_pos-ppB.z_pos;
484  newtr.length = sqrt(deltax*deltax+deltay*deltay+deltaz*deltaz);
485  newtr.thetaxy = atan2(deltax,deltay);
486  newtr.phizy = atan2(deltaz,deltay);
487  newtr.plane1 = ppA.plane;
488  newtr.plane2 = ppB.plane;
489 
490  return(newtr);
491 
492  } // shcut()
493 
494  DEFINE_ART_MODULE(CRTTrackProducer)
495 
496 }// namespace crt
497 }// namespace icarus
float z_err
position uncertainty in z-direction (cm).
Definition: CRTHit.hh:43
float x_err
position uncertainty in x-direction (cm).
Definition: CRTHit.hh:39
double ts0_ns_err_h2
T0 time error of second CRTHit.
Definition: CRTTrack.hh:51
double ts1_ns_err
Error on average T1 (nanosecond) of the two hits making the track.
Definition: CRTTrack.hh:29
double ts0_s
Average time (second) of the two hits making the track.
Definition: CRTTrack.hh:24
double ts1_ns
Timestamp T1 ([signal time w.r.t. Trigger time]), in UTC absolute time scale in nanoseconds from the ...
Definition: CRTHit.hh:34
double ts0_ns_err
Error on average T0 (nanosecond) of the two hits making the track.
Definition: CRTTrack.hh:27
int plane
Name of the CRT wall (in the form of numbers).
Definition: CRTHit.hh:36
float peshit
Total photo-electron (PE) in a crt hit.
Definition: CRTHit.hh:27
float y_err
position uncertainty in y-direction (cm).
Definition: CRTHit.hh:41
pdgs p
Definition: selectors.fcl:22
double ts0_s_err
Average time (second) spread of the two hits making the track.
Definition: CRTTrack.hh:25
sbn::crt::CRTTrack shcut(CRTavehit ppA, CRTavehit ppb, uint32_t time0s, uint16_t terr)
float x1_pos
X position of first CRTHit.
Definition: CRTTrack.hh:33
float y1_err
Y position error of first CRTHit.
Definition: CRTTrack.hh:36
BEGIN_PROLOG g
vector< vector< art::Ptr< sbn::crt::CRTHit > > > CreateCRTTzeros(vector< art::Ptr< sbn::crt::CRTHit >>)
struct icarus::crt::CRTavehit tempah
double ts0_ns_h1
T0 time of first CRTHit.
Definition: CRTTrack.hh:48
process_name gaushit a
CRTavehit copyme(sbn::crt::CRTHit myhit)
while getopts h
void vmanip(vector< float > v, float *ave, float *rms)
CRTTrackProducer & operator=(CRTTrackProducer const &)=delete
float z_pos
position in z-direction (cm).
Definition: CRTHit.hh:42
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:265
double ts0_ns
Timestamp T0 (from White Rabbit), in UTC absolute time scale in nanoseconds from the Epoch...
Definition: CRTHit.hh:32
float z1_err
Z position error of first CRTHit.
Definition: CRTTrack.hh:38
float y2_err
Y position error of second CRTHit.
Definition: CRTTrack.hh:42
double ts1_ns
Average T1 (nanosecond) of the two hits making the track.
Definition: CRTTrack.hh:28
CRTavehit fillme(uint32_t i, uint16_t j, int32_t k, uint16_t l, float a, float b, float c, float d, float e, float f, float g, int p, string t)
float length
Track length.
Definition: CRTTrack.hh:45
double ts0_ns
Average T0 (nanosecond) of the two hits making the track.
Definition: CRTTrack.hh:26
float peshit
Total photoelectrons for this track (sum of PEs from the two CRTHits)
Definition: CRTTrack.hh:23
vector< pair< sbn::crt::CRTHit, vector< int > > > AverageHits(vector< art::Ptr< sbn::crt::CRTHit >> hits, map< art::Ptr< sbn::crt::CRTHit >, int > hitIds)
double ts0_ns_err_h1
T0 time error of first CRTHit.
Definition: CRTTrack.hh:49
float z1_pos
Z position of first CRTHit.
Definition: CRTTrack.hh:37
double ts0_ns_h2
T0 time of second CRTHit.
Definition: CRTTrack.hh:50
float y_pos
position in y-direction (cm).
Definition: CRTHit.hh:40
double mean(const std::vector< short > &wf, size_t start, size_t nsample)
Definition: UtilFunc.cxx:13
float phizy
Track angle on the Z-Y plane.
Definition: CRTTrack.hh:47
int plane1
Plane ID of first CRTHit.
Definition: CRTTrack.hh:30
float z2_pos
Z position of second CRTHit.
Definition: CRTTrack.hh:43
float x_pos
position in x-direction (cm).
Definition: CRTHit.hh:38
float y2_pos
Y position of second CRTHit.
Definition: CRTTrack.hh:41
float y1_pos
Y position of first CRTHit.
Definition: CRTTrack.hh:35
do i e
float x2_pos
X position of second CRTHit.
Definition: CRTTrack.hh:39
vector< pair< sbn::crt::CRTTrack, vector< int > > > CreateTracks(vector< pair< sbn::crt::CRTHit, vector< int >>> hits)
TCEvent evt
Definition: DataStructs.cxx:8
pdgs k
Definition: selectors.fcl:22
float x1_err
X position error of first CRTHit.
Definition: CRTTrack.hh:34
process_name crt
std::string tagger
Name of the CRT wall (in the form of strings).
Definition: CRTHit.hh:45
int plane2
Plane ID of second CRTHit.
Definition: CRTTrack.hh:31
float z2_err
Z position error of second CRTHit.
Definition: CRTTrack.hh:44
float x2_err
X position error of second CRTHit.
Definition: CRTTrack.hh:40
float thetaxy
Track angle on the X-Y plane.
Definition: CRTTrack.hh:46