|
ATLAS Offline Software
|
Go to the documentation of this file.
46 return StatusCode::FAILURE;
69 return StatusCode::SUCCESS;
81 ATH_CHECK( trigElecColl.record (std::make_unique<xAOD::TrigElectronContainer>(),
82 std::make_unique<xAOD::TrigEMClusterAuxContainer>()) );
89 ATH_CHECK( trigDummyElecColl.record (std::make_unique<xAOD::TrigElectronContainer>(),
90 std::make_unique<xAOD::TrigEMClusterAuxContainer>()) );
96 if (roiCollection->size()==0) {
98 return StatusCode::SUCCESS;
104 <<
", Phi = " << (roiDescriptor)->
phi());
106 float calo_eta(999), calo_phi(999), calo_et(-1);
117 calo_eta = emCluster->
eta();
118 calo_phi = emCluster->
phi();
119 calo_et = emCluster->
et();
124 ATH_MSG_DEBUG(
"searching a matching track: loop over tracks");
130 if (tracks->
size() == 0){
131 return StatusCode::SUCCESS;
134 size_t coll_size = tracks->
size();
135 trigElecColl->reserve(coll_size);
138 std::vector<float> calotrkdeta_noextrap_mon;
145 auto caloTrackDEtaNoExtrapMon =
Monitored::Collection(
"CaloTrackdEtaNoExtrapMon", calotrkdeta_noextrap_mon );
147 auto mon =
Monitored::Group(
m_monTool, caloPtMon, trackPtMon, caloTrackDEtaMon, caloTrackDPhiMon, etOverPtMon, caloTrackDEtaNoExtrapMon );
154 trigDummyElecColl->push_back(trigDummyElec);
155 trigDummyElec->
init( 0, 0, 0, 0, clusEL, trackDummyEL);
160 ATH_CHECK(caloDetDescrMgrHandle.isValid());
164 for(
unsigned int track_index = 0; track_index < tracks->
size(); track_index++)
177 float trkPt = std::abs((trkIter)->
pt());
178 float etoverpt = std::abs(calo_et/trkPt);
179 float calotrkdeta_noextrap = (trkIter)->
eta() - calo_eta;
181 double etaAtCalo=999.;
182 double phiAtCalo=999.;
184 if(!
extrapolate(ctx,*caloDD,emCluster,trkIter,etaAtCalo,phiAtCalo)){
190 " eta = " << etaAtCalo <<
" phi = " << phiAtCalo);
193 trigElecColl->push_back(trigElec);
196 etaAtCalo, phiAtCalo, etoverpt,
199 calotrkdeta_noextrap_mon.push_back(calotrkdeta_noextrap);
203 ATH_MSG_DEBUG(
"Apply cuts on track with index: "<<track_index);
209 ATH_MSG_DEBUG(
"Failed pre extrapolation calo track deta " << calotrkdeta_noextrap);
218 ATH_MSG_DEBUG(
"Failed pre extrapolation calo track deta for high et");
230 if(!
extrapolate(ctx,*caloDD,emCluster,trkIter,etaAtCalo,phiAtCalo)){
235 ATH_MSG_DEBUG(
"extrapolated eta/phi=" << etaAtCalo <<
"/" << phiAtCalo);
237 float dEtaCalo = std::abs(etaAtCalo - calo_eta);
244 float dPhiCalo = std::abs(phiAtCalo - calo_phi);
245 dPhiCalo = ( dPhiCalo <
M_PI ? dPhiCalo : 2*
M_PI - dPhiCalo );
260 " track index= " << track_index <<
" eta = " << etaAtCalo <<
" phi = " << phiAtCalo <<
261 " deta = " << dEtaCalo <<
"dphi = " << dPhiCalo);
263 trigElecColl->push_back(trigElec);
265 etaAtCalo, phiAtCalo, etoverpt,
270 <<
" dphi = " << dPhiCalo <<
" dphi = " << trigElec->
trkClusDphi()
271 <<
" caloEta = " << calo_eta <<
" caloEta = " << trigElec->
caloEta()
272 <<
" caloPhi = " << calo_phi <<
" calophi = " << trigElec->
caloPhi()
273 <<
" etaAtCalo = " << etaAtCalo <<
" etaAtCalo = " << trigElec->
trkEtaAtCalo()
274 <<
" phiAtCalo = " << phiAtCalo <<
" phiAtCalo = " << trigElec->
trkPhiAtCalo()
276 calotrkdeta_noextrap_mon.push_back(calotrkdeta_noextrap);
283 ATH_MSG_DEBUG(
"REGTEST: returning an xAOD::TrigElectronContainer with size "<< trigElecColl->size() <<
".");
285 return StatusCode::SUCCESS;
291 double& etaAtCalo,
double& phiAtCalo)
const {
297 std::vector<CaloSampling::CaloSample> samples;
307 std::vector<std::unique_ptr<Trk::Surface>> caloSurfaces =
315 if (extension.empty()) {
320 etaAtCalo = extension[0].second->position().eta();
321 phiAtCalo = extension[0].second->position().phi();
323 ATH_MSG_VERBOSE(
"Hit sampling :" << extension.at(0).first <<
" at eta : "
324 << etaAtCalo <<
" at phi : " << phiAtCalo);
bool extrapolate(const EventContext &ctx, const CaloDetDescrManager &caloDD, const xAOD::TrigEMCluster *, const xAOD::TrackParticle *, double &, double &) const
Class describing an electron reconstructed in the HLT.
Group
Properties of a chain group.
float eta() const
get Eta (calibrated)
Scalar phi() const
phi method
Gaudi::Property< float > m_calotrackdphi
Scalar eta() const
pseudorapidity method
virtual unsigned int roiWord() const override final
virtual StatusCode initialize() override
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
nope - should be used for standalone also, perhaps need to protect the class def bits #ifndef XAOD_AN...
Gaudi::Property< float > m_calotrackdeoverp_low
#define ATH_MSG_VERBOSE(x)
float trkClusDeta() const
The absolute value of the track-calo eta measurement difference.
ValuesCollection< T > Collection(std::string name, const T &collection)
Declare a monitored (double-convertible) collection.
An algorithm that can be simultaneously executed in multiple threads.
float trkEtaAtCalo() const
Get the track's pseudorapidity extrapolated to the calorimeter.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Gaudi::Property< float > m_calotrkdeta_noextrap_highet
ToolHandle< Trk::IParticleCaloExtensionTool > m_caloExtensionTool
const Trk::Perigee & perigeeParameters() const
Returns the Trk::MeasuredPerigee track parameters.
float phi() const
get Phi (calibrated)
static double getTkPt(const xAOD::TrigElectron *el)
Gaudi::Property< float > m_calotrackdeoverp_high
float trkPhiAtCalo() const
Get the track's azimuthal angle extrapolated to the calorimeter.
static double getCaloPt(const xAOD::TrigElectron *el)
::StatusCode StatusCode
StatusCode definition for legacy code.
setTeId setLumiBlock roiId
Gaudi::Property< float > m_clusEtthr
#define CHECK(...)
Evaluate an expression and check for errors.
Gaudi::Property< bool > m_acceptAll
float etOverPt() const
Get for the electron.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Gaudi::Property< float > m_trackPtthr_highet
Header file to be included by clients of the Monitored infrastructure.
SG::WriteHandleKey< xAOD::TrigElectronContainer > m_outputElectronsKey
ElementLink implementation for ROOT usage.
SG::ReadHandleKey< TrigRoiDescriptorCollection > m_roiCollectionKey
StatusCode initialize(bool used=true)
void init(uint32_t roi, float trkEtaAtCalo, float trkPhiAtCalo, float etOverPt, const EMClusterLink_t &clLink, const TrackParticleLink_t &tpLink)
Initialisation function, setting most properties of the object.
TrigElectron_v1 TrigElectron
Declare the latest version of the class.
SG::WriteHandleKey< xAOD::TrigElectronContainer > m_outputDummyElectronsKey
Gaudi::Property< float > m_trackPtthr
This class provides the client interface for accessing the detector description information common to...
SG::ReadHandleKey< xAOD::TrigEMClusterContainer > m_TrigEMClusterContainerKey
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_TrackParticleContainerKey
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloDetDescrMgrKey
index_type index() const
Get the index of the element inside of its container.
Gaudi::Property< float > m_calotrackdeta
float trkClusDphi() const
The absolute value of the track-calo phi measurement difference.
ToolHandle< GenericMonitoringTool > m_monTool
virtual StatusCode execute(const EventContext &ctx) const override
float et() const
get Et (calibrated)
Gaudi::Property< float > m_calotrkdeta_noextrap
Class describing a TrackParticle.
float caloPhi() const
Azimuthal angle ( ) of the electron in the calorimeter.
Description of a trigger EM cluster.
size_type size() const noexcept
Returns the number of elements in the collection.
float energy() const
get Energy (calibrated)
TrigEgammaFastElectronReAlgo(const std::string &name, ISvcLocator *pSvcLocator)
float caloEta() const
Pseudorapidity ( ) of the electron in the calorimeter.