StitchingCosmicRayMergingTool class. More...
#include <StitchingCosmicRayMergingTool.h>
Classes | |
class | PfoAssociation |
PfoAssociation class. More... | |
Public Member Functions | |
StitchingCosmicRayMergingTool () | |
Default constructor. More... | |
void | Run (const MasterAlgorithm *const pAlgorithm, const pandora::PfoList *const pMultiPfoList, PfoToLArTPCMap &pfoToLArTPCMap, PfoToFloatMap &stitchedPfosToX0Map) |
Run the algorithm tool. More... | |
Private Types | |
typedef std::unordered_map < const pandora::ParticleFlowObject *, LArPointingCluster > | ThreeDPointingClusterMap |
typedef std::unordered_map < const pandora::LArTPC *, pandora::PfoList > | LArTPCToPfoMap |
typedef std::unordered_map < const pandora::ParticleFlowObject *, PfoAssociation > | PfoAssociationMap |
typedef std::unordered_map < const pandora::ParticleFlowObject *, PfoAssociationMap > | PfoAssociationMatrix |
typedef std::unordered_map < const pandora::ParticleFlowObject *, pandora::PfoList > | PfoMergeMap |
typedef std::unordered_map < const pandora::ParticleFlowObject *, LArPointingCluster::Vertex > | PfoToPointingVertexMap |
typedef std::unordered_map < const pandora::ParticleFlowObject *, PfoToPointingVertexMap > | PfoToPointingVertexMatrix |
Private Member Functions | |
pandora::StatusCode | ReadSettings (const pandora::TiXmlHandle xmlHandle) |
void | SelectPrimaryPfos (const pandora::PfoList *pInputPfoList, const PfoToLArTPCMap &pfoToLArTPCMap, pandora::PfoList &outputPfoList) const |
Select primary Pfos from the input list of Pfos. More... | |
void | BuildPointingClusterMaps (const pandora::PfoList &inputPfoList, const PfoToLArTPCMap &pfoToLArTPCMap, ThreeDPointingClusterMap &pointingClusterMap) const |
Build a 3D pointing cluster for each Pfo. More... | |
void | BuildTPCMaps (const pandora::PfoList &inputPfoList, const PfoToLArTPCMap &pfoToLArTPCMap, LArTPCToPfoMap &larTPCToPfoMap) const |
Build a list of Pfos for each tpc. More... | |
void | CreatePfoMatches (const LArTPCToPfoMap &larTPCToPfoMap, const ThreeDPointingClusterMap &pointingClusterMap, PfoAssociationMatrix &pfoAssociationMatrix) const |
Create associations between Pfos using 3D pointing clusters. More... | |
void | CreatePfoMatches (const pandora::LArTPC &larTPC1, const pandora::LArTPC &larTPC2, const pandora::ParticleFlowObject *const pPfo1, const pandora::ParticleFlowObject *const pPfo2, const ThreeDPointingClusterMap &pointingClusterMap, PfoAssociationMatrix &pfoAssociationMatrix) const |
Create associations between Pfos using 3D pointing clusters. More... | |
void | SelectPfoMatches (const PfoAssociationMatrix &pfoAssociationMatrix, PfoMergeMap &pfoSelectedMatches) const |
Select the best associations between Pfos; create a mapping between associated Pfos, handling any ambiguities. More... | |
void | SelectPfoMerges (const PfoMergeMap &pfoMatches, PfoMergeMap &pfoMerges) const |
Create an initial map of Pfo merges to be made. More... | |
void | CollectAssociatedPfos (const pandora::ParticleFlowObject *const pSeedPfo, const pandora::ParticleFlowObject *const pCurrentPfo, const PfoMergeMap &pfoMerges, const pandora::PfoSet &vetoSet, pandora::PfoList &associatedList) const |
Collect up associations between Pfos. More... | |
void | OrderPfoMerges (const PfoToLArTPCMap &pfoToLArTPCMap, const ThreeDPointingClusterMap &pointingClusterMap, const PfoMergeMap &inputPfoMerges, PfoMergeMap &outputPfoMerges) const |
Identify the vertex Pfo and then re-order the map of merges so that the vertex Pfo will be enlarged. More... | |
void | StitchPfos (const MasterAlgorithm *const pAlgorithm, const ThreeDPointingClusterMap &pointingClusterMap, const PfoMergeMap &pfoMerges, PfoToLArTPCMap &pfoToLArTPCMap, PfoToFloatMap &stitchedPfosToX0Map) const |
Apply X0 corrections, and then stitch together Pfos. More... | |
void | ShiftPfo (const MasterAlgorithm *const pAlgorithm, const pandora::ParticleFlowObject *const pPfoToShift, const pandora::ParticleFlowObject *const pMatchedPfo, const float x0, const PfoToLArTPCMap &pfoToLArTPCMap, const PfoToPointingVertexMatrix &pfoToPointingVertexMatrix) const |
Shift a pfo given its pfo stitching pair. More... | |
bool | CalculateX0 (const PfoToLArTPCMap &pfoToLArTPCMap, const ThreeDPointingClusterMap &pointingClusterMap, const pandora::PfoVector &pfoVector, float &x0, PfoToPointingVertexMatrix &pfoToPointingVertexMatrix) const |
Calculate x0 shift for a group of associated Pfos. More... | |
Private Attributes | |
bool | m_useXcoordinate |
bool | m_alwaysApplyT0Calculation |
int | m_halfWindowLayers |
float | m_minLengthSquared |
float | m_minCosRelativeAngle |
float | m_relaxMinLongitudinalDisplacement |
The minimum value of the longitudinal impact parameter for association if both verticies fall in the detector gap. More... | |
float | m_maxLongitudinalDisplacementX |
float | m_maxTransverseDisplacement |
float | m_relaxCosRelativeAngle |
float | m_relaxTransverseDisplacement |
unsigned int | m_minNCaloHits3D |
float | m_maxX0FractionalDeviation |
The maximum allowed fractional difference of an X0 contribution for matches to be stitched. More... | |
float | m_boundaryToleranceWidth |
The distance from the APA/CPA boundary inside which the deviation consideration is ignored. More... | |
StitchingCosmicRayMergingTool class.
Definition at line 23 of file StitchingCosmicRayMergingTool.h.
|
private |
Definition at line 110 of file StitchingCosmicRayMergingTool.h.
|
private |
Definition at line 121 of file StitchingCosmicRayMergingTool.h.
|
private |
Definition at line 122 of file StitchingCosmicRayMergingTool.h.
|
private |
Definition at line 148 of file StitchingCosmicRayMergingTool.h.
|
private |
Definition at line 201 of file StitchingCosmicRayMergingTool.h.
|
private |
Definition at line 202 of file StitchingCosmicRayMergingTool.h.
|
private |
Definition at line 98 of file StitchingCosmicRayMergingTool.h.
lar_content::StitchingCosmicRayMergingTool::StitchingCosmicRayMergingTool | ( | ) |
Default constructor.
Definition at line 25 of file StitchingCosmicRayMergingTool.cc.
|
private |
Build a 3D pointing cluster for each Pfo.
inputPfoList | the input list of Pfos |
pfoToLArTPCMap | the input mapping between Pfos and tpc |
pointingClusterMap | the mapping between Pfos and their corresponding 3D pointing clusters |
Definition at line 98 of file StitchingCosmicRayMergingTool.cc.
|
private |
Build a list of Pfos for each tpc.
inputPfoList | the input list of Pfos |
pfoToLArTPCMap | the input mapping between Pfos and tpc |
larTPCToPfoMap | the output mapping between tpc and Pfos |
Definition at line 129 of file StitchingCosmicRayMergingTool.cc.
|
private |
Calculate x0 shift for a group of associated Pfos.
pfoToLArTPCMap | the mapping between pfos and tpc |
pointingClusterMap | the mapping between Pfos and their corresponding 3D pointing clusters |
pfoVector | the vector of parent Pfos to stitch together |
x0 | the output x0 value |
pfoToPointingVertexMatrix | map of pfo to a map of matched pfo and the corresponding pointing vertex used in stitching |
Definition at line 662 of file StitchingCosmicRayMergingTool.cc.
|
private |
Collect up associations between Pfos.
pSeedPfo | the seed Pfo (will be enlarged after merging) |
pCurrentPfo | the target Pfo (will be deleted after merging) |
pfoMerges | the list of associations between Pfos |
vetoSet | the set of associated Pfos that have already been considered |
associatedList | the output list of associated Pfos |
Definition at line 432 of file StitchingCosmicRayMergingTool.cc.
|
private |
Create associations between Pfos using 3D pointing clusters.
larTPCToPfoMap | the input mapping between tpc and Pfos |
pointingClusterMap | the input mapping between Pfos and their corresponding 3D pointing clusters |
pfoAssociationMatrix | the output matrix of associations between Pfos |
Definition at line 142 of file StitchingCosmicRayMergingTool.cc.
|
private |
Create associations between Pfos using 3D pointing clusters.
larTPC1 | the tpc description for the first Pfo |
larTPC2 | the tpc description for the second Pfo |
pPfo1 | the first Pfo |
pPfo2 | the second Pfo |
pointingClusterMap | the input mapping between Pfos and their corresponding 3D pointing clusters |
pfoAssociationMatrix | the output matrix of associations between Pfos |
|
private |
Identify the vertex Pfo and then re-order the map of merges so that the vertex Pfo will be enlarged.
pfoToLArTPCMap | the mapping between pfos and tpc |
pointingClusterMap | the mapping between Pfos and their corresponding 3D pointing clusters |
inputPfoMerges | the input map of Pfo merges |
outputPfoMerges | the re-ordered map of Pfo merges |
Definition at line 461 of file StitchingCosmicRayMergingTool.cc.
|
private |
Definition at line 818 of file StitchingCosmicRayMergingTool.cc.
|
virtual |
Run the algorithm tool.
pAlgorithm | address of the calling algorithm |
pMultiPfoList | the list of pfos in multiple lar tpcs |
pfoToLArTPCMap | the pfo to lar tpc map |
stitchedPfosToX0Map | a map of cosmic-ray pfos that have been stitched between lar tpcs to the X0 shift |
Implements lar_content::StitchingBaseTool.
Definition at line 42 of file StitchingCosmicRayMergingTool.cc.
|
private |
Select the best associations between Pfos; create a mapping between associated Pfos, handling any ambiguities.
pfoAssociationMatrix | the input list of all associations between Pfos |
pfoSelectedMatches | the output list of good associations between pfos (candidates for merging) |
Definition at line 291 of file StitchingCosmicRayMergingTool.cc.
|
private |
Create an initial map of Pfo merges to be made.
pfoMatches | the input list of associated Pfos |
pfoMerges | the output mapping between Pfos to enlarge and Pfos to delete |
Definition at line 392 of file StitchingCosmicRayMergingTool.cc.
|
private |
Select primary Pfos from the input list of Pfos.
pInputPfoList | the input list of Pfos |
pfoToLArTPCMap | the input mapping between Pfos and tpc |
outputPfoList | the output list of Pfos |
Definition at line 80 of file StitchingCosmicRayMergingTool.cc.
|
private |
Shift a pfo given its pfo stitching pair.
pPfoToShift | the pfo of the stitching pair to shift |
pMatchedPfo | the pfo of the stitching pair to remain stationary |
x0 | the distance by which pPfoToShift is to be shifted (direction of shift is determined in method) |
pfoToLArTPCMap | the pfo to lar tpc map |
pfoToPointingVertexMatrix | the map [pfo -> map [matched pfo -> pfo stitching vertex]] |
Definition at line 618 of file StitchingCosmicRayMergingTool.cc.
|
private |
Apply X0 corrections, and then stitch together Pfos.
pAlgorithm | the address of the parent stitching algorithm |
pointingClusterMap | the mapping between Pfos and their corresponding 3D pointing clusters |
pfoMerges | the input map of Pfo merges |
pfoToLArTPCMap | the pfo to lar tpc map |
stitchedPfosToX0Map | a map of cosmic-ray pfos that have been stitched between lar tpcs to the X0 shift |
Definition at line 541 of file StitchingCosmicRayMergingTool.cc.
|
private |
Definition at line 232 of file StitchingCosmicRayMergingTool.h.
|
private |
The distance from the APA/CPA boundary inside which the deviation consideration is ignored.
Definition at line 243 of file StitchingCosmicRayMergingTool.h.
|
private |
Definition at line 233 of file StitchingCosmicRayMergingTool.h.
|
private |
Definition at line 237 of file StitchingCosmicRayMergingTool.h.
|
private |
Definition at line 238 of file StitchingCosmicRayMergingTool.h.
|
private |
The maximum allowed fractional difference of an X0 contribution for matches to be stitched.
Definition at line 242 of file StitchingCosmicRayMergingTool.h.
|
private |
Definition at line 235 of file StitchingCosmicRayMergingTool.h.
|
private |
Definition at line 234 of file StitchingCosmicRayMergingTool.h.
|
private |
Definition at line 241 of file StitchingCosmicRayMergingTool.h.
|
private |
Definition at line 239 of file StitchingCosmicRayMergingTool.h.
|
private |
The minimum value of the longitudinal impact parameter for association if both verticies fall in the detector gap.
Definition at line 236 of file StitchingCosmicRayMergingTool.h.
|
private |
Definition at line 240 of file StitchingCosmicRayMergingTool.h.
|
private |
Definition at line 231 of file StitchingCosmicRayMergingTool.h.