Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-27 09:20:27

0001 /**
0002  *  @file   PandoraSDK/include/Utilities/ShowerProfilePlugin.h
0003  * 
0004  *  @brief  Header file for the shower profile plugin interface class.
0005  * 
0006  *  $Log: $
0007  */
0008 #ifndef PANDORA_SHOWER_PROFILE_PLUGIN_H
0009 #define PANDORA_SHOWER_PROFILE_PLUGIN_H 1
0010 
0011 #include "Pandora/PandoraInternal.h"
0012 #include "Pandora/Process.h"
0013 
0014 namespace pandora
0015 {
0016 
0017 /**
0018  *  @brief  ShowerProfilePlugin class
0019  */
0020 class ShowerProfilePlugin : public Process
0021 {
0022 public:
0023     /**
0024      *  @brief  ShowerPeak class
0025      */
0026     class ShowerPeak
0027     {
0028     public:
0029         /**
0030          *  @brief  Constructor
0031          * 
0032          *  @param  peakEnergy the peak energy
0033          *  @param  peakRms the peak rms
0034          *  @param  rmsXYRatio the rms x-y ratio
0035          *  @param  peakCaloHitList the peak calo hit list
0036          */
0037         ShowerPeak(const float peakEnergy, const float peakRms, const float rmsXYRatio, const CaloHitList &peakCaloHitList);
0038 
0039         /**
0040          *  @brief  Get peak energy
0041          * 
0042          *  @return the peak energy
0043          */
0044         float GetPeakEnergy() const;
0045 
0046         /**
0047          *  @brief  Get peak rms
0048          * 
0049          *  @return the peak rms
0050          */
0051         float GetPeakRms() const;
0052 
0053         /**
0054          *  @brief  Get rms x-y ratio
0055          * 
0056          *  @return the rms x-y ratio
0057          */
0058         float GetRmsXYRatio() const;
0059 
0060         /**
0061          *  @brief  Get peak calo hit list
0062          * 
0063          *  @return the peak calo hit list
0064          */
0065         const CaloHitList &GetPeakCaloHitList() const;
0066 
0067     private:
0068         float           m_peakEnergy;                   ///< The peak energy
0069         float           m_peakRms;                      ///< The peak rms
0070         float           m_rmsXYRatio;                   ///< The peak x-rms / y-rms ratio (larger rms over smaller rms)
0071         CaloHitList     m_peakCaloHitList;              ///< The peak calo hit list
0072     };
0073 
0074     typedef std::vector<ShowerPeak> ShowerPeakList;
0075 
0076     /**
0077      *  @brief  Get the layer at which shower can be considered to start; this function evaluates the the starting point of
0078      *          a series of "showerStartNonMipLayers" successive layers, each with mip fraction below "showerLayerMipFraction"
0079      * 
0080      *  @param  pCluster address of the cluster
0081      *  @param  showerStartLayer to receive the shower start layer
0082      */
0083     virtual void CalculateShowerStartLayer(const Cluster *const pCluster, unsigned int &showerStartLayer) const = 0;
0084 
0085     /**
0086      *  @brief  Calculate longitudinal shower profile for a cluster and compare it with the expected profile for a photon
0087      * 
0088      *  @param  pCluster address of the cluster to investigate
0089      *  @param  profileStart to receive the profile start, in radiation lengths
0090      *  @param  profileDiscrepancy to receive the profile discrepancy
0091      */
0092     virtual void CalculateLongitudinalProfile(const Cluster *const pCluster, float &profileStart, float &profileDiscrepancy) const = 0;
0093 
0094     /**
0095      *  @brief  Calculate transverse shower profile for a cluster and get the list of peaks identified in the profile
0096      * 
0097      *  @param  pCluster the address of the cluster
0098      *  @param  maxPseudoLayer the maximum pseudo layer to consider
0099      *  @param  showerPeakList to receive the shower peak list
0100      */
0101     virtual void CalculateTransverseProfile(const Cluster *const pCluster, const unsigned int maxPseudoLayer, ShowerPeakList &showerPeakList) const = 0;
0102 
0103     /**
0104      *  @brief  Calculate transverse shower profile for a cluster and get the list of peaks identified in the profile
0105      * 
0106      *  @param  pCluster the address of the cluster
0107      *  @param  maxPseudoLayer the maximum pseudo layer to consider
0108      *  @param  showerPeakList to receive the shower peak list
0109      *  @param  inclusiveMode whether to operate inclusive shower peak finding
0110      */
0111     virtual void CalculateTransverseProfile(const Cluster *const pCluster, const unsigned int maxPseudoLayer, ShowerPeakList &showerPeakList,
0112         const bool inclusiveMode) const = 0;
0113 
0114     /**
0115      *  @brief  Calculate transverse shower profile for a cluster and get the list of peaks identified in the profile, for clusters close to tracks
0116      * 
0117      *  @param  pCluster the address of the cluster
0118      *  @param  maxPseudoLayer the maximum pseudo layer to consider
0119      *  @param  pClosestTrack the address of the closest track
0120      *  @param  trackVector the vector of nearby tracks
0121      *  @param  showerPeakListPhoton to receive the shower peak list that are photon candidates
0122      *  @param  showerPeakListNonPhoton to receive the shower peak list that are not photon candidates
0123      */
0124     virtual void CalculateTrackBasedTransverseProfile(const Cluster *const pCluster, const unsigned int maxPseudoLayer, const Track *const pClosestTrack, 
0125         const TrackVector &trackVector, ShowerPeakList &showerPeakListPhoton, ShowerPeakList &showerPeakListNonPhoton) const = 0;
0126 
0127 protected:
0128     friend class PluginManager;
0129 };
0130 
0131 //------------------------------------------------------------------------------------------------------------------------------------------
0132 
0133 inline ShowerProfilePlugin::ShowerPeak::ShowerPeak(const float peakEnergy, const float peakRms, const float rmsXYRatio, const CaloHitList &peakCaloHitList) :
0134     m_peakEnergy(peakEnergy),
0135     m_peakRms(peakRms),
0136     m_rmsXYRatio(rmsXYRatio),
0137     m_peakCaloHitList(peakCaloHitList)
0138 {
0139 }
0140 
0141 //------------------------------------------------------------------------------------------------------------------------------------------
0142 
0143 inline float ShowerProfilePlugin::ShowerPeak::GetPeakEnergy() const
0144 {
0145     return m_peakEnergy;
0146 }
0147 
0148 //------------------------------------------------------------------------------------------------------------------------------------------
0149 
0150 inline float ShowerProfilePlugin::ShowerPeak::GetPeakRms() const
0151 {
0152     return m_peakRms;
0153 }
0154 
0155 //------------------------------------------------------------------------------------------------------------------------------------------
0156 
0157 inline float ShowerProfilePlugin::ShowerPeak::GetRmsXYRatio() const
0158 {
0159     return m_rmsXYRatio;
0160 }
0161 
0162 //------------------------------------------------------------------------------------------------------------------------------------------
0163 
0164 inline const CaloHitList &ShowerProfilePlugin::ShowerPeak::GetPeakCaloHitList() const
0165 {
0166     return m_peakCaloHitList;
0167 }
0168 
0169 } // namespace pandora
0170 
0171 #endif // #ifndef PANDORA_SHOWER_PROFILE_PLUGIN_H