Skip to content
Snippets Groups Projects
Commit f68fdddc authored by Edward Moyse's avatar Edward Moyse
Browse files

Merge branch 'PrivateToolFix/MuidCaloEnergyTools' into 'master'

Private tool fix/muid calo energy tools

See merge request atlas/athena!35655
parents c7cb10e4 96f08ec6
No related branches found
No related tags found
No related merge requests found
/* /*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/ */
/////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
AlgTool to access the energy deposited by a muon in the AlgTool to access the energy deposited by a muon in the
calorimeters. The energy deposit is estimated according to calorimeters. The energy deposit is estimated according to
the active measurements in the traversed calorimeter cells. the active measurements in the traversed calorimeter cells.
@author Konstantinos.Nikolopoulos@cern.ch, Alan.Poppleton@cern.ch @author Konstantinos.Nikolopoulos@cern.ch, Alan.Poppleton@cern.ch
(c) ATLAS Combined Muon software (c) ATLAS Combined Muon software
*/ */
...@@ -18,14 +18,14 @@ ...@@ -18,14 +18,14 @@
//<<<<<< INCLUDES >>>>>> //<<<<<< INCLUDES >>>>>>
#include <atomic>
#include "AthenaBaseComps/AthAlgTool.h" #include "AthenaBaseComps/AthAlgTool.h"
#include "CaloConditions/CaloNoise.h"
#include "CaloEvent/CaloCellContainer.h"
#include "GaudiKernel/ToolHandle.h" #include "GaudiKernel/ToolHandle.h"
#include "MuidInterfaces/IMuidCaloEnergyMeas.h" #include "MuidInterfaces/IMuidCaloEnergyMeas.h"
#include "StoreGate/ReadHandleKey.h" #include "StoreGate/ReadHandleKey.h"
#include "CaloEvent/CaloCellContainer.h"
#include "CaloConditions/CaloNoise.h"
#include <atomic>
//<<<<<< CLASS DECLARATIONS >>>>>> //<<<<<< CLASS DECLARATIONS >>>>>>
...@@ -35,91 +35,76 @@ class LArEM_ID; ...@@ -35,91 +35,76 @@ class LArEM_ID;
class LArHEC_ID; class LArHEC_ID;
class TileID; class TileID;
namespace Rec namespace Rec {
{
class caloMeas; class caloMeas;
class IMuidCaloEnergyParam; class IMuidCaloEnergyParam;
class MuidCaloEnergyMeas: public AthAlgTool, class MuidCaloEnergyMeas : public AthAlgTool, virtual public IMuidCaloEnergyMeas {
virtual public IMuidCaloEnergyMeas public:
{ MuidCaloEnergyMeas(const std::string& type, const std::string& name, const IInterface* parent);
public: ~MuidCaloEnergyMeas(void); // destructor
MuidCaloEnergyMeas(const std::string& type,
const std::string& name, StatusCode initialize();
const IInterface* parent); StatusCode finalize();
~MuidCaloEnergyMeas(void); // destructor
StatusCode initialize();
StatusCode finalize();
/**IMuidCaloEnergyMeas interface: /**IMuidCaloEnergyMeas interface:
get the muon energy loss measurement from the calorimeter, get the muon energy loss measurement from the calorimeter,
knowing the track intersection at the em and had cals*/ knowing the track intersection at the em and had cals*/
CaloMeas* energyMeasurement(double etaEM, CaloMeas* energyMeasurement(double etaEM, double phiEM, double etaHad, double phiHad) const;
double phiEM,
double etaHad, private:
double phiHad) const;
private:
// private methods // private methods
void energyInCalo(CaloMeas& caloMeas, void energyInCalo(CaloMeas& caloMeas, const CaloCellContainer* cellContainer, double eta, double phi,
const CaloCellContainer* cellContainer, int iSubCalo) const;
double eta, void isolationEnergy(CaloMeas& caloMeas, const CaloCellContainer* cellContainer, double eta, double phi,
double phi, int iSubCalo) const;
int iSubCalo) const; double energyInTile(const CaloCellContainer* cellContainer, double eta, double phi, int, int) const;
void isolationEnergy(CaloMeas& caloMeas, double energyInLArHEC(const CaloCellContainer* cellContainer, double eta, double phi, int, int) const;
const CaloCellContainer* cellContainer, double energyInLArEM(const CaloCellContainer* cellContainer, double eta, double phi, int, int) const;
double eta, int cellCounting(const CaloCellContainer* cellContainer, double eta, double phi) const;
double phi,
int iSubCalo) const;
double energyInTile(const CaloCellContainer* cellContainer,
double eta,
double phi,
int,
int) const;
double energyInLArHEC(const CaloCellContainer* cellContainer,
double eta,
double phi,
int,
int) const;
double energyInLArEM(const CaloCellContainer* cellContainer,
double eta,
double phi,
int,
int) const;
int cellCounting(const CaloCellContainer* cellContainer,
double eta,
double phi) const;
// helpers, managers, tools // helpers, managers, tools
SG::ReadCondHandleKey<CaloNoise> m_noiseCDOKey{this,"CaloNoiseKey","totalNoise","SG Key of CaloNoise data object"}; SG::ReadCondHandleKey<CaloNoise> m_noiseCDOKey{
ToolHandle<IMuidCaloEnergyParam> m_caloParamTool; this,
"CaloNoiseKey",
const TileID* m_tileID; "totalNoise",
const LArEM_ID* m_emID; "SG Key of CaloNoise data object",
const LArHEC_ID* m_hecID; };
SG::ReadHandleKey<CaloCellContainer> m_cellContainerLocation{this,"CellContainerLocation","AllCalo","calo cell container location"}; ToolHandle<IMuidCaloEnergyParam> m_caloParamTool{
this,
double m_measurementConeTile; "CaloParamTool",
double m_measurementConeLArHEC; "",
double m_measurementConeLArEM; };
double m_isolationConeTile;
double m_isolationConeLArHEC; const TileID* m_tileID;
double m_isolationConeLArEM; const LArEM_ID* m_emID;
const LArHEC_ID* m_hecID;
double m_sigmasAboveNoise; // The minimum sigmas above the noise tool rms SG::ReadHandleKey<CaloCellContainer> m_cellContainerLocation{
double m_sigmasAboveNoiseCore; // The minimum sigmas above the noise tool rms this,
"CellContainerLocation",
mutable std::atomic_int m_totalCoreCellsEM; "AllCalo",
mutable std::atomic_int m_totalCoreCellsHEC; "calo cell container location",
mutable std::atomic_int m_totalCoreCellsTile; };
mutable std::atomic_int m_totalSelectedEM;
mutable std::atomic_int m_totalSelectedHEC; double m_measurementConeTile;
mutable std::atomic_int m_totalSelectedTile; double m_measurementConeLArHEC;
double m_measurementConeLArEM;
double m_isolationConeTile;
double m_isolationConeLArHEC;
double m_isolationConeLArEM;
double m_sigmasAboveNoise; // The minimum sigmas above the noise tool rms
double m_sigmasAboveNoiseCore; // The minimum sigmas above the noise tool rms
mutable std::atomic_int m_totalCoreCellsEM;
mutable std::atomic_int m_totalCoreCellsHEC;
mutable std::atomic_int m_totalCoreCellsTile;
mutable std::atomic_int m_totalSelectedEM;
mutable std::atomic_int m_totalSelectedHEC;
mutable std::atomic_int m_totalSelectedTile;
}; };
} // end of namespace } // namespace Rec
#endif // MUIDCALOENERGYTOOLS_MUIDCALOENERGYMEAS_H
#endif // MUIDCALOENERGYTOOLS_MUIDCALOENERGYMEAS_H
/* /*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/ */
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
K. Nikolopoulos, D. Fassouliotis, C. Kourkoumelis, and A. Poppleton, K. Nikolopoulos, D. Fassouliotis, C. Kourkoumelis, and A. Poppleton,
"Event-by-Event Estimate of Muon Energy Loss in ATLAS", "Event-by-Event Estimate of Muon Energy Loss in ATLAS",
IEEE Trans. Nucl. Sci., vol. 54, no. 5, pt. 2, pp. 1792-1796, Oct. 2007. IEEE Trans. Nucl. Sci., vol. 54, no. 5, pt. 2, pp. 1792-1796, Oct. 2007.
@author Konstantinos.Nikolopoulos@cern.ch, Alan.Poppleton@cern.ch @author Konstantinos.Nikolopoulos@cern.ch, Alan.Poppleton@cern.ch
(c) ATLAS Combined Muon software (c) ATLAS Combined Muon software
*/ */
...@@ -24,95 +24,89 @@ ...@@ -24,95 +24,89 @@
//<<<<<< INCLUDES >>>>>> //<<<<<< INCLUDES >>>>>>
#include <atomic>
#include "AthenaBaseComps/AthAlgTool.h" #include "AthenaBaseComps/AthAlgTool.h"
#include "GaudiKernel/ToolHandle.h" #include "GaudiKernel/ToolHandle.h"
#include "MuidInterfaces/IMuidCaloEnergy.h" #include "MuidInterfaces/IMuidCaloEnergy.h"
#include "MuidInterfaces/IMuidCaloEnergyParam.h"
#include <atomic> #include "MuidInterfaces/IMuidTrackIsolation.h"
//<<<<<< CLASS DECLARATIONS >>>>>> //<<<<<< CLASS DECLARATIONS >>>>>>
namespace Rec namespace Rec {
{
class CaloMeas; class CaloMeas;
class IMuidCaloEnergyMeas; class IMuidCaloEnergyMeas;
class IMuidCaloEnergyParam; class IMuidCaloEnergyParam;
class IMuidTrackIsolation; class IMuidTrackIsolation;
class MuidCaloEnergyTool: public AthAlgTool, class MuidCaloEnergyTool : public AthAlgTool, virtual public IMuidCaloEnergy {
virtual public IMuidCaloEnergy
{ public:
MuidCaloEnergyTool(const std::string& type, const std::string& name, const IInterface* parent);
~MuidCaloEnergyTool(void); // destructor
public:
MuidCaloEnergyTool(const std::string& type,
const std::string& name,
const IInterface* parent);
~MuidCaloEnergyTool(void); // destructor
StatusCode initialize(); StatusCode initialize();
StatusCode finalize(); StatusCode finalize();
/**IMuidCaloEnergy interface: /**IMuidCaloEnergy interface:
to get the total energyLoss in the calorimeters */ to get the total energyLoss in the calorimeters */
CaloEnergy* energyLoss(double trackMomentum, CaloEnergy* energyLoss(double trackMomentum, double eta, double phi) const;
double eta,
double phi) const;
/**IMuidCaloEnergy interface: /**IMuidCaloEnergy interface:
TrackStateOnSurface for parameters and energyLoss at the calorimeter mid-surface */ TrackStateOnSurface for parameters and energyLoss at the calorimeter mid-surface */
const Trk::TrackStateOnSurface* trackStateOnSurface( const Trk::TrackStateOnSurface* trackStateOnSurface(const Trk::TrackParameters& middleParameters,
const Trk::TrackParameters& middleParameters, const Trk::TrackParameters* innerParameters,
const Trk::TrackParameters* innerParameters, const Trk::TrackParameters* outerParameters) const;
const Trk::TrackParameters* outerParameters) const;
private:
private:
// private methods // private methods
CaloEnergy* measurement(double trackMomentum, CaloEnergy* measurement(double trackMomentum, double eta, double phi, CaloMeas* caloMeas) const;
double eta, double muSpecResolParam(double trackMomentum, double eta) const;
double phi, double paramCorrection(double trackMomentum, double eta, double MopLoss, double MopSigma) const;
CaloMeas* caloMeas) const; double landau(double x, double mpv, double sigma, bool norm) const;
double muSpecResolParam(double trackMomentum,
double eta) const;
double paramCorrection(double trackMomentum,
double eta,
double MopLoss,
double MopSigma) const;
double landau(double x,
double mpv,
double sigma,
bool norm) const;
// helpers, managers, tools // helpers, managers, tools
ToolHandle<IMuidCaloEnergyMeas> m_caloMeasTool; ToolHandle<IMuidCaloEnergyMeas> m_caloMeasTool{
ToolHandle<IMuidCaloEnergyParam> m_caloParamTool; this,
ToolHandle<IMuidTrackIsolation> m_trackIsolationTool; "CaloMeasTool",
"Rec::MuidCaloEnergyMeas/MuidCaloEnergyMeas",
};
ToolHandle<IMuidCaloEnergyParam> m_caloParamTool{
this,
"CaloParamTool",
"Rec::MuidCaloEnergyParam/MuidCaloEnergyParam",
};
ToolHandle<IMuidTrackIsolation> m_trackIsolationTool{
this,
"TrackIsolationTool",
"Rec::MuidTrackIsolation/MuidTrackIsolation",
};
// configurable options // configurable options
bool m_cosmics; bool m_cosmics;
bool m_energyLossMeasurement; bool m_energyLossMeasurement;
bool m_forceIsolationFailure; bool m_forceIsolationFailure;
bool m_FSRtreatment; bool m_FSRtreatment;
bool m_MOPparametrization; bool m_MOPparametrization;
bool m_trackIsolation; bool m_trackIsolation;
// thresholds for use of energy measurement // thresholds for use of energy measurement
double m_emEtCut; // minimum Et in em for FSR treatment double m_emEtCut; // minimum Et in em for FSR treatment
double m_emF1Cut; // minimum F1 in em for FSR treatment double m_emF1Cut; // minimum F1 in em for FSR treatment
double m_emMinEnergy; // mininum energy in the EM double m_emMinEnergy; // mininum energy in the EM
double m_hecMinEnergy; // minimum energy in the HEC double m_hecMinEnergy; // minimum energy in the HEC
int m_maxNTracksIso; // max #tracks in the isolation cone int m_maxNTracksIso; // max #tracks in the isolation cone
double m_minFinalEnergy; // minimum measured final energy double m_minFinalEnergy; // minimum measured final energy
double m_minMuonPt; // minimum pt of the muon double m_minMuonPt; // minimum pt of the muon
// counters (for finalize) // counters (for finalize)
mutable std::atomic_int m_countMean; //number of tracks using mean mutable std::atomic_int m_countMean; // number of tracks using mean
mutable std::atomic_int m_countMeasurement; //number of tracks using measurement mutable std::atomic_int m_countMeasurement; // number of tracks using measurement
mutable std::atomic_int m_countMop; //number of tracks using mop mutable std::atomic_int m_countMop; // number of tracks using mop
}; };
} // end of namespace } // namespace Rec
#endif // MUIDCALOENERGYTOOLS_MUIDCALOENERGYTOOL_H
#endif // MUIDCALOENERGYTOOLS_MUIDCALOENERGYTOOL_H
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment