FastMonopoleTriggers.cxx
Go to the documentation of this file.
1 #include "FastMonopoleTriggers.h"
2 
3 bool zcl::FastMonopoleTriggers::is_trigger_by_epoch1_fmmtrigger(art::Handle< std::vector<rb::Cluster> > slices, int & _penetrated, double & _nSatHits, double & _meanADC){
4  bool triggered = false;
5  for (unsigned sliceIdx = 0; sliceIdx != slices->size(); ++sliceIdx) {
6  const rb::Cluster& slice = (*slices)[sliceIdx];
7  double _nxhits_slice = 0;
8  double _nyhits_slice = 0;
9  double _deltaP;
10  double _deltaTNS;
11  double PX_max = 0;
12  double PY_max = 0;
13  double PX_min = 999;
14  double PY_min = 999;
15  double TX_max = -9e7;
16  double TY_max = -9e7;
17  double TX_min = 9e9;
18  double TY_min = 9e9;
19 
20  _penetrated = 0;
21  double _trueHits = 0;
22  _nSatHits = 0;
23  _meanADC = 0;
24  //double noise_hits = 0;
25 
26  bool Intrusion = false;
27  int entry_id = -1;
28  for (unsigned i = 0; i != slice.NCell(); ++i) {
29  const art::Ptr<rb::CellHit> chit = slice.Cell(i);
30  if(chit->IsMC()==true) ++_trueHits;
31  }
32 
33  if(_trueHits==0) continue;
34  for (unsigned i = 0; i != slice.NCell(); ++i) {
35  const art::Ptr<rb::CellHit> chit = slice.Cell(i);
36  if (chit->ADC() < 501) continue;
37  if (chit->ADC() > 3100) ++_nSatHits;
38  _meanADC += chit->ADC();
39  float tns = chit->TNS();
40 
41  if (chit->View()==geo::kX) { //X view
42  ++_nxhits_slice;
43  if (PX_max < chit->Plane() ) PX_max = chit->Plane();
44  if (PX_min > chit->Plane() ) PX_min = chit->Plane();
45  if (TX_max < tns ) TX_max = tns;
46  if (TX_min > tns ) TX_min = tns;
47 
48  if (!Intrusion) {
49  if (chit->Cell() < _xdelt){
50  entry_id = 1;
51  Intrusion = true;
52  }
53  else if (chit->Cell() > _xMax - _xdelt){
54  entry_id = 2;
55  Intrusion = true;
56  }
57  }
58  else if (!_penetrated) {
59  if (chit->Cell() < _xdelt && entry_id!=1) _penetrated = 1;
60  else if (chit->Cell() > _xMax-_xdelt && entry_id!=2) _penetrated = 1;
61  }
62  }
63 
64  else { //Y view
65  ++_nyhits_slice;
66  if (PY_max < chit->Plane() ) PY_max = chit->Plane();
67  if (PY_min > chit->Plane() ) PY_min = chit->Plane();
68  if (TY_max < chit->TNS() ) TY_max = chit->TNS();
69  if (TY_min > chit->TNS() ) TY_min = chit->TNS();
70 
71  if (!Intrusion) {
72  if (chit->Cell() < _ydelt) {
73  entry_id = 3;
74  Intrusion = true;
75  }
76  else if (chit->Cell() > _yMax - _ydelt) {
77  entry_id = 4;
78  Intrusion = true;
79  }
80  }
81 
82  else if (!_penetrated) {
83  if (chit->Cell() < _ydelt && entry_id!=3) _penetrated = 1;
84  else if (chit->Cell() > _yMax-_ydelt && entry_id!=4) _penetrated = 1;
85  }
86  }
87 
88  if (!Intrusion) {
89  if (chit->Plane() < _zdelt) {
90  entry_id = 5;
91  Intrusion = true;
92  }
93  else if (chit->Plane() > _zMax - _zdelt) {
94  entry_id = 6;
95  Intrusion = true;
96  }
97  }
98  else if (!_penetrated) { //intrusion happened but not through yet
99  if (chit->Plane() < _zdelt && entry_id!=5) _penetrated=1;
100  else if (chit->Plane() > _zMax-_zdelt && entry_id!=6) _penetrated=1;
101  }
102  }
103  //Record the info
104  _meanADC = _meanADC/(_nxhits_slice+_nyhits_slice+0.);
105  _deltaP = std::min(PX_max,PY_max) - std::max(PX_min,PY_min);
106  _deltaTNS = std::min(TX_max,TY_max) - std::max(TX_min,TY_min);
107 
108  if(_trueHits>2&&_penetrated==1&&_nSatHits>4&&_meanADC>1200&&_deltaP>2&&_deltaTNS>0&&_nxhits_slice>2&&_nyhits_slice>2){
109  triggered = true;
110  return triggered;
111  }
112  }
113  _penetrated = 0;
114  _nSatHits = 0;
115  _meanADC = 0;
116  return triggered;
117 }
118 
119 
120 bool zcl::FastMonopoleTriggers::passed_epoch2_fmmtrigger(art::Handle< std::vector<rb::Cluster> > slices, int & _penetrated, double & _nSatHits, double & _meanADC){
121  bool triggered = false;
122  for (unsigned sliceIdx = 0; sliceIdx != slices->size(); ++sliceIdx) {
123  const rb::Cluster& slice = (*slices)[sliceIdx];
124  int nx = 0;
125  int ny = 0;
126  double sumADC=0;
127  // double stdevADC=0;
128  double sq_sum_ADC=0;
129  double _deltaP;
130  double _deltaTNS;
131  double PX_max = 0;
132  double PY_max = 0;
133  double PX_min = 9999;
134  double PY_min = 9999;
135  double CX_max = 0;
136  double CY_max = 0;
137  double CX_min = 9999;
138  double CY_min = 9999;
139  double TX_max = -9e7;
140  double TY_max = -9e7;
141  double TX_min = 9e9;
142  double TY_min = 9e9;
143  double _trueHits = 0;
144 
145  _penetrated = 0;
146  _nSatHits = 0;
147  _meanADC = 0;
148  //double noise_hits = 0;
149 
150  bool Intrusion = false;
151  int entry_id = -1;
152  for (unsigned i = 0; i != slice.NCell(); ++i) {
153  const art::Ptr<rb::CellHit> chit = slice.Cell(i);
154  if(chit->IsMC()==true) ++_trueHits;
155  }
156 
157  if(_trueHits==0) continue;
158  for (unsigned i = 0; i != slice.NCell(); ++i) {
159  const art::Ptr<rb::CellHit> chit = slice.Cell(i);
160  if (chit->ADC() < 501) continue;
161  if (chit->ADC() > 3100) ++_nSatHits;
162  sumADC += chit->ADC();
163  sq_sum_ADC += chit->ADC()*chit->ADC();
164  _meanADC += chit->ADC();
165  float tns = chit->TNS();
166 
167  if (chit->View()==geo::kX) { //X view
168  ++nx;
169  if (PX_max < chit->Plane() ) PX_max = chit->Plane();
170  if (PX_min > chit->Plane() ) PX_min = chit->Plane();
171  if (CX_max < chit->Cell() ) CX_max = chit->Cell();
172  if (CX_min > chit->Cell() ) CX_min = chit->Cell();
173  if (TX_max < tns ) TX_max = tns;
174  if (TX_min > tns ) TX_min = tns;
175 
176  if (!Intrusion) {
177  if (chit->Cell() < _xdelt){
178  entry_id = 1;
179  Intrusion = true;
180  }
181  else if (chit->Cell() > _xMax - _xdelt){
182  entry_id = 2;
183  Intrusion = true;
184  }
185  }
186  else if (!_penetrated) {
187  if (chit->Cell() < _xdelt && entry_id!=1) _penetrated = 1;
188  else if (chit->Cell() > _xMax-_xdelt && entry_id!=2) _penetrated = 1;
189  }
190  }
191 
192  else { //Y view
193  ++ny;
194  if (PY_max < chit->Plane() ) PY_max = chit->Plane();
195  if (PY_min > chit->Plane() ) PY_min = chit->Plane();
196  if (CY_max < chit->Cell() ) CY_max = chit->Cell();
197  if (CY_min > chit->Cell() ) CY_min = chit->Cell();
198  if (TY_max < chit->TNS() ) TY_max = chit->TNS();
199  if (TY_min > chit->TNS() ) TY_min = chit->TNS();
200 
201  if (!Intrusion) {
202  if (chit->Cell() < _ydelt) {
203  entry_id = 3;
204  Intrusion = true;
205  }
206  else if (chit->Cell() > _yMax - _ydelt) {
207  entry_id = 4;
208  Intrusion = true;
209  }
210  }
211 
212  else if (!_penetrated) {
213  if (chit->Cell() < _ydelt && entry_id!=3) _penetrated = 1;
214  else if (chit->Cell() > _yMax-_ydelt && entry_id!=4) _penetrated = 1;
215  }
216  }
217 
218  if (!Intrusion) {
219  if (chit->Plane() < _zdelt) {
220  entry_id = 5;
221  Intrusion = true;
222  }
223  else if (chit->Plane() > _zMax - _zdelt) {
224  entry_id = 6;
225  Intrusion = true;
226  }
227  }
228  else if (!_penetrated) { //intrusion happened but not through yet
229  if (chit->Plane() < _zdelt && entry_id!=5) _penetrated=1;
230  else if (chit->Plane() > _zMax-_zdelt && entry_id!=6) _penetrated=1;
231  }
232  }
233  //Record the info
234  _meanADC = _meanADC/(nx+ny+0.);
235  _deltaP = std::min(PX_max,PY_max) - std::max(PX_min,PY_min);
236  _deltaTNS = std::min(TX_max,TY_max) - std::max(TX_min,TY_min);
237 
238  if(_trueHits>2&&_penetrated==1&&_deltaP>2&&_deltaTNS>0&&nx>2&&ny>2){
239  float tracklength =Distance(CX_max, CY_max, PX_max, CX_min, CY_min, PX_min);
240  if( tracklength<80) continue;
241  if( NumberOfSurfaceHits(slice) < 22) continue;
242  if( slice.NCell()*1.0/tracklength < 0.44) continue;
243 
244  double tracklength_of_xview=Distance(CX_max, 0, PX_max, CX_min, 0, PX_min);
245  double tracklength_of_yview=Distance(0, CY_max, PY_max, 0, CY_min, PY_min);
246  double number_of_cells_per_length_xview=0;
247  double number_of_cells_per_length_yview=0;
248  double weighted_off_center_xx=0, weighted_off_center_xz=0, weighted_off_center_yy=0, weighted_off_center_yz=0;
249  double stdev_cells_per_plane_xview=0, stdev_cells_per_plane_yview=0;
250 
251  NumberOfCellsPerLength(slice, tracklength_of_xview,tracklength_of_yview,number_of_cells_per_length_xview,number_of_cells_per_length_yview, PX_max, PY_max, PX_min, PY_min);
252  if( number_of_cells_per_length_xview<0.2 || number_of_cells_per_length_yview<0.2) continue;
253 
254  //stdevADC = std::sqrt( sq_sum_ADC*1.0/(nx+ny) - sumADC*1.0/(nx+ny)*sumADC*1.0/(nx+ny));
255  StdevCellsPerPlane(slice, stdev_cells_per_plane_xview, stdev_cells_per_plane_yview, PX_max, PX_min, PY_max, PY_min );
256  if (stdev_cells_per_plane_xview > 1.25 || stdev_cells_per_plane_yview > 1.2) continue;
257  WeightedCenterCut(slice, PX_min, PX_max, PY_min, PY_max, CX_min, CX_max, CY_min, CY_max, weighted_off_center_xx, weighted_off_center_xz, weighted_off_center_yy, weighted_off_center_yz );
258  if (weighted_off_center_xz > 0.13 || weighted_off_center_yz > 0.13) continue;
259  //sumADC*1.0/(nx+ny);
260  //stdevADC;
261  //nx;
262  //ny;
263  if( NumberOfHitsInOverlapPlanesCut(slice,PX_min,PX_max,PY_min,PY_max) <= 0.45) continue;
264  triggered = true;
265  return triggered;
266  }
267  }
268  _penetrated = 0;
269  _nSatHits = 0;
270  _meanADC = 0;
271  return triggered;
272 }
273 
274 void zcl::FastMonopoleTriggers::NumberOfCellsPerLength(rb::Cluster const &hits,double tracklength_of_xview, double tracklength_of_yview, double &number_of_cells_per_length_xview,double &number_of_cells_per_length_yview, double const &PX_max, double const &PY_max, double const &PX_min, double const &PY_min) const{
275  //Maybe use hits instead of cells?
276  std::vector<std::vector<int>> x_hits_plane(PX_max-PX_min+1,std::vector<int>(0));
277  std::vector<std::vector<int>> y_hits_plane(PY_max-PY_min+1,std::vector<int>(0));
278  for (auto const hit_ptr: hits.AllCells()) {
279  const rb::CellHit hit = *hit_ptr;
280  if (hit.View() == geo::kX) {
281  //std::cout<<"X hits"<<std::endl;
282  x_hits_plane[hit.Plane()-PX_min].push_back(hit.Cell());
283  }
284  if (hit.View() == geo::kY) {
285  //std::cout<<"Y hits"<<std::endl;
286  y_hits_plane[hit.Plane()-PY_min].push_back(hit.Cell());
287  }
288  }
289  //following is to get unique number of cells hit per plane
290  std::vector<int> x_cells_plane(PX_max-PX_min+1,0);
291  std::vector<int> y_cells_plane(PY_max-PY_min+1,0);
292  for (unsigned i=0;i!=x_hits_plane.size();i++){
293  std::sort(x_hits_plane[i].begin(),x_hits_plane[i].end());
294  std::vector<int>::iterator it;
295  it = std::unique (x_hits_plane[i].begin(),x_hits_plane[i].end());
296  x_hits_plane[i].resize(std::distance(x_hits_plane[i].begin(),it));
297  x_cells_plane[i]=x_hits_plane[i].size();
298  }
299  for (unsigned i=0;i!=y_hits_plane.size();i++){
300  std::sort(y_hits_plane[i].begin(),y_hits_plane[i].end());
301  std::vector<int>::iterator it;
302  it = std::unique (y_hits_plane[i].begin(),y_hits_plane[i].end());
303  y_hits_plane[i].resize(std::distance(y_hits_plane[i].begin(),it));
304  y_cells_plane[i]=y_hits_plane[i].size();
305  }
306  //following is to get number of cells per track length in x view and y view
307  int sum_of_cells=0;
308  for (unsigned i=0;i!=x_cells_plane.size();i++){
309  sum_of_cells+=x_cells_plane[i];
310  }
311  number_of_cells_per_length_xview=sum_of_cells/tracklength_of_xview;
312  sum_of_cells=0;
313  for (unsigned i=0;i!=y_cells_plane.size();i++){
314  sum_of_cells+=y_cells_plane[i];
315  }
316  number_of_cells_per_length_yview=sum_of_cells/tracklength_of_yview;
317 
318 }
319 
321  int number_of_surface_hits=0;
322  for(unsigned i=0;i!=hits.NCell();++i){
323  if(SurfAssign(*(hits.Cell(i)))==true) number_of_surface_hits++;
324  }
325  return number_of_surface_hits;
326 }
327 
329  //Check if this is close to surface
330  if ( hit.Cell() > _xMax - _xdelt ) return true;
331  else if ( hit.Cell() < _xdelt ) return true;
332  else if ( hit.Plane() < _zdelt ) return true;
333  else if ( hit.Plane() > _zMax - _zdelt ) return true;
334 
335  return false;
336 }
337 void zcl::FastMonopoleTriggers::StdevCellsPerPlane(rb::Cluster const &hits, double &stdev_cells_per_plane_xview, double &stdev_cells_per_plane_yview, double PX_max, double PX_min, double PY_max, double PY_min ) const{
338  //fluctuation of number of cells of each plane check by Enhao
339  //I need to use cells not hits, because there might be many hits in same cell, and the cosmic shower has many different cells hits
340  //Maybe use hits instead of cells?
341  std::vector<std::vector<int>> x_hits_plane(PX_max-PX_min+1,std::vector<int>(0));
342  std::vector<std::vector<int>> y_hits_plane(PY_max-PY_min+1,std::vector<int>(0));
343  for (auto const hit_ptr: hits.AllCells()) {
344  const rb::CellHit hit = *hit_ptr;
345  if (hit.View() == geo::kX) {
346  //std::cout<<"X hits"<<std::endl;
347  x_hits_plane[hit.Plane()-PX_min].push_back(hit.Cell());
348  }
349  if (hit.View() == geo::kY) {
350  //std::cout<<"Y hits"<<std::endl;
351  y_hits_plane[hit.Plane()-PY_min].push_back(hit.Cell());
352  }
353  }
354  double sum =0;
355  double mean = 0;
356  double sq_sum = 0;
357  double stdev = 0;
358  //following is to get unique number of cells hit per plane
359  std::vector<int> x_cells_plane(PX_max-PX_min+1,0);
360  std::vector<int> y_cells_plane(PY_max-PY_min+1,0);
361  for (unsigned i=0;i!=x_hits_plane.size();i++){
362  std::sort(x_hits_plane[i].begin(),x_hits_plane[i].end());
363  std::vector<int>::iterator it;
364  it = std::unique (x_hits_plane[i].begin(),x_hits_plane[i].end());
365  x_hits_plane[i].resize(std::distance(x_hits_plane[i].begin(),it));
366  x_cells_plane[i]=x_hits_plane[i].size();
367  }
368  for (unsigned i=0;i!=y_hits_plane.size();i++){
369  std::sort(y_hits_plane[i].begin(),y_hits_plane[i].end());
370  std::vector<int>::iterator it;
371  it = std::unique (y_hits_plane[i].begin(),y_hits_plane[i].end());
372  y_hits_plane[i].resize(std::distance(y_hits_plane[i].begin(),it));
373  y_cells_plane[i]=y_hits_plane[i].size();
374  }
375  sum = std::accumulate(x_cells_plane.begin(),x_cells_plane.end(),0.0);
376  mean = sum / x_cells_plane.size();
377  sq_sum = std::inner_product(x_cells_plane.begin(),x_cells_plane.end(),x_cells_plane.begin(),0.0);
378  stdev = std::sqrt(sq_sum / x_cells_plane.size()-mean * mean);
379  // std::cout<<"x stdev is "<<stdev<<" "<<stdev/mean<<std::endl;
380  //if (stdev/mean > _stdevcellsperplane) return false;
381  stdev_cells_per_plane_xview=stdev/mean;
382  sum = std::accumulate(y_cells_plane.begin(),y_cells_plane.end(),0.0);
383  mean = sum / y_cells_plane.size();
384  sq_sum = std::inner_product(y_cells_plane.begin(),y_cells_plane.end(),y_cells_plane.begin(),0.0);
385  stdev = std::sqrt(sq_sum / y_cells_plane.size()-mean * mean);
386  stdev_cells_per_plane_yview=stdev/mean;
387  // std::cout<<"y stdev is "<<stdev<<" "<<stdev/mean<<std::endl;
388  // std::cout<<"sum of x and y stdev is "<<sum_stdev<<std::endl;
389  //if (stdev/mean > _stdevcellsperplane) return false;
390 }
391 
392 float zcl::FastMonopoleTriggers::Distance( double const &xcell1, double const &ycell1, double const &plane1,double const &xcell2, double const &ycell2 , double const &plane2) const {
393  return std::sqrt((plane1-plane2)*(plane1-plane2)*2.82072+(xcell1-xcell2)*(xcell1-xcell2)+(ycell1-ycell2)*(ycell1-ycell2));
394  //This part I should use Martin's smt::Constant::cell width, plane width
395 }
396 
397 double zcl::FastMonopoleTriggers::WeightedCenterCut(rb::Cluster const &hits,float PX_min,float PX_max,float PY_min,float PY_max,float CX_min, float CX_max, float CY_min, float CY_max, double &weighted_off_center_xx,double &weighted_off_center_xz,double &weighted_off_center_yy,double &weighted_off_center_yz ) const{
398  float Weighted_PX_Center=0.5,Weighted_CX_Center=0.5,Weighted_PY_Center=0.5,Weighted_CY_Center=0.5,SumOfXHitsADC=0,SumOfYHitsADC=0;
399  for (auto const hit_ptr: hits.AllCells()) {
400  const rb::CellHit hit = *hit_ptr;
401  if (hit.View() == geo::kX) {
402  SumOfXHitsADC+=hit.ADC();
403  Weighted_PX_Center+=hit.ADC()*(hit.Plane()-PX_min);
404  Weighted_CX_Center+=hit.ADC()*(hit.Cell()-CX_min);
405  }
406  if (hit.View() == geo::kY) {
407  SumOfYHitsADC+=hit.ADC();
408  Weighted_PY_Center+=hit.ADC()*(hit.Plane()-PY_min);
409  Weighted_CY_Center+=hit.ADC()*(hit.Cell()-CY_min);
410  }
411  }
412  if(PX_max!=PX_min) Weighted_PX_Center=Weighted_PX_Center/SumOfXHitsADC/(PX_max-PX_min);
413  if(PY_max!=PY_min) Weighted_PY_Center=Weighted_PY_Center/SumOfYHitsADC/(PY_max-PY_min);
414  if(CX_max!=CX_min) Weighted_CX_Center=Weighted_CX_Center/SumOfXHitsADC/(CX_max-CX_min);
415  if(CY_max!=CY_min) Weighted_CY_Center=Weighted_CY_Center/SumOfYHitsADC/(CY_max-CY_min);
416  // std::cout<<"weighted px, py, cx, cy center is "<<Weighted_PX_Center<<" "<<Weighted_PY_Center<<" "<<Weighted_CX_Center<<" "<<Weighted_CY_Center<<std::endl;
417  // if(std::abs(Weighted_PX_Center-0.5)>_MaxOffCenter||std::abs(Weighted_PY_Center-0.5)>_MaxOffCenter||std::abs(Weighted_CX_Center-0.5)>_MaxOffCenter||std::abs(Weighted_CY_Center-0.5)>_MaxOffCenter) return false;
418  //else return true;
419  weighted_off_center_xx=std::abs(Weighted_CX_Center-0.5);
420  weighted_off_center_xz=std::abs(Weighted_PX_Center-0.5);
421  weighted_off_center_yy=std::abs(Weighted_CY_Center-0.5);
422  weighted_off_center_yz=std::abs(Weighted_PY_Center-0.5);
423  return std::max(std::max(std::abs(Weighted_PX_Center-0.5),std::abs(Weighted_PY_Center-0.5)),std::max(std::abs(Weighted_CX_Center-0.5),std::abs(Weighted_CY_Center-0.5)));
424 }
425 
426 double zcl::FastMonopoleTriggers::NumberOfHitsInOverlapPlanesCut(rb::Cluster const &hits,float PX_min,float PX_max,float PY_min,float PY_max ) const{
427  int max=std::min(PX_max,PY_max);
428  int min=std::max(PX_min,PY_min);
429  double number_hits_in_overlap_planes=0;
430  for (auto const hit_ptr: hits.AllCells()) {
431  const rb::CellHit hit = *hit_ptr;
432  if(hit.Plane()<=max && hit.Plane()>=min) number_hits_in_overlap_planes++;
433  }
434 
435  return number_hits_in_overlap_planes/hits.NCell();
436 
437 }
int NumberOfSurfaceHits(rb::Cluster const &hits) const
float TNS() const
Definition: CellHit.h:46
T max(const caf::Proxy< T > &a, T b)
void StdevCellsPerPlane(rb::Cluster const &hits, double &stdev_cells_per_plane_xview, double &stdev_cells_per_plane_yview, double PX_max, double PX_min, double PY_max, double PY_min) const
def stdev(lst)
Definition: HandyFuncs.py:286
unsigned int NCell(geo::View_t view) const
Number of cells in view view.
Definition: Cluster.cxx:134
set< int >::iterator it
unsigned short Plane() const
Definition: CellHit.h:39
geo::View_t View() const
Definition: CellHit.h:41
T sqrt(T number)
Definition: d0nt_math.hpp:156
Vertical planes which measure X.
Definition: PlaneGeo.h:28
A collection of associated CellHits.
Definition: Cluster.h:47
double NumberOfHitsInOverlapPlanesCut(rb::Cluster const &hits, float PX_min, float PX_max, float PY_min, float PY_max) const
float Distance(double const &xcell1, double const &ycell1, double const &plane1, double const &xcell2, double const &ycell2, double const &plane2) const
unsigned distance(const T &t1, const T &t2)
bool SurfAssign(rb::CellHit const &hit) const
float abs(float number)
Definition: d0nt_math.hpp:39
Horizontal planes which measure Y.
Definition: PlaneGeo.h:29
art::PtrVector< rb::CellHit > AllCells() const
Get all cells from both views.
Definition: Cluster.cxx:180
unsigned short Cell() const
Definition: CellHit.h:40
double WeightedCenterCut(rb::Cluster const &hits, float PX_min, float PX_max, float PY_min, float PY_max, float CX_min, float CX_max, float CY_min, float CY_max, double &weighted_off_center_xx, double &weighted_off_center_xz, double &weighted_off_center_yy, double &weighted_off_center_yz) const
void hits()
Definition: readHits.C:15
bool IsMC() const
Definition: RawDigit.h:108
static float min(const float a, const float b, const float c)
Definition: absgeo.cxx:45
art::Ptr< rb::CellHit > Cell(geo::View_t view, unsigned int viewIdx) const
Get the ith cell from view view.
Definition: Cluster.cxx:145
A rawdata::RawDigit with channel information decoded.
Definition: CellHit.h:27
int16_t ADC(uint32_t i) const
Definition: RawDigit.cxx:58
Definition: structs.h:12
T min(const caf::Proxy< T > &a, T b)
Double_t sum
Definition: plot.C:31
bool is_trigger_by_epoch1_fmmtrigger(art::Handle< std::vector< rb::Cluster > > slices, int &_penetrated, double &_nSatHits, double &_meanADC)
T max(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
Definition: statistics.h:68
bool passed_epoch2_fmmtrigger(art::Handle< std::vector< rb::Cluster > > slices, int &_penetrated, double &_nSatHits, double &_meanADC)
void NumberOfCellsPerLength(rb::Cluster const &hits, double tracklength_of_xview, double tracklength_of_yview, double &number_of_cells_per_length_xview, double &number_of_cells_per_length_yview, double const &PX_max, double const &PY_max, double const &PX_min, double const &PY_min) const