#include "DirOfGamma.h"
Definition at line 118 of file DirOfGamma.h.
ems::DirOfGamma::DirOfGamma |
( |
const std::vector< art::Ptr< recob::Hit > > & |
src, |
|
|
unsigned int |
nbins, |
|
|
unsigned int |
idcl |
|
) |
| |
Definition at line 180 of file DirOfGamma.cxx.
References ComputeBaryCenter(), ComputeMaxCharge(), ComputeMaxDist(), fBaryCenter, fBins, fHits, FillBins(), FindCandidates(), FindInitialPart(), fNbins, and fPoints2D.
188 for (
unsigned int i = 0; i < src.size(); i++)
190 Hit2D*
hit =
new Hit2D(src[i]);
196 for (
unsigned int i = 0; i <
fNbins; i++)
std::vector< Hit2D * > fPoints2D
void ComputeMaxCharge(void)
void FindInitialPart(void)
std::vector< Bin2D > fBins
void ComputeBaryCenter(void)
Detector simulation of raw signals on wires.
bool FindCandidates(void)
void ComputeMaxDist(void)
std::vector< art::Ptr< recob::Hit > > fHits
ems::DirOfGamma::~DirOfGamma |
( |
| ) |
|
|
inline |
Definition at line 122 of file DirOfGamma.h.
std::vector< Hit2D * > fPoints2D
void ems::DirOfGamma::ComputeBaryCenter |
( |
void |
| ) |
|
|
private |
Definition at line 208 of file DirOfGamma.cxx.
References fBaryCenter, and fPoints2D.
Referenced by DirOfGamma().
210 double nomx = 0.0;
double nomy = 0.0;
212 for (
unsigned int i = 0; i <
fPoints2D.size(); i++)
219 double bx = nomx / denom;
double by = nomy / denom;
std::vector< Hit2D * > fPoints2D
void ems::DirOfGamma::ComputeFinalValues |
( |
void |
| ) |
|
|
private |
void ems::DirOfGamma::ComputeMaxCharge |
( |
void |
| ) |
|
|
private |
void ems::DirOfGamma::ComputeMaxDist |
( |
void |
| ) |
|
|
private |
void ems::DirOfGamma::FillBins |
( |
void |
| ) |
|
|
private |
Definition at line 223 of file DirOfGamma.cxx.
References bin, fBaryCenter, fBins, fNbins, fPoints2D, X, and Y.
Referenced by DirOfGamma().
225 TVector2 vstart(0, 1);
227 for (
unsigned int i = 0; i <
fPoints2D.size(); i++)
231 float sinsign = (vstart.X() * vecp.Y()) - (vstart.Y() * vecp.X());
232 float cosine = (vstart * vecp) / (vstart.Mod() * vecp.Mod());
233 float theta = 180.0F * (std::acos(cosine)) / TMath::Pi();
235 unsigned int id = 0;
double bin = double(360.0) / double(
fNbins);
237 if (sinsign >= 0)
id = int (theta / bin);
238 else if (sinsign < 0)
id = int (theta / bin) + (
fNbins/2);
244 for (
unsigned int id = 0;
id <
fBins.size();
id++)
fBins[
id].Sort();
std::vector< Hit2D * > fPoints2D
std::vector< Bin2D > fBins
bool ems::DirOfGamma::FindCandidates |
( |
void |
| ) |
|
|
private |
Definition at line 271 of file DirOfGamma.cxx.
References pma::Dist2(), fBaryCenter, fBins, fCandidates, fNbins, fNormDist, fPoints2D, and ems::Hit2D::GetPointCm().
Referenced by DirOfGamma().
274 for (
unsigned int id = 0;
id <
fNbins;
id++)
277 if (!
fBins[
id].Size())
continue;
279 std::vector< Hit2D* > points;
280 Hit2D* candidate2D =
fBins[id].GetHits2D().front();
282 for (
unsigned int i = 0; i <
fPoints2D.size(); i++)
287 if ((distnorm > 0.5) && (dist2 < rad*rad)) points.push_back(
fPoints2D[i]);
291 if (
fBins[
id].Size() > 1)
293 EndPoint ep(*candidate2D, points, nbins);
std::vector< Hit2D * > fPoints2D
double Dist2(const TVector2 &v1, const TVector2 &v2)
std::vector< Bin2D > fBins
std::vector< EndPoint > fCandidates
void ems::DirOfGamma::FindInitialPart |
( |
void |
| ) |
|
|
private |
Definition at line 313 of file DirOfGamma.cxx.
References pma::Dist2(), fBaryCenter, fCandidateID, fCandidates, fIniHits, fStartHit, and fStartPoint.
Referenced by DirOfGamma().
315 double max_asymmetry = 0.0;
316 unsigned int saveid = 0;
bool found =
false;
318 double maxdist2 = 0.0;
double maxcharge = 0.0;
319 unsigned int idmaxdist = 0;
unsigned int idmaxcharge = 0;
321 for (
unsigned int i = 0; i <
fCandidates.size(); i++)
325 if (dist2 > maxdist2) { maxdist2 = dist2; idmaxdist = i;}
326 if (charge > maxcharge) { maxcharge = charge; idmaxcharge = i;}
329 maxdist2 = 0.0;
unsigned int idmaxdistb = 0;
332 if ((i == idmaxdist) || (i == idmaxcharge))
continue;
335 if (dist2 > maxdist2) { maxdist2 = dist2; idmaxdistb = i;}
340 for (
unsigned int i = 0; i <
fCandidates.size(); i++)
344 if ((i == idmaxdist) || (i == idmaxcharge) || (i == idmaxdistb))
346 if (asymmetry > max_asymmetry)
348 max_asymmetry = asymmetry;
349 saveid = i; found =
true;
356 for (
unsigned int i = 0; i <
fCandidates.size(); i++)
360 if ((i == idmaxdist) || (i == idmaxdistb))
362 if (asymmetry > max_asymmetry)
364 max_asymmetry = asymmetry;
365 saveid = i; found =
true;
double Dist2(const TVector2 &v1, const TVector2 &v2)
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
std::vector< art::Ptr< recob::Hit > > fIniHits
art::Ptr< recob::Hit > fStartHit
std::vector< EndPoint > fCandidates
TVector2 const& ems::DirOfGamma::GetBaryCenterCm |
( |
void |
| ) |
const |
|
inline |
std::vector< EndPoint > const& ems::DirOfGamma::GetCandidates |
( |
void |
| ) |
const |
|
inline |
Definition at line 128 of file DirOfGamma.h.
std::vector< EndPoint > fCandidates
Definition at line 140 of file DirOfGamma.h.
art::Ptr< recob::Hit > fStartHit
TVector2 const& ems::DirOfGamma::GetFirstPoint |
( |
void |
| ) |
const |
|
inline |
Definition at line 142 of file DirOfGamma.h.
std::vector< art::Ptr< recob::Hit > > fHits
std::vector< Hit2D* > const& ems::DirOfGamma::GetHits2D |
( |
void |
| ) |
const |
|
inline |
const size_t ems::DirOfGamma::GetIdCandidate |
( |
void |
| ) |
|
|
inline |
size_t const ems::DirOfGamma::GetIdCl |
( |
void |
| ) |
const |
|
inline |
Definition at line 146 of file DirOfGamma.h.
std::vector< art::Ptr< recob::Hit > > fIniHits
void ems::DirOfGamma::SetIdCandidate |
( |
size_t |
id | ) |
|
|
inline |
Definition at line 130 of file DirOfGamma.h.
std::vector< art::Ptr< recob::Hit > > fIniHits
art::Ptr< recob::Hit > fStartHit
std::vector< EndPoint > fCandidates
TVector2 ems::DirOfGamma::fBaryCenter |
|
private |
std::vector< Bin2D > ems::DirOfGamma::fBins |
|
private |
size_t ems::DirOfGamma::fCandidateID |
|
private |
std::vector< EndPoint > ems::DirOfGamma::fCandidates |
|
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 |
std::vector< Hit2D* > ems::DirOfGamma::fPoints2D |
|
private |
TVector2 ems::DirOfGamma::fStartPoint |
|
private |
The documentation for this class was generated from the following files:
- /cvmfs/larsoft.opensciencegrid.org/products/larreco/v07_10_02/source/larreco/DirOfGamma/DirOfGamma.h
- /cvmfs/larsoft.opensciencegrid.org/products/larreco/v07_10_02/source/larreco/DirOfGamma/DirOfGamma.cxx