Commit 55e00c89 authored by Jovan Mitrevski's avatar Jovan Mitrevski
Browse files

snapshot of making extrapolator private in in ParticleCaloExtensionTool

parent a7ec5a15
......@@ -47,7 +47,6 @@ MySubUpdators += [NoElossMaterialEffectsUpdator.name()] # for muon
theAtlasExtrapolator.MaterialEffectsUpdators = MyUpdators
theAtlasExtrapolator.SubMEUpdators = MySubUpdators
ToolSvc+=theAtlasExtrapolator
from TrackToCalo.TrackToCaloConf import Trk__ParticleCaloExtensionTool
ClassifierParticleCaloExtensionTool= Trk__ParticleCaloExtensionTool(name="ClassifierParticleCaloExtensionTool",
......
......@@ -182,10 +182,23 @@ def MuidSegmentRegionRecoveryTool( name ='MuidSegmentRegionRecoveryTool', **kwar
kwargs.setdefault("Fitter", getPublicTool("CombinedMuonTrackBuilderFit") )
return CfgMgr.Muon__MuonSegmentRegionRecoveryTool(name,**kwargs)
from AthenaCommon.AppMgr import ToolSvc
def CombinedMuonTrackBuilderFit( name='CombinedMuonTrackBuilderFit', **kwargs ):
import MuonCombinedRecExample.CombinedMuonTrackSummary
from AthenaCommon.AppMgr import ToolSvc
from TrkExTools.AtlasExtrapolator import AtlasExtrapolator
from TrackToCalo.TrackToCaloConf import Trk__ParticleCaloExtensionTool, Rec__MuonCaloEnergyTool, Rec__ParticleCaloCellAssociationTool
from TrkMaterialProvider.TrkMaterialProviderConf import Trk__TrkMaterialProviderTool
pcExtensionTool = Trk__ParticleCaloExtensionTool(Extrapolator = AtlasExtrapolator())
caloCellAssociationTool = Rec__ParticleCaloCellAssociationTool(ParticleCaloExtensionTool = pcExtensionTool)
muonCaloEnergyTool = Rec__MuonCaloEnergyTool(ParticleCaloExtensionTool = pcExtensionTool,
ParticleCaloCellAssociationTool = caloCellAssociationTool)
materialProviderTool = Trk__TrkMaterialProviderTool(MuonCaloEnergyTool = muonCaloEnergyTool);
ToolSvc += materialProviderTool
kwargs.setdefault("CaloEnergyParam" , getPublicTool("MuidCaloEnergyToolParam") )
kwargs.setdefault("CaloTSOS" , getPublicTool("MuidCaloTrackStateOnSurface") )
kwargs.setdefault("CscRotCreator" , getPublicTool("CscClusterOnTrackCreator") )
......@@ -209,6 +222,7 @@ def CombinedMuonTrackBuilderFit( name='CombinedMuonTrackBuilderFit', **kwargs ):
kwargs.setdefault("Vertex3DSigmaZ" , 60.*mm)
kwargs.setdefault("TrackSummaryTool" , ToolSvc.CombinedMuonTrackSummary )
kwargs.setdefault("UseCaloTG" , False )
kwargs.setdefault("CaloMaterialProvider" , materialProviderTool)
if beamFlags.beamType() == 'cosmics':
kwargs.setdefault("MdtRotCreator" , "" )
......
......@@ -33,8 +33,12 @@ addTool("MuonCombinedRecExample.MuGirlTagTool.MuonStauInsideOutRecoTool","MuonSt
addTool("MuonCombinedRecExample.MuGirlTagTool.MuonStauRecoTool","MuonStauRecoTool")
from TrkExTools.AtlasExtrapolator import AtlasExtrapolator
from TrackToCalo.TrackToCaloConf import Trk__ParticleCaloExtensionTool
addTool("MuonCombined::MuonCombinedStacoTagTool","MuonCombinedStacoTagTool")
pcExtensionTool = Trk__ParticleCaloExtensionTool(Extrapolator = AtlasExtrapolator())
addTool("MuonCombined::MuonCombinedStacoTagTool","MuonCombinedStacoTagTool", ParticleCaloExtensionTool = pcExtensionTool)
addTool("MuonCombinedRecExample.MuonCombinedTools.MuonCombinedFitTagTool","MuonCombinedFitTagTool")
addTool("Trk::TrackParticleCreatorTool","TrackParticleCreatorTool")
addTool("MuonCombinedRecExample.MuonCaloTagTool.MuonCaloTagTool","MuonCaloTagTool")
......
......@@ -62,12 +62,15 @@ CaloClustersInConeTool = ToolFactory(xAOD__CaloClustersInConeTool,
CaloClusterLocation = "CaloCalTopoClusters")
# tool to extrapolate to the calo
import AthenaCommon.CfgMgr as CfgMgr
from TrackToCalo.TrackToCaloConf import Trk__ParticleCaloExtensionTool, Rec__ParticleCaloCellAssociationTool
#this is just regular extrapolator, but in ToolFactory form
from egammaTools.InDetTools import egammaExtrapolator
CaloExtensionTool = ToolFactory (CfgMgr.Trk__ParticleCaloExtensionTool,
CaloExtensionTool = ToolFactory (Trk__ParticleCaloExtensionTool,
Extrapolator = egammaExtrapolator)
CaloCellAssocTool = ToolFactory (Rec__ParticleCaloCellAssociationTool,
ParticleCaloExtensionTool = CaloExtensionTool)
# configuration for ED computation
# For the time being, it uses all pflow objects (neutral@EM + charged) for pflow
......@@ -188,6 +191,7 @@ CaloIsolationTool = ToolFactory(xAOD__CaloIsolationTool,name = "CaloIsolationToo
PFlowObjectsInConeTool = PFlowObjectsInConeTool,
ParticleCaloExtensionTool = CaloExtensionTool,
IsoLeakCorrectionTool = IsoCorrectionTool,
ParticleCaloCellAssociationTool = CaloCellAssocTool,
EMCaloNums = [SUBCALO.LAREM],
HadCaloNums = [SUBCALO.LARHEC, SUBCALO.TILE],
UseEMScale = True)
......
......@@ -25,8 +25,8 @@ namespace Rec {
MuonCaloEnergyTool::MuonCaloEnergyTool(const std::string& t, const std::string& n, const IInterface* p )
: AthAlgTool(t,n,p),
m_caloExtensionTool("Trk::ParticleCaloExtensionTool/ParticleCaloExtensionTool"),
m_caloCellAssociationTool("Rec::ParticleCaloCellAssociationTool/ParticleCaloCellAssociationTool"),
m_caloExtensionTool("Trk::ParticleCaloExtensionTool/ParticleCaloExtensionTool", this),
m_caloCellAssociationTool("Rec::ParticleCaloCellAssociationTool/ParticleCaloCellAssociationTool", this),
m_particleCreator("Trk::TrackParticleCreatorTool/MuonCaloParticleCreator"),
m_caloNoiseTool("CaloNoiseToolDefault"),
m_sigmasAboveNoise(4.),
......
......@@ -25,19 +25,10 @@ namespace Rec {
ParticleCaloCellAssociationTool::ParticleCaloCellAssociationTool(const std::string& t, const std::string& n, const IInterface* p )
: AthAlgTool(t,n,p),
m_caloExtensionTool("Trk::ParticleCaloExtensionTool/ParticleCaloExtensionTool"),
m_defaultSelector(0.4)
{
declareInterface<IParticleCaloCellAssociationTool>(this);
declareProperty("ParticleCaloExtensionTool", m_caloExtensionTool );
//Default data source for the calocells
declareProperty("CaloCellContainer", m_cellContainerName="AllCalo");
//coneSize for including calo cells around track below 0.2 we will loose cells energy in e.g. Tile HEC etc.
declareProperty("ConeSize", m_coneSize = 0.2);
}
ParticleCaloCellAssociationTool::~ParticleCaloCellAssociationTool() {}
......
......@@ -68,12 +68,17 @@ namespace Rec {
void associateCells( const CaloCellContainer& container, const Trk::CaloExtension& caloExtension, float dr,
std::vector<const CaloCell*>& cells ) const;
ToolHandle< Trk::IParticleCaloExtensionTool > m_caloExtensionTool;
SG::ReadHandleKey<CaloCellContainer> m_cellContainerName;
double m_coneSize;
mutable Trk::CaloCellSelectorLayerdR m_defaultSelector;
ToolHandle< Trk::IParticleCaloExtensionTool > m_caloExtensionTool {this,
"ParticleCaloExtensionTool", ""};
mutable PathLengthUtils m_pathLenUtil;
SG::ReadHandleKey<CaloCellContainer> m_cellContainerName {this,
"CaloCellContainer", "AllCalo"};
Gaudi::Property<double> m_coneSize {this, "ConeSize", 0.2};
Trk::CaloCellSelectorLayerdR m_defaultSelector;
PathLengthUtils m_pathLenUtil;
};
......
......@@ -72,7 +72,7 @@ private:
std::unique_ptr<Trk::CaloExtension> caloExtension( const xAOD::NeutralParticle& particle ) const;
std::unique_ptr<Trk::CaloExtension> caloExtension( const xAOD::TrackParticle& particle ) const;
PublicToolHandle<Trk::IExtrapolator> m_extrapolator {this, "Extrapolator", "Trk::Extrapolator/AtlasExtrapolator"};
ToolHandle<Trk::IExtrapolator> m_extrapolator {this, "Extrapolator", ""};
Gaudi::Property<std::string> m_particleTypeName{this,"ParticleType","muon","The particle type : muon, pion, electron,nonInteracting"};
Gaudi::Property<bool> m_startFromPerigee{this,"StartFromPerigee",false, "Start from Perigee"};
const AtlasDetectorID* m_detID;
......
......@@ -19,7 +19,7 @@ PathLengthUtils::~PathLengthUtils(){
}
//=========================================================================================================================
double PathLengthUtils::get3DPathLength(const CaloCell& cell, const Amg::Vector3D& entrance, const Amg::Vector3D& exit, double drFix, double dzFix){
double PathLengthUtils::get3DPathLength(const CaloCell& cell, const Amg::Vector3D& entrance, const Amg::Vector3D& exit, double drFix, double dzFix) const{
//=========================================================================================================================
int debugLevel = 0;
......@@ -483,7 +483,7 @@ double PathLengthUtils::get3DPathLength(const CaloCell& cell, const Amg::Vector3
return path;
}
bool PathLengthUtils::crossingMatrix(Amg::MatrixX Matrix ,Amg::Vector3D entry, Amg::Vector3D& path) {
bool PathLengthUtils::crossingMatrix(Amg::MatrixX Matrix ,Amg::Vector3D entry, Amg::Vector3D& path) const {
// std::cout << " Matrix determinant " << Matrix.determinant() << std::endl;
// std::cout << " Matrix " << std::endl;
......@@ -509,7 +509,7 @@ bool PathLengthUtils::crossingMatrix(Amg::MatrixX Matrix ,Amg::Vector3D entry, A
return crossing;
}
double PathLengthUtils::getPathLengthInTile(const CaloCell& cell, const Amg::Vector3D& entrance, const Amg::Vector3D& exit){
double PathLengthUtils::getPathLengthInTile(const CaloCell& cell, const Amg::Vector3D& entrance, const Amg::Vector3D& exit) const {
//=========================================================================================================================
// OBTAIN LAYER INDICES FOR LINEAR INTERPOLATION
unsigned int SampleID = cell.caloDDE()->getSampling();
......@@ -733,7 +733,7 @@ double PathLengthUtils::getPathLengthInTile(const CaloCell& cell, const Amg::Vec
CaloSampling::CaloSample PathLengthUtils::tileEntrance(CaloSampling::CaloSample sample){
CaloSampling::CaloSample PathLengthUtils::tileEntrance(CaloSampling::CaloSample sample) const {
if(sample==CaloSampling::TileBar0||sample==CaloSampling::TileBar1||sample==CaloSampling::TileBar2||sample==CaloSampling::TileGap2) return CaloSampling::TileBar0;
if(sample==CaloSampling::TileGap1) return CaloSampling::TileBar1;
if(sample==CaloSampling::TileGap3||sample==CaloSampling::TileExt0||sample==CaloSampling::TileExt1||sample==CaloSampling::TileExt2) return CaloSampling::TileExt0;
......@@ -741,7 +741,7 @@ CaloSampling::CaloSample PathLengthUtils::tileEntrance(CaloSampling::CaloSample
//return sample;
} // PathLengthUtils::entrance
CaloSampling::CaloSample PathLengthUtils::tileExit(CaloSampling::CaloSample sample){
CaloSampling::CaloSample PathLengthUtils::tileExit(CaloSampling::CaloSample sample) const {
if(sample==CaloSampling::TileBar0||sample==CaloSampling::TileBar1||sample==CaloSampling::TileBar2||sample==CaloSampling::TileGap1) return CaloSampling::TileBar2;
if(sample==CaloSampling::TileGap2) return CaloSampling::TileBar1;
if(sample==CaloSampling::TileGap3) return CaloSampling::TileExt1;
......@@ -751,7 +751,7 @@ CaloSampling::CaloSample PathLengthUtils::tileExit(CaloSampling::CaloSample samp
} // PathLengthUtils::exit
/** Return the length(mm) of the path crossed inside the cell, given the parameters for the extrapolation at entrance and exit of the layer **/
double PathLengthUtils::pathInsideCell(const CaloCell& cell, const CaloExtensionHelpers::EntryExitLayerMap& entryExitLayerMap) {
double PathLengthUtils::pathInsideCell(const CaloCell& cell, const CaloExtensionHelpers::EntryExitLayerMap& entryExitLayerMap) const {
CaloSampling::CaloSample sample = cell.caloDDE()->getSampling();
......
......@@ -34,33 +34,33 @@
~PathLengthUtils();
double pathInsideCell(const CaloCell& cell, const CaloExtensionHelpers::EntryExitLayerMap& entryExitLayerMap);
double get3DPathLength(const CaloCell& cell, const Amg::Vector3D& entry, const Amg::Vector3D& exit, double drFix, double dzFix );
double pathInsideCell(const CaloCell& cell, const CaloExtensionHelpers::EntryExitLayerMap& entryExitLayerMap) const;
double get3DPathLength(const CaloCell& cell, const Amg::Vector3D& entry, const Amg::Vector3D& exit, double drFix, double dzFix ) const;
double getPathLengthInTile(const CaloCell& cell, const Amg::Vector3D& entry, const Amg::Vector3D& exit );
double getPathLengthInTile(const CaloCell& cell, const Amg::Vector3D& entry, const Amg::Vector3D& exit ) const;
//double path(xAOD::TrackParticle& trackParticle, const CaloCell* cell);
//double path(xAOD::TrackParticle& trackParticle, const CaloCell_ID::CaloSample sample);
private:
CaloSampling::CaloSample tileEntrance(CaloSampling::CaloSample sample);
CaloSampling::CaloSample tileExit(CaloSampling::CaloSample sample);
double phiMean(double a, double b);
bool crossedPhi(const CaloCell& cell, double phi_entrance, double phi_exit);
double getPathLengthInEta(const CaloCell& cell, double eta_entrance, double eta_exit);
double getPathLengthInZ(double zMin, double zMax, double z_entrance, double z_exit);
double getPathLengthInZ(const CaloCell& cell, double z_entrance, double z_exit);
bool crossingMatrix(Amg::MatrixX Matrix ,Amg::Vector3D entry, Amg::Vector3D& path);
CaloSampling::CaloSample tileEntrance(CaloSampling::CaloSample sample) const;
CaloSampling::CaloSample tileExit(CaloSampling::CaloSample sample) const;
double phiMean(double a, double b) const;
bool crossedPhi(const CaloCell& cell, double phi_entrance, double phi_exit) const;
double getPathLengthInEta(const CaloCell& cell, double eta_entrance, double eta_exit) const;
double getPathLengthInZ(double zMin, double zMax, double z_entrance, double z_exit) const;
double getPathLengthInZ(const CaloCell& cell, double z_entrance, double z_exit) const;
bool crossingMatrix(Amg::MatrixX Matrix ,Amg::Vector3D entry, Amg::Vector3D& path) const;
//static double CellZB[9];
//static double CellDZB[9];
//static double CellZC[9];
//static double CellDZC[9];
};
inline double PathLengthUtils::phiMean(double a, double b) { return 0.5*(a+b) + (a*b < 0)*M_PI; }
inline double PathLengthUtils::phiMean(double a, double b) const { return 0.5*(a+b) + (a*b < 0)*M_PI; }
/** Return true if the cell crossed was crossed by the track in phi **/
inline bool PathLengthUtils::crossedPhi(const CaloCell& cell, double phi_entrance, double phi_exit) {
inline bool PathLengthUtils::crossedPhi(const CaloCell& cell, double phi_entrance, double phi_exit) const {
double mean_phi = phiMean(phi_entrance, phi_exit);
double dphi = fabs( CaloPhiRange::diff(phi_entrance, phi_exit) );
double phi_min = mean_phi - dphi, phi_max = mean_phi + dphi;
......@@ -70,7 +70,7 @@ inline bool PathLengthUtils::crossedPhi(const CaloCell& cell, double phi_entranc
}
/** Return the % of path length crossed by the track inside a cell in eta **/
inline double PathLengthUtils::getPathLengthInEta(const CaloCell& cell, double eta_entrance, double eta_exit) {
inline double PathLengthUtils::getPathLengthInEta(const CaloCell& cell, double eta_entrance, double eta_exit) const {
double etaMin = cell.eta() - 0.5*cell.caloDDE()->deta();
double etaMax = cell.eta() + 0.5*cell.caloDDE()->deta();
if ( fabs(eta_entrance - eta_exit) < 1e-6 ) // to avoid FPE
......@@ -82,7 +82,7 @@ inline double PathLengthUtils::getPathLengthInEta(const CaloCell& cell, double e
}
/** Return the % of path length crossed by the track inside a cell in Z **/
inline double PathLengthUtils::getPathLengthInZ(double zMin, double zMax, double z_entrance, double z_exit) {
inline double PathLengthUtils::getPathLengthInZ(double zMin, double zMax, double z_entrance, double z_exit) const {
if ( fabs(z_entrance - z_exit) < 1e-6 ) // to avoid FPE
return z_entrance > zMin && z_entrance < zMax;
......@@ -92,7 +92,7 @@ inline double PathLengthUtils::getPathLengthInZ(double zMin, double zMax, double
}
/** Return the % of path length crossed by the track inside a cell in Z **/
inline double PathLengthUtils::getPathLengthInZ(const CaloCell& cell, double z_entrance, double z_exit) {
inline double PathLengthUtils::getPathLengthInZ(const CaloCell& cell, double z_entrance, double z_exit) const {
return getPathLengthInZ(cell.z() - 0.5*cell.caloDDE()->dz(), cell.z() + 0.5*cell.caloDDE()->dz(), z_entrance, z_exit);
}
......
......@@ -8,8 +8,8 @@ from egammaRec.Factories import FcnWrapper, ToolFactory, PublicToolFactory
###############
#egammaExtrapolator: just use the AtlasExtrapolator, making a tool factory
from TrkExTools.AtlasExtrapolator import AtlasExtrapolator
egammaExtrapolator = PublicToolFactory(AtlasExtrapolator,
name = 'AtlasExtrapolator')
egammaExtrapolator = ToolFactory(AtlasExtrapolator,
name = 'AtlasExtrapolator')
#egammaInDetTrackSummaryTool: just use the AtlasTrackSummaryTool, making a tool factory
from TrkTrackSummaryTool.AtlasTrackSummaryTool import AtlasTrackSummaryTool
......
......@@ -30,6 +30,8 @@
#include "TrkGeometry/TrackingVolume.h"
#include "TrkGeometry/MagneticFieldProperties.h"
#include "RecoToolInterfaces/IMuonCaloEnergyTool.h"
namespace MagField {
class IMagFieldSvc;
}
......@@ -43,7 +45,6 @@ namespace Rec {
class IMuidCaloEnergyMeas;
class IMuidCaloEnergyParam;
class IMuidTrackIsolation;
class IMuonCaloEnergyTool;
}
class AtlasDetectorID;
......@@ -186,7 +187,8 @@ namespace Trk{
ToolHandle<Rec::IMuidCaloEnergyMeas> m_caloMeasTool;
ToolHandle<Rec::IMuidCaloEnergyParam> m_caloParamTool;
ToolHandle<Rec::IMuidTrackIsolation> m_trackIsolationTool;
ToolHandle<Rec::IMuonCaloEnergyTool> m_muonCaloEnergyTool;
ToolHandle<Rec::IMuonCaloEnergyTool> m_muonCaloEnergyTool {this,
"MuonCaloEnergyTool", ""};
const AtlasDetectorID *m_DetID;
const Trk::Volume* m_calorimeterVolume;
......
......@@ -28,7 +28,6 @@
#include "MuidInterfaces/IMuidCaloEnergyMeas.h"
#include "MuidInterfaces/IMuidCaloEnergyParam.h"
#include "MuidInterfaces/IMuidTrackIsolation.h"
#include "RecoToolInterfaces/IMuonCaloEnergyTool.h"
//#define DEBUGON //To activate printout for TSOS lists at various stages
// for line-by-line debugging
......@@ -65,7 +64,6 @@ Trk::TrkMaterialProviderTool::TrkMaterialProviderTool(const std::string& t, cons
m_caloMeasTool ("Rec::MuidCaloEnergyMeas/MuidCaloEnergyMeas"),
m_caloParamTool ("Rec::MuidCaloEnergyParam/MuidCaloEnergyParam"),
m_trackIsolationTool ("Rec::MuidTrackIsolation/MuidTrackIsolation"),
m_muonCaloEnergyTool ("Rec::MuonCaloEnergyTool/MuonCaloEnergyTool"),
m_DetID(0),
m_calorimeterVolume(0),
m_indetVolume(0),
......
......@@ -18,7 +18,7 @@ from AthenaCommon.SystemOfUnits import GeV,MeV,deg
# New configuration for use in rel 19.X with xAOD
# Adapted from egammaRec/egammaGetter.py
# Factory tools, handles configuration of tools and dependencies
from egammaRec.Factories import Factory, PublicToolFactory, FcnWrapper, getPropertyValue
from egammaRec.Factories import Factory, ToolFactory, PublicToolFactory, FcnWrapper, getPropertyValue
# Import tools required for trigger reconstruction
# Following offline tools not used at HLT:
......@@ -47,6 +47,16 @@ TrigCaloFillRectangularCluster = PublicToolFactory( Cccc.CaloFillRectangularClus
phi_size = 7,
cells_name = "")
# tool to extrapolate to the calo
from TrackToCalo.TrackToCaloConf import Trk__ParticleCaloExtensionTool, Rec__ParticleCaloCellAssociationTool
#this is just regular extrapolator, but in ToolFactory form
from egammaTools.InDetTools import egammaExtrapolator
CaloExtensionTool = ToolFactory (Trk__ParticleCaloExtensionTool,
Extrapolator = egammaExtrapolator)
CaloCellAssocTool = ToolFactory (Rec__ParticleCaloCellAssociationTool,
ParticleCaloExtensionTool = CaloExtensionTool)
from AthenaCommon.GlobalFlags import globalflags
isMC = not globalflags.DataSource()=='data'
from IsolationCorrections.IsolationCorrectionsConf import CP__IsolationCorrectionTool as ICT
......@@ -55,28 +65,32 @@ IsoCorrectionToolTrig = PublicToolFactory(ICT,
IsMC = isMC)
from IsolationTool.IsolationToolConf import xAOD__CaloIsolationTool,xAOD__TrackIsolationTool
from CaloIdentifier import SUBCALO
TrigCaloIsolationTool = PublicToolFactory(xAOD__CaloIsolationTool,name = "TrigEgammaCaloIsolationTool",
TrigCaloIsolationTool = ToolFactory(xAOD__CaloIsolationTool,name = "TrigEgammaCaloIsolationTool",
doEnergyDensityCorrection = False,
saveOnlyRequestedCorrections = True,
IsoLeakCorrectionTool = IsoCorrectionToolTrig,
CaloFillRectangularClusterTool = TrigCaloFillRectangularCluster,
ParticleCaloExtensionTool = CaloExtensionTool,
ParticleCaloCellAssociationTool = CaloCellAssocTool,
EMCaloNums = [SUBCALO.LAREM],
HadCaloNums = [SUBCALO.LARHEC,SUBCALO.TILE])
from ParticlesInConeTools.ParticlesInConeToolsConf import xAOD__CaloClustersInConeTool
TrigCaloClustersInConeTool = PublicToolFactory(xAOD__CaloClustersInConeTool,CaloClusterLocation = "CaloCalTopoCluster")
TrigCaloTopoIsolationTool = PublicToolFactory(xAOD__CaloIsolationTool,name = "TrigEgammaCaloTopoIsolationTool",
TrigCaloTopoIsolationTool = ToolFactory(xAOD__CaloIsolationTool,name = "TrigEgammaCaloTopoIsolationTool",
doEnergyDensityCorrection = True,
saveOnlyRequestedCorrections = True,
IsoLeakCorrectionTool = IsoCorrectionToolTrig,
ClustersInConeTool = TrigCaloClustersInConeTool,
CaloFillRectangularClusterTool = TrigCaloFillRectangularCluster,
UseEMScale = True,
ParticleCaloExtensionTool = CaloExtensionTool,
ParticleCaloCellAssociationTool = CaloCellAssocTool,
TopoClusterEDCentralContainer = "HLTTopoClusterIsoCentralEventShape",
TopoClusterEDForwardContainer = "HLTTopoClusterIsoForwardEventShape")
TrigTrackIsolationTool = PublicToolFactory(xAOD__TrackIsolationTool, name = 'TrigEgammaTrackIsolationTool')
TrigTrackIsolationTool = ToolFactory(xAOD__TrackIsolationTool, name = 'TrigEgammaTrackIsolationTool')
TrkIsoCfg = CfgMgr.xAOD__TrackIsolationTool('TrigEgammaTrackIsolationTool')
TrkIsoCfg.TrackSelectionTool.maxZ0SinTheta = 3.
......
......@@ -99,6 +99,9 @@ TrigEgammaRec::TrigEgammaRec(const std::string& name,ISvcLocator* pSvcLocator):
HLT::FexAlgo(name, pSvcLocator),
m_electronContainerName("egamma_Electrons"),
m_photonContainerName("egamma_Photons"),
m_trackIsolationTool("", this),
m_caloCellIsolationTool("", this),
m_topoIsolationTool("", this),
m_lumiBlockMuTool("LumiBlockMuTool/LumiBlockMuTool")
{
......
......@@ -10,6 +10,10 @@ from AthenaCommon.SystemOfUnits import GeV, mm
from AthenaCommon.AppMgr import ToolSvc
from TrackToCalo.TrackToCaloConf import Trk__ParticleCaloExtensionTool
from TrkExTools.AtlasExtrapolator import AtlasExtrapolator
ParticleCaloExtensionTool= Trk__ParticleCaloExtensionTool(Extrapolator = AtlasExtrapolator())
# ---------------------------------------------------------------
# class for common setups (like monitoring)
class L2ElectronFexBase(TrigL2ElectronFex):
......@@ -36,6 +40,8 @@ class L2ElectronFexBase(TrigL2ElectronFex):
self.CaloTrackdEoverPLow = 0.0
self.CaloTrackdEoverPHigh = 999.0
self.ParticleCaloExtensionTool = ParticleCaloExtensionTool
# ---------------------------------------------------------------
# TrigL2ElectronFex configurations
# ---------------------------------------------------------------
......
......@@ -12,6 +12,10 @@ from AthenaCommon.AppMgr import ToolSvc
from AthenaMonitoring.GenericMonitoringTool import GenericMonitoringTool,defineHistogram
from TrackToCalo.TrackToCaloConf import Trk__ParticleCaloExtensionTool
from TrkExTools.AtlasExtrapolator import AtlasExtrapolator
ParticleCaloExtensionTool= Trk__ParticleCaloExtensionTool(Extrapolator = AtlasExtrapolator())
# ---------------------------------------------------------------
# class for common setups (like monitoring)
class L2ElectronFexBase(TrigL2ElectronFexMT):
......@@ -31,6 +35,8 @@ class L2ElectronFexBase(TrigL2ElectronFexMT):
self.CaloTrackdEoverPLow = 0.0
self.CaloTrackdEoverPHigh = 999.0
self.ParticleCaloExtensionTool = ParticleCaloExtensionTool
from TriggerJobOpts.TriggerFlags import TriggerFlags
if 'Validation' in TriggerFlags.enableMonitoring() or 'Online' in TriggerFlags.enableMonitoring():
monTool = GenericMonitoringTool('MonTool')
......
......@@ -36,7 +36,7 @@ inline const DataVector<xAOD::TrigElectron>** dvec_cast(SRC** ptr) {
TrigL2ElectronFex::TrigL2ElectronFex(const std::string & name, ISvcLocator* pSvcLocator)
: HLT::FexAlgo(name, pSvcLocator),
m_caloExtensionTool("Trk::ParticleCaloExtensionTool/ParticleCaloExtensionTool")
m_caloExtensionTool("Trk::ParticleCaloExtensionTool/ParticleCaloExtensionTool", this)
{
declareProperty( "AcceptAll", m_acceptAll = false );
declareProperty( "ClusEt", m_clusEtthr = 20.0*CLHEP::GeV );
......
......@@ -107,7 +107,7 @@ class TrigL2ElectronFexMT : public AthAlgorithm {
Gaudi::Property<float> m_RCAL {this, "RCalBarrelFace", 1470.0*CLHEP::mm , "Radius of inner face of the barrel calorimeter"};
Gaudi::Property<float> m_ZCAL {this, "ZCalEndcapFace", 3800.0*CLHEP::mm, "z of the inner face of endcap calorimeter"};
// Too be changed Public Tools depreciated
PublicToolHandle<Trk::IParticleCaloExtensionTool > m_caloExtensionTool {this, "ParticleCaloExtensionTool", "Trk::ParticleCaloExtensionTool/ParticleCaloExtensionTool", "Tool to extrapolate Track to Calo inner surface"};
ToolHandle<Trk::IParticleCaloExtensionTool > m_caloExtensionTool {this, "ParticleCaloExtensionTool", "Trk::ParticleCaloExtensionTool/ParticleCaloExtensionTool", "Tool to extrapolate Track to Calo inner surface"};
SG::ReadHandleKey<TrigRoiDescriptorCollection> m_roiCollectionKey { this,
"RoIs", // property name
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment