ATLAS Offline Software
Loading...
Searching...
No Matches
MDTWorstCaseSummary.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5/* MDTWorstCaseSummary.cxx file makes a WorstCaseSummary from the LowStat MDT flags. This loops over all results in MDT[BA][BC][EA][EC] and determines looks at ML Coverage plots, it
6then computes the region coverage as a percentage of NBinsOn/TotalBins.
7 */
8
9#include <dqm_core/AlgorithmManager.h>
10
12
13#include <string>
14
15#include <dqm_core/Result.h>
16#include <dqm_core/Parameter.h>
17
19
21{
22 dqm_core::AlgorithmManager::instance().registerSummaryMaker("MDTWorstCaseSummary",this);
23}
24
28
34
35dqm_core::Result*
37 const dqm_core::Result &,
38 const dqm_core::ParametersMap & map)
39{
40 dqm_core::ParametersMap::const_iterator iter;
41
42 double TotalBins = 0;
43 int NBins = 0;
44
45 for (iter=map.begin();iter!=map.end();++iter){
46
47 std::string name = (*iter).first;
48 if(name.find("NumberOfHitsIn") == std::string::npos) continue;
49
50 std::map<std::string,double> theTags = (*iter).second->getResult()->tags_;
51
52 int nBins = 0;
53 double ratio = 1.;
54 double effCut = 1.;
55 for(std::map<std::string,double>::const_iterator mitr = theTags.begin(); mitr != theTags.end(); ++mitr){
56 std::string parameter = (*mitr).first;
57 if(parameter == "NBins") {
58 nBins = (*mitr).second;
59 }
60 if(parameter == "NBins_%"){
61 ratio = (*mitr).second;
62 }
63 if(parameter == "Effective_BinThreshold") effCut = (*mitr).second;
64 }
65
66 if(ratio > 0 && effCut > 1.1) {
67 TotalBins += nBins/ratio*100;
68 NBins += nBins;
69 }
70
71 }
72
73 dqm_core::Result *newresult = new dqm_core::Result();
74
75
76 if( TotalBins < 100) newresult->status_ = dqm_core::Result::Undefined;
77 else if( NBins*1./TotalBins < 0.9) newresult->status_ = dqm_core::Result::Red;
78 else newresult->status_ = dqm_core::Result::Green;
79
80 return newresult;
81
82}
83
static dqm_algorithms::BinContentComp myInstance
file declares the dqm_algorithms::summary::MDTWorstCaseSummary class.
STL class.
A simple summary Compute the MDT Coverage to ML Granularity per region (BA,BC,EA,EC) based on four se...
dqm_core::Result * execute(const std::string &, const dqm_core::Result &, const dqm_core::ParametersMap &)