#include <PmaNode3D.h>
Public Member Functions | |
Node3D () | |
Node3D (detinfo::DetectorPropertiesData const &detProp, const TVector3 &p3d, unsigned int tpc, unsigned int cryo, bool vtx=false, double xshift=0) | |
TVector3 const & | Point3D () const |
bool | SetPoint3D (const TVector3 &p3d) |
TVector2 const & | Projection2D (unsigned int view) const |
double | GetDistToWall () const |
bool | SameTPC (const TVector3 &p3d, float margin=0.0F) const |
Check if p3d is in the same TPC as the node. More... | |
bool | SameTPC (const pma::Vector3D &p3d, float margin=0.0F) const |
bool | IsBranching () const |
Belongs to more than one track? More... | |
bool | IsTPCEdge () const |
Is the first/last in this TPC? More... | |
bool | IsVertex () const |
Check fIsVertex flag. More... | |
void | SetVertex (bool state) |
void | SetVertexToBranching (bool setAllNodes) |
std::vector< pma::Track3D * > | GetBranches () const |
double | GetDistance2To (const TVector3 &p3d) const override |
Distance [cm] from the 3D point to the point 3D. More... | |
double | GetDistance2To (const TVector2 &p2d, unsigned int view) const override |
pma::Vector3D | GetDirection3D () const override |
TVector3 | GetUnconstrainedProj3D (const TVector2 &p2d, unsigned int view) const override |
In case of a node it is simply 3D position of the node. More... | |
void | SetProjection (pma::Hit3D &h) const override |
Set hit 3D position and its 2D projection to the vertex. More... | |
double | Length2 () const override |
double | SegmentCos () const |
Cosine of 3D angle between connected segments. More... | |
double | SegmentCosWirePlane () const |
double | SegmentCosTransverse () const |
double | GetObjFunction (float penaltyValue, float endSegWeight) const |
Objective function minimized during oprimization. More... | |
void | Optimize (float penaltyValue, float endSegWeight) |
void | ClearAssigned (pma::Track3D *trk=0) override |
void | ApplyDriftShift (double dx) |
double | GetDriftShift () const |
Public Member Functions inherited from pma::Element3D | |
int | TPC (void) const |
TPC index or -1 if out of any TPC. More... | |
int | Cryo (void) const |
Cryostat index or -1 if out of any cryostat. More... | |
double | Length (void) const |
const std::vector< pma::Hit3D * > & | Hits (void) const |
bool | HasHit (const pma::Hit3D *h) const |
pma::Hit3D & | Hit (size_t index) |
void | RemoveHitAt (size_t index) |
void | AddHit (pma::Hit3D *h) |
size_t | NHits (void) const |
size_t | NEnabledHits (unsigned int view=geo::kUnknown) const |
size_t | NPrecalcEnabledHits (void) const |
TVector3 const & | ReferencePoint (size_t index) const |
size_t | NPoints (void) const |
void | AddPoint (TVector3 *p) |
void | UpdateHitParams (void) |
void | UpdateProjection (void) |
void | SortHits (void) |
double | SumDist2 (void) const |
double | SumDist2 (unsigned int view) const |
double | SumHitsQ (unsigned int view) const |
unsigned int | NHits (unsigned int view) const |
unsigned int | NThisHits (unsigned int view) const |
double | HitsRadius3D (unsigned int view) const |
bool | IsFrozen (void) const |
Check if the vertex 3D position is fixed. More... | |
void | SetFrozen (bool state) |
Fix / relese vertex 3D position. More... | |
bool | SelectRndHits (size_t nmax_per_view) |
bool | SelectAllHits (void) |
Public Member Functions inherited from pma::SortedBranchBase | |
SortedBranchBase (void) | |
SortedBranchBase (pma::SortedObjectBase *prevElement, pma::SortedObjectBase *nextElement=0) | |
SortedBranchBase (const pma::SortedBranchBase &src) | |
Note: copy constructor does not preserve connections. More... | |
virtual | ~SortedBranchBase (void) |
virtual void | Disconnect (void) |
virtual bool | AddNext (pma::SortedObjectBase *nextElement) |
virtual int | RemoveNext (pma::SortedObjectBase *nextElement) |
virtual pma::SortedObjectBase * | Next (unsigned int index=0) const |
virtual unsigned int | NextCount (void) const |
virtual bool | IsLast (void) const |
Public Member Functions inherited from pma::SortedObjectBase | |
SortedObjectBase (void) | |
SortedObjectBase (pma::SortedObjectBase *prevElement, pma::SortedObjectBase *nextElement) | |
SortedObjectBase (const pma::SortedObjectBase &src) | |
Note: copy constructor does not preserve connections. More... | |
virtual | ~SortedObjectBase (void) |
virtual bool | IsFirst (void) const |
virtual pma::SortedObjectBase * | Prev (void) const |
Static Public Member Functions | |
static void | SetMargin (double m) |
Set allowed node position margin around TPC. More... | |
Static Public Member Functions inherited from pma::Element3D | |
static float | OptFactor (unsigned int view) |
static void | SetOptFactor (unsigned int view, float value) |
Private Member Functions | |
bool | LimitPoint3D () |
Returns true if node position was trimmed to its TPC volume + fMargin. More... | |
void | UpdateProj2D () |
double | EndPtCos2Transverse () const |
double | PiInWirePlane () const |
double | PenaltyInWirePlane () const |
double | Pi (float endSegWeight, bool doAsymm) const |
double | Penalty (float endSegWeight) const |
double | Mse () const |
double | MakeGradient (float penaltyValue, float endSegWeight) |
double | StepWithGradient (float alfa, float tol, float penalty, float weight) |
double | SumDist2Hits () const override |
Private Attributes | |
geo::TPCGeo const & | fTpcGeo |
double | fMinX |
double | fMaxX |
double | fMinY |
double | fMaxY |
double | fMinZ |
double | fMaxZ |
TVector3 | fPoint3D |
TVector2 | fProj2D [3] |
double | fDriftOffset |
TVector3 | fGradient |
bool | fIsVertex |
Static Private Attributes | |
static bool | fGradFixed [3] = {false, false, false} |
static double | fMargin = 3.0 |
Additional Inherited Members | |
Protected Member Functions inherited from pma::Element3D | |
Element3D (void) | |
Protected Attributes inherited from pma::Element3D | |
int | fTPC |
int | fCryo |
bool | fFrozen |
std::vector< pma::Hit3D * > | fAssignedHits |
std::vector< TVector3 * > | fAssignedPoints |
size_t | fNThisHits [3] |
size_t | fNThisHitsEnabledAll |
size_t | fNHits [3] |
double | fSumHitsQ [3] |
double | fHitsRadius |
Protected Attributes inherited from pma::SortedBranchBase | |
std::vector < pma::SortedObjectBase * > | next_vector |
Protected Attributes inherited from pma::SortedObjectBase | |
pma::SortedObjectBase * | next |
pma::SortedObjectBase * | prev |
Static Protected Attributes inherited from pma::Element3D | |
static float | fOptFactors [3] = { 0.2F, 0.8F, 1.0F } |
Definition at line 34 of file PmaNode3D.h.
pma::Node3D::Node3D | ( | ) |
Definition at line 28 of file PmaNode3D.cxx.
pma::Node3D::Node3D | ( | detinfo::DetectorPropertiesData const & | detProp, |
const TVector3 & | p3d, | ||
unsigned int | tpc, | ||
unsigned int | cryo, | ||
bool | vtx = false , |
||
double | xshift = 0 |
||
) |
Definition at line 48 of file PmaNode3D.cxx.
|
inline |
Definition at line 138 of file PmaNode3D.h.
|
overridevirtual |
Clear hits/points vectors of this element, optionally only those which are owned by given track.
Reimplemented from pma::Element3D.
Definition at line 853 of file PmaNode3D.cxx.
|
private |
Definition at line 372 of file PmaNode3D.cxx.
std::vector< pma::Track3D * > pma::Node3D::GetBranches | ( | ) | const |
Definition at line 463 of file PmaNode3D.cxx.
|
overridevirtual |
Get 3D direction cosines of the next segment, or previous segment if this is the last node.
Implements pma::Element3D.
Definition at line 206 of file PmaNode3D.cxx.
|
overridevirtual |
Distance [cm] from the 3D point to the point 3D.
Implements pma::Element3D.
Definition at line 178 of file PmaNode3D.cxx.
|
overridevirtual |
Distance [cm] from the 2D point to the object's 2D projection in one of wire views.
Implements pma::Element3D.
Definition at line 184 of file PmaNode3D.cxx.
double pma::Node3D::GetDistToWall | ( | ) | const |
Definition at line 82 of file PmaNode3D.cxx.
|
inline |
Definition at line 144 of file PmaNode3D.h.
double pma::Node3D::GetObjFunction | ( | float | penaltyValue, |
float | endSegWeight | ||
) | const |
|
inlineoverridevirtual |
In case of a node it is simply 3D position of the node.
Implements pma::Element3D.
Definition at line 104 of file PmaNode3D.h.
bool pma::Node3D::IsBranching | ( | ) | const |
Belongs to more than one track?
Definition at line 436 of file PmaNode3D.cxx.
bool pma::Node3D::IsTPCEdge | ( | ) | const |
Is the first/last in this TPC?
Definition at line 451 of file PmaNode3D.cxx.
|
inline |
Check fIsVertex flag.
Definition at line 74 of file PmaNode3D.h.
|
overridevirtual |
Squared sum of half-lengths of connected 3D segments (used in the vertex position optimization).
Implements pma::Element3D.
Definition at line 299 of file PmaNode3D.cxx.
|
private |
Returns true if node position was trimmed to its TPC volume + fMargin.
Definition at line 124 of file PmaNode3D.cxx.
|
private |
Definition at line 583 of file PmaNode3D.cxx.
|
private |
Definition at line 554 of file PmaNode3D.cxx.
void pma::Node3D::Optimize | ( | float | penaltyValue, |
float | endSegWeight | ||
) |
Optimize vertex 3D position with given penalty on connected segments angle and weight assigned to the outermost segments. Only MSE is used in case of branching nodes.
Definition at line 843 of file PmaNode3D.cxx.
|
private |
Definition at line 534 of file PmaNode3D.cxx.
|
private |
Definition at line 412 of file PmaNode3D.cxx.
|
private |
Definition at line 477 of file PmaNode3D.cxx.
|
private |
Definition at line 390 of file PmaNode3D.cxx.
|
inline |
Definition at line 45 of file PmaNode3D.h.
|
inline |
Definition at line 55 of file PmaNode3D.h.
bool pma::Node3D::SameTPC | ( | const TVector3 & | p3d, |
float | margin = 0.0F |
||
) | const |
bool pma::Node3D::SameTPC | ( | const pma::Vector3D & | p3d, |
float | margin = 0.0F |
||
) | const |
Definition at line 113 of file PmaNode3D.cxx.
double pma::Node3D::SegmentCos | ( | ) | const |
Cosine of 3D angle between connected segments.
Definition at line 312 of file PmaNode3D.cxx.
double pma::Node3D::SegmentCosTransverse | ( | ) | const |
Cosine of 2D angle (in horizontal plane, parallel to drift) between connected segments. Should be changed / generalized for horizontal wire planes (e.g. 2-phase LAr).
Definition at line 352 of file PmaNode3D.cxx.
double pma::Node3D::SegmentCosWirePlane | ( | ) | const |
Cosine of 2D angle (in plane parallel to wire planes) between connected segments. Should be changed / generalized for horizontal wire planes (e.g. 2-phase LAr).
Definition at line 333 of file PmaNode3D.cxx.
|
inlinestatic |
Set allowed node position margin around TPC.
Definition at line 151 of file PmaNode3D.h.
bool pma::Node3D::SetPoint3D | ( | const TVector3 & | p3d | ) |
Returns true if the new position was accepted; returns false if the new position was trimmed to fit insite TPC volume + fMargin.
Definition at line 167 of file PmaNode3D.cxx.
|
overridevirtual |
Set hit 3D position and its 2D projection to the vertex.
Implements pma::Element3D.
Definition at line 224 of file PmaNode3D.cxx.
|
inline |
Definition at line 79 of file PmaNode3D.h.
|
inline |
Definition at line 84 of file PmaNode3D.h.
|
private |
Definition at line 667 of file PmaNode3D.cxx.
|
overrideprivatevirtual |
Implements pma::Element3D.
Definition at line 190 of file PmaNode3D.cxx.
|
private |
Definition at line 159 of file PmaNode3D.cxx.
|
private |
Definition at line 182 of file PmaNode3D.h.
|
staticprivate |
Definition at line 187 of file PmaNode3D.h.
|
private |
Definition at line 184 of file PmaNode3D.h.
|
private |
Definition at line 185 of file PmaNode3D.h.
|
staticprivate |
Definition at line 188 of file PmaNode3D.h.
|
private |
Definition at line 176 of file PmaNode3D.h.
|
private |
Definition at line 176 of file PmaNode3D.h.
|
private |
Definition at line 176 of file PmaNode3D.h.
|
private |
Definition at line 176 of file PmaNode3D.h.
|
private |
Definition at line 176 of file PmaNode3D.h.
|
private |
Definition at line 176 of file PmaNode3D.h.
|
private |
Definition at line 179 of file PmaNode3D.h.
|
private |
Definition at line 180 of file PmaNode3D.h.
|
private |
Definition at line 174 of file PmaNode3D.h.