Commit 3ac64c9e authored by Antonia Strubig's avatar Antonia Strubig
Browse files

ATR-15450, adding consistency check for MinTOBPt of L1Calo items to ConfigurationCheck.cxx


Former-commit-id: 888c9e93e39c152938b8b7999fde854a79bb7e44
parent aa4083b0
......@@ -1729,6 +1729,55 @@ private:
//////////////////////////////////////// CHECK NO L1CALO ITEM HAS THRESHOLD LOWER THAN IN MINTOBPT ////////////////////////////////////////
class MinTOBPtCheck : public TrigConfTest {
public:
MinTOBPtCheck()
: TrigConfTest("MinimumTOBPtCheck", "Check if all L1Calo items have threshold above MinTOBPt value", WARNING),
m_belowMinTOBpt("")
{}
virtual void execute(const Exc_t&) {
if ( !m_ctp ) return;
const TrigConf::CaloInfo caloinfo = m_ctp->menu().thresholdConfig().caloInfo();
unsigned int em_min = caloinfo.minTobEM().ptmin;
unsigned int tau_min = caloinfo.minTobTau().ptmin;
unsigned int Jsmall_min = caloinfo.minTobJetSmall().ptmin;
unsigned int Jlarge_min = caloinfo.minTobJetLarge().ptmin;
for(const TrigConf::TriggerThreshold* thr : m_ctp->menu().thresholdConfig().thresholdVector() ) {
if(thr->type() == "EM" || thr->type() == "TAU" || thr->type() == "JET"){
for( const TrigConf::TriggerThresholdValue* thrVal : thr->thresholdValueVector() ) {
if(thr->type() == "EM" && thrVal->ptcut() < em_min) m_belowMinTOBpt += thr->name() + ", ";
if(thr->type() == "TAU" && thrVal->ptcut() < tau_min) m_belowMinTOBpt += thr->name() + ", ";
if(thr->type() == "JET"){
const TrigConf::JetThresholdValue* jetThrVal = dynamic_cast<const TrigConf::JetThresholdValue*>(thrVal);
if(jetThrVal->windowSizeAsString() == "LARGE" && thrVal->ptcut() < Jlarge_min) m_belowMinTOBpt += thr->name() + ", ";
if(jetThrVal->windowSizeAsString() == "SMALL" && thrVal->ptcut() < Jsmall_min) m_belowMinTOBpt += thr->name() + ", ";
}
}
}
}
if(m_belowMinTOBpt.size()>0) {
m_error = "L1 calo thresholds that are below the MinTOBPt: " + m_belowMinTOBpt;
}
}
private:
std::string m_belowMinTOBpt;
};
// set of tests
ConfigurationCheck::ConfigurationCheck(TrigConf::CTPConfig* ctp, TrigConf::HLTFrame* hlt) {
......@@ -1765,6 +1814,7 @@ ConfigurationCheck::ConfigurationCheck(TrigConf::CTPConfig* ctp, TrigConf::HLTFr
m_tests.push_back(new L1SeedLenghtTest());
//m_tests.push_back(new SignaturesConnectedTest());
m_tests.push_back(new MinTOBPtCheck());
std::vector<TrigConfTest*>::iterator testIt;
for ( testIt = m_tests.begin();
......
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