|
| FlashGeoBarycenter (art::ToolConfigTable< Config > const &config) |
|
void | GetFlashLocation (std::vector< double > pePerOpChannel, double &Ycenter, double &Zcenter, double &Ywidth, double &Zwidth) override |
|
Definition at line 20 of file FlashGeoBarycenter_tool.cc.
lightana::FlashGeoBarycenter::FlashGeoBarycenter |
( |
art::ToolConfigTable< Config > const & |
config | ) |
|
|
explicit |
void lightana::FlashGeoBarycenter::GetFlashLocation |
( |
std::vector< double > |
pePerOpChannel, |
|
|
double & |
Ycenter, |
|
|
double & |
Zcenter, |
|
|
double & |
Ywidth, |
|
|
double & |
Zwidth |
|
) |
| |
|
overridevirtual |
Implements lightana::FlashGeoBase.
Definition at line 57 of file FlashGeoBarycenter_tool.cc.
63 Ycenter = Zcenter = 0.;
64 Ywidth = Zwidth = -999.;
66 double sumy = 0., sumz = 0., sumy2 = 0., sumz2 = 0.;
68 for (
unsigned int opch = 0; opch < pePerOpChannel.size(); opch++) {
74 if(
fWeightExp==1) weight = pePerOpChannel[opch];
75 else if(
fWeightExp==2) weight = pePerOpChannel[opch]*pePerOpChannel[opch];
76 else weight = std::pow(pePerOpChannel[opch],
fWeightExp);
79 sumy += weight*PMTxyz[1];
80 sumy2 += weight*PMTxyz[1]*PMTxyz[1];
81 sumz += weight*PMTxyz[2];
82 sumz2 += weight*PMTxyz[2]*PMTxyz[2];
86 Ycenter = sumy/totalPE;
87 Zcenter = sumz/totalPE;
90 if ( (sumy2*totalPE - sumy*sumy) > 0. )
91 Ywidth = std::sqrt(sumy2*totalPE - sumy*sumy)/totalPE;
93 if ( (sumz2*totalPE - sumz*sumz) > 0. )
94 Zwidth = std::sqrt(sumz2*totalPE - sumz*sumz)/totalPE;
void OpDetCenterFromOpChannel(size_t opch, double *xyz)
unsigned int lightana::FlashGeoBarycenter::fWeightExp |
|
private |
The documentation for this class was generated from the following file: