Skip to content
Snippets Groups Projects
Commit aa539e08 authored by Tim Martin's avatar Tim Martin
Browse files

Merge branch 'fix_etcut_ringer_hypo' into '21.1'

Fix etcut chains

See merge request !3073

Former-commit-id: 979f7537dffd76e055501704b7ccae3c26b7d5d6
parents 16899190 68ff9174
No related merge requests found
Showing
with 28 additions and 31 deletions
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
......@@ -121,7 +121,7 @@ HLT::ErrorCode TrigL2CaloRingerFex::hltFinalize() {
HLT::ErrorCode TrigL2CaloRingerFex::hltExecute(const HLT::TriggerElement* /*inputTE*/, HLT::TriggerElement* outputTE){
// For now, this must be [avgmu, rnnOutputWithTansig, rnnOutputWithoutTansig]
m_output=-99;
m_output=-999;
std::vector<float> output;
///Retrieve rings pattern information
......@@ -162,10 +162,14 @@ HLT::ErrorCode TrigL2CaloRingerFex::hltExecute(const HLT::TriggerElement* /*inpu
// Fix eta range
if(eta>2.50) eta=2.50;///fix for events out of the ranger
// Add avgmu!
output.push_back(avgmu);
if(doTiming()) m_decisionTimer->start();
if(m_discriminators.size() > 0){
if(doTiming()) m_decisionTimer->start();
for(unsigned i=0; i<m_discriminators.size(); ++i){
if(et > m_discriminators[i]->etmin() && et <= m_discriminators[i]->etmax()){
if(eta > m_discriminators[i]->etamin() && eta <= m_discriminators[i]->etamax()){
......@@ -176,25 +180,20 @@ HLT::ErrorCode TrigL2CaloRingerFex::hltExecute(const HLT::TriggerElement* /*inpu
}///Et conditions
}///Loop over discriminators
///get shape
const std::vector<float> rings = ringerShape->rings();
ATH_MSG_DEBUG( "ringerShape->rings().size() is: " <<rings.size() );
std::vector<float> refRings(rings.size());
refRings.assign(rings.begin(), rings.end());
ATH_MSG_DEBUG( "Et = " << et << " GeV, |eta| = " << eta );
///pre-processing ringer shape (default is Norm1...)
if(doTiming()) m_normTimer->start();
if(preproc) preproc->ppExecute(refRings);
if(doTiming()) m_normTimer->stop();
ATH_MSG_DEBUG( "after preproc refRings.size() is: " <<rings.size() );
///Apply the discriminator
if(discr){
const std::vector<float> rings = ringerShape->rings();
std::vector<float> refRings(rings.size());
refRings.assign(rings.begin(), rings.end());
///pre-processing ringer shape (default is Norm1...)
if(doTiming()) m_normTimer->start();
if(preproc) preproc->ppExecute(refRings);
if(doTiming()) m_normTimer->stop();
float eta_norm=0.0;
float avgmu_norm=0.0;
......@@ -214,16 +213,13 @@ HLT::ErrorCode TrigL2CaloRingerFex::hltExecute(const HLT::TriggerElement* /*inpu
}
m_output=discr->propagate(refRings);
output.push_back(avgmu);
output.push_back(m_output);
output.push_back(discr->getOutputBeforeTheActivationFunction());
}
}// has discr?
}else{
ATH_MSG_DEBUG( "There is no discriminator into this Fex." );
}
if(doTiming()) m_decisionTimer->stop();
ATH_MSG_DEBUG( "Et = " << et << " GeV, |eta| = " << eta << " and rnnoutput = " << m_output );
......
......@@ -78,13 +78,6 @@ HLT::ErrorCode TrigL2CaloRingerHypo::hltExecute(const HLT::TriggerElement* outpu
return HLT::OK;
}
// TODO: Maybe this will expanded for future...
// This was define as [avgmu, rnnOtput, rnnOutputWithoutTansig]
if(rnnOutput->rnnDecision().size() != 3){
ATH_MSG_DEBUG( "Event reproved because we can not retrieve the completed information from RnnOutput to run this hypo!" );
return HLT::OK;
}
// Start to retrieve all information that I need...
const xAOD::TrigEMCluster *emCluster = 0;
const xAOD::TrigRingerRings *ringerShape = rnnOutput->ringer();
......@@ -101,8 +94,6 @@ HLT::ErrorCode TrigL2CaloRingerHypo::hltExecute(const HLT::TriggerElement* outpu
float eta = std::fabs(emCluster->eta());
float et = emCluster->et()*1e-3;//GeV
float avgmu = rnnOutput->rnnDecision().at(0);
if(eta>2.50) eta=2.50;///fix for events out of the ranger
///Et threshold
......@@ -111,7 +102,17 @@ HLT::ErrorCode TrigL2CaloRingerHypo::hltExecute(const HLT::TriggerElement* outpu
return HLT::OK;
}
if(m_cutDefs.size() > 0){
// TODO: Maybe this will expanded for future...
// This was define as [avgmu, rnnOtput, rnnOutputWithoutTansig]
if(rnnOutput->rnnDecision().size() != 3){
ATH_MSG_INFO( "Event reproved because we can not retrieve the completed information from RnnOutput to run this hypo!" );
return HLT::OK;
}
float avgmu = rnnOutput->rnnDecision().at(0);
///Select the correct threshold for each eta/Et region
for(unsigned i=0; i<m_cutDefs.size();++i){
if((et > m_cutDefs[i]->etmin()) && (et <= m_cutDefs[i]->etmax())){
......
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