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 @@
AlgTool to access the energy deposited by a muon in the
calorimeters. The energy deposit is estimated according to
the active measurements in the traversed calorimeter cells.
@author Konstantinos.Nikolopoulos@cern.ch, Alan.Poppleton@cern.ch
(c) ATLAS Combined Muon software
*/
......@@ -18,14 +18,14 @@
//<<<<<< INCLUDES >>>>>>
#include <atomic>
#include "AthenaBaseComps/AthAlgTool.h"
#include "CaloConditions/CaloNoise.h"
#include "CaloEvent/CaloCellContainer.h"
#include "GaudiKernel/ToolHandle.h"
#include "MuidInterfaces/IMuidCaloEnergyMeas.h"
#include "StoreGate/ReadHandleKey.h"
#include "CaloEvent/CaloCellContainer.h"
#include "CaloConditions/CaloNoise.h"
#include <atomic>
//<<<<<< CLASS DECLARATIONS >>>>>>
......@@ -35,91 +35,76 @@ class LArEM_ID;
class LArHEC_ID;
class TileID;
namespace Rec
{
namespace Rec {
class caloMeas;
class IMuidCaloEnergyParam;
class caloMeas;
class IMuidCaloEnergyParam;
class MuidCaloEnergyMeas: public AthAlgTool,
virtual public IMuidCaloEnergyMeas
{
public:
MuidCaloEnergyMeas(const std::string& type,
const std::string& name,
const IInterface* parent);
~MuidCaloEnergyMeas(void); // destructor
class MuidCaloEnergyMeas : public AthAlgTool, virtual public IMuidCaloEnergyMeas {
public:
MuidCaloEnergyMeas(const std::string& type, const std::string& name, const IInterface* parent);
~MuidCaloEnergyMeas(void); // destructor
StatusCode initialize();
StatusCode finalize();
StatusCode initialize();
StatusCode finalize();
/**IMuidCaloEnergyMeas interface:
get the muon energy loss measurement from the calorimeter,
knowing the track intersection at the em and had cals*/
CaloMeas* energyMeasurement(double etaEM,
double phiEM,
double etaHad,
double phiHad) const;
private:
CaloMeas* energyMeasurement(double etaEM, double phiEM, double etaHad, double phiHad) const;
private:
// private methods
void energyInCalo(CaloMeas& caloMeas,
const CaloCellContainer* cellContainer,
double eta,
double phi,
int iSubCalo) const;
void isolationEnergy(CaloMeas& caloMeas,
const CaloCellContainer* cellContainer,
double eta,
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;
void energyInCalo(CaloMeas& caloMeas, const CaloCellContainer* cellContainer, double eta, double phi,
int iSubCalo) const;
void isolationEnergy(CaloMeas& caloMeas, const CaloCellContainer* cellContainer, double eta, 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
SG::ReadCondHandleKey<CaloNoise> m_noiseCDOKey{this,"CaloNoiseKey","totalNoise","SG Key of CaloNoise data object"};
ToolHandle<IMuidCaloEnergyParam> m_caloParamTool;
const TileID* m_tileID;
const LArEM_ID* m_emID;
const LArHEC_ID* m_hecID;
SG::ReadHandleKey<CaloCellContainer> m_cellContainerLocation{this,"CellContainerLocation","AllCalo","calo cell container location"};
double m_measurementConeTile;
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;
SG::ReadCondHandleKey<CaloNoise> m_noiseCDOKey{
this,
"CaloNoiseKey",
"totalNoise",
"SG Key of CaloNoise data object",
};
ToolHandle<IMuidCaloEnergyParam> m_caloParamTool{
this,
"CaloParamTool",
"",
};
const TileID* m_tileID;
const LArEM_ID* m_emID;
const LArHEC_ID* m_hecID;
SG::ReadHandleKey<CaloCellContainer> m_cellContainerLocation{
this,
"CellContainerLocation",
"AllCalo",
"calo cell container location",
};
double m_measurementConeTile;
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
#endif // MUIDCALOENERGYTOOLS_MUIDCALOENERGYMEAS_H
} // namespace Rec
#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 @@
K. Nikolopoulos, D. Fassouliotis, C. Kourkoumelis, and A. Poppleton,
"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.
@author Konstantinos.Nikolopoulos@cern.ch, Alan.Poppleton@cern.ch
(c) ATLAS Combined Muon software
*/
......@@ -24,95 +24,89 @@
//<<<<<< INCLUDES >>>>>>
#include <atomic>
#include "AthenaBaseComps/AthAlgTool.h"
#include "GaudiKernel/ToolHandle.h"
#include "MuidInterfaces/IMuidCaloEnergy.h"
#include <atomic>
#include "MuidInterfaces/IMuidCaloEnergyParam.h"
#include "MuidInterfaces/IMuidTrackIsolation.h"
//<<<<<< CLASS DECLARATIONS >>>>>>
namespace Rec
{
namespace Rec {
class CaloMeas;
class IMuidCaloEnergyMeas;
class IMuidCaloEnergyParam;
class IMuidTrackIsolation;
class MuidCaloEnergyTool: public AthAlgTool,
virtual public IMuidCaloEnergy
{
class MuidCaloEnergyTool : public AthAlgTool, 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 finalize();
/**IMuidCaloEnergy interface:
to get the total energyLoss in the calorimeters */
CaloEnergy* energyLoss(double trackMomentum,
double eta,
double phi) const;
CaloEnergy* energyLoss(double trackMomentum, double eta, double phi) const;
/**IMuidCaloEnergy interface:
TrackStateOnSurface for parameters and energyLoss at the calorimeter mid-surface */
const Trk::TrackStateOnSurface* trackStateOnSurface(
const Trk::TrackParameters& middleParameters,
const Trk::TrackParameters* innerParameters,
const Trk::TrackParameters* outerParameters) const;
private:
const Trk::TrackStateOnSurface* trackStateOnSurface(const Trk::TrackParameters& middleParameters,
const Trk::TrackParameters* innerParameters,
const Trk::TrackParameters* outerParameters) const;
private:
// private methods
CaloEnergy* measurement(double trackMomentum,
double eta,
double phi,
CaloMeas* caloMeas) 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;
CaloEnergy* measurement(double trackMomentum, double eta, double phi, CaloMeas* caloMeas) 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
ToolHandle<IMuidCaloEnergyMeas> m_caloMeasTool;
ToolHandle<IMuidCaloEnergyParam> m_caloParamTool;
ToolHandle<IMuidTrackIsolation> m_trackIsolationTool;
ToolHandle<IMuidCaloEnergyMeas> m_caloMeasTool{
this,
"CaloMeasTool",
"Rec::MuidCaloEnergyMeas/MuidCaloEnergyMeas",
};
ToolHandle<IMuidCaloEnergyParam> m_caloParamTool{
this,
"CaloParamTool",
"Rec::MuidCaloEnergyParam/MuidCaloEnergyParam",
};
ToolHandle<IMuidTrackIsolation> m_trackIsolationTool{
this,
"TrackIsolationTool",
"Rec::MuidTrackIsolation/MuidTrackIsolation",
};
// configurable options
bool m_cosmics;
bool m_energyLossMeasurement;
bool m_forceIsolationFailure;
bool m_FSRtreatment;
bool m_MOPparametrization;
bool m_trackIsolation;
bool m_cosmics;
bool m_energyLossMeasurement;
bool m_forceIsolationFailure;
bool m_FSRtreatment;
bool m_MOPparametrization;
bool m_trackIsolation;
// thresholds for use of energy measurement
double m_emEtCut; // minimum Et 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_hecMinEnergy; // minimum energy in the HEC
int m_maxNTracksIso; // max #tracks in the isolation cone
double m_minFinalEnergy; // minimum measured final energy
double m_minMuonPt; // minimum pt of the muon
double m_emEtCut; // minimum Et 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_hecMinEnergy; // minimum energy in the HEC
int m_maxNTracksIso; // max #tracks in the isolation cone
double m_minFinalEnergy; // minimum measured final energy
double m_minMuonPt; // minimum pt of the muon
// counters (for finalize)
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_countMop; //number of tracks using mop
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_countMop; // number of tracks using mop
};
} // end of namespace
#endif // MUIDCALOENERGYTOOLS_MUIDCALOENERGYTOOL_H
} // namespace Rec
#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