LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
LArPandoraInput.h
Go to the documentation of this file.
1 
7 #ifndef LAR_PANDORA_INPUT_H
8 #define LAR_PANDORA_INPUT_H 1
9 
11 
15 
16 namespace lar_pandora
17 {
18 
23 {
24 public:
28  class Settings
29  {
30  public:
34  Settings();
35 
36  const pandora::Pandora *m_pPrimaryPandora;
40  double m_dx_cm;
41  double m_int_cm;
42  double m_rad_cm;
43  double m_dEdX_mip;
44  double m_mips_max;
46  double m_mips_to_gev;
48  };
49 
58  static void CreatePandoraHits2D(const Settings &settings, const LArDriftVolumeMap &driftVolumeMap, const HitVector &hitVector, IdToHitMap &idToHitMap);
59 
66  static void CreatePandoraLArTPCs(const Settings &settings, const LArDriftVolumeList &driftVolumeList);
67 
75  static void CreatePandoraDetectorGaps(const Settings &settings, const LArDriftVolumeList &driftVolumeList,
76  const LArDetectorGapList &listOfGaps);
77 
84  static void CreatePandoraReadoutGaps(const Settings &settings, const LArDriftVolumeMap &driftVolumeMap);
85 
93  static void CreatePandoraMCParticles(const Settings &settings, const MCTruthToMCParticles &truthToParticles,
94  const MCParticlesToMCTruth &particlesToTruth, const RawMCParticleVector &generatorMCParticleVector);
95 
102  static void FindPrimaryParticles(const RawMCParticleVector &mcParticleVector, std::map<const simb::MCParticle, bool> &primaryMCParticleMap);
103 
110  static bool IsPrimaryMCParticle(const art::Ptr<simb::MCParticle> &mcParticle, std::map<const simb::MCParticle, bool> &primaryMCParticleMap);
111 
119  static void CreatePandoraMCLinks2D(const Settings &settings, const HitMap &hitMap, const HitsToTrackIDEs &hitToParticleMap);
120 
121 private:
130  static void GetTrueStartAndEndPoints(const Settings &settings, const art::Ptr<simb::MCParticle> &particle, int &startT, int &endT);
131 
141  static void GetTrueStartAndEndPoints(const unsigned int cstat, const unsigned int tpc, const art::Ptr<simb::MCParticle> &particle,
142  int &startT, int &endT);
143 
150  static float GetTrueX0(const art::Ptr<simb::MCParticle> &particle, const int nT);
151 
159  static double GetMips(const Settings &settings, const double hit_Charge, const geo::View_t hit_View);
160 };
161 
162 } // namespace lar_pandora
163 
164 #endif // #ifndef LAR_PANDORA_INPUT_H
Interface class for LArPandora producer modules, which reconstruct recob::PFParticles from recob::Hit...
std::map< art::Ptr< recob::Hit >, TrackIDEVector > HitsToTrackIDEs
static void CreatePandoraMCParticles(const Settings &settings, const MCTruthToMCParticles &truthToParticles, const MCParticlesToMCTruth &particlesToTruth, const RawMCParticleVector &generatorMCParticleVector)
Create the Pandora MC particles from the MC particles.
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...
std::vector< LArDetectorGap > LArDetectorGapList
static double GetMips(const Settings &settings, const double hit_Charge, const geo::View_t hit_View)
Convert charge in ADCs to approximate MIPs.
Helper functions for extracting detector geometry for use in reconsruction.
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
std::map< unsigned int, LArDriftVolume > LArDriftVolumeMap
std::map< art::Ptr< simb::MCTruth >, MCParticleVector > MCTruthToMCParticles
std::vector< LArDriftVolume > LArDriftVolumeList
static void FindPrimaryParticles(const RawMCParticleVector &mcParticleVector, std::map< const simb::MCParticle, bool > &primaryMCParticleMap)
Find all primary MCParticles in a given vector of MCParticles.
const pandora::Pandora * m_pPrimaryPandora
std::map< int, art::Ptr< recob::Hit > > IdToHitMap
Definition: ILArPandora.h:20
static void CreatePandoraHits2D(const Settings &settings, const LArDriftVolumeMap &driftVolumeMap, const HitVector &hitVector, IdToHitMap &idToHitMap)
Create the Pandora 2D hits from the ART hits.
std::map< art::Ptr< simb::MCParticle >, art::Ptr< simb::MCTruth > > MCParticlesToMCTruth
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.
static float GetTrueX0(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.
static void CreatePandoraMCLinks2D(const Settings &settings, const HitMap &hitMap, const HitsToTrackIDEs &hitToParticleMap)
Create links between the 2D hits and Pandora MC particles.
std::vector< art::Ptr< recob::Hit > > HitVector
static void CreatePandoraReadoutGaps(const Settings &settings, const LArDriftVolumeMap &driftVolumeMap)
Create pandora line gaps to cover any (continuous regions of) bad channels.
std::vector< simb::MCParticle > RawMCParticleVector
static void CreatePandoraLArTPCs(const Settings &settings, const LArDriftVolumeList &driftVolumeList)
Create pandora LArTPCs to represent the different drift volumes in use.
helper function for LArPandoraInterface producer module
std::map< int, art::Ptr< recob::Hit > > HitMap
Definition: fwd.h:25
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.
LArPandoraInput class.