Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-27 09:14:59

0001 /**
0002  *  @file   LCContent/include/LCPlugins/LCEnergyCorrectionPlugins.h
0003  *
0004  *  @brief  Header file for the lc energy correction plugins class.
0005  *
0006  *  $Log: $
0007  */
0008 #ifndef LC_ENERGY_CORRECTION_PLUGINS_H
0009 #define LC_ENERGY_CORRECTION_PLUGINS_H 1
0010 
0011 #include "Plugins/EnergyCorrectionsPlugin.h"
0012 
0013 namespace lc_content {
0014 
0015 /**
0016  *  @brief  LCEnergyCorrectionPlugins class
0017  */
0018 class LCEnergyCorrectionPlugins {
0019 public:
0020   /**
0021    *   @brief  Correct cluster energy to account for non-linearities in calibration
0022    */
0023   class NonLinearityCorrection : public pandora::EnergyCorrectionPlugin {
0024   public:
0025     /**
0026      *  @brief  Constructor
0027      *
0028      *  @param  inputEnergyCorrectionPoints the input energy points for energy correction
0029      *  @param  outputEnergyCorrectionPoints the output energy points for energy correction
0030      */
0031     NonLinearityCorrection(const pandora::FloatVector& inputEnergyCorrectionPoints,
0032                            const pandora::FloatVector& outputEnergyCorrectionPoints);
0033 
0034     pandora::StatusCode MakeEnergyCorrections(const pandora::Cluster* const pCluster, float& correctedEnergy) const;
0035 
0036   private:
0037     pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
0038 
0039     pandora::FloatVector m_inputEnergyCorrectionPoints; ///< The input energy points for energy correction
0040     pandora::FloatVector m_energyCorrections;           ///< The energy correction factors
0041   };
0042 
0043   /**
0044    *   @brief  CleanCluster class. Correct cluster energy by searching for constituent calo hits with anomalously high
0045    * energy. Corrections are made by examining the energy in adjacent layers of the cluster.
0046    */
0047   class CleanCluster : public pandora::EnergyCorrectionPlugin {
0048   public:
0049     /**
0050      *  @brief  Default constructor
0051      */
0052     CleanCluster();
0053 
0054     pandora::StatusCode MakeEnergyCorrections(const pandora::Cluster* const pCluster, float& correctedEnergy) const;
0055 
0056   private:
0057     /**
0058      *  @brief  Get the sum of the hadronic energies of all calo hits in a specified layer of an ordered calo hit list
0059      *
0060      *  @param  orderedCaloHitList the ordered calo hit list
0061      *  @param  pseudoLayer the specified pseudolayer
0062      */
0063     float GetHadronicEnergyInLayer(const pandora::OrderedCaloHitList& orderedCaloHitList,
0064                                    const unsigned int pseudoLayer) const;
0065 
0066     pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
0067 
0068     float m_minCleanHitEnergy;          ///< Min calo hit hadronic energy to consider cleaning hit/cluster
0069     float m_minCleanHitEnergyFraction;  ///< Min fraction of cluster energy represented by hit to consider cleaning
0070     float m_minCleanCorrectedHitEnergy; ///< Min value of new hit hadronic energy estimate after cleaning
0071   };
0072 
0073   /**
0074    *   @brief  ScaleHotHadrons class. Correct cluster energy by searching for clusters with anomalously high mip
0075    * energies per constituent calo hit. Corrections are made by scaling back the mean number of mips per calo hit.
0076    */
0077   class ScaleHotHadrons : public pandora::EnergyCorrectionPlugin {
0078   public:
0079     /**
0080      *  @brief  Default constructor
0081      */
0082     ScaleHotHadrons();
0083 
0084     pandora::StatusCode MakeEnergyCorrections(const pandora::Cluster* const pCluster, float& correctedEnergy) const;
0085 
0086   private:
0087     pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
0088 
0089     unsigned int m_minHitsForHotHadron;    ///< Min number of hits in a hot hadron candidate cluster
0090     unsigned int m_maxHitsForHotHadron;    ///< Max number of hits in a hot hadron candidate cluster
0091     unsigned int m_hotHadronInnerLayerCut; ///< Cut 1 of 3 (must fail all for rejection): Min inner layer for hot hadron
0092     float m_hotHadronMipFractionCut;   ///< Cut 2 of 3 (must fail all for rejection): Min mip fraction for hot hadron
0093     unsigned int m_hotHadronNHitsCut;  ///< Cut 3 of 3 (must fail all for rejection): Max number of hits for hot hadron
0094     float m_hotHadronMipsPerHit;       ///< Min number of mips per hit for a hot hadron cluster
0095     float m_scaledHotHadronMipsPerHit; ///< Scale factor (new mips per hit value) to correct hot hadron energies
0096   };
0097 
0098   /**
0099    *   @brief  MuonCoilCorrection class. Addresses issue of energy loss in uninstrumented coil region.
0100    */
0101   class MuonCoilCorrection : public pandora::EnergyCorrectionPlugin {
0102   public:
0103     /**
0104      *  @brief  Default constructor
0105      */
0106     MuonCoilCorrection();
0107 
0108     pandora::StatusCode MakeEnergyCorrections(const pandora::Cluster* const pCluster, float& correctedEnergy) const;
0109 
0110   private:
0111     pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
0112 
0113     float m_muonHitEnergy;                  ///< The energy for a digital muon calorimeter hit, units GeV
0114     float m_coilEnergyLossCorrection;       ///< Energy correction due to missing energy deposited in coil, units GeV
0115     unsigned int m_minMuonHitsInInnerLayer; ///< Min muon hits in muon inner layer to correct charged cluster energy
0116     float m_coilEnergyCorrectionChi;        ///< Track-cluster chi value used to assess need for coil energy correction
0117   };
0118 };
0119 
0120 } // namespace lc_content
0121 
0122 #endif // #ifndef LC_ENERGY_CORRECTION_PLUGINS_H