JMShower.cxx
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 /// \brief TODO
3 /// \author bianjm@umn.physics.edu
4 ///////////////////////////////////////////////////////////////////////
6 #include "Geometry/Geometry.h"
9 
10 namespace jmshower
11 {
12  //......................................................................
14  int id,
15  double length)
16  : rb::Shower(prong,
17  id,
18  length)
19  {
20  }
21 
22  //..................................................................
23  void JMShower::SetWindowSize(unsigned int nplane)
24  {
25  for(unsigned int i =0; i<20;i++){
26  fANN[i]=-5;
27  }
28  for(unsigned int i = 0;i<nplane;i++) {
29  fPlaneDedx.push_back(0);
30  fPlaneRadius.push_back(0);
31  fPlaneProbE.push_back(-99);
32  fPlaneProbEqe.push_back(-99);
33  fPlaneProbEres.push_back(-99);
34  fPlaneProbEdis.push_back(-99);
35  fPlaneProbEcoh.push_back(-99);
36  fPlaneProbG.push_back(-99);
37  fPlaneProbMu.push_back(-99);
38  fPlaneProbPi0.push_back(-99);
39  fPlaneProbHad.push_back(-99);
40  fPlaneProbProton.push_back(-99);
41  fPlaneProbNuetron.push_back(-99);
42  fPlaneProbPion.push_back(-99);
43  TVector3 plhitxyz(0,0,0);
44  fPlaneHitXYZ.push_back(plhitxyz);
45  fPlaneE1Cell.push_back(-1);
46  fPlaneE2Cell.push_back(-1);
47  fPlaneCentroidCell.push_back(-1);
48  fPlaneHitCell.push_back(0);
49 
50  }
51  }
52 
53  void JMShower::SetHitColSize(unsigned int ncell)
54  {
55  for(unsigned int i = 0;i<ncell;i++) {
56  fHitDistCol.push_back(0);
57  fHitDeconvECol.push_back(0);
58  fHitSumECol.push_back(0);
59  }
60  }
61 
62  void JMShower::SetStop(TVector3 stop)
63  {
64  fStop = stop;
65  }
66 
67  TVector3 JMShower::Stop() const
68  {
69  return fStop;
70  }
71 
72  void JMShower::SetHitDist(unsigned int cell, double dist)
73  {
75  }
76 
77  double JMShower::HitDist(unsigned int cell) const
78  {
79  return fHitDistCol[cell];
80  }
81 
82  void JMShower::SetHitDeconvE(unsigned int cell, double deconve)
83  {
84  fHitDeconvECol[cell] = deconve;
85  }
86 
87  double JMShower::HitDeconvE(unsigned int cell) const
88  {
89  return fHitDeconvECol[cell];
90  }
91 
92 
93  void JMShower::SetHitSumE(unsigned int cell, double sume)
94  {
95  fHitSumECol[cell] = sume;
96  }
97 
98  double JMShower::HitSumE(unsigned int cell) const
99  {
100  return fHitSumECol[cell];
101  }
102 
103 
104  void JMShower::SetIsFiducial(bool isfiducial)
105  {
106  fIsFiducial = isfiducial;
107  }
108  bool JMShower::IsFiducial() const
109  {
110  return fIsFiducial;
111  }
112 
113  void JMShower::SetDistToEdge(double disttoedge)
114  {
115  fDistToEdge = disttoedge;
116  }
117  double JMShower::DistToEdge() const
118  {
119  return fDistToEdge;
120  }
121 
122 
123  void JMShower::SetDepositEnergy(double depositenergy)
124  {
125  fDepositEnergy = depositenergy;
126  }
127  double JMShower::DepositEnergy() const
128  {
129  return fDepositEnergy;
130  }
131 
132  void JMShower::SetExclEnergy(double exclenergy)
133  {
134  fExclEnergy = exclenergy;
135  }
136  double JMShower::ExclEnergy() const
137  {
138  return fExclEnergy;
139  }
140 
141 
142 
144  {
145  fEnergy = energy;
146  }
147  double JMShower::Energy() const
148  {
149  return fEnergy;
150  }
151 
152  void JMShower::SetVtxGeV(double gev)
153  {
154  fVtxGeV = gev;
155  }
156  double JMShower::VtxGeV() const
157  {
158  return fVtxGeV;
159  }
160 
161  void JMShower::SetVtxCenterGeV(double gev)
162  {
163  fVtxCenterGeV = gev;
164  }
166  {
167  fVtxCenterGeV5cell = gev;
168  }
170  {
171  fVtxCenterGeV10cell = gev;
172  }
174  {
175  fVtxCenterGeV15cell = gev;
176  }
178  {
179  fVtxCenterGeV20cell = gev;
180  }
181 
182 
183  double JMShower::VtxCenterGeV() const
184  {
185  return fVtxCenterGeV;
186  }
188  {
189  return fVtxCenterGeV5cell;
190  }
192  {
193  return fVtxCenterGeV10cell;
194  }
196  {
197  return fVtxCenterGeV15cell;
198  }
200  {
201  return fVtxCenterGeV20cell;
202  }
203 
204  void JMShower::SetPi0Mgg(double pi0mass)
205  {
206  fPi0Mgg = pi0mass;
207  }
208  double JMShower::Pi0Mgg() const
209  {
210  return fPi0Mgg;
211  }
212 
213  void JMShower::SetPi0G2ID(int id)
214  {
215  fPi0G2ID = id;
216  }
217  int JMShower::Pi0G2ID() const
218  {
219  return fPi0G2ID;
220  }
221 
223  {
224  fTheta = theta;
225  }
226  double JMShower::Theta() const
227  {
228  return fTheta;
229  }
230 
231 
232  void JMShower::SetTrkGeV(double gev)
233  {
234  fTrkGeV = gev;
235  }
236  double JMShower::TrkGeV() const
237  {
238  return fTrkGeV;
239  }
240 
241  void JMShower::SetSliceGeV(double gev)
242  {
243  fSliceGeV = gev;
244  }
245  double JMShower::SliceGeV() const
246  {
247  return fSliceGeV;
248  }
249 
250  void JMShower::SetSliceEtot(double etot)
251  {
252  fSliceEtot = etot;
253  }
254  double JMShower::SliceEtot() const
255  {
256  return fSliceEtot;
257  }
258 
259  void JMShower::SetNueEnergy(double nueenergy)
260  {
261  fNueEnergy = nueenergy;
262  }
263  double JMShower::NueEnergy() const
264  {
265  return fNueEnergy;
266  }
267 
268 
270  {
271  fSliceEdge10GeV = gev;
272  }
274  {
275  return fSliceEdge10GeV;
276  }
277 
278  void JMShower::SetSliceEdge5GeV(double gev)
279  {
280  fSliceEdge5GeV = gev;
281  }
282  double JMShower::SliceEdge5GeV() const
283  {
284  return fSliceEdge5GeV;
285  }
286 
287  void JMShower::SetSliceEdge2GeV(double gev)
288  {
289  fSliceEdge2GeV = gev;
290  }
291  double JMShower::SliceEdge2GeV() const
292  {
293  return fSliceEdge2GeV;
294  }
295 
296 
298  {
299  fNCellToEdge = nce;
300  }
302  {
303  return fNCellToEdge;
304  }
305 
306  void JMShower::SetClosetEdge(int edge)
307  {
308  fClosetEdge = edge;
309  }
310 
312  {
313  return fClosetEdge;
314  }
315 
316 
317  void JMShower::SetEdge20GeV(double gev)
318  {
319  fEdge20GeV = gev;
320  }
321  double JMShower::Edge20GeV() const
322  {
323  return fEdge20GeV;
324  }
325  void JMShower::SetEdge15GeV(double gev)
326  {
327  fEdge15GeV = gev;
328  }
329 
330  double JMShower::Edge15GeV() const
331  {
332  return fEdge15GeV;
333  }
334 
335  void JMShower::SetEdge10GeV(double gev)
336  {
337  fEdge10GeV = gev;
338  }
339 
340  double JMShower::Edge10GeV() const
341  {
342  return fEdge10GeV;
343  }
344 
345  void JMShower::SetEdge5GeV(double gev)
346  {
347  fEdge5GeV = gev;
348  }
349  double JMShower::Edge5GeV() const
350  {
351  return fEdge5GeV;
352  }
353 
354  void JMShower::SetEdge2GeV(double gev)
355  {
356  fEdge2GeV = gev;
357  }
358  double JMShower::Edge2GeV() const
359  {
360  return fEdge2GeV;
361  }
362 
363  void JMShower::SetSliceExclGeV(double gev)
364  {
365  fSliceExclGeV = gev;
366  }
367  double JMShower::SliceExclGeV() const
368  {
369  return fSliceExclGeV;
370  }
371 
373  {
374  fRadius = radius;
375  }
376  double JMShower::Radius() const
377  {
378  return fRadius;
379  }
380 
381  void JMShower::SetSumDRadius(double dradius)
382  {
383  fSumDRadius = dradius;
384  }
385  double JMShower::SumDRadius() const
386  {
387  return fSumDRadius;
388  }
389 
390  void JMShower::SetSum10DRadius(double dradius)
391  {
392  fSum10DRadius = dradius;
393  }
394  double JMShower::Sum10DRadius() const
395  {
396  return fSum10DRadius;
397  }
398 
399  void JMShower::SetBackTag(bool backtag)
400  {
401  fBackTag = backtag;
402  }
403 
404  bool JMShower::BackTag() const
405  {
406  return fBackTag;
407  }
408 
409 
410  void JMShower::SetGap(double gap)
411  {
412  fGap = gap;
413  }
414 
415  double JMShower::Gap() const
416  {
417  return fGap;
418  }
419 
420  void JMShower::SetContGap(double gap)
421  {
422  fContGap = gap;
423  }
424 
425  double JMShower::ContGap() const
426  {
427  return fContGap;
428  }
429 
430  void JMShower::SetVtxDoca(double vtxdoca)
431  {
432  fVtxDoca = vtxdoca;
433  }
434 
435  double JMShower::VtxDoca() const
436  {
437  return fVtxDoca;
438  }
439 
440 
441  void JMShower::SetCentroid(TVector3 centroid)
442  {
443  fCentroid = centroid;
444  }
445  TVector3 JMShower::Centroid() const
446  {
447  return fCentroid;
448  }
449 
450  void JMShower::SetStartPlane(unsigned int startplane)
451  {
452  fStartPlane = startplane;
453  }
454  unsigned int JMShower::StartPlane() const
455  {
456  return fStartPlane;
457  }
458 
459  void JMShower::SetStopPlane(unsigned int stopplane)
460  {
461  fStopPlane = stopplane;
462  }
463  unsigned int JMShower::StopPlane() const
464  {
465  return fStopPlane;
466  }
467 
468  void JMShower::SetNPlane(unsigned int nplane)
469  {
470  fNPlane = nplane;
471  }
472  unsigned int JMShower::NPlane() const
473  {
474  return fNPlane;
475  }
476 
477  void JMShower::SetXNPlane(unsigned int xnplane)
478  {
479  fXNPlane = xnplane;
480  }
481  unsigned int JMShower::XNPlane() const
482  {
483  return fXNPlane;
484  }
485 
486  void JMShower::SetYNPlane(unsigned int ynplane)
487  {
488  fYNPlane = ynplane;
489  }
490  unsigned int JMShower::YNPlane() const
491  {
492  return fYNPlane;
493  }
494 
495 
496  void JMShower::SetXMinPlane(unsigned int xminplane)
497  {
498  fXMinPlane = xminplane;
499  }
500  unsigned int JMShower::XMinPlane() const
501  {
502  return fXMinPlane;
503  }
504 
505  void JMShower::SetYMinPlane(unsigned int yminplane)
506  {
507  fYMinPlane = yminplane;
508  }
509  unsigned int JMShower::YMinPlane() const
510  {
511  return fYMinPlane;
512  }
513 
514 
515  void JMShower::SetXMaxPlane(unsigned int xmaxlane)
516  {
517  fXMaxPlane = xmaxlane;
518  }
519  unsigned int JMShower::XMaxPlane() const
520  {
521  return fXMaxPlane;
522  }
523 
524  void JMShower::SetYMaxPlane(unsigned int ymaxlane)
525  {
526  fYMaxPlane = ymaxlane;
527  }
528  unsigned int JMShower::YMaxPlane() const
529  {
530  return fYMaxPlane;
531  }
532 
533 
534  void JMShower::SetPlaneHitXYZ(unsigned int plane, TVector3 xyz)
535  {
536  if(plane>=JMShower::NPlane())return;
537 // if(plane>=200)return;
538  fPlaneHitXYZ[plane] = xyz;
539  }
540 
541  TVector3 JMShower::PlaneHitXYZ(unsigned int plane) const
542  {
543 // if(plane>=200)return 0;
544  if(plane>=JMShower::NPlane()){
545  TVector3 p3null(0,0,0);
546  return p3null;
547  }
548  return fPlaneHitXYZ[plane];
549  }
550 
551 
552  void JMShower::SetPlaneHitCell(unsigned int plane, unsigned int cell)
553  {
554  if(plane>=JMShower::NPlane())return;
556  }
557  unsigned int JMShower::PlaneHitCell(unsigned int plane) const
558  {
559  if(plane>=JMShower::NPlane())return 0;
560  return fPlaneHitCell[plane];
561  }
562 
563  void JMShower::SetPlaneE1Cell(unsigned int plane, int cell)
564  {
565  if(plane>=JMShower::NPlane())return;
567  }
568 
569  int JMShower::PlaneE1Cell(unsigned int plane) const
570  {
571  if(plane>=JMShower::NPlane())return 0;
572  return fPlaneE1Cell[plane];
573  }
574 
575  void JMShower::SetPlaneE2Cell(unsigned int plane, int cell)
576  {
577  if(plane>=JMShower::NPlane())return;
579  }
580 
581  int JMShower::PlaneE2Cell(unsigned int plane) const
582  {
583  if(plane>=JMShower::NPlane())return 0;
584  return fPlaneE2Cell[plane];
585  }
586 
587  void JMShower::SetPlaneCentroidCell(unsigned int plane, int cell)
588  {
589  if(plane>=JMShower::NPlane())return;
591  }
592 
593  int JMShower::PlaneCentroidCell(unsigned int plane) const
594  {
595  if(plane>=JMShower::NPlane())return 0;
596  return fPlaneCentroidCell[plane];
597  }
598 
599  void JMShower::SetPlaneDedx(unsigned int plane, double planededx)
600  {
601  if(plane>=JMShower::NPlane())return;
602  fPlaneDedx[plane] = planededx;
603  }
604 
605  double JMShower::PlaneDedx(unsigned int plane) const
606  {
607 // if(plane>=200)return 0;
608  if(plane>=JMShower::NPlane())return 0;
609  return fPlaneDedx[plane];
610  }
611 
612  void JMShower::SetPlaneRadius(unsigned int plane, double planerad)
613  {
614  if(plane>=JMShower::NPlane())return;
615 // if(plane>=200)return;
616  fPlaneRadius[plane] = planerad;
617  }
618 
619  double JMShower::PlaneRadius(unsigned int plane) const
620  {
621 // if(plane>=200)return 0;
622  if(plane>=JMShower::NPlane())return 0;
623  return fPlaneRadius[plane];
624  }
625 
626  void JMShower::SetPlaneProb(unsigned int plane, double planeprob, int type)
627  {
628 
629  if(plane>=JMShower::NPlane())return;
630 
631  if(type==0)fPlaneProbE[plane] = planeprob;
632  if(type==1)fPlaneProbG[plane] = planeprob;
633  if(type==2)fPlaneProbMu[plane] = planeprob;
634  if(type==3)fPlaneProbPi0[plane] = planeprob;
635  if(type==4)fPlaneProbHad[plane] = planeprob;
636  if(type==5)fPlaneProbProton[plane] = planeprob;
637  if(type==6)fPlaneProbNuetron[plane] = planeprob;
638  if(type==7)fPlaneProbPion[plane] = planeprob;
639  if(type==8)fPlaneProbEqe[plane] = planeprob;
640  if(type==9)fPlaneProbEres[plane] = planeprob;
641  if(type==10)fPlaneProbEdis[plane] = planeprob;
642  if(type==11)fPlaneProbEcoh[plane] = planeprob;
643 
644  return;
645  }
646 
647  double JMShower::PlaneProb(unsigned int plane, int type) const
648  {
649  if(plane>=JMShower::NPlane()) return -99;
650  if(type==0)return fPlaneProbE[plane];
651  if(type==1)return fPlaneProbG[plane];
652  if(type==2)return fPlaneProbMu[plane];
653  if(type==3)return fPlaneProbPi0[plane];
654  if(type==4)return fPlaneProbHad[plane];
655  if(type==5)return fPlaneProbProton[plane];
656  if(type==6)return fPlaneProbNuetron[plane];
657  if(type==7)return fPlaneProbPion[plane];
658  if(type==8)fPlaneProbEqe[plane];
659  if(type==9)fPlaneProbEres[plane];
660  if(type==10)fPlaneProbEdis[plane];
661  if(type==11)fPlaneProbEcoh[plane];
662  return -9999;
663  }
664 
665 
666  void JMShower::SetDedxLongLL(double dedxlongll, int type)
667  {
668  if(type>=20) return;
669  fDedxLongLL[type] = dedxlongll;
670  }
671 
672  double JMShower::DedxLongLL(int type) const
673  {
674  if(type>=20)return -9999;
675  return fDedxLongLL[type];
676  }
677 
678  void JMShower::SetDedxInvLongLL(double dedxlongll, int type)
679  {
680  if(type>=20) return;
681  fDedxInvLongLL[type] = dedxlongll;
682  }
683 
684  double JMShower::DedxInvLongLL(int type) const
685  {
686  if(type>=20)return -9999;
687  return fDedxInvLongLL[type];
688  }
689 
690  void JMShower::SetCellTransDedx(unsigned int tcell,double celldedx)
691  {
692  if(tcell>=20)return;
693  fCelltransDedx[tcell] = celldedx;
694  }
695 
696  double JMShower::CellTransDedx(unsigned int tcell) const
697  {
698  if(tcell>=20)return 0;
699  return fCelltransDedx[tcell];
700  }
701 
702 
703  void JMShower::SetDedxTransLL(double dedxtransll, int type)
704  {
705  if(type>=20) return;
706  fDedxTransLL[type] = dedxtransll;
707  }
708  double JMShower::DedxTransLL(int type) const
709  {
710  if(type>=20)return -9999;
711  return fDedxTransLL[type];
712  }
713 
714  void JMShower::SetIsMuon(bool ismuon)
715  {
716  fIsMuon = ismuon;
717  }
718 
719  bool JMShower::IsMuon() const
720  {
721  return fIsMuon;
722  }
723 
724  void JMShower::SetIsInvPhoton(bool isinvphoton)
725  {
726  fIsInvPhoton = isinvphoton;
727  }
728 
730  {
731  return fIsInvPhoton;
732  }
733 
734 
735  void JMShower::SetNMIPPlane(int nmipplane)
736  {
737  fNMIPPlane = nmipplane;
738  }
740  {
741  return fNMIPPlane;
742  }
743 
744  void JMShower::SetISlice(unsigned int islice)
745  {
746  fISlice = islice;
747  }
748  unsigned int JMShower::ISlice() const
749  {
750  return fISlice;
751  }
752 
753 
754  void JMShower::SetANN(unsigned int mode, double ann)
755  {
756  fANN[mode] = ann;
757  }
758  double JMShower::ANN(unsigned int mode) const
759  {
760  return fANN[mode];
761  }
762 
763  void JMShower::SetEfrac_2slides(double efrac_2slides)
764  {
765  fEfrac_2slides = efrac_2slides;
766  }
767  double JMShower::Efrac_2slides() const
768  {
769  return fEfrac_2slides;
770  }
771 
772  void JMShower::SetEfrac_4slides(double efrac_4slides)
773  {
774  fEfrac_4slides = efrac_4slides;
775  }
776  double JMShower::Efrac_4slides() const
777  {
778  return fEfrac_4slides;
779  }
780 
781  void JMShower::SetEfrac_6slides(double efrac_6slides)
782  {
783  fEfrac_6slides = efrac_6slides;
784  }
785  double JMShower::Efrac_6slides() const
786  {
787  return fEfrac_6slides;
788  }
789 
790  void JMShower::SetEfrac_20slides(double efrac_20slides)
791  {
792  fEfrac_20slides = efrac_20slides;
793  }
795  {
796  return fEfrac_20slides;
797  }
798 
799  void JMShower::SetEfrac_2sigmaHOR(double efrac_2sigmaHOR)
800  {
801  fEfrac_2sigmaHOR = efrac_2sigmaHOR;
802  }
804  {
805  return fEfrac_2sigmaHOR;
806  }
807 
808  void JMShower::SetEfrac_4sigmaHOR(double efrac_4sigmaHOR)
809  {
810  fEfrac_4sigmaHOR = efrac_4sigmaHOR;
811  }
813  {
814  return fEfrac_4sigmaHOR;
815  }
816 
817  void JMShower::SetEiso_2sigmaHOR(double eiso_2sigmaHOR)
818  {
819  fEiso_2sigmaHOR = eiso_2sigmaHOR;
820  }
822  {
823  return fEiso_2sigmaHOR;
824  }
825  void JMShower::SetEiso_4sigmaHOR(double eiso_4sigmaHOR)
826  {
827  fEiso_4sigmaHOR = eiso_4sigmaHOR;
828  }
830  {
831  return fEiso_4sigmaHOR;
832  }
833  void JMShower::SetEiso_6sigmaHOR(double eiso_6sigmaHOR)
834  {
835  fEiso_6sigmaHOR = eiso_6sigmaHOR;
836  }
838  {
839  return fEiso_6sigmaHOR;
840  }
841 
842  void JMShower::SetNodes(std::vector<TVector3> nodespos, std::vector<double> nodese, std::vector<geo::OfflineChan> xid, std::vector<geo::OfflineChan> yid)
843  {
844  if(nodespos.size()!=nodese.size())return;
845  fNNode = nodespos.size();
846  fNodesPos.clear();
847  fNodesE.clear();
848  fNodesXID.clear();
849  fNodesYID.clear();
850  for(int i=0;i<fNNode;i++){
851  fNodesPos.push_back(nodespos[i]);
852  fNodesE.push_back(nodese[i]);
853  fNodesXID.push_back(xid[i]);
854  fNodesYID.push_back(yid[i]);
855  }
856  }
857 
858  int JMShower::NNode() const
859  {
860  return fNNode;
861  }
862 
863  TVector3 JMShower::NodePos(int node) const
864  {
865  TVector3 nodepos(0,0,0);
866  if(node>=(int)fNodesPos.size())return nodepos;
867  nodepos = fNodesPos[node];
868  return nodepos;
869  }
870 
871  double JMShower::NodeE(int node) const
872  {
873  double nodee=0;
874  if(node>=(int)fNodesE.size())return nodee;
875  nodee = fNodesE[node];
876  return nodee;
877  }
878 
880  {
881  geo::OfflineChan key0(0,0);
882  if(node>=(int)fNodesXID.size())return key0;
883  return fNodesXID[node];
884  }
886  {
887  geo::OfflineChan key0(0,0);
888  if(node>=(int)fNodesYID.size())return key0;
889  return fNodesYID[node];
890  }
891 
892  void JMShower::SetIxyz(TVector3 ixyz)
893  {
894  fIxyz = ixyz;
895  }
896  TVector3 JMShower::Ixyz()const
897  {
898  return fIxyz;
899  }
900 
901  void JMShower::SetAsym(double asym)
902  {
903  fAsym = asym;
904  }
905  double JMShower::Asym()const
906  {
907  return fAsym;
908  }
909 
910 
911  std::map< int, std::vector< int > > JMShower::GetPlaneHits()
912  {
913  std::map< int, std::vector< int > > mapP;
914  int ncells = this->NCell();
915  for( int i = 0; i < ncells; ++i){
916  mapP[ this->Cell(i)->Plane() ].push_back( i );
917  }// end loop over cells
918 
919  return mapP;
920  }// end of GetPlaneHits
921 
922  //......................................................................
923 
924 
925  std::map< int, std::vector< int > > JMShower::GetTransHits()
926  {
927 
928  std::map< int, std::vector< int > > mapT;
930  int ncells = this->NCell();
931  TVector3 dir = this->Dir();
932  TVector3 start = this->Start();
933  TVector3 stop = this->Stop();
934 
935  float xslope = dir.X()/dir.Z();
936  float yslope = dir.Y()/dir.Z();
937  float planeX = (start.X() - stop.X() ) /2.0;
938  float planeY = (start.Y() - stop.Y() ) /2.0;
939 
940 
941  for( int i = 0; i < ncells; ++i){
942 
943  int plane = this->Cell(i)->Plane();
944  int cell = this->Cell(i)->Cell();
945  geo::View_t view = this->Cell(i)->View();
946 
947  // Find the cell in this plane that the shower
948  // core passes through
949  TVector3 cellCenter;
950 
951  geom->Plane(plane)->Cell(0)->GetCenter( cellCenter );
952  float cellW = geom->Plane( plane )->Cell(0)->HalfW();
953 
954  if( fabs(dir.Z()) > 0.0001 ){
955  planeX = start.X() + ( cellCenter.Z() - start.Z() )*xslope;
956  planeY = start.Y() + ( cellCenter.Z() - start.Z() )*yslope;
957  }
958  int trkCell = ( view == geo::kX )? std::ceil( (planeX- cellCenter.X())/cellW )
959  : std::ceil( (planeY- cellCenter.Y())/cellW );
960 
961 
962  mapT[ trkCell - cell ].push_back( i );
963  }// end loop over cells
964 
965  return mapT;
966  }
967 
968 
969 }
970  //......................................................................
std::vector< int > fPlaneCentroidCell
Definition: JMShower.h:405
double Edge20GeV() const
Definition: JMShower.cxx:321
::xsd::cxx::tree::id< char, ncname > id
Definition: Database.h:165
void SetStop(TVector3 stop)
Definition: JMShower.cxx:62
double fDedxTransLL[20]
Definition: JMShower.h:412
void SetPlaneE2Cell(unsigned int plane, int cell)
Definition: JMShower.cxx:575
bool IsInvPhoton() const
Definition: JMShower.cxx:729
double PlaneDedx(unsigned int plane) const
Definition: JMShower.cxx:605
double NueEnergy() const
Definition: JMShower.cxx:263
double PlaneProb(unsigned int plane, int type) const
Definition: JMShower.cxx:647
void SetYNPlane(unsigned int ynplane)
Definition: JMShower.cxx:486
void SetRadius(double radius)
Definition: JMShower.cxx:372
TVector3 Centroid() const
Definition: JMShower.cxx:445
void SetContGap(double gap)
Definition: JMShower.cxx:420
void SetVtxCenterGeV10cell(double gev)
Definition: JMShower.cxx:169
void GetCenter(double *xyz, double localz=0.0) const
Definition: CellGeo.cxx:159
double Sum10DRadius() const
Definition: JMShower.cxx:394
void SetIsMuon(bool ismuon)
Definition: JMShower.cxx:714
double fEfrac_4sigmaHOR
Definition: JMShower.h:430
fvar< T > fabs(const fvar< T > &x)
Definition: fabs.hpp:15
double HitDeconvE(unsigned int cell) const
Definition: JMShower.cxx:87
void SetSliceEdge10GeV(double gev)
Definition: JMShower.cxx:269
void SetIsInvPhoton(bool isinvphoton)
Definition: JMShower.cxx:724
bool IsMuon() const
Definition: JMShower.cxx:719
double fSliceExclGeV
Definition: JMShower.h:369
void SetSum10DRadius(double dradius)
Definition: JMShower.cxx:390
void SetTrkGeV(double gev)
Definition: JMShower.cxx:232
TVector3 NodePos(int node) const
Definition: JMShower.cxx:863
void SetYMaxPlane(unsigned int ymaxplane)
Definition: JMShower.cxx:524
void SetXMinPlane(unsigned int xminplane)
Definition: JMShower.cxx:496
void SetStopPlane(unsigned int stopplane)
Definition: JMShower.cxx:459
void SetIsFiducial(bool isfiducial)
Definition: JMShower.cxx:104
double fSliceEdge10GeV
Definition: JMShower.h:356
void SetDedxTransLL(double dedxtransll, int type)
Definition: JMShower.cxx:703
double HitDist(unsigned int cell) const
Definition: JMShower.cxx:77
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
double Asym() const
Definition: JMShower.cxx:905
unsigned short Plane() const
Definition: CellHit.h:39
void SetVtxCenterGeV(double gev)
Definition: JMShower.cxx:161
void SetEfrac_2sigmaHOR(double efrac_2sigmaHOR)
Definition: JMShower.cxx:799
geo::OfflineChan NodeYID(int node) const
Definition: JMShower.cxx:885
double fEfrac_20slides
Definition: JMShower.h:428
double Efrac_20slides() const
Definition: JMShower.cxx:794
double DedxInvLongLL(int type) const
Definition: JMShower.cxx:684
void SetIxyz(TVector3 ixyz)
Definition: JMShower.cxx:892
geo::View_t View() const
Definition: CellHit.h:41
void SetDedxLongLL(double dedxlongll, int type)
Definition: JMShower.cxx:666
const CellGeo * Cell(int icell) const
Definition: PlaneGeo.h:48
double fCelltransDedx[20]
Definition: JMShower.h:411
void SetClosetEdge(int edge)
Definition: JMShower.cxx:306
double Gap() const
Definition: JMShower.cxx:415
Vertical planes which measure X.
Definition: PlaneGeo.h:28
double Efrac_2sigmaHOR() const
Definition: JMShower.cxx:803
std::vector< double > fPlaneProbEcoh
Definition: JMShower.h:391
void SetWindowSize(unsigned int nplane)
Definition: JMShower.cxx:23
double VtxCenterGeV20cell() const
Definition: JMShower.cxx:199
void SetGap(double gap)
Definition: JMShower.cxx:410
double HalfW() const
Definition: CellGeo.cxx:191
double NodeE(int node) const
Definition: JMShower.cxx:871
void SetHitSumE(unsigned int cell, double sume)
Definition: JMShower.cxx:93
void SetCellTransDedx(unsigned int tcell, double celldedx)
Definition: JMShower.cxx:690
unsigned int YNPlane() const
Definition: JMShower.cxx:490
std::vector< double > fPlaneProbProton
Definition: JMShower.h:397
unsigned fXMaxPlane
Definition: JMShower.h:380
double fEfrac_2sigmaHOR
Definition: JMShower.h:429
void SetXNPlane(unsigned int xnplane)
Definition: JMShower.cxx:477
std::vector< TVector3 > fNodesPos
Definition: JMShower.h:331
double fSum10DRadius
Definition: JMShower.h:372
void SetNCellToEdge(int nce)
Definition: JMShower.cxx:297
void SetSliceEdge5GeV(double gev)
Definition: JMShower.cxx:278
void SetNodes(std::vector< TVector3 > nodespos, std::vector< double > nodese, std::vector< geo::OfflineChan > xid, std::vector< geo::OfflineChan > yid)
Definition: JMShower.cxx:842
double PlaneRadius(unsigned int plane) const
Definition: JMShower.cxx:619
const PlaneGeo * Plane(unsigned int i) const
unsigned int StartPlane() const
Definition: JMShower.cxx:454
void SetDepositEnergy(double depositenergy)
Definition: JMShower.cxx:123
virtual TVector3 Start() const
Definition: Prong.h:73
double fSliceEdge2GeV
Definition: JMShower.h:358
double fSliceEdge5GeV
Definition: JMShower.h:357
unsigned int YMaxPlane() const
Definition: JMShower.cxx:528
TODO.
Definition: FillPIDs.h:12
std::vector< int > fPlaneE1Cell
Definition: JMShower.h:403
void SetStartPlane(unsigned int startplane)
Definition: JMShower.cxx:450
void SetNMIPPlane(int nmipplane)
Definition: JMShower.cxx:735
unsigned int YMinPlane() const
Definition: JMShower.cxx:509
void SetPi0Mgg(double pi0mass)
Definition: JMShower.cxx:204
std::vector< int > fPlaneE2Cell
Definition: JMShower.h:404
double fVtxCenterGeV10cell
Definition: JMShower.h:346
geo::OfflineChan NodeXID(int node) const
Definition: JMShower.cxx:879
double fDepositEnergy
Definition: JMShower.h:340
void SetCentroid(TVector3 centroid)
Definition: JMShower.cxx:441
void SetSliceExclGeV(double gev)
Definition: JMShower.cxx:363
double dist
Definition: runWimpSim.h:113
double Efrac_4sigmaHOR() const
Definition: JMShower.cxx:812
double Eiso_4sigmaHOR() const
Definition: JMShower.cxx:829
double Edge15GeV() const
Definition: JMShower.cxx:330
unsigned int ISlice() const
Definition: JMShower.cxx:748
unsigned int NPlane() const
Definition: JMShower.cxx:472
double Eiso_6sigmaHOR() const
Definition: JMShower.cxx:837
double Edge5GeV() const
Definition: JMShower.cxx:349
double Edge10GeV() const
Definition: JMShower.cxx:340
double fEiso_2sigmaHOR
Definition: JMShower.h:431
int Pi0G2ID() const
Definition: JMShower.cxx:217
unsigned short Cell() const
Definition: CellHit.h:40
void SetEfrac_6slides(double efrac_6slides)
Definition: JMShower.cxx:781
double fVtxCenterGeV20cell
Definition: JMShower.h:348
double fExclEnergy
Definition: JMShower.h:341
double fEiso_6sigmaHOR
Definition: JMShower.h:433
double fDistToEdge
Definition: JMShower.h:339
void SetVtxGeV(double gev)
Definition: JMShower.cxx:152
double fEfrac_4slides
Definition: JMShower.h:426
void SetVtxCenterGeV15cell(double gev)
Definition: JMShower.cxx:173
void SetEdge20GeV(double gev)
Definition: JMShower.cxx:317
void SetSliceEtot(double etot)
Definition: JMShower.cxx:250
int NNode() const
Definition: JMShower.cxx:858
length
Definition: demo0.py:21
std::vector< double > fPlaneProbE
Definition: JMShower.h:387
void SetDedxInvLongLL(double dedxlongll, int type)
Definition: JMShower.cxx:678
void SetEdge15GeV(double gev)
Definition: JMShower.cxx:325
void SetPi0G2ID(int id)
Definition: JMShower.cxx:213
double fSumDRadius
Definition: JMShower.h:371
void SetEiso_4sigmaHOR(double eiso_4sigmaHOR)
Definition: JMShower.cxx:825
double DedxLongLL(int type) const
Definition: JMShower.cxx:672
TVector3 Stop() const
Definition: JMShower.cxx:67
std::vector< geo::OfflineChan > fNodesXID
Definition: JMShower.h:333
unsigned fStartPlane
Definition: JMShower.h:373
void SetEfrac_2slides(double efrac_2slides)
Definition: JMShower.cxx:763
void SetSliceEdge2GeV(double gev)
Definition: JMShower.cxx:287
unsigned fXNPlane
Definition: JMShower.h:376
unsigned int NCell() const
Number of cells in either view.
Definition: Cluster.h:110
double fEfrac_2slides
Definition: JMShower.h:425
void SetEdge2GeV(double gev)
Definition: JMShower.cxx:354
void SetNPlane(unsigned int nplane)
Definition: JMShower.cxx:468
TVector3 fIxyz
Definition: JMShower.h:420
double fEfrac_6slides
Definition: JMShower.h:427
void SetEfrac_20slides(double efrac_20slides)
Definition: JMShower.cxx:790
void SetEfrac_4sigmaHOR(double efrac_4sigmaHOR)
Definition: JMShower.cxx:808
double VtxCenterGeV10cell() const
Definition: JMShower.cxx:191
virtual TVector3 Dir() const
Unit vector describing prong direction.
Definition: Prong.h:77
unsigned int XMaxPlane() const
Definition: JMShower.cxx:519
double energy
Definition: plottest35.C:25
unsigned fYMaxPlane
Definition: JMShower.h:381
bool BackTag() const
Definition: JMShower.cxx:404
double fANN[20]
Definition: JMShower.h:423
std::vector< double > fPlaneRadius
Definition: JMShower.h:386
void SetVtxCenterGeV20cell(double gev)
Definition: JMShower.cxx:177
double SliceEdge10GeV() const
Definition: JMShower.cxx:273
void SetPlaneE1Cell(unsigned int plane, int cell)
Definition: JMShower.cxx:563
int NMIPPlane() const
Definition: JMShower.cxx:739
double Theta() const
Definition: JMShower.cxx:226
double HitSumE(unsigned int cell) const
Definition: JMShower.cxx:98
unsigned fYMinPlane
Definition: JMShower.h:379
double ContGap() const
Definition: JMShower.cxx:425
std::vector< double > fPlaneProbEdis
Definition: JMShower.h:390
double VtxGeV() const
Definition: JMShower.cxx:156
void SetPlaneDedx(unsigned int plane, double planededx)
Definition: JMShower.cxx:599
Double_t radius
unsigned fXMinPlane
Definition: JMShower.h:378
double VtxCenterGeV() const
Definition: JMShower.cxx:183
double SumDRadius() const
Definition: JMShower.cxx:385
void SetPlaneHitCell(unsigned int plane, unsigned int cell)
Definition: JMShower.cxx:552
void SetEdge5GeV(double gev)
Definition: JMShower.cxx:345
void SetDistToEdge(double disttoedge)
Definition: JMShower.cxx:113
double SliceEtot() const
Definition: JMShower.cxx:254
double DepositEnergy() const
Definition: JMShower.cxx:127
std::vector< double > fPlaneProbG
Definition: JMShower.h:393
Perform a "2 point" Hough transform on a collection of hits.
double Radius() const
Definition: JMShower.cxx:376
std::vector< double > fPlaneDedx
Definition: JMShower.h:385
std::vector< double > fPlaneProbPi0
Definition: JMShower.h:395
double SliceEdge5GeV() const
Definition: JMShower.cxx:282
void SetEnergy(double energy)
Definition: JMShower.cxx:143
TVector3 fCentroid
Definition: JMShower.h:419
double fEiso_4sigmaHOR
Definition: JMShower.h:432
std::vector< unsigned int > fPlaneHitCell
Definition: JMShower.h:406
unsigned fNPlane
Definition: JMShower.h:375
double DedxTransLL(int type) const
Definition: JMShower.cxx:708
void SetHitDist(unsigned int cell, double dist)
Definition: JMShower.cxx:72
void SetPlaneHitXYZ(unsigned int plane, TVector3 xyz)
Definition: JMShower.cxx:534
TVector3 Ixyz() const
Definition: JMShower.cxx:896
int ClosetEdge() const
Definition: JMShower.cxx:311
art::Ptr< rb::CellHit > Cell(geo::View_t view, unsigned int viewIdx) const
Get the ith cell from view view.
Definition: Cluster.cxx:145
void SetPlaneRadius(unsigned int plane, double planerad)
Definition: JMShower.cxx:612
std::vector< double > fNodesE
Definition: JMShower.h:332
unsigned fStopPlane
Definition: JMShower.h:374
void SetISlice(unsigned int islice)
Definition: JMShower.cxx:744
TVector3 fStop
Definition: JMShower.h:337
double DistToEdge() const
Definition: JMShower.cxx:117
unsigned int fISlice
Definition: JMShower.h:384
double ExclEnergy() const
Definition: JMShower.cxx:136
void SetNueEnergy(double nueenergy)
Definition: JMShower.cxx:259
A Cluster with defined start position and direction.
Definition: Prong.h:19
std::vector< double > fPlaneProbEqe
Definition: JMShower.h:388
double Pi0Mgg() const
Definition: JMShower.cxx:208
double CellTransDedx(unsigned int tcell) const
Definition: JMShower.cxx:696
double SliceExclGeV() const
Definition: JMShower.cxx:367
std::map< int, std::vector< int > > GetPlaneHits()
Returns a map where the first element is plane number and the second is vector of global cell indices...
Definition: JMShower.cxx:911
TDirectory * dir
Definition: macro.C:5
double Energy() const
Definition: JMShower.cxx:147
std::map< int, std::vector< int > > GetTransHits()
Returns a map where the first index is the number of cells away from the track core, and the second is a vector of global cell indices in a shower that are that many cells from the track core. It callapses the transverse profile of the shower to a single plane.
Definition: JMShower.cxx:925
std::vector< geo::OfflineChan > fNodesYID
Definition: JMShower.h:334
void SetXMaxPlane(unsigned int xmaxplane)
Definition: JMShower.cxx:515
int NCellToEdge() const
Definition: JMShower.cxx:301
double TrkGeV() const
Definition: JMShower.cxx:236
unsigned int PlaneHitCell(unsigned int plane) const
Definition: JMShower.cxx:557
void SetTheta(double theta)
Definition: JMShower.cxx:222
A (plane, cell) pair.
Definition: OfflineChan.h:17
bool IsFiducial() const
Definition: JMShower.cxx:108
void SetExclEnergy(double exclenergy)
Definition: JMShower.cxx:132
double Edge2GeV() const
Definition: JMShower.cxx:358
void geom(int which=0)
Definition: geom.C:163
std::vector< double > fPlaneProbNuetron
Definition: JMShower.h:398
void SetSliceGeV(double gev)
Definition: JMShower.cxx:241
int PlaneE1Cell(unsigned int plane) const
Definition: JMShower.cxx:569
void SetBackTag(bool backtag)
Definition: JMShower.cxx:399
TVector3 PlaneHitXYZ(unsigned int plane) const
Definition: JMShower.cxx:541
std::vector< double > fHitSumECol
Definition: JMShower.h:329
double SliceEdge2GeV() const
Definition: JMShower.cxx:291
std::vector< double > fPlaneProbMu
Definition: JMShower.h:394
void SetVtxCenterGeV5cell(double gev)
Definition: JMShower.cxx:165
int ncells
Definition: geom.C:124
void SetEiso_6sigmaHOR(double eiso_6sigmaHOR)
Definition: JMShower.cxx:833
void SetVtxDoca(double vtxdoca)
Definition: JMShower.cxx:430
void SetPlaneProb(unsigned int plane, double planeprob, int type)
Definition: JMShower.cxx:626
std::vector< double > fPlaneProbPion
Definition: JMShower.h:399
double VtxCenterGeV15cell() const
Definition: JMShower.cxx:195
void SetEdge10GeV(double gev)
Definition: JMShower.cxx:335
double Efrac_4slides() const
Definition: JMShower.cxx:776
double fVtxCenterGeV5cell
Definition: JMShower.h:345
double Eiso_2sigmaHOR() const
Definition: JMShower.cxx:821
double fVtxCenterGeV15cell
Definition: JMShower.h:347
void SetYMinPlane(unsigned int yminplane)
Definition: JMShower.cxx:505
unsigned int StopPlane() const
Definition: JMShower.cxx:463
double Efrac_6slides() const
Definition: JMShower.cxx:785
double fDedxInvLongLL[20]
Definition: JMShower.h:410
int PlaneCentroidCell(unsigned int plane) const
Definition: JMShower.cxx:593
unsigned int XMinPlane() const
Definition: JMShower.cxx:500
void SetEiso_2sigmaHOR(double eiso_2sigmaHOR)
Definition: JMShower.cxx:817
void SetEfrac_4slides(double efrac_4slides)
Definition: JMShower.cxx:772
std::vector< TVector3 > fPlaneHitXYZ
Definition: JMShower.h:401
double ANN(unsigned int mode) const
Definition: JMShower.cxx:758
void SetAsym(double asym)
Definition: JMShower.cxx:901
double VtxCenterGeV5cell() const
Definition: JMShower.cxx:187
double Efrac_2slides() const
Definition: JMShower.cxx:767
std::vector< double > fPlaneProbEres
Definition: JMShower.h:389
std::vector< double > fHitDistCol
Definition: JMShower.h:327
double fVtxCenterGeV
Definition: JMShower.h:344
void SetANN(unsigned int mode, double ann)
Definition: JMShower.cxx:754
std::vector< double > fPlaneProbHad
Definition: JMShower.h:396
void SetHitColSize(unsigned int ncell)
Definition: JMShower.cxx:53
void SetHitDeconvE(unsigned int cell, double deconve)
Definition: JMShower.cxx:82
std::vector< double > fHitDeconvECol
Definition: JMShower.h:328
Encapsulate the geometry of one entire detector (near, far, ndos)
fvar< T > ceil(const fvar< T > &x)
Definition: ceil.hpp:11
void SetPlaneCentroidCell(unsigned int plane, int cell)
Definition: JMShower.cxx:587
unsigned int XNPlane() const
Definition: JMShower.cxx:481
void SetSumDRadius(double dradius)
Definition: JMShower.cxx:381
double VtxDoca() const
Definition: JMShower.cxx:435
double SliceGeV() const
Definition: JMShower.cxx:245
unsigned fYNPlane
Definition: JMShower.h:377
double fDedxLongLL[20]
Definition: JMShower.h:409
int PlaneE2Cell(unsigned int plane) const
Definition: JMShower.cxx:581