#include "DirOfGamma.h"
Definition at line 119 of file DirOfGamma.h.
Definition at line 160 of file DirOfGamma.cxx.
References ComputeBaryCenter(), ComputeMaxCharge(), ComputeMaxDist(), fBaryCenter, fBins, fHits, FillBins(), FindCandidates(), FindInitialPart(), fNbins, and fPoints2D.
168 for (
unsigned int i = 0; i < src.size(); i++) {
169 Hit2D*
hit =
new Hit2D(detProp, src[i]);
175 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 125 of file DirOfGamma.h.
127 for (
unsigned int i = 0; i <
fPoints2D.size(); ++i)
std::vector< Hit2D * > fPoints2D
| void ems::DirOfGamma::ComputeBaryCenter |
( |
| ) |
|
|
private |
| void ems::DirOfGamma::ComputeFinalValues |
( |
| ) |
|
|
private |
| void ems::DirOfGamma::ComputeMaxCharge |
( |
| ) |
|
|
private |
| void ems::DirOfGamma::ComputeMaxDist |
( |
| ) |
|
|
private |
| void ems::DirOfGamma::FillBins |
( |
| ) |
|
|
private |
Definition at line 202 of file DirOfGamma.cxx.
References bin, fBaryCenter, fBins, fNbins, fPoints2D, X, and Y.
Referenced by DirOfGamma().
204 TVector2 vstart(0, 1);
206 for (
unsigned int i = 0; i <
fPoints2D.size(); i++) {
209 float sinsign = (vstart.X() * vecp.Y()) - (vstart.Y() * vecp.X());
210 float cosine = (vstart * vecp) / (vstart.Mod() * vecp.Mod());
211 float theta = 180.0F * (std::acos(cosine)) / TMath::Pi();
214 double bin = double(360.0) / double(
fNbins);
217 id = int(theta / bin);
218 else if (sinsign < 0)
219 id = int(theta / bin) + (
fNbins / 2);
225 for (
unsigned int id = 0;
id <
fBins.size();
id++)
std::vector< Bin2D > fBins
std::vector< Hit2D * > fPoints2D
| bool ems::DirOfGamma::FindCandidates |
( |
| ) |
|
|
private |
Definition at line 247 of file DirOfGamma.cxx.
References pma::Dist2(), fBaryCenter, fBins, fCandidates, fNbins, fNormDist, fPoints2D, and ems::Hit2D::GetPointCm().
Referenced by DirOfGamma().
250 unsigned int nbins =
fNbins * 4;
251 for (
unsigned int id = 0;
id <
fNbins;
id++) {
253 if (!
fBins[
id].Size())
continue;
255 std::vector<Hit2D*> points;
256 Hit2D* candidate2D =
fBins[id].GetHits2D().front();
258 for (
unsigned int i = 0; i <
fPoints2D.size(); i++) {
262 if ((distnorm > 0.5) && (dist2 < rad * rad)) points.push_back(
fPoints2D[i]);
265 if (
fBins[
id].Size() > 1) {
266 EndPoint ep(*candidate2D, points, nbins);
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 286 of file DirOfGamma.cxx.
References pma::Dist2(), fBaryCenter, fCandidateID, fCandidates, fIniHits, fStartHit, and fStartPoint.
Referenced by DirOfGamma().
288 double max_asymmetry = 0.0;
289 unsigned int saveid = 0;
292 double maxdist2 = 0.0;
293 double maxcharge = 0.0;
294 unsigned int idmaxdist = 0;
295 unsigned int idmaxcharge = 0;
297 for (
unsigned int i = 0; i <
fCandidates.size(); i++) {
300 if (dist2 > maxdist2) {
304 if (charge > maxcharge) {
311 unsigned int idmaxdistb = 0;
313 if ((i == idmaxdist) || (i == idmaxcharge))
continue;
316 if (dist2 > maxdist2) {
323 for (
unsigned int i = 0; i <
fCandidates.size(); i++) {
326 if ((i == idmaxdist) || (i == idmaxcharge) || (i == idmaxdistb)) {
327 if (asymmetry > max_asymmetry) {
328 max_asymmetry = asymmetry;
336 for (
unsigned int i = 0; i <
fCandidates.size(); i++) {
339 if ((i == idmaxdist) || (i == idmaxdistb)) {
340 if (asymmetry > max_asymmetry) {
341 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 |
| std::vector<EndPoint> const& ems::DirOfGamma::GetCandidates |
( |
| ) |
const |
|
inline |
Definition at line 135 of file DirOfGamma.h.
std::vector< EndPoint > fCandidates
Definition at line 149 of file DirOfGamma.h.
art::Ptr< recob::Hit > fStartHit
| TVector2 const& ems::DirOfGamma::GetFirstPoint |
( |
| ) |
const |
|
inline |
Definition at line 151 of file DirOfGamma.h.
std::vector< art::Ptr< recob::Hit > > fHits
| std::vector<Hit2D*> const& ems::DirOfGamma::GetHits2D |
( |
| ) |
const |
|
inline |
| size_t ems::DirOfGamma::GetIdCandidate |
( |
| ) |
|
|
inline |
| size_t ems::DirOfGamma::GetIdCl |
( |
| ) |
const |
|
inline |
Definition at line 155 of file DirOfGamma.h.
std::vector< art::Ptr< recob::Hit > > fIniHits
| void ems::DirOfGamma::SetIdCandidate |
( |
size_t |
id | ) |
|
|
inline |
Definition at line 137 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 |
| 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: