LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
LArPandoraInput class. More...
#include "LArPandoraInput.h"
Classes | |
class | Settings |
Settings class. More... | |
Static Public Member Functions | |
static void | CreatePandoraHits2D (const art::Event &evt, const Settings &settings, const LArDriftVolumeMap &driftVolumeMap, const HitVector &hitVector, IdToHitMap &idToHitMap) |
Create the Pandora 2D hits from the ART hits. More... | |
static void | CreatePandoraLArTPCs (const Settings &settings, const LArDriftVolumeList &driftVolumeList) |
Create pandora LArTPCs to represent the different drift volumes in use. More... | |
static void | CreatePandoraDetectorGaps (const Settings &settings, const LArDriftVolumeList &driftVolumeList, const LArDetectorGapList &listOfGaps) |
Create pandora line gaps to cover dead regions between TPCs in a global drift volume approach. More... | |
static void | CreatePandoraReadoutGaps (const Settings &settings, const LArDriftVolumeMap &driftVolumeMap) |
Create pandora line gaps to cover any (continuous regions of) bad channels. More... | |
static void | CreatePandoraMCParticles (const Settings &settings, const MCTruthToMCParticles &truthToParticles, const MCParticlesToMCTruth &particlesToTruth, const RawMCParticleVector &generatorMCParticleVector) |
Create the Pandora MC particles from the MC particles. More... | |
static void | FindPrimaryParticles (const RawMCParticleVector &mcParticleVector, std::map< const simb::MCParticle, bool > &primaryMCParticleMap) |
Find all primary MCParticles in a given vector of MCParticles. More... | |
static bool | IsPrimaryMCParticle (const art::Ptr< simb::MCParticle > &mcParticle, std::map< const simb::MCParticle, bool > &primaryMCParticleMap) |
Check whether an MCParticle can be found in a given map. More... | |
static void | CreatePandoraMCLinks2D (const Settings &settings, const HitMap &hitMap, const HitsToTrackIDEs &hitToParticleMap) |
Create links between the 2D hits and Pandora MC particles. More... | |
Private Types | |
typedef std::map< std::string, lar_content::MCProcess > | MCProcessMap |
Static Private Member Functions | |
static void | GetTrueStartAndEndPoints (const Settings &settings, const art::Ptr< simb::MCParticle > &particle, int &startT, int &endT) |
Loop over MC trajectory points and identify start and end points within the detector. More... | |
static void | GetTrueStartAndEndPoints (const geo::TPCID &ref_tpcid, const art::Ptr< simb::MCParticle > &particle, int &startT, int &endT) |
Loop over MC trajectory points and identify start and end points within a given cryostat and TPC. More... | |
static float | GetTrueX0 (const art::Event &evt, const art::Ptr< simb::MCParticle > &particle, const int nT) |
Use detector and time services to get a true X offset for a given trajectory point. More... | |
static double | GetMips (const detinfo::DetectorPropertiesData &detProp, const Settings &settings, const double hit_Charge, const geo::View_t hit_View) |
Convert charge in ADCs to approximate MIPs. More... | |
static void | FillMCProcessMap (MCProcessMap &processMap) |
Populate a map from MC process string to enumeration. More... | |
LArPandoraInput class.
Definition at line 29 of file LArPandoraInput.h.
|
private |
Definition at line 143 of file LArPandoraInput.h.
|
static |
Create pandora line gaps to cover dead regions between TPCs in a global drift volume approach.
settings | the settings |
driftVolumeList | the drift volume list |
listOfGaps | the list of gaps |
Definition at line 238 of file LArPandoraInput.cxx.
References lar_pandora::LArPandoraDetectorType::CreateLineGapParametersFromDetectorGaps(), lar_pandora::detector_functions::GetDetectorType(), and lar_pandora::LArPandoraInput::Settings::m_pPrimaryPandora.
Referenced by lar_pandora::LArPandora::beginJob().
|
static |
Create the Pandora 2D hits from the ART hits.
evt | art event being processed |
settings | the settings |
driftVolumeMap | the mapping from volume id to drift volume |
hits | the input list of ART hits for this event |
idToHitMap | to receive the mapping from Pandora hit ID to ART hit |
Definition at line 45 of file LArPandoraInput.cxx.
References geo::WireGeo::GetCenter(), lar_pandora::LArPandoraGeometry::GetDaughterVolumeID(), lar_pandora::detector_functions::GetDetectorType(), GetMips(), lar_pandora::LArPandoraGeometry::GetVolumeID(), recob::Hit::Integral(), lar_content::LArCaloHitParameters::m_daughterVolumeId, lar_pandora::LArPandoraInput::Settings::m_dx_cm, lar_pandora::LArPandoraInput::Settings::m_hitCounterOffset, lar_pandora::LArPandoraInput::Settings::m_int_cm, lar_content::LArCaloHitParameters::m_larTPCVolumeId, lar_pandora::LArPandoraInput::Settings::m_mips_to_gev, lar_pandora::LArPandoraInput::Settings::m_pPrimaryPandora, lar_pandora::LArPandoraInput::Settings::m_rad_cm, lar_pandora::LArPandoraInput::Settings::m_uidOffset, lar_pandora::LArPandoraInput::Settings::m_useHitWidths, recob::Hit::PeakTime(), recob::Hit::PeakTimeMinusRMS(), recob::Hit::PeakTimePlusRMS(), lar_pandora::LArPandoraDetectorType::TargetViewU(), lar_pandora::LArPandoraDetectorType::TargetViewV(), lar_pandora::LArPandoraDetectorType::TargetViewW(), recob::Hit::View(), geo::GeometryCore::Wire(), recob::Hit::WireID(), and geo::GeometryCore::WirePitch().
Referenced by lar_pandora::LArPandora::CreatePandoraInput().
|
static |
Create pandora LArTPCs to represent the different drift volumes in use.
settings | the settings |
driftVolumeList | the drift volume list |
Definition at line 183 of file LArPandoraInput.cxx.
References lar_pandora::LArPandoraInput::Settings::m_pPrimaryPandora.
Referenced by lar_pandora::LArPandora::beginJob().
|
static |
Create links between the 2D hits and Pandora MC particles.
settings | the settings |
hitMap | mapping from Pandora hit addresses to ART hits |
hitToParticleMap | mapping from each ART hit to its underlying G4 track ID |
Definition at line 661 of file LArPandoraInput.cxx.
References util::abs(), and lar_pandora::LArPandoraInput::Settings::m_pPrimaryPandora.
Referenced by lar_pandora::LArPandora::CreatePandoraInput().
|
static |
Create the Pandora MC particles from the MC particles.
settings | the settings |
truthToParticles | mapping from MC truth to MC particles |
particlesToTruth | mapping from MC particles to MC truth |
Definition at line 373 of file LArPandoraInput.cxx.
References E, simb::MCParticle::E(), FillMCProcessMap(), FindPrimaryParticles(), simb::MCTruth::GetNeutrino(), GetTrueStartAndEndPoints(), IsPrimaryMCParticle(), simb::kCosmicRay, simb::kSingleParticle, lar_content::LArMCParticleParameters::m_nuanceCode, lar_pandora::LArPandoraInput::Settings::m_pPrimaryPandora, lar_content::LArMCParticleParameters::m_process, lar_pandora::LArPandoraInput::Settings::m_uidOffset, lar_content::MC_PROC_INCIDENT_NU, lar_content::MC_PROC_UNKNOWN, simb::MCParticle::Mother(), simb::MCTruth::NeutrinoSet(), simb::MCTruth::Origin(), geo::origin(), simb::MCParticle::PdgCode(), simb::MCParticle::Process(), simb::MCParticle::Px(), simb::MCParticle::Py(), simb::MCParticle::Pz(), simb::MCParticle::TrackId(), cheat::ParticleInventoryService::TrackIdToMCTruth(), simb::MCParticle::Vx(), simb::MCParticle::Vy(), and simb::MCParticle::Vz().
Referenced by lar_pandora::LArPandora::CreatePandoraInput().
|
static |
Create pandora line gaps to cover any (continuous regions of) bad channels.
settings | the settings |
driftVolumeMap | the mapping from volume id to drift volume |
Definition at line 284 of file LArPandoraInput.cxx.
References lar_pandora::LArPandoraDetectorType::CreateLineGapParametersFromReadoutGaps(), f, lar_pandora::detector_functions::GetDetectorType(), lar_pandora::LArPandoraGeometry::GetVolumeID(), geo::GeometryCore::Iterate(), lar_pandora::LArPandoraInput::Settings::m_pPrimaryPandora, geo::GeometryCore::Nwires(), geo::GeometryCore::PlaneWireToChannel(), and geo::GeometryCore::WirePitch().
Referenced by lar_pandora::LArPandora::CreatePandoraInput().
|
staticprivate |
Populate a map from MC process string to enumeration.
processMap | the output map from MC process string to enumeration |
Definition at line 817 of file LArPandoraInput.cxx.
References lar_content::MC_PROC_ALPHA_INELASTIC, lar_content::MC_PROC_ANNIHIL, lar_content::MC_PROC_ANTI_ALPHA_INELASTIC, lar_content::MC_PROC_ANTI_DEUTERON_INELASTIC, lar_content::MC_PROC_ANTI_HE3_INELASTIC, lar_content::MC_PROC_ANTI_NEUTRON_INELASTIC, lar_content::MC_PROC_ANTI_PROTON_INELASTIC, lar_content::MC_PROC_ANTI_TRITON_INELASTIC, lar_content::MC_PROC_CHIPS_NUCLEAR_CAPTURE_AT_REST, lar_content::MC_PROC_COMPT, lar_content::MC_PROC_CONV, lar_content::MC_PROC_COULOMB_SCAT, lar_content::MC_PROC_DECAY, lar_content::MC_PROC_DEUTERON_INELASTIC, lar_content::MC_PROC_E_BREM, lar_content::MC_PROC_E_IONI, lar_content::MC_PROC_ELECTRON_NUCLEAR, lar_content::MC_PROC_HAD_BERTINI_CAPTURE_AT_REST, lar_content::MC_PROC_HAD_BREM, lar_content::MC_PROC_HAD_ELASTIC, lar_content::MC_PROC_HAD_FRITIOF_CAPTURE_AT_REST, lar_content::MC_PROC_HAD_IONI, lar_content::MC_PROC_HAD_PAIR_PROD, lar_content::MC_PROC_HE3_INELASTIC, lar_content::MC_PROC_ION_INELASTIC, lar_content::MC_PROC_ION_IONI, lar_content::MC_PROC_KAON_MINUS_INELASTIC, lar_content::MC_PROC_KAON_PLUS_INELASTIC, lar_content::MC_PROC_LAMBDA_INELASTIC, lar_content::MC_PROC_MU_BREM, lar_content::MC_PROC_MU_IONI, lar_content::MC_PROC_MU_MINUS_CAPTURE_AT_REST, lar_content::MC_PROC_MU_NUCLEAR, lar_content::MC_PROC_MU_PAIR_PROD, lar_content::MC_PROC_N_CAPTURE, lar_content::MC_PROC_NEUTRON_INELASTIC, lar_content::MC_PROC_NEUTRON_KILLER, lar_content::MC_PROC_PHOT, lar_content::MC_PROC_PHOTON_INELASTIC, lar_content::MC_PROC_PHOTON_NUCLEAR, lar_content::MC_PROC_PI_MINUS_INELASTIC, lar_content::MC_PROC_PI_PLUS_INELASTIC, lar_content::MC_PROC_PRIMARY, lar_content::MC_PROC_PRIMARY_BACKGROUND, lar_content::MC_PROC_PROTON_INELASTIC, lar_content::MC_PROC_RAYLEIGH, lar_content::MC_PROC_TRANSPORTATION, lar_content::MC_PROC_TRITON_INELASTIC, and lar_content::MC_PROC_UNKNOWN.
Referenced by CreatePandoraMCParticles().
|
static |
Find all primary MCParticles in a given vector of MCParticles.
mcParticleVector | vector of all MCParticles to consider |
primaryMCParticleMap | map containing primary MCParticles and bool indicating whether particle has been accounted for |
Definition at line 624 of file LArPandoraInput.cxx.
Referenced by CreatePandoraMCParticles().
|
staticprivate |
Convert charge in ADCs to approximate MIPs.
settings | the settings |
hit_Charge | the input charge |
hit_View | the input view number |
Definition at line 792 of file LArPandoraInput.cxx.
References detinfo::DetectorPropertiesData::BirksCorrection(), detinfo::DetectorPropertiesData::ElectronsToADC(), util::kGeVToElectrons, lar_pandora::LArPandoraInput::Settings::m_dEdX_mip, lar_pandora::LArPandoraInput::Settings::m_mips_if_negative, lar_pandora::LArPandoraInput::Settings::m_mips_max, lar_pandora::LArPandoraInput::Settings::m_recombination_factor, lar_pandora::LArPandoraInput::Settings::m_useBirksCorrection, and geo::GeometryCore::WirePitch().
Referenced by CreatePandoraHits2D().
|
staticprivate |
Loop over MC trajectory points and identify start and end points within the detector.
settings | the settings |
particle | the true particle |
startT | the first trajectory point in the detector |
endT | the last trajectory point in the detector |
Definition at line 717 of file LArPandoraInput.cxx.
References geo::GeometryCore::Iterate().
Referenced by CreatePandoraMCParticles().
|
staticprivate |
Loop over MC trajectory points and identify start and end points within a given cryostat and TPC.
cstat | the cryostat |
tpc | the TPC |
particle | the true particle |
startT | the first trajectory point in the detector |
endT | the last trajectory point in the detector |
Definition at line 740 of file LArPandoraInput.cxx.
References geo::GeometryCore::FindTPCAtPosition(), geo::CryostatID::isValid, simb::MCParticle::NumberTrajectoryPoints(), simb::MCParticle::Vx(), simb::MCParticle::Vy(), and simb::MCParticle::Vz().
|
staticprivate |
Use detector and time services to get a true X offset for a given trajectory point.
evt | event currently being processing by art |
particle | the true particle |
nT | the trajectory point |
Definition at line 769 of file LArPandoraInput.cxx.
References geo::TPCGeo::DriftDirection(), geo::kNegX, geo::GeometryCore::PositionToTPCID(), simb::MCParticle::T(), geo::GeometryCore::TPC(), detinfo::trigger_offset(), simb::MCParticle::Vx(), simb::MCParticle::Vy(), and simb::MCParticle::Vz().
|
static |
Check whether an MCParticle can be found in a given map.
mcParticle | target MCParticle |
primaryMCParticleMap | map containing primary MCParticles and bool indicating whether particle has been accounted for |
Definition at line 637 of file LArPandoraInput.cxx.
References simb::MCParticle::Px(), simb::MCParticle::Py(), and simb::MCParticle::Pz().
Referenced by CreatePandoraMCParticles().