#include <DirOfGamma.h>
Definition at line 181 of file DirOfGamma.h.
Definition at line 177 of file DirOfGamma.cxx.
185 for (
unsigned int i = 0; i < src.size(); i++) {
186 Hit2D*
hit =
new Hit2D(detProp, src[i]);
192 for (
unsigned int i = 0; i <
fNbins; i++)
std::vector< art::Ptr< recob::Hit > > fHits
std::vector< Bin2D > fBins
Detector simulation of raw signals on wires.
std::vector< Hit2D * > fPoints2D
ems::DirOfGamma::~DirOfGamma |
( |
| ) |
|
|
inline |
Definition at line 187 of file DirOfGamma.h.
189 for (
unsigned int i = 0; i <
fPoints2D.size(); ++i)
std::vector< Hit2D * > fPoints2D
void ems::DirOfGamma::ComputeBaryCenter |
( |
| ) |
|
|
private |
Definition at line 204 of file DirOfGamma.cxx.
209 for (
unsigned int i = 0; i <
fPoints2D.size(); i++) {
215 double bx = nomx / denom;
216 double by = nomy / denom;
std::vector< Hit2D * > fPoints2D
void ems::DirOfGamma::ComputeFinalValues |
( |
| ) |
|
|
private |
void ems::DirOfGamma::ComputeMaxCharge |
( |
| ) |
|
|
private |
Definition at line 298 of file DirOfGamma.cxx.
301 for (
unsigned int i = 0; i <
fCandidates.size(); i++) {
std::vector< EndPoint > fCandidates
void ems::DirOfGamma::ComputeMaxDist |
( |
| ) |
|
|
private |
Definition at line 249 of file DirOfGamma.cxx.
251 double maxdist2 = 0.0;
253 for (
unsigned int id = 0;
id <
fBins.size();
id++) {
255 if (!
fBins[
id].Size())
continue;
257 Hit2D* candidate =
fBins[id].GetHits2D().front();
260 if (dist2 > maxdist2) { maxdist2 = dist2; }
double Dist2(const TVector2 &v1, const TVector2 &v2)
std::vector< Bin2D > fBins
void ems::DirOfGamma::FillBins |
( |
| ) |
|
|
private |
Definition at line 221 of file DirOfGamma.cxx.
223 TVector2 vstart(0, 1);
225 for (
unsigned int i = 0; i <
fPoints2D.size(); i++) {
228 float sinsign = (vstart.X() * vecp.Y()) - (vstart.Y() * vecp.X());
229 float cosine = (vstart * vecp) / (vstart.Mod() * vecp.Mod());
230 float theta = 180.0F * (std::acos(cosine)) / TMath::Pi();
233 double bin = double(360.0) / double(
fNbins);
236 id =
int(theta / bin);
237 else if (sinsign < 0)
244 for (
unsigned int id = 0;
id <
fBins.size();
id++)
std::vector< Bin2D > fBins
QTextStream & bin(QTextStream &s)
std::vector< Hit2D * > fPoints2D
bool ems::DirOfGamma::FindCandidates |
( |
| ) |
|
|
private |
Definition at line 268 of file DirOfGamma.cxx.
272 for (
unsigned int id = 0;
id <
fNbins;
id++) {
274 if (!
fBins[
id].Size())
continue;
276 std::vector<Hit2D*> points;
277 Hit2D* candidate2D =
fBins[id].GetHits2D().front();
279 for (
unsigned int i = 0; i <
fPoints2D.size(); i++) {
283 if ((distnorm > 0.5) && (dist2 < rad *
rad)) points.push_back(
fPoints2D[i]);
286 if (
fBins[
id].Size() > 1) {
287 EndPoint ep(*candidate2D, points, nbins);
static constexpr double rad
double Dist2(const TVector2 &v1, const TVector2 &v2)
std::vector< Bin2D > fBins
std::vector< EndPoint > fCandidates
std::vector< Hit2D * > fPoints2D
void ems::DirOfGamma::FindInitialPart |
( |
| ) |
|
|
private |
Definition at line 309 of file DirOfGamma.cxx.
311 double max_asymmetry = 0.0;
312 unsigned int saveid = 0;
315 double maxdist2 = 0.0;
316 double maxcharge = 0.0;
317 unsigned int idmaxdist = 0;
318 unsigned int idmaxcharge = 0;
320 for (
unsigned int i = 0; i <
fCandidates.size(); i++) {
323 if (dist2 > maxdist2) {
327 if (charge > maxcharge) {
334 unsigned int idmaxdistb = 0;
336 if ((i == idmaxdist) || (i == idmaxcharge))
continue;
339 if (dist2 > maxdist2) {
346 for (
unsigned int i = 0; i <
fCandidates.size(); i++) {
349 if ((i == idmaxdist) || (i == idmaxcharge) || (i == idmaxdistb)) {
350 if (asymmetry > max_asymmetry) {
351 max_asymmetry = asymmetry;
359 for (
unsigned int i = 0; i <
fCandidates.size(); i++) {
362 if ((i == idmaxdist) || (i == idmaxdistb)) {
363 if (asymmetry > max_asymmetry) {
364 max_asymmetry = asymmetry;
double Dist2(const TVector2 &v1, const TVector2 &v2)
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
std::vector< EndPoint > fCandidates
art::Ptr< recob::Hit > fStartHit
std::vector< art::Ptr< recob::Hit > > fIniHits
TVector2 const& ems::DirOfGamma::GetBaryCenterCm |
( |
| ) |
const |
|
inline |
Definition at line 206 of file DirOfGamma.h.
std::vector< EndPoint > fCandidates
Definition at line 229 of file DirOfGamma.h.
art::Ptr< recob::Hit > fStartHit
TVector2 const& ems::DirOfGamma::GetFirstPoint |
( |
| ) |
const |
|
inline |
Definition at line 235 of file DirOfGamma.h.
std::vector< art::Ptr< recob::Hit > > fHits
Definition at line 200 of file DirOfGamma.h.
std::vector< Hit2D * > fPoints2D
const size_t ems::DirOfGamma::GetIdCandidate |
( |
| ) |
|
|
inline |
size_t const ems::DirOfGamma::GetIdCl |
( |
| ) |
const |
|
inline |
Definition at line 247 of file DirOfGamma.h.
std::vector< art::Ptr< recob::Hit > > fIniHits
void ems::DirOfGamma::SetIdCandidate |
( |
size_t |
id | ) |
|
|
inline |
Definition at line 212 of file DirOfGamma.h.
std::vector< EndPoint > fCandidates
art::Ptr< recob::Hit > fStartHit
std::vector< art::Ptr< recob::Hit > > fIniHits
TVector2 ems::DirOfGamma::fBaryCenter |
|
private |
size_t ems::DirOfGamma::fCandidateID |
|
private |
size_t ems::DirOfGamma::fIdCl |
|
private |
bool ems::DirOfGamma::fIsCandidateIDset |
|
private |
size_t ems::DirOfGamma::fNbins |
|
private |
float ems::DirOfGamma::fNormCharge |
|
private |
float ems::DirOfGamma::fNormDist |
|
private |
TVector2 ems::DirOfGamma::fStartPoint |
|
private |
The documentation for this class was generated from the following files: