CosmicRayTaggingTool class. More...
#include <CosmicRayTaggingTool.h>
Classes | |
class | CRCandidate |
Class to encapsulate the logic required determine if a Pfo should or shouldn't be tagged as a cosmic ray. More... | |
Public Member Functions | |
CosmicRayTaggingTool () | |
Default constructor. More... | |
pandora::StatusCode | Initialize () |
void | FindAmbiguousPfos (const pandora::PfoList &parentCosmicRayPfos, pandora::PfoList &ambiguousPfos, const MasterAlgorithm *const pAlgorithm) |
Find the list of ambiguous pfos (could represent cosmic-ray muons or neutrinos) More... | |
Private Types | |
typedef std::list< CRCandidate > | CRCandidateList |
typedef std::unordered_map< const pandora::ParticleFlowObject *, pandora::PfoList > | PfoToPfoListMap |
typedef std::unordered_map< const pandora::ParticleFlowObject *, unsigned int > | PfoToSliceIdMap |
typedef std::unordered_map< const pandora::ParticleFlowObject *, bool > | PfoToBoolMap |
typedef std::set< unsigned int > | UIntSet |
typedef std::unordered_map< int, bool > | IntBoolMap |
typedef std::pair< const ThreeDSlidingFitResult, const ThreeDSlidingFitResult > | SlidingFitPair |
typedef std::unordered_map< const pandora::ParticleFlowObject *, SlidingFitPair > | PfoToSlidingFitsMap |
typedef std::vector< pandora::PfoList > | SliceList |
Private Member Functions | |
bool | GetValid3DCluster (const pandora::ParticleFlowObject *const pPfo, const pandora::Cluster *&pCluster3D) const |
Get the 3D calo hit cluster associated with a given Pfo, and check if it has sufficient hits. More... | |
void | GetPfoAssociations (const pandora::PfoList &parentCosmicRayPfos, PfoToPfoListMap &pfoAssociationMap) const |
Get mapping between Pfos that are associated with it other by pointing. More... | |
bool | CheckAssociation (const pandora::CartesianVector &endPoint1, const pandora::CartesianVector &endDir1, const pandora::CartesianVector &endPoint2, const pandora::CartesianVector &endDir2) const |
Check whethe two Pfo endpoints are associated by distance of closest approach. More... | |
void | SliceEvent (const pandora::PfoList &parentCosmicRayPfos, const PfoToPfoListMap &pfoAssociationMap, PfoToSliceIdMap &pfoToSliceIdMap) const |
Break the event up into slices of associated Pfos. More... | |
void | FillSlice (const pandora::ParticleFlowObject *const pPfo, const PfoToPfoListMap &pfoAssociationMap, pandora::PfoList &slice) const |
Fill a slice iteratively using Pfo associations. More... | |
void | GetCRCandidates (const pandora::PfoList &parentCosmicRayPfos, const PfoToSliceIdMap &pfoToSliceIdMap, CRCandidateList &candidates) const |
Make a list of CRCandidates. More... | |
void | CheckIfInTime (const CRCandidateList &candidates, PfoToBoolMap &pfoToInTimeMap) const |
Check if each candidate is "in time". More... | |
void | CheckIfContained (const CRCandidateList &candidates, PfoToBoolMap &pfoToIsContainedMap) const |
Check if each candidate is "contained" (contained = no associations to Y or Z detector faces, but the Pfo could still enter or exit by and X-face) More... | |
void | CheckIfTopToBottom (const CRCandidateList &candidates, PfoToBoolMap &pfoToIsTopToBottomMap) const |
Check if each candidate is "top to bottom". More... | |
void | GetNeutrinoSlices (const CRCandidateList &candidates, const PfoToBoolMap &pfoToInTimeMap, const PfoToBoolMap &pfoToIsContainedMap, UIntSet &neutrinoSliceSet) const |
Get the slice indices which contain a likely neutrino Pfo. More... | |
void | TagCRMuons (const CRCandidateList &candidates, const PfoToBoolMap &pfoToInTimeMap, const PfoToBoolMap &pfoToIsTopToBottomMap, const UIntSet &neutrinoSliceSet, PfoToBoolMap &pfoToIsLikelyCRMuonMap) const |
Tag Pfos which are likely to be a CR muon. More... | |
pandora::StatusCode | ReadSettings (const pandora::TiXmlHandle xmlHandle) |
Private Attributes | |
std::string | m_cutMode |
Choose a set of cuts using a keyword - "cautious" = remove as few neutrinos as possible "nominal" = optimised to maximise CR removal whilst preserving neutrinos "aggressive" = remove CR muons and allow more neutrinos to be tagged. More... | |
float | m_angularUncertainty |
The uncertainty in degrees for the angle of a Pfo. More... | |
float | m_positionalUncertainty |
The uncertainty in cm for the position of Pfo endpoint in 3D. More... | |
float | m_maxAssociationDist |
The maximum distance from endpoint to point of closest approach, typically a multiple of LAr radiation length. More... | |
unsigned int | m_minimumHits |
The minimum number of hits for a Pfo to be considered. More... | |
float | m_inTimeMargin |
The maximum distance outside of the physical detector volume that a Pfo may be to still be considered in time. More... | |
float | m_inTimeMaxX0 |
The maximum pfo x0 (determined from shifted vertex) to allow pfo to still be considered in time. More... | |
float | m_marginY |
The minimum distance from a detector Y-face for a Pfo to be associated. More... | |
float | m_marginZ |
The minimum distance from a detector Z-face for a Pfo to be associated. More... | |
float | m_maxNeutrinoCosTheta |
The maximum cos(theta) that a Pfo can have to be classified as a likely neutrino. More... | |
float | m_minCosmicCosTheta |
The minimum cos(theta) that a Pfo can have to be classified as a likely CR muon. More... | |
float | m_maxCosmicCurvature |
The maximum curvature that a Pfo can have to be classified as a likely CR muon. More... | |
float | m_face_Xa |
Anode X face. More... | |
float | m_face_Xc |
Cathode X face. More... | |
float | m_face_Yb |
Bottom Y face. More... | |
float | m_face_Yt |
Top Y face. More... | |
float | m_face_Zu |
Upstream Z face. More... | |
float | m_face_Zd |
Downstream Z face. More... | |
CosmicRayTaggingTool class.
Definition at line 23 of file CosmicRayTaggingTool.h.
|
private |
Definition at line 68 of file CosmicRayTaggingTool.h.
|
private |
Definition at line 159 of file CosmicRayTaggingTool.h.
|
private |
Definition at line 132 of file CosmicRayTaggingTool.h.
|
private |
Definition at line 80 of file CosmicRayTaggingTool.h.
|
private |
Definition at line 103 of file CosmicRayTaggingTool.h.
|
private |
Definition at line 187 of file CosmicRayTaggingTool.h.
|
private |
Definition at line 188 of file CosmicRayTaggingTool.h.
|
private |
Definition at line 186 of file CosmicRayTaggingTool.h.
|
private |
Definition at line 158 of file CosmicRayTaggingTool.h.
lar_content::CosmicRayTaggingTool::CosmicRayTaggingTool | ( | ) |
Default constructor.
Definition at line 23 of file CosmicRayTaggingTool.cc.
|
private |
Check whethe two Pfo endpoints are associated by distance of closest approach.
endPoint1 | position vector of an endpoint of Pfo 1 |
endDir1 | direction vector of an endpoint of Pfo 1 |
endPoint2 | position vector of an endpoint of Pfo 2 |
endDir2 | direction vector of an endpoint of Pfos |
Definition at line 220 of file CosmicRayTaggingTool.cc.
|
private |
Check if each candidate is "contained" (contained = no associations to Y or Z detector faces, but the Pfo could still enter or exit by and X-face)
candidates | input list of candidates |
pfoToIsContainedMap | output mapping between candidates Pfos and if they are contained |
Definition at line 430 of file CosmicRayTaggingTool.cc.
|
private |
Check if each candidate is "in time".
candidates | input list of candidates |
pfoToInTimeMap | output mapping between candidates Pfos and if they are in time |
Definition at line 339 of file CosmicRayTaggingTool.cc.
|
private |
Check if each candidate is "top to bottom".
candidates | input list of candidates |
pfoToIsTopToBottomMap | output mapping between candidates Pfos and if they are top to bottom |
Definition at line 455 of file CosmicRayTaggingTool.cc.
|
private |
Fill a slice iteratively using Pfo associations.
pPfo | Pfo to add to the slice |
pfoAssociationMap | mapping between Pfos and other associated Pfos |
slice | the slice to add Pfos to |
Definition at line 308 of file CosmicRayTaggingTool.cc.
|
virtual |
Find the list of ambiguous pfos (could represent cosmic-ray muons or neutrinos)
parentCosmicRayPfos | the list of parent cosmic-ray pfos |
ambiguousPfos | to receive the list of ambiguous pfos |
pAlgorithm | the address of this master algorithm |
Implements lar_content::CosmicRayTaggingBaseTool.
Definition at line 74 of file CosmicRayTaggingTool.cc.
|
private |
Make a list of CRCandidates.
parentCosmicRayPfos | input list of Pfos |
pfoToSliceIdMap | input mapping between Pfos and their slice id |
candidates | to receive the output list of CRCandidates |
Definition at line 326 of file CosmicRayTaggingTool.cc.
|
private |
Get the slice indices which contain a likely neutrino Pfo.
candidates | input list of candidates |
pfoToInTimeMap | input map between Pfo and if in time |
pfoToIsContainedMap | input map between Pfo and if contained |
neutrinoSliceSet | output set of slice indices containing a likely neutrino Pfo |
Definition at line 473 of file CosmicRayTaggingTool.cc.
|
private |
Get mapping between Pfos that are associated with it other by pointing.
parentCosmicRayPfos | input list of Pfos |
pfoAssociationsMap | to receive the output mapping between associated Pfos |
Definition at line 157 of file CosmicRayTaggingTool.cc.
|
private |
Get the 3D calo hit cluster associated with a given Pfo, and check if it has sufficient hits.
pPfo | input Pfo |
pCluster3D | to receive the address of the 3D cluster |
Definition at line 141 of file CosmicRayTaggingTool.cc.
StatusCode lar_content::CosmicRayTaggingTool::Initialize | ( | void | ) |
Definition at line 47 of file CosmicRayTaggingTool.cc.
|
private |
Definition at line 581 of file CosmicRayTaggingTool.cc.
|
private |
Break the event up into slices of associated Pfos.
parentCosmicRayPfos | input list of Pfos |
pfoAssociationMap | mapping between Pfos and other associated Pfos |
pfoToSliceIdMap | to receive the mapping between Pfos and their slice ID |
Definition at line 269 of file CosmicRayTaggingTool.cc.
|
private |
Tag Pfos which are likely to be a CR muon.
candidates | input list of candidates |
pfoToInTimeMap | input map between Pfo and if in time |
pfoToIsTopToBottomMap | input mapping between candidate Pfos and if they are top to bottom |
neutrinoSliceSet | input set of slice indices containing a likely neutrino Pfo |
pfoToIsLikelyCRMuonMap | to receive the output mapping between Pfos and a boolean deciding if they are likely a CR muon |
Definition at line 502 of file CosmicRayTaggingTool.cc.
|
private |
The uncertainty in degrees for the angle of a Pfo.
Definition at line 197 of file CosmicRayTaggingTool.h.
|
private |
Choose a set of cuts using a keyword - "cautious" = remove as few neutrinos as possible "nominal" = optimised to maximise CR removal whilst preserving neutrinos "aggressive" = remove CR muons and allow more neutrinos to be tagged.
Definition at line 195 of file CosmicRayTaggingTool.h.
|
private |
Anode X face.
Definition at line 211 of file CosmicRayTaggingTool.h.
|
private |
Cathode X face.
Definition at line 212 of file CosmicRayTaggingTool.h.
|
private |
Bottom Y face.
Definition at line 213 of file CosmicRayTaggingTool.h.
|
private |
Top Y face.
Definition at line 214 of file CosmicRayTaggingTool.h.
|
private |
Downstream Z face.
Definition at line 216 of file CosmicRayTaggingTool.h.
|
private |
Upstream Z face.
Definition at line 215 of file CosmicRayTaggingTool.h.
|
private |
The maximum distance outside of the physical detector volume that a Pfo may be to still be considered in time.
Definition at line 203 of file CosmicRayTaggingTool.h.
|
private |
The maximum pfo x0 (determined from shifted vertex) to allow pfo to still be considered in time.
Definition at line 204 of file CosmicRayTaggingTool.h.
|
private |
The minimum distance from a detector Y-face for a Pfo to be associated.
Definition at line 205 of file CosmicRayTaggingTool.h.
|
private |
The minimum distance from a detector Z-face for a Pfo to be associated.
Definition at line 206 of file CosmicRayTaggingTool.h.
|
private |
The maximum distance from endpoint to point of closest approach, typically a multiple of LAr radiation length.
Definition at line 199 of file CosmicRayTaggingTool.h.
|
private |
The maximum curvature that a Pfo can have to be classified as a likely CR muon.
Definition at line 209 of file CosmicRayTaggingTool.h.
|
private |
The maximum cos(theta) that a Pfo can have to be classified as a likely neutrino.
Definition at line 207 of file CosmicRayTaggingTool.h.
|
private |
The minimum cos(theta) that a Pfo can have to be classified as a likely CR muon.
Definition at line 208 of file CosmicRayTaggingTool.h.
|
private |
The minimum number of hits for a Pfo to be considered.
Definition at line 201 of file CosmicRayTaggingTool.h.
|
private |
The uncertainty in cm for the position of Pfo endpoint in 3D.
Definition at line 198 of file CosmicRayTaggingTool.h.