diff --git a/Control/AthenaMonitoring/AthenaMonitoring/AthMonitorAlgorithm.h b/Control/AthenaMonitoring/AthenaMonitoring/AthMonitorAlgorithm.h index ce4f2bd308ab96936bfc6d673403645b55684c53..b9625700decf5820b7d4841b511d64628d0989ff 100644 --- a/Control/AthenaMonitoring/AthenaMonitoring/AthMonitorAlgorithm.h +++ b/Control/AthenaMonitoring/AthenaMonitoring/AthMonitorAlgorithm.h @@ -91,22 +91,53 @@ public: * should avoid using this specific function name 'fill' in daughter classes. * * @param groupHandle A reference of the GenericMonitoringTool to which add variables + * @param variables Rvalue reference to vector of monitored variables to be saved. Note, + * the vector will not be valid after calling this function! Use + * const lvalue variant if you want to keep your vectors. + */ + void fill( const ToolHandle<GenericMonitoringTool>& groupHandle, + std::vector<std::reference_wrapper<Monitored::IMonitoredVariable>>&& variables ) const; + + /** + * Fills a vector of variables to a group by reference. Calls BASE FILL. + * + * At the end of the fillHistograms routine, one should save the monitored variables + * to the group. This function wraps the process of getting the desired group by a + * call to AthMonitorAlgorithm::getGroup() and a call to Monitored::Group::fill(), + * which also disables the auto-fill feature to avoid double-filling. Note, users + * should avoid using this specific function name 'fill' in daughter classes. + * + * @param groupHandle A reference of the GenericMonitoringTool to which add variables * @param variables Vector of monitored variables to be saved */ + void fill( const ToolHandle<GenericMonitoringTool>& groupHandle, - std::vector<std::reference_wrapper<Monitored::IMonitoredVariable>> variables ) const; + const std::vector<std::reference_wrapper<Monitored::IMonitoredVariable>>& variables ) const { + fill(groupHandle, std::move(std::vector<std::reference_wrapper<Monitored::IMonitoredVariable>>{variables})); + }; /** - * Fills a variadic list of variables to a group by reference. Callse BASE FILL. + * Fills a variadic list of variables to a group by reference. Calls BASE FILL. * * @param groupHandle Reference to the GenericMonitoringTool * @param variables... Variadic list of monitored variables to be saved */ template <typename... T> void fill( const ToolHandle<GenericMonitoringTool>& groupHandle, T&&... variables ) const { - fill(groupHandle,{std::forward<T>(variables)...}); + fill(groupHandle,std::move(std::vector<std::reference_wrapper<Monitored::IMonitoredVariable>>{std::forward<T>(variables)...})); } + /** + * Fills a vector of variables to a group by name. Calls BASE FILL. + * + * @param groupHandle Reference to the GenericMonitoringTool + * @param variables Rvalue reference to vector of monitored variables to be saved. Note, + * the vector will not be valid after calling this function! Use + * const lvalue variant if you want to keep your vectors. + */ + void fill( const std::string& groupName, + std::vector<std::reference_wrapper<Monitored::IMonitoredVariable>>&& variables ) const; + /** * Fills a vector of variables to a group by name. Calls BASE FILL. * @@ -114,7 +145,9 @@ public: * @param variables Vector of monitored variables to be saved */ void fill( const std::string& groupName, - std::vector<std::reference_wrapper<Monitored::IMonitoredVariable>> variables ) const; + const std::vector<std::reference_wrapper<Monitored::IMonitoredVariable>>& variables ) const { + fill( getGroup(groupName), std::move(std::vector<std::reference_wrapper<Monitored::IMonitoredVariable>>{variables})); + } /** * Fills a variadic list of variables to a group by name. Calls BASE FILL. @@ -124,7 +157,7 @@ public: */ template <typename... T> void fill( const std::string& groupName, T&&... variables ) const { - fill(getGroup(groupName),{std::forward<T>(variables)...}); + fill(getGroup(groupName),std::move(std::vector<std::reference_wrapper<Monitored::IMonitoredVariable>>{std::forward<T>(variables)...})); } /** @} */ // end of fill group @@ -345,6 +378,7 @@ protected: private: typedef std::vector<std::reference_wrapper<Monitored::IMonitoredVariable>> MonVarVec_t; std::string m_name; + std::unordered_map<std::string, size_t> m_toolLookupMap; }; #endif diff --git a/Control/AthenaMonitoring/src/AthMonitorAlgorithm.cxx b/Control/AthenaMonitoring/src/AthMonitorAlgorithm.cxx index 63c0dcdd0bfa96219451b126a579708b89820785..b4cd41c0287db8c58b3e11667f02b13f2db6d497 100644 --- a/Control/AthenaMonitoring/src/AthMonitorAlgorithm.cxx +++ b/Control/AthenaMonitoring/src/AthMonitorAlgorithm.cxx @@ -21,6 +21,9 @@ StatusCode AthMonitorAlgorithm::initialize() { // Retrieve the generic monitoring tools (a ToolHandleArray) if ( !m_tools.empty() ) { ATH_CHECK( m_tools.retrieve() ); + for (size_t idx = 0; idx < m_tools.size(); ++idx) { + m_toolLookupMap[m_tools[idx].name()] = idx; + } } // Retrieve the trigger decision tool if requested @@ -86,14 +89,14 @@ StatusCode AthMonitorAlgorithm::execute( const EventContext& ctx ) const { void AthMonitorAlgorithm::fill( const ToolHandle<GenericMonitoringTool>& groupHandle, - MonVarVec_t variables ) const { - Monitored::Group(groupHandle,variables).fill(); + MonVarVec_t&& variables ) const { + Monitored::Group(groupHandle,std::move(variables)).fill(); } void AthMonitorAlgorithm::fill( const std::string& groupName, - MonVarVec_t variables ) const { - fill(getGroup(groupName),variables); + MonVarVec_t&& variables ) const { + this->fill(getGroup(groupName),std::move(variables)); } @@ -156,8 +159,12 @@ AthMonitorAlgorithm::DataType_t AthMonitorAlgorithm::dataTypeStringToEnum( const ToolHandle<GenericMonitoringTool> AthMonitorAlgorithm::getGroup( const std::string& name ) const { // get the pointer to the tool, and check that it exists - const ToolHandle<GenericMonitoringTool>* toolPtr = m_tools[name]; - if ( !toolPtr ) { + const ToolHandle<GenericMonitoringTool>* toolPtr{nullptr}; + auto idx = m_toolLookupMap.find(name); + if (ATH_LIKELY(idx != m_toolLookupMap.end())) { + toolPtr = &m_tools[idx->second]; + } + if ( ATH_UNLIKELY(!toolPtr) ) { std::string available = std::accumulate( m_tools.begin(), m_tools.end(), m_tools.begin()->name(), [](std::string s,auto h){return s + "," + h->name();} ); ATH_MSG_FATAL( "The tool " << name << " could not be found in the tool array of the " << @@ -166,7 +173,7 @@ ToolHandle<GenericMonitoringTool> AthMonitorAlgorithm::getGroup( const std::stri available << "}." << endmsg ); } const ToolHandle<GenericMonitoringTool> toolHandle = *toolPtr; - if ( toolHandle.empty() ) { + if ( ATH_UNLIKELY(toolHandle.empty()) ) { ATH_MSG_FATAL("The tool "<<name<<" could not be found because of an empty tool handle."<<endmsg); } // return the tool handle diff --git a/Control/AthenaMonitoring/src/ExampleMonitorAlgorithm.cxx b/Control/AthenaMonitoring/src/ExampleMonitorAlgorithm.cxx index eac9f78a444c8612bcd2ef266a43cf9d6eea3fa3..008e26bea43ee70770ad9970cd9fea0d39a823ae 100644 --- a/Control/AthenaMonitoring/src/ExampleMonitorAlgorithm.cxx +++ b/Control/AthenaMonitoring/src/ExampleMonitorAlgorithm.cxx @@ -15,6 +15,9 @@ ExampleMonitorAlgorithm::~ExampleMonitorAlgorithm() {} StatusCode ExampleMonitorAlgorithm::initialize() { using namespace Monitored; + // initialize superclass + ATH_CHECK( AthMonitorAlgorithm::initialize() ); + m_abGroups1 = buildToolMap<int>(m_tools,"ExampleMonitor",2); m_abGroups2 = buildToolMap<std::vector<int>>(m_tools,"ExampleMonitor",4,2); @@ -22,7 +25,7 @@ StatusCode ExampleMonitorAlgorithm::initialize() { std::vector<std::string> clusters = {"clusterX","clusterB"}; m_cGroups1 = buildToolMap<int>(m_tools,"ExampleMonitor",layers); m_cGroups2 = buildToolMap<std::map<std::string,int>>(m_tools,"ExampleMonitor",layers,clusters); - return AthMonitorAlgorithm::initialize(); + return StatusCode::SUCCESS; } diff --git a/Control/AthenaMonitoringKernel/AthenaMonitoringKernel/GenericMonitoringTool.h b/Control/AthenaMonitoringKernel/AthenaMonitoringKernel/GenericMonitoringTool.h index 5e9db8d79990c52d93c902dd1292fb195b45e7a3..448d3324f868512c39cfb523006cdc618fec7442 100644 --- a/Control/AthenaMonitoringKernel/AthenaMonitoringKernel/GenericMonitoringTool.h +++ b/Control/AthenaMonitoringKernel/AthenaMonitoringKernel/GenericMonitoringTool.h @@ -95,7 +95,7 @@ public: virtual StatusCode stop() override; /// Retrieve the histogram fillers - std::vector<std::shared_ptr<Monitored::HistogramFiller>> getHistogramsFillers(std::vector<std::reference_wrapper<Monitored::IMonitoredVariable>> monitoredVariables) const; + std::vector<std::shared_ptr<Monitored::HistogramFiller>> getHistogramsFillers(const std::vector<std::reference_wrapper<Monitored::IMonitoredVariable>>& monitoredVariables) const; /// Book histograms StatusCode book(); /// Overrride configured booking path @@ -112,7 +112,6 @@ private: Gaudi::Property<bool> m_explicitBooking { this, "ExplicitBooking", false, "Do not create histograms automatically in initialize but wait until the method book is called." }; std::unordered_map<std::string, std::vector<std::shared_ptr<Monitored::HistogramFiller>>> m_fillerMap; //!< map from variables to fillers - }; /** diff --git a/Control/AthenaMonitoringKernel/AthenaMonitoringKernel/HistogramDef.h b/Control/AthenaMonitoringKernel/AthenaMonitoringKernel/HistogramDef.h index 3322c7878a83b857a714c1f6313d113a4bb729ad..f6e0486d7bfc7ede350644b9490c14fec863bae7 100644 --- a/Control/AthenaMonitoringKernel/AthenaMonitoringKernel/HistogramDef.h +++ b/Control/AthenaMonitoringKernel/AthenaMonitoringKernel/HistogramDef.h @@ -22,6 +22,7 @@ namespace Monitored { std::string tld{""}; //!< top level directory (below THistSvc stream) std::string convention; //!< path naming convention (e.g. OFFLINE) std::string weight; //!< name of weight variable + std::string cutMask; //!< variable that defines whether event is accepted std::string xvar; //!< name of x variable int xbins; //!< number of y bins diff --git a/Control/AthenaMonitoringKernel/AthenaMonitoringKernel/HistogramFiller.h b/Control/AthenaMonitoringKernel/AthenaMonitoringKernel/HistogramFiller.h index 8055ec83044d8fe1e98cf0c3b96d6854d26dbcc5..29a0f9ff2bb9de2b39f2cd4d4d1360ca44d29af6 100644 --- a/Control/AthenaMonitoringKernel/AthenaMonitoringKernel/HistogramFiller.h +++ b/Control/AthenaMonitoringKernel/AthenaMonitoringKernel/HistogramFiller.h @@ -29,7 +29,8 @@ namespace Monitored { : m_mutex(std::make_shared<std::mutex>()), m_histDef(new HistogramDef(histDef)), m_histogramProvider(histogramProvider), - m_monWeight(nullptr) {} + m_monWeight(nullptr), + m_monCutMask(nullptr) {} /** * @brief Copy constructor * @@ -39,7 +40,8 @@ namespace Monitored { : m_mutex(hf.m_mutex), m_histDef(hf.m_histDef), m_histogramProvider(hf.m_histogramProvider), - m_monWeight(hf.m_monWeight) {} + m_monWeight(hf.m_monWeight), + m_monCutMask(hf.m_monCutMask) {} /** * @brief Move constructor */ @@ -59,11 +61,11 @@ namespace Monitored { * @brief clone filler for actual filling * Note that this operation is very chip as the this class is effectively a flyweight */ - virtual HistogramFiller* clone() = 0; + virtual HistogramFiller* clone() const = 0; - void setMonitoredVariables(const std::vector<std::reference_wrapper<Monitored::IMonitoredVariable>>& monitoredVariables) { - m_monVariables = monitoredVariables; + void setMonitoredVariables(std::vector<std::reference_wrapper<Monitored::IMonitoredVariable>>&& monitoredVariables) { + m_monVariables = std::move(monitoredVariables); } /** @@ -74,6 +76,10 @@ namespace Monitored { m_monWeight = monitoredWeight; } + void setMonitoredCutMask(Monitored::IMonitoredVariable* monitoredCutMask) { + m_monCutMask = monitoredCutMask; + } + const std::vector<std::string>& histogramVariablesNames() const { return m_histDef->name; } @@ -82,18 +88,43 @@ namespace Monitored { return m_histDef->weight; } + const std::string& histogramCutMaskName() const { + return m_histDef->cutMask; + } + protected: template <class H> H* histogram() { return static_cast<H*>(m_histogramProvider->histogram()); } + // convenience function to provide a function that interprets the cutmask + std::pair<size_t, std::function<bool(size_t)>> getCutMaskFunc() { + std::function<bool(size_t)> cutMaskValue = [] (size_t){ return true; }; // default is true + size_t maskSize = 1; + const std::vector<double> cutMaskVector{m_monCutMask ? m_monCutMask->getVectorRepresentation() : std::vector<double>{}}; + if ( m_monCutMask != nullptr ) { + maskSize = cutMaskVector.size(); + if (maskSize == 1) { + if (!cutMaskVector[0]) { + // globally fails cut; zero first argument is a signal that one can abort + return std::make_pair(0, [](size_t){ return false; }); + // otherwise, default cutMaskValue is sufficient + } + } else { + return std::make_pair(maskSize, [cutMaskVector=std::move(cutMaskVector)](size_t i){ return bool(cutMaskVector[i]); }); + } + } + return std::make_pair(maskSize, cutMaskValue); + } + std::shared_ptr<std::mutex> m_mutex; std::shared_ptr<HistogramDef> m_histDef; std::shared_ptr<IHistogramProvider> m_histogramProvider; std::vector<std::reference_wrapper<Monitored::IMonitoredVariable>> m_monVariables; Monitored::IMonitoredVariable* m_monWeight; // bare pointer instead of reference as it can be null - + Monitored::IMonitoredVariable* m_monCutMask; + private: HistogramFiller& operator=(HistogramFiller const&) = delete; }; diff --git a/Control/AthenaMonitoringKernel/AthenaMonitoringKernel/IMonitoredVariable.h b/Control/AthenaMonitoringKernel/AthenaMonitoringKernel/IMonitoredVariable.h index 5196cf928014834fc4596c199c3e41f552ba9d7f..e01f26d92302577517d745ee11297d4f06c83424 100644 --- a/Control/AthenaMonitoringKernel/AthenaMonitoringKernel/IMonitoredVariable.h +++ b/Control/AthenaMonitoringKernel/AthenaMonitoringKernel/IMonitoredVariable.h @@ -17,10 +17,11 @@ namespace Monitored { virtual ~IMonitoredVariable() {} const std::string& name() const { return m_name; } - virtual const std::vector<double> getVectorRepresentation() const = 0; + virtual std::vector<double> getVectorRepresentation() const = 0; virtual std::vector<std::string> getStringVectorRepresentation() const = 0; virtual bool hasStringRepresentation() const = 0; //!< indcates that the stored content can be converted to strings - + virtual size_t size() const = 0; //!< gives size of vector representation + protected: IMonitoredVariable(std::string name) diff --git a/Control/AthenaMonitoringKernel/AthenaMonitoringKernel/MonitoredCollection.h b/Control/AthenaMonitoringKernel/AthenaMonitoringKernel/MonitoredCollection.h index acff63691153e4bfd6b84d2cd89165068859c515..4f6f3c2f895f7b8bded8a06b4b97dfbf48bc9caa 100644 --- a/Control/AthenaMonitoringKernel/AthenaMonitoringKernel/MonitoredCollection.h +++ b/Control/AthenaMonitoringKernel/AthenaMonitoringKernel/MonitoredCollection.h @@ -58,6 +58,10 @@ namespace Monitored { std::function<double(const typename ObjectsCollection<T>::const_value_type&)> converterToDouble) { return ObjectsCollection<T>(std::move(name), collection, std::move(converterToDouble)); } + template <class T> ObjectsCollection<T> + Collection(std::string name, const T&& collection, + std::function<double(const typename ObjectsCollection<T>::const_value_type&)> converterToDouble) = delete; + namespace detail { /// Get element type for containers @@ -84,10 +88,11 @@ namespace Monitored { /// @brief . \if empty doc string required due to doxygen bug 787131 \endif friend ValuesCollection<T> Collection<T>(std::string name, const T& collection); + friend ValuesCollection<T> Collection<T>(std::string name, const T&& collection); ValuesCollection(ValuesCollection&&) = default; - const std::vector<double> getVectorRepresentation() const override { + std::vector<double> getVectorRepresentation() const override { return convertToDouble( m_collection ); } @@ -97,13 +102,18 @@ namespace Monitored { virtual bool hasStringRepresentation() const override { return std::is_constructible<std::string, value_type>::value; } + virtual size_t size() const override { + return std::size(m_collection); + } private: const T& m_collection; + ValuesCollection(std::string vname, const T& collection) - : IMonitoredVariable(std::move(vname)), m_collection(collection) { + : IMonitoredVariable(std::move(vname)), m_collection{collection} { } + ValuesCollection(ValuesCollection const&) = delete; ValuesCollection& operator=(ValuesCollection const&) = delete; @@ -149,7 +159,7 @@ namespace Monitored { ObjectsCollection(ObjectsCollection&&) = default; - const std::vector<double> getVectorRepresentation() const override { + std::vector<double> getVectorRepresentation() const override { // Reserve space and fill vector std::vector<double> result; result.reserve(std::size(m_collection)); @@ -164,7 +174,10 @@ namespace Monitored { virtual bool hasStringRepresentation() const override { return false; }; - + virtual size_t size() const override { + return std::size(m_collection); + } + private: const T& m_collection; std::function<double(const const_value_type&)> m_converterToDouble; @@ -172,7 +185,7 @@ namespace Monitored { ObjectsCollection(std::string name, const T& collection, std::function<double(const const_value_type&)> converterToDouble) : IMonitoredVariable(std::move(name)), - m_collection(collection), + m_collection(std::move(collection)), m_converterToDouble(std::move(converterToDouble)) {} ObjectsCollection(ObjectsCollection const&) = delete; ObjectsCollection& operator=(ObjectsCollection const&) = delete; diff --git a/Control/AthenaMonitoringKernel/AthenaMonitoringKernel/MonitoredGroup.h b/Control/AthenaMonitoringKernel/AthenaMonitoringKernel/MonitoredGroup.h index 951124bcd87e903b7536cbb51a4dd75282ab6615..c3711108617116a5b229c21b1456954f51241717 100644 --- a/Control/AthenaMonitoringKernel/AthenaMonitoringKernel/MonitoredGroup.h +++ b/Control/AthenaMonitoringKernel/AthenaMonitoringKernel/MonitoredGroup.h @@ -47,12 +47,18 @@ namespace Monitored { m_monitoredGroup{monitoredGroup...}, m_histogramsFillers(!m_tool.empty() ? m_tool->getHistogramsFillers(m_monitoredGroup) : std::vector<std::shared_ptr<Monitored::HistogramFiller>>()) { } - Group(const ToolHandle<GenericMonitoringTool>& tool, std::vector<std::reference_wrapper<IMonitoredVariable>> monitoredGroup) + Group(const ToolHandle<GenericMonitoringTool>& tool, const std::vector<std::reference_wrapper<IMonitoredVariable>>& monitoredGroup) : m_tool(tool), m_autoFill(true), m_monitoredGroup(monitoredGroup), m_histogramsFillers(!m_tool.empty() ? m_tool->getHistogramsFillers(m_monitoredGroup) : std::vector<std::shared_ptr<Monitored::HistogramFiller>>()) { } + Group(const ToolHandle<GenericMonitoringTool>& tool, std::vector<std::reference_wrapper<IMonitoredVariable>>&& monitoredGroup) + : m_tool(tool), + m_autoFill(true), + m_monitoredGroup(std::move(monitoredGroup)), + m_histogramsFillers(!m_tool.empty() ? m_tool->getHistogramsFillers(m_monitoredGroup) : std::vector<std::shared_ptr<Monitored::HistogramFiller>>()) { } + virtual ~Group() { if (m_autoFill) { fill(); diff --git a/Control/AthenaMonitoringKernel/AthenaMonitoringKernel/MonitoredScalar.h b/Control/AthenaMonitoringKernel/AthenaMonitoringKernel/MonitoredScalar.h index f4b498dc5756d8eaa30c8204292877a94abd54e9..833483e31b6f9f9fb95a8702cbb445ae34e15de4 100644 --- a/Control/AthenaMonitoringKernel/AthenaMonitoringKernel/MonitoredScalar.h +++ b/Control/AthenaMonitoringKernel/AthenaMonitoringKernel/MonitoredScalar.h @@ -71,7 +71,7 @@ namespace Monitored { T operator--() { return --m_value; } T operator--(int) { return m_value--; } - const std::vector<double> getVectorRepresentation() const override { + std::vector<double> getVectorRepresentation() const override { return { convertToDouble( m_value, m_valueTransform, m_valueGenerator ) }; } @@ -83,6 +83,10 @@ namespace Monitored { return std::is_constructible<std::string, T>::value; } + virtual size_t size() const override { + return 1; + } + private: T m_value; std::function<double(const T&)> m_valueTransform; diff --git a/Control/AthenaMonitoringKernel/AthenaMonitoringKernel/MonitoredTimer.h b/Control/AthenaMonitoringKernel/AthenaMonitoringKernel/MonitoredTimer.h index 93c7d3731ea4096df73dd8f8fa10b15034b46486..3f98a6b0ea871148ab5a9bd02f34bab2d1400804 100644 --- a/Control/AthenaMonitoringKernel/AthenaMonitoringKernel/MonitoredTimer.h +++ b/Control/AthenaMonitoringKernel/AthenaMonitoringKernel/MonitoredTimer.h @@ -38,11 +38,12 @@ namespace Monitored { operator double() const; //!< duration between start and stop (or current time) in microseconds - const std::vector<double> getVectorRepresentation() const override { return {double(*this)}; } + std::vector<double> getVectorRepresentation() const override { return {double(*this)}; } virtual std::vector<std::string> getStringVectorRepresentation() const override { return std::vector<std::string>(); }; virtual bool hasStringRepresentation() const override { return false; }; - + virtual size_t size() const override { return 1; } + private: typedef std::chrono::high_resolution_clock clock_type; diff --git a/Control/AthenaMonitoringKernel/python/GenericMonitoringTool.py b/Control/AthenaMonitoringKernel/python/GenericMonitoringTool.py index 5b94c9c318fa5d65f0be34d8dc17db4c0172af9c..0833930b08c098a9919d25a527062a6d7625a455 100644 --- a/Control/AthenaMonitoringKernel/python/GenericMonitoringTool.py +++ b/Control/AthenaMonitoringKernel/python/GenericMonitoringTool.py @@ -106,6 +106,7 @@ class GenericMonitoringArray: # @param path top-level histogram directory (e.g. EXPERT, SHIFT, etc.) # @param title Histogram title and optional axis title (same syntax as in TH constructor) # @param weight Name of the variable containing the fill weight +# @param cutmask Name of the boolean-castable variable that determines if the plot is filled # @param opt Histrogram options (see GenericMonitoringTool) # @param labels Deprecated. Copies value to xlabels. # @param xlabels List of x bin labels. @@ -117,11 +118,12 @@ def defineHistogram(varname, type='TH1F', path=None, xbins=100, xmin=0, xmax=1, xlabels=None, ybins=None, ymin=None, ymax=None, ylabels=None, zmin=None, zmax=None, zlabels=None, - opt='', labels=None, convention=None): + opt='', labels=None, convention=None, + cutmask=None): # All of these fields default to an empty string stringSettingsKeys = ['xvar', 'yvar', 'zvar', 'type', 'path', 'title', 'weight', - 'opt', 'convention', 'alias'] + 'cutMask', 'opt', 'convention', 'alias'] # All of these fileds default to 0 numberSettingsKeys = ['xbins', 'xmin', 'xmax', 'ybins', 'ymin', 'ymax', 'zbins', 'zmin', 'zmax'] @@ -185,6 +187,10 @@ def defineHistogram(varname, type='TH1F', path=None, if weight is not None: settings['weight'] = weight + # Cutmask + if cutmask is not None: + settings['cutMask'] = cutmask + # Output path naming convention if convention is not None: settings['convention'] = convention @@ -228,12 +234,17 @@ def defineHistogram(varname, type='TH1F', path=None, if labels is not None: assert xlabels is None and ylabels is None and zlabels is None,'Mixed use of \ depricated "labels" argument with [xyz]labels arguments.' + log.warning('Histogram %s configured with deprecated "labels" argument. Please use "xlabels" and "ylabels" instead.', + settings['title']) nLabels = len(labels) if nLabels==xbins: xlabels = labels elif nLabels>xbins: + if nLabels > xbins+ybins: + log.warning('More labels specified for %s (%d) than there are x+y bins (%d+%d)', + settings['title'], nLabels, xbins, ybins) xlabels = labels[:xbins] - ylabels = labels[xbins:] + ylabels = labels[xbins:xbins+ybins] # Then, parse the [xyz]label arguments if xlabels is not None and len(xlabels)>0: assert isinstance(xlabels, (list, tuple)),'xlabels must be list or tuple' diff --git a/Control/AthenaMonitoringKernel/share/GenericMon.txt b/Control/AthenaMonitoringKernel/share/GenericMon.txt index 3059d7b083de428feb3c255977e623ee2918df80..e0c57b811055ef490d03939f20ff38f8e7b3a931 100644 --- a/Control/AthenaMonitoringKernel/share/GenericMon.txt +++ b/Control/AthenaMonitoringKernel/share/GenericMon.txt @@ -15,12 +15,14 @@ THistSvc.OutputLevel = 0; THistSvc.Output= {"EXPERT DATAFILE='expert-monitoring.root' OPT='RECREATE'" }; ToolSvc.MonTool.OutputLevel = 0; ToolSvc.MonTool.HistPath="TestGroup"; -ToolSvc.MonTool.Histograms = {'{"alias": "Eta", "allvars": ["Eta"], "convention": "", "opt": "", "path": "EXPERT", "title": "#eta of Clusters; #eta; number of RoIs", "type": "TH1F", "weight": "", "xarray": [], "xbins": 2, "xlabels": [], "xmax": 2.50, "xmin": -2.50, "xvar": "Eta", "yarray": [], "ybins": 0.0, "ylabels": [], "ymax": 0.0, "ymin": 0.0, "yvar": "", "zbins": 0, "zlabels": [], "zmax": 0.0, "zmin": 0.0, "zvar": ""}'}; -ToolSvc.MonTool.Histograms += {'{"alias": "Phi", "allvars": ["Phi"], "convention": "", "opt": "", "path": "EXPERT", "title": "#phi of Clusters; #phi; number of RoIs", "type": "TH1F", "weight": "", "xarray": [], "xbins": 2, "xlabels": [], "xmax": 3.15, "xmin": -3.15, "xvar": "Phi", "yarray": [], "ybins": 0.0, "ylabels": [], "ymax": 0.0, "ymin": 0.0, "yvar": "", "zbins": 0, "zlabels": [], "zmax": 0.0, "zmin": 0.0, "zvar": ""}'}; -ToolSvc.MonTool.Histograms += {'{"alias": "Eta_vs_Phi", "allvars": ["Eta", "Phi"], "convention": "", "opt": "", "path": "EXPERT", "title": "#eta vs #phi of Clusters; #eta; #phi; number of RoIs", "type": "TH2F", "weight": "", "xarray": [], "xbins": 2, "xlabels": [], "xmax": 2.5, "xmin": -2.5, "xvar": "Eta", "yarray": [], "ybins": 2, "ylabels": [], "ymax": 3.15, "ymin": -3.15, "yvar": "Phi", "zbins": 0, "zlabels": [], "zmax": 0.0, "zmin": 0.0, "zvar": ""}'}; -ToolSvc.MonTool.Histograms += {'{"alias": "TIME_t1", "allvars": ["TIME_t1"], "convention": "", "opt": "", "path": "EXPERT", "title": "Timing of tool 1", "type": "TH1F", "weight": "", "xarray": [], "xbins": 100, "xlabels": [], "xmax": 1000.0, "xmin": 0.0, "xvar": "TIME_t1", "yarray": [], "ybins": 0.0, "ylabels": [], "ymax": 0.0, "ymin": 0.0, "yvar": "", "zbins": 0, "zlabels": [], "zmax": 0.0, "zmin": 0.0, "zvar": ""}'}; -ToolSvc.MonTool.Histograms += {'{"alias": "TIME_t2", "allvars": ["TIME_t2"], "convention": "", "opt": "", "path": "EXPERT", "title": "Timing of tool 2", "type": "TH1F", "weight": "", "xarray": [], "xbins": 100, "xlabels": [], "xmax": 1000.0, "xmin": 0.0, "xvar": "TIME_t2", "yarray": [], "ybins": 0.0, "ylabels": [], "ymax": 0.0, "ymin": 0.0, "yvar": "", "zbins": 0, "zlabels": [], "zmax": 0.0, "zmin": 0.0, "zvar": ""}'}; -ToolSvc.MonTool.Histograms += {'{"alias": "DetID", "allvars": ["DetID"], "convention": "", "opt": "", "path": "EXPERT", "title": "Test of text filling", "type": "TH1F", "weight": "", "xarray": [], "xbins": 10, "xlabels": [], "xmax": 10.0, "xmin": 0.0, "xvar": "DetID", "yarray": [], "ybins": 0.0, "ylabels": [], "ymax": 0.0, "ymin": 0.0, "yvar": "", "zbins": 0, "zlabels": [], "zmax": 0.0, "zmin": 0.0, "zvar": ""}'}; -ToolSvc.MonTool.Histograms += {'{"alias": "DetCalo_vs_DetID", "allvars": ["DetCalo", "DetID"], "convention": "", "opt": "", "path": "EXPERT", "title": "Fill 2D with strings", "type": "TH2I", "weight": "", "xarray": [], "xbins": 10, "xlabels": [], "xmax": 10.0, "xmin": 0.0, "xvar": "DetCalo", "yarray": [], "ybins": 10, "ylabels": [], "ymax": 10.0, "ymin": 0.0, "yvar": "DetID", "zbins": 0, "zlabels": [], "zmax": 0.0, "zmin": 0.0, "zvar": ""}'}; -ToolSvc.MonTool.Histograms += {'{"alias": "DetCalo_vs_y", "allvars": ["DetCalo", "y"], "convention": "", "opt": "", "path": "EXPERT", "title": "Fill 2D with string & double", "type": "TH2I", "weight": "", "xarray": [], "xbins": 10, "xlabels": [], "xmax": 10.0, "xmin": 0.0, "xvar": "DetCalo", "yarray": [], "ybins": 10, "ylabels": [], "ymax": 10.0, "ymin": 0.0, "yvar": "y", "zbins": 0, "zlabels": [], "zmax": 0.0, "zmin": 0.0, "zvar": ""}'}; -ToolSvc.MonTool.Histograms += {'{"alias": "x_vs_DetCalo", "allvars": ["x", "DetCalo"], "convention": "", "opt": "", "path": "EXPERT", "title": "Fill 2D with double & string", "type": "TH2I", "weight": "", "xarray": [], "xbins": 10, "xlabels": [], "xmax": 10.0, "xmin": 0.0, "xvar": "x", "yarray": [], "ybins": 10, "ylabels": [], "ymax": 10.0, "ymin": 0.0, "yvar": "DetCalo", "zbins": 0, "zlabels": [], "zmax": 0.0, "zmin": 0.0, "zvar": ""}'}; +// '{"alias": "Eta", "allvars": ["Eta"], "convention": "", "opt": "", "path": "EXPERT", "title": "#eta of Clusters; #eta; number of RoIs", "type": "TH1F", "weight": "", "cutMask": "", "xarray": [], "xbins": 2, "xlabels": [], "xmax": 2.5, "xmin": -2.5, "xvar": "var", "yarray": [], "ybins": 0.0, "ylabels": [], "ymax": 0.0, "ymin": 0.0, "yvar": "", "zbins": 0, "zlabels": [], "zmax": 0.0, "zmin": 0.0, "zvar": ""}' +ToolSvc.MonTool.Histograms = {'{"alias": "Eta", "allvars": ["Eta"], "convention": "", "opt": "", "path": "EXPERT", "title": "#eta of Clusters; #eta; number of RoIs", "type": "TH1F", "weight": "", "cutMask": "", "xarray": [], "xbins": 2, "xlabels": [], "xmax": 2.50, "xmin": -2.50, "xvar": "Eta", "yarray": [], "ybins": 0.0, "ylabels": [], "ymax": 0.0, "ymin": 0.0, "yvar": "", "zbins": 0, "zlabels": [], "zmax": 0.0, "zmin": 0.0, "zvar": ""}'}; +ToolSvc.MonTool.Histograms += {'{"alias": "Eta_CutMask", "allvars": ["Eta"], "convention": "", "opt": "", "path": "EXPERT", "title": "#eta of Clusters, with cut; #eta; number of RoIs", "type": "TH1F", "weight": "", "cutMask": "CutMask", "xarray": [], "xbins": 2, "xlabels": [], "xmax": 2.50, "xmin": -2.50, "xvar": "Eta", "yarray": [], "ybins": 0.0, "ylabels": [], "ymax": 0.0, "ymin": 0.0, "yvar": "", "zbins": 0, "zlabels": [], "zmax": 0.0, "zmin": 0.0, "zvar": ""}'}; +ToolSvc.MonTool.Histograms += {'{"alias": "Phi", "allvars": ["Phi"], "convention": "", "opt": "", "path": "EXPERT", "title": "#phi of Clusters; #phi; number of RoIs", "type": "TH1F", "weight": "", "cutMask": "", "xarray": [], "xbins": 2, "xlabels": [], "xmax": 3.15, "xmin": -3.15, "xvar": "Phi", "yarray": [], "ybins": 0.0, "ylabels": [], "ymax": 0.0, "ymin": 0.0, "yvar": "", "zbins": 0, "zlabels": [], "zmax": 0.0, "zmin": 0.0, "zvar": ""}'}; +ToolSvc.MonTool.Histograms += {'{"alias": "Eta_vs_Phi", "allvars": ["Eta", "Phi"], "convention": "", "opt": "", "path": "EXPERT", "title": "#eta vs #phi of Clusters; #eta; #phi; number of RoIs", "type": "TH2F", "weight": "", "cutMask": "", "xarray": [], "xbins": 2, "xlabels": [], "xmax": 2.5, "xmin": -2.5, "xvar": "Eta", "yarray": [], "ybins": 2, "ylabels": [], "ymax": 3.15, "ymin": -3.15, "yvar": "Phi", "zbins": 0, "zlabels": [], "zmax": 0.0, "zmin": 0.0, "zvar": ""}'}; +ToolSvc.MonTool.Histograms += {'{"alias": "TIME_t1", "allvars": ["TIME_t1"], "convention": "", "opt": "", "path": "EXPERT", "title": "Timing of tool 1", "type": "TH1F", "weight": "", "cutMask": "", "xarray": [], "xbins": 100, "xlabels": [], "xmax": 1000.0, "xmin": 0.0, "xvar": "TIME_t1", "yarray": [], "ybins": 0.0, "ylabels": [], "ymax": 0.0, "ymin": 0.0, "yvar": "", "zbins": 0, "zlabels": [], "zmax": 0.0, "zmin": 0.0, "zvar": ""}'}; +ToolSvc.MonTool.Histograms += {'{"alias": "TIME_t2", "allvars": ["TIME_t2"], "convention": "", "opt": "", "path": "EXPERT", "title": "Timing of tool 2", "type": "TH1F", "weight": "", "cutMask": "", "xarray": [], "xbins": 100, "xlabels": [], "xmax": 1000.0, "xmin": 0.0, "xvar": "TIME_t2", "yarray": [], "ybins": 0.0, "ylabels": [], "ymax": 0.0, "ymin": 0.0, "yvar": "", "zbins": 0, "zlabels": [], "zmax": 0.0, "zmin": 0.0, "zvar": ""}'}; +ToolSvc.MonTool.Histograms += {'{"alias": "DetID", "allvars": ["DetID"], "convention": "", "opt": "", "path": "EXPERT", "title": "Test of text filling", "type": "TH1F", "weight": "", "cutMask": "", "xarray": [], "xbins": 10, "xlabels": [], "xmax": 10.0, "xmin": 0.0, "xvar": "DetID", "yarray": [], "ybins": 0.0, "ylabels": [], "ymax": 0.0, "ymin": 0.0, "yvar": "", "zbins": 0, "zlabels": [], "zmax": 0.0, "zmin": 0.0, "zvar": ""}'}; +ToolSvc.MonTool.Histograms += {'{"alias": "DetCalo_vs_DetID", "allvars": ["DetCalo", "DetID"], "convention": "", "opt": "", "path": "EXPERT", "title": "Fill 2D with strings", "type": "TH2I", "weight": "", "cutMask": "", "xarray": [], "xbins": 10, "xlabels": [], "xmax": 10.0, "xmin": 0.0, "xvar": "DetCalo", "yarray": [], "ybins": 10, "ylabels": [], "ymax": 10.0, "ymin": 0.0, "yvar": "DetID", "zbins": 0, "zlabels": [], "zmax": 0.0, "zmin": 0.0, "zvar": ""}'}; +ToolSvc.MonTool.Histograms += {'{"alias": "DetCalo_vs_y", "allvars": ["DetCalo", "y"], "convention": "", "opt": "", "path": "EXPERT", "title": "Fill 2D with string & double", "type": "TH2I", "weight": "", "cutMask": "", "xarray": [], "xbins": 10, "xlabels": [], "xmax": 10.0, "xmin": 0.0, "xvar": "DetCalo", "yarray": [], "ybins": 10, "ylabels": [], "ymax": 10.0, "ymin": 0.0, "yvar": "y", "zbins": 0, "zlabels": [], "zmax": 0.0, "zmin": 0.0, "zvar": ""}'}; +ToolSvc.MonTool.Histograms += {'{"alias": "x_vs_DetCalo", "allvars": ["x", "DetCalo"], "convention": "", "opt": "", "path": "EXPERT", "title": "Fill 2D with double & string", "type": "TH2I", "weight": "", "cutMask": "", "xarray": [], "xbins": 10, "xlabels": [], "xmax": 10.0, "xmin": 0.0, "xvar": "x", "yarray": [], "ybins": 10, "ylabels": [], "ymax": 10.0, "ymin": 0.0, "yvar": "DetCalo", "zbins": 0, "zlabels": [], "zmax": 0.0, "zmin": 0.0, "zvar": ""}'}; diff --git a/Control/AthenaMonitoringKernel/src/GenericMonitoringTool.cxx b/Control/AthenaMonitoringKernel/src/GenericMonitoringTool.cxx index 99063ff81b2148f845a2aacc20ce26e7b5ee38f3..e0b1eb04c400df06922f6ffba3a791bd032c14c7 100644 --- a/Control/AthenaMonitoringKernel/src/GenericMonitoringTool.cxx +++ b/Control/AthenaMonitoringKernel/src/GenericMonitoringTool.cxx @@ -98,10 +98,6 @@ StatusCode GenericMonitoringTool::book() { for (const auto& fillerVariable : fillerVariables) { m_fillerMap[fillerVariable].push_back(filler); } - const auto& fillerWeight = filler->histogramWeightName(); - if (fillerWeight != "") { - m_fillerMap[fillerWeight].push_back(filler); - } } return StatusCode::SUCCESS; @@ -114,26 +110,32 @@ namespace Monitored { } } -std::vector<std::shared_ptr<HistogramFiller>> GenericMonitoringTool::getHistogramsFillers(std::vector<std::reference_wrapper<IMonitoredVariable>> monitoredVariables) const { - +std::vector<std::shared_ptr<HistogramFiller>> GenericMonitoringTool::getHistogramsFillers(const std::vector<std::reference_wrapper<IMonitoredVariable>>& monitoredVariables) const { - std::vector<std::shared_ptr<HistogramFiller>> result; // stage 1: get candidate fillers (assume generally we get only a few variables) - std::unordered_set<std::shared_ptr<HistogramFiller>> candidates; + std::vector<const HistogramFiller*> candidates; for (const auto& monValue : monitoredVariables) { const auto& match = m_fillerMap.find(monValue.get().name()); if (match != m_fillerMap.end()) { - candidates.insert(match->second.begin(), match->second.end()); + for (const auto& i : match->second) { + candidates.push_back(i.get()); + } } } + // dedup vector + std::sort(candidates.begin(), candidates.end()); + candidates.erase(std::unique(candidates.begin(), candidates.end()), candidates.end()); // stage 2: refine for fillers that have all variables set + std::vector<std::shared_ptr<HistogramFiller>> result; + result.reserve(candidates.size()); for (const auto& filler : candidates) { // Find the associated monitored variable for each histogram's variable(s) const auto& fillerVariables = filler->histogramVariablesNames(); std::vector<std::reference_wrapper<IMonitoredVariable>> variables; + variables.reserve(3); // enough for all current fillers for (const auto& fillerVariable : fillerVariables) { for (const auto& monValue : monitoredVariables) { @@ -156,17 +158,32 @@ std::vector<std::shared_ptr<HistogramFiller>> GenericMonitoringTool::getHistogra } } - if (fillerVariables.size() != variables.size()) { + // Find the cutMask variable in the list of monitored variables + const auto& fillerCutMask = filler->histogramCutMaskName(); + Monitored::IMonitoredVariable* cutmask = nullptr; + if ( fillerCutMask != "" ) { + for (const auto& monValue : monitoredVariables) { + if (fillerCutMask.compare(monValue.get().name()) == 0) { + cutmask = &monValue.get(); + break; + } + } + } + + if (ATH_UNLIKELY(fillerVariables.size() != variables.size() + || (fillerWeight != "" && !weight) + || (fillerCutMask != "" && !cutmask))) { ATH_MSG_DEBUG("Filler has different variables than monitoredVariables"); ATH_MSG_DEBUG("Filler variables : " << fillerVariables); ATH_MSG_DEBUG("Asked to fill from mon. vars: " << monitoredVariables); ATH_MSG_DEBUG("Selected monitored variables: " << variables); continue; } - std::shared_ptr<HistogramFiller> fillerCopy(filler->clone()); - fillerCopy->setMonitoredVariables(variables); + HistogramFiller* fillerCopy(filler->clone()); + fillerCopy->setMonitoredVariables(std::move(variables)); fillerCopy->setMonitoredWeight(weight); - result.push_back(fillerCopy); + fillerCopy->setMonitoredCutMask(cutmask); + result.emplace_back(fillerCopy); } return result; diff --git a/Control/AthenaMonitoringKernel/src/HistogramDef.cxx b/Control/AthenaMonitoringKernel/src/HistogramDef.cxx index cf6cb46fbda4e3652dcb272fd5da18f5d5c9795e..5dc47585962078e013a9d80b8f52c6b37d3617dc 100644 --- a/Control/AthenaMonitoringKernel/src/HistogramDef.cxx +++ b/Control/AthenaMonitoringKernel/src/HistogramDef.cxx @@ -20,6 +20,7 @@ const HistogramDef HistogramDef::parse(const std::string& histogramDefinition) { result.opt = setting["opt"]; result.convention = setting["convention"]; result.weight = setting["weight"]; + result.cutMask = setting["cutMask"]; result.xvar = setting["xvar"]; result.xbins = setting["xbins"]; diff --git a/Control/AthenaMonitoringKernel/src/HistogramFiller/CumulativeHistogramFiller1D.h b/Control/AthenaMonitoringKernel/src/HistogramFiller/CumulativeHistogramFiller1D.h index daf5816ec2a76ff6ba7ef4c011ce231283ef0608..f26edca9ccc60d3f20ed90346b377455b04e7c82 100644 --- a/Control/AthenaMonitoringKernel/src/HistogramFiller/CumulativeHistogramFiller1D.h +++ b/Control/AthenaMonitoringKernel/src/HistogramFiller/CumulativeHistogramFiller1D.h @@ -16,7 +16,7 @@ namespace Monitored { CumulativeHistogramFiller1D(const HistogramDef& definition, std::shared_ptr<IHistogramProvider> provider) : HistogramFiller1D(definition, provider) {} - virtual CumulativeHistogramFiller1D* clone() override { + virtual CumulativeHistogramFiller1D* clone() const override { return new CumulativeHistogramFiller1D( *this ); } @@ -26,12 +26,25 @@ namespace Monitored { return 0; } + size_t varVecSize = m_monVariables.at(0).get().size(); + + // handling of the cutmask + auto cutMaskValuePair = getCutMaskFunc(); + if (cutMaskValuePair.first == 0) { return 0; } + if (ATH_UNLIKELY(cutMaskValuePair.first > 1 && cutMaskValuePair.first != varVecSize)) { + MsgStream log(Athena::getMessageSvc(), "CumulativeHistogramFiller1D"); + log << MSG::ERROR << "CutMask does not match the size of plotted variable: " + << cutMaskValuePair.first << " " << varVecSize << endmsg; + } + auto cutMaskValue = cutMaskValuePair.second; + unsigned i(0); auto histogram = this->histogram<TH1>(); - auto valuesVector = m_monVariables[0].get().getVectorRepresentation(); + auto valuesVector{m_monVariables[0].get().getVectorRepresentation()}; std::lock_guard<std::mutex> lock(*(this->m_mutex)); - + size_t idx = 0; for (auto value : valuesVector) { + if (!cutMaskValue(idx++)) { continue; } unsigned bin = histogram->FindBin(value); for (unsigned j = bin; j > 0; --j) { diff --git a/Control/AthenaMonitoringKernel/src/HistogramFiller/HistogramFiller1D.h b/Control/AthenaMonitoringKernel/src/HistogramFiller/HistogramFiller1D.h index 2fece6ef8a598e50c3344c44ca278e91cc7f0c97..3439b1f073927c57a66edd4fb63c047ffc5ca061 100644 --- a/Control/AthenaMonitoringKernel/src/HistogramFiller/HistogramFiller1D.h +++ b/Control/AthenaMonitoringKernel/src/HistogramFiller/HistogramFiller1D.h @@ -8,7 +8,8 @@ #include "TH1.h" #include "AthenaMonitoringKernel/HistogramFiller.h" -#include <boost/range/combine.hpp> +#include "CxxUtils/AthUnlikelyMacros.h" +#include "GaudiKernel/MsgStream.h" namespace Monitored { /** @@ -20,40 +21,64 @@ namespace Monitored { : HistogramFiller(definition, provider) { } - virtual HistogramFiller1D* clone() override { + virtual HistogramFiller1D* clone() const override { return new HistogramFiller1D( *this ); } virtual unsigned fill() override { if (m_monVariables.size() != 1) { return 0; } + size_t varVecSize = m_monVariables.at(0).get().size(); + + // handling of the cutmask + auto cutMaskValuePair = getCutMaskFunc(); + if (cutMaskValuePair.first == 0) { return 0; } + if (ATH_UNLIKELY(cutMaskValuePair.first > 1 && cutMaskValuePair.first != varVecSize)) { + MsgStream log(Athena::getMessageSvc(), "HistogramFiller1D"); + log << MSG::ERROR << "CutMask does not match the size of plotted variable: " + << cutMaskValuePair.first << " " << varVecSize << endmsg; + } + auto cutMaskAccessor = cutMaskValuePair.second; std::function<double(size_t)> weightValue = [] (size_t ){ return 1.0; }; // default is always 1.0 - std::vector<double> weightVector; + const std::vector<double> weightVector{m_monWeight ? m_monWeight->getVectorRepresentation() : std::vector<double>{}}; if ( m_monWeight != nullptr ) { - weightVector = m_monWeight->getVectorRepresentation(); - weightValue = [&](size_t i){ return weightVector[i]; }; + if (weightVector.size() == 1) { + weightValue = [=](size_t){ return weightVector[0]; }; + } else { + weightValue = [&](size_t i){ return weightVector[i]; }; + if (ATH_UNLIKELY(weightVector.size() != varVecSize)) { + MsgStream log(Athena::getMessageSvc(), "HistogramFiller1D"); + log << MSG::ERROR << "Weight does not match the size of plotted variable: " + << weightVector.size() << " " << varVecSize << endmsg; + } + } } if ( not m_monVariables.at(0).get().hasStringRepresentation() ) { - const auto valuesVector = m_monVariables.at(0).get().getVectorRepresentation(); - fill( std::size( valuesVector), [&](size_t i){ return valuesVector[i]; }, weightValue ); + const auto valuesVector{m_monVariables.at(0).get().getVectorRepresentation()}; + fill( std::size( valuesVector), [&](size_t i){ return valuesVector[i]; }, weightValue, cutMaskAccessor ); return std::size( valuesVector ); } else { - const auto valuesVector = m_monVariables.at(0).get().getStringVectorRepresentation(); - fill( std::size( valuesVector ), [&](size_t i){ return valuesVector[i].c_str(); }, weightValue ); + const auto valuesVector{m_monVariables.at(0).get().getStringVectorRepresentation()}; + fill( std::size( valuesVector ), [&](size_t i){ return valuesVector[i].c_str(); }, weightValue, cutMaskAccessor ); return std::size( valuesVector ); } } protected: - template<typename F1, typename F2> - void fill( size_t n, F1 f1, F2 f2 ) { + // The following method takes the length of the vector of values and three functions as arguments: + // a function that returns a value, one that returns a weight, and one that functions as a cut mask + // template allows us to support both floating point and string variable fill calls + template<typename F1, typename F2, typename F3> + void fill( size_t n, F1 f1, F2 f2, F3 f3 ) { std::lock_guard<std::mutex> lock(*(this->m_mutex)); auto histogram = this->histogram<TH1>(); for ( size_t i = 0; i < n; ++i ) { - histogram->Fill( f1(i), f2(i) ); + if (f3(i)) { + histogram->Fill( f1(i), f2(i) ); + } } } }; diff --git a/Control/AthenaMonitoringKernel/src/HistogramFiller/HistogramFiller2D.h b/Control/AthenaMonitoringKernel/src/HistogramFiller/HistogramFiller2D.h index e2861e7961bbc78f8845b6f3b0caef866ba5c9bc..a2448f034b590cdb760400ffaa8069c3eddb3980 100644 --- a/Control/AthenaMonitoringKernel/src/HistogramFiller/HistogramFiller2D.h +++ b/Control/AthenaMonitoringKernel/src/HistogramFiller/HistogramFiller2D.h @@ -7,9 +7,9 @@ #include "TH2.h" -#include <boost/range/combine.hpp> #include "AthenaMonitoringKernel/HistogramFiller.h" - +#include "CxxUtils/AthUnlikelyMacros.h" +#include "GaudiKernel/MsgStream.h" namespace Monitored { /** @@ -20,26 +20,44 @@ namespace Monitored { HistogramFiller2D(const HistogramDef& definition, std::shared_ptr<IHistogramProvider> provider) : HistogramFiller(definition, provider) {} - virtual HistogramFiller2D* clone() override { - return new HistogramFiller2D( *this ); + virtual HistogramFiller2D* clone() const override { + return new HistogramFiller2D( *this ); } - - + virtual unsigned fill() override { - if (m_monVariables.size() != 2) { + if (ATH_UNLIKELY(m_monVariables.size() != 2)) { + return 0; + } + size_t size1 {m_monVariables[0].get().size()}, size2{m_monVariables[1].get().size()}; + if (ATH_UNLIKELY(size1 == 0 || size2 == 0)) { + // nothing to do return 0; } + // handling of the cutmask + auto cutMaskValuePair = getCutMaskFunc(); + if (cutMaskValuePair.first == 0) { return 0; } + auto cutMaskAccessor = cutMaskValuePair.second; + // handling of the weight std::function<double(size_t)> weightAccessor = [] (size_t ){ return 1.0; }; // default is always 1.0 - std::vector<double> weightVector; + const std::vector<double> weightVector{m_monWeight ? m_monWeight->getVectorRepresentation() : std::vector<double>{}}; if ( m_monWeight != nullptr ) { - weightVector = m_monWeight->getVectorRepresentation(); - weightAccessor = [&](size_t i){ - if ( weightVector.size() == 1 ) - return weightVector[0]; - return weightVector[i]; - }; + if (weightVector.size() == 1) { + weightAccessor = [=](size_t){ return weightVector[0]; }; + } else { + weightAccessor = [&](size_t i){ return weightVector[i]; }; + } + } + + if (ATH_UNLIKELY(size1 > 1 && size2 > 1 + && (size1 != size2 + || (weightVector.size() > 1 && size1 != weightVector.size()) + || (cutMaskValuePair.first > 1 && size1 != cutMaskValuePair.first) + ))) { + MsgStream log(Athena::getMessageSvc(), "HistogramFiller2D"); + log << MSG::ERROR << "Mismatch of provided vector sizes for " << m_histDef->alias << endmsg; + return 0; } struct Extractor { @@ -81,24 +99,26 @@ namespace Monitored { // double-double, string-double, double-string and string-string in calling the fill, we always pass the weigh const size_t maxsize = std::max( value1.size(), value2.size() ); if ( value1.doublesAccessor and value2.doublesAccessor ) - fill( maxsize, value1.doublesAccessor, value2.doublesAccessor, weightAccessor ); + fill( maxsize, value1.doublesAccessor, value2.doublesAccessor, weightAccessor, cutMaskAccessor ); else if ( value1.stringsAccessor and value2.doublesAccessor ) - fill( maxsize, value1.stringsAccessor, value2.doublesAccessor, weightAccessor ); + fill( maxsize, value1.stringsAccessor, value2.doublesAccessor, weightAccessor, cutMaskAccessor ); else if ( value1.doublesAccessor and value2.stringsAccessor ) - fill( maxsize, value1.doublesAccessor, value2.stringsAccessor, weightAccessor ); + fill( maxsize, value1.doublesAccessor, value2.stringsAccessor, weightAccessor, cutMaskAccessor ); else - fill( maxsize, value1.stringsAccessor, value2.stringsAccessor, weightAccessor ); + fill( maxsize, value1.stringsAccessor, value2.stringsAccessor, weightAccessor, cutMaskAccessor ); return maxsize; } protected: - template<typename F1, typename F2, typename F3> - void fill( size_t n, F1 f1, F2 f2, F3 f3 ) { + template<typename F1, typename F2, typename F3, typename F4> + void fill( size_t n, F1 f1, F2 f2, F3 f3, F4 f4 ) { std::lock_guard<std::mutex> lock(*(this->m_mutex)); auto histogram = this->histogram<TH2>(); for ( size_t i = 0; i < n; ++i ) { - histogram->Fill( f1(i), f2(i), f3(i) ); + if (f4(i)) { + histogram->Fill( f1(i), f2(i), f3(i) ); + } } } diff --git a/Control/AthenaMonitoringKernel/src/HistogramFiller/HistogramFiller2DProfile.h b/Control/AthenaMonitoringKernel/src/HistogramFiller/HistogramFiller2DProfile.h index 8825afea79beb96e8d894ca7dbff47d20e32d764..60725582cadf1c3fec2f2dff8441252a20c51c01 100644 --- a/Control/AthenaMonitoringKernel/src/HistogramFiller/HistogramFiller2DProfile.h +++ b/Control/AthenaMonitoringKernel/src/HistogramFiller/HistogramFiller2DProfile.h @@ -18,7 +18,7 @@ namespace Monitored { HistogramFiller2DProfile(const HistogramDef& definition, std::shared_ptr<IHistogramProvider> provider) : HistogramFiller(definition, provider) {} - virtual HistogramFiller2DProfile* clone() override { + virtual HistogramFiller2DProfile* clone() const override { return new HistogramFiller2DProfile( *this ); } @@ -28,10 +28,15 @@ namespace Monitored { return 0; } + // handling of the cutmask + auto cutMaskValuePair = getCutMaskFunc(); + if (cutMaskValuePair.first == 0) { return 0; } + auto cutMaskAccessor = cutMaskValuePair.second; + auto histogram = this->histogram<TProfile2D>(); - auto valuesVector1 = m_monVariables[0].get().getVectorRepresentation(); - auto valuesVector2 = m_monVariables[1].get().getVectorRepresentation(); - auto valuesVector3 = m_monVariables[2].get().getVectorRepresentation(); + const auto valuesVector1{m_monVariables[0].get().getVectorRepresentation()}; + const auto valuesVector2{m_monVariables[1].get().getVectorRepresentation()}; + const auto valuesVector3{m_monVariables[2].get().getVectorRepresentation()}; std::lock_guard<std::mutex> lock(*(this->m_mutex)); /*HERE NEED TO INCLUDE CASE IN WHICH SOME VARIABLES ARE SCALAR AND SOME VARIABLES ARE VECTORS unsigned i(0); @@ -42,16 +47,21 @@ namespace Monitored { //For now lets just consider the case in which all variables are of the same length if ( m_monWeight && m_monWeight->getVectorRepresentation().size()==valuesVector1.size() ) { // Weighted fill - auto weightVector = m_monWeight->getVectorRepresentation(); + const auto weightVector{m_monWeight->getVectorRepresentation()}; double value1,value2,value3,weight; + size_t idx = 0; for (const auto& zipped : boost::combine(valuesVector1,valuesVector2,valuesVector3,weightVector)) { - boost::tie(value1,value2,value3,weight) = zipped; - histogram->Fill(value1,value2,value3,weight); + if (cutMaskAccessor(idx++)) { + boost::tie(value1,value2,value3,weight) = zipped; + histogram->Fill(value1,value2,value3,weight); + } } } else { // Unweighted fill for (unsigned i = 0; i < std::size(valuesVector1); ++i) { - histogram->Fill(valuesVector1[i], valuesVector2[i], valuesVector3[i]); + if (cutMaskAccessor(i)) { + histogram->Fill(valuesVector1[i], valuesVector2[i], valuesVector3[i]); + } } } return std::size(valuesVector1); diff --git a/Control/AthenaMonitoringKernel/src/HistogramFiller/HistogramFillerEfficiency.h b/Control/AthenaMonitoringKernel/src/HistogramFiller/HistogramFillerEfficiency.h index c0cec043768c18a505fe9fce7696b573d9af6b5f..5ae54389b214d726e3b346120320d943b075ccf5 100644 --- a/Control/AthenaMonitoringKernel/src/HistogramFiller/HistogramFillerEfficiency.h +++ b/Control/AthenaMonitoringKernel/src/HistogramFiller/HistogramFillerEfficiency.h @@ -19,37 +19,54 @@ namespace Monitored { HistogramFillerEfficiency(const HistogramDef& definition, std::shared_ptr<IHistogramProvider> provider) : HistogramFiller(definition, provider) {} - virtual HistogramFillerEfficiency* clone() override { + virtual HistogramFillerEfficiency* clone() const override { return new HistogramFillerEfficiency( *this ); } virtual unsigned fill() override { + size_t varVecSize = m_monVariables.at(0).get().size(); + + auto cutMaskValuePair = getCutMaskFunc(); + if (cutMaskValuePair.first == 0) { return 0; } + if (ATH_UNLIKELY(cutMaskValuePair.first > 1 && cutMaskValuePair.first != varVecSize)) { + MsgStream log(Athena::getMessageSvc(), "HistogramFillerEfficiency"); + log << MSG::ERROR << "CutMask does not match the size of plotted variable: " + << cutMaskValuePair.first << " " << varVecSize << endmsg; + } + auto cutMaskAccessor = cutMaskValuePair.second; + auto efficiency = this->histogram<TEfficiency>(); std::lock_guard<std::mutex> lock(*(this->m_mutex)); int nMonVar = m_monVariables.size(); if ( nMonVar==2 ) { // Single observable (1D TEfficiency) - auto valuesVector0 = m_monVariables[0].get().getVectorRepresentation(); - auto valuesVector1 = retrieveVariable(efficiency, 1); + const auto valuesVector0 = m_monVariables[0].get().getVectorRepresentation(); + const auto valuesVector1 = retrieveVariable(efficiency, 1); for (unsigned i = 0; i < std::size(valuesVector0); ++i) { - efficiency->Fill(valuesVector0[i], valuesVector1[i]); + if (cutMaskAccessor(i)) { + efficiency->Fill(valuesVector0[i], valuesVector1[i]); + } } return std::size(valuesVector0); } else if ( nMonVar==3 ) { // Two observables (2D TEfficiency) - auto valuesVector0 = m_monVariables[0].get().getVectorRepresentation(); - auto valuesVector1 = retrieveVariable(efficiency, 1); - auto valuesVector2 = retrieveVariable(efficiency, 2); + const auto valuesVector0 = m_monVariables[0].get().getVectorRepresentation(); + const auto valuesVector1 = retrieveVariable(efficiency, 1); + const auto valuesVector2 = retrieveVariable(efficiency, 2); for (unsigned i = 0; i < std::size(valuesVector0); ++i) { - efficiency->Fill(valuesVector0[i], valuesVector1[i], valuesVector2[i]); + if (cutMaskAccessor(i)) { + efficiency->Fill(valuesVector0[i], valuesVector1[i], valuesVector2[i]); + } } return std::size(valuesVector0); } else if ( nMonVar==4 ) { // Three observables (3D Efficiency) - auto valuesVector0 = m_monVariables[0].get().getVectorRepresentation(); - auto valuesVector1 = retrieveVariable(efficiency, 1); - auto valuesVector2 = retrieveVariable(efficiency, 2); - auto valuesVector3 = retrieveVariable(efficiency, 3); + const auto valuesVector0 = m_monVariables[0].get().getVectorRepresentation(); + const auto valuesVector1 = retrieveVariable(efficiency, 1); + const auto valuesVector2 = retrieveVariable(efficiency, 2); + const auto valuesVector3 = retrieveVariable(efficiency, 3); for (unsigned i = 0; i < std::size(valuesVector0); ++i) { - efficiency->Fill(valuesVector0[i], valuesVector1[i], valuesVector2[i], valuesVector3[i]); + if (cutMaskAccessor(i)) { + efficiency->Fill(valuesVector0[i], valuesVector1[i], valuesVector2[i], valuesVector3[i]); + } } return std::size(valuesVector0); } else { @@ -59,9 +76,8 @@ namespace Monitored { const std::vector<double> retrieveVariable(TEfficiency* efficiency, int iVariable) { auto valueVariable = m_monVariables[iVariable]; - auto valuesVector = valueVariable.get().getVectorRepresentation(); + std::vector<double> valuesVector; if ( valueVariable.get().hasStringRepresentation() ) { - valuesVector.clear(); TH1* tot ATLAS_THREAD_SAFE = const_cast<TH1*>(efficiency->GetTotalHistogram()); const TAxis* axis = getAxis(tot, iVariable); for ( const std::string& value : valueVariable.get().getStringVectorRepresentation() ) { @@ -69,6 +85,8 @@ namespace Monitored { const double binCenter ATLAS_THREAD_SAFE = axis->GetBinCenter(binNumber); valuesVector.push_back(binCenter); } + } else { + valuesVector = valueVariable.get().getVectorRepresentation(); } return valuesVector; } diff --git a/Control/AthenaMonitoringKernel/src/HistogramFiller/HistogramFillerProfile.h b/Control/AthenaMonitoringKernel/src/HistogramFiller/HistogramFillerProfile.h index 66c47a5bd8a693890161562424e08b5ea5d679de..8e455ff4e6f5489b93ac1255cb8a9d9eddaf3549 100644 --- a/Control/AthenaMonitoringKernel/src/HistogramFiller/HistogramFillerProfile.h +++ b/Control/AthenaMonitoringKernel/src/HistogramFiller/HistogramFillerProfile.h @@ -8,6 +8,7 @@ #include "TProfile.h" #include "AthenaMonitoringKernel/HistogramFiller.h" +#include "boost/range/combine.hpp" namespace Monitored { /** @@ -18,7 +19,7 @@ namespace Monitored { HistogramFillerProfile(const HistogramDef& definition, std::shared_ptr<IHistogramProvider> provider) : HistogramFiller(definition, provider) {} - virtual HistogramFillerProfile* clone() override { + virtual HistogramFillerProfile* clone() const override { return new HistogramFillerProfile( *this ); } @@ -27,17 +28,42 @@ namespace Monitored { return 0; } - unsigned i(0); + // handling of the cutmask + auto cutMaskValuePair = getCutMaskFunc(); + if (cutMaskValuePair.first == 0) { return 0; } + auto cutMaskAccessor = cutMaskValuePair.second; + + // handling of the weight + std::function<double(size_t)> weightAccessor = [] (size_t ){ return 1.0; }; // default is always 1.0 + const std::vector<double> weightVector{m_monWeight ? m_monWeight->getVectorRepresentation() : std::vector<double>{}}; + if ( m_monWeight != nullptr ) { + if (weightVector.size() == 1) { + weightAccessor = [=](size_t){ return weightVector[0]; }; + } else { + weightAccessor = [&](size_t i){ return weightVector[i]; }; + } + } + auto histogram = this->histogram<TProfile>(); - auto valuesVector1 = m_monVariables[0].get().getVectorRepresentation(); - auto valuesVector2 = m_monVariables[1].get().getVectorRepresentation(); - const unsigned size1 = std::size(valuesVector1); - const unsigned size2 = std::size(valuesVector2); + const auto valuesVector1{m_monVariables[0].get().getVectorRepresentation()}; + const auto valuesVector2{m_monVariables[1].get().getVectorRepresentation()}; + const size_t size1 = std::size(valuesVector1); + const size_t size2 = std::size(valuesVector2); const bool isAnyVectorEmpty = size1 == 0 || size2 == 0; const bool isAnyVectorScalar = size1 == 1 || size2 == 1; const bool areVectorsSameSize = size1 == size2; const bool areVectorsValid = !isAnyVectorEmpty && (areVectorsSameSize || isAnyVectorScalar); if (!areVectorsValid) return 0; + if (ATH_UNLIKELY(!isAnyVectorScalar + && ((weightVector.size() > 1 && size1 != weightVector.size()) + || (cutMaskValuePair.first > 1 && size1 != cutMaskValuePair.first) + ) + ) + ) { + MsgStream log(Athena::getMessageSvc(), "HistogramFillerProfile"); + log << MSG::ERROR << "Mismatch of provided vector sizes for " << m_histDef->alias << endmsg; + return 0; + } std::lock_guard<std::mutex> lock(*(this->m_mutex)); @@ -45,58 +71,28 @@ namespace Monitored { const auto xmax = std::max_element(begin(valuesVector1), end(valuesVector1)); if (shouldRebinHistogram(*xmax)) { rebinHistogram(*xmax); } } - - if (areVectorsSameSize) { // Two equal-size vectors - if ( m_monWeight && m_monWeight->getVectorRepresentation().size()==valuesVector1.size() ) { - // Weighted fill - auto weightVector = m_monWeight->getVectorRepresentation(); - double value1,value2,weight; - for (const auto& zipped : boost::combine(valuesVector1,valuesVector2,weightVector)) { - boost::tie(value1,value2,weight) = zipped; - histogram->Fill(value1,value2,weight); - } - } else { - // Unweighted fill - for (i = 0; i < std::size(valuesVector1); ++i) { - histogram->Fill(valuesVector1[i], valuesVector2[i]); - } - } - } else if (size1==1) { // first variable is scalar -- loop over second - if ( m_monWeight && m_monWeight->getVectorRepresentation().size()==valuesVector2.size() ) { - // Weighted fill - auto weightVector = m_monWeight->getVectorRepresentation(); - double value2,weight; - for (const auto& zipped : boost::combine(valuesVector2,weightVector)) { - boost::tie(value2,weight) = zipped; - histogram->Fill(valuesVector1[0],value2,weight); - } - } else { - // Unweighted fill - for (auto value2 : valuesVector2) { - histogram->Fill(valuesVector1[0], value2); - ++i; - } - } + std::function<double(size_t)> fillFunc1, fillFunc2; + if (size1 == 1) { + fillFunc1 = [=](size_t){ return valuesVector1[0]; }; + } else { + fillFunc1 = [&](size_t i){ return valuesVector1[i]; }; + } - } else if (size2==1) { // second variable is scalar -- loop over first - if ( m_monWeight && m_monWeight->getVectorRepresentation().size()==valuesVector1.size() ) { - // Weighted fill - auto weightVector = m_monWeight->getVectorRepresentation(); - double value1,weight; - for (const auto& zipped : boost::combine(valuesVector1,weightVector)) { - boost::tie(value1,weight) = zipped; - histogram->Fill(value1,valuesVector2[0],weight); - } - } else { - // Unweighted fill - for (auto value1 : valuesVector1) { - histogram->Fill(value1, valuesVector2[0]); - ++i; - } + if (size2 == 1) { + fillFunc2 = [=](size_t){ return valuesVector2[0]; }; + } else { + fillFunc2 = [&](size_t i){ return valuesVector2[i]; }; + } + + size_t itrSize = std::max(size1, size2); + + for (size_t idx = 0; idx < itrSize; ++idx) { + if (cutMaskAccessor(idx)) { + histogram->Fill(fillFunc1(idx), fillFunc2(idx), weightAccessor(idx)); } } - return i; + return itrSize; } private: diff --git a/Control/AthenaMonitoringKernel/src/HistogramFiller/HistogramFillerRebinable1D.h b/Control/AthenaMonitoringKernel/src/HistogramFiller/HistogramFillerRebinable1D.h index 6e882bc06361c9b95f96bb77f29a2dbb2c0a2c9a..73f6c2bf5f59748ce7aee8366bafab53455e071d 100644 --- a/Control/AthenaMonitoringKernel/src/HistogramFiller/HistogramFillerRebinable1D.h +++ b/Control/AthenaMonitoringKernel/src/HistogramFiller/HistogramFillerRebinable1D.h @@ -24,7 +24,7 @@ namespace Monitored { } } - virtual HistogramFillerRebinable1D* clone() override { + virtual HistogramFillerRebinable1D* clone() const override { return new HistogramFillerRebinable1D( *this ); } diff --git a/Control/AthenaMonitoringKernel/src/HistogramFiller/VecHistogramFiller1D.h b/Control/AthenaMonitoringKernel/src/HistogramFiller/VecHistogramFiller1D.h index 0e918cc0e75c8e593550cbef5756152c8c3952ec..bf6a52eb90a111d8ea456123b28a9963ea1c16d6 100644 --- a/Control/AthenaMonitoringKernel/src/HistogramFiller/VecHistogramFiller1D.h +++ b/Control/AthenaMonitoringKernel/src/HistogramFiller/VecHistogramFiller1D.h @@ -13,7 +13,7 @@ namespace Monitored { VecHistogramFiller1D(const HistogramDef& definition, std::shared_ptr<IHistogramProvider> provider) : HistogramFiller1D(definition, provider) {} - virtual VecHistogramFiller1D* clone() override { + virtual VecHistogramFiller1D* clone() const override { return new VecHistogramFiller1D( *this ); } @@ -22,14 +22,26 @@ namespace Monitored { return 0; } + // handling of the cutmask + auto cutMaskValuePair = getCutMaskFunc(); + if (cutMaskValuePair.first == 0) { return 0; } + auto cutMaskAccessor = cutMaskValuePair.second; + auto histogram = this->histogram<TH1>(); - auto valuesVector = m_monVariables[0].get().getVectorRepresentation(); + const auto valuesVector{m_monVariables[0].get().getVectorRepresentation()}; + if (ATH_UNLIKELY(cutMaskValuePair.first > 1 && cutMaskValuePair.first != valuesVector.size())) { + MsgStream log(Athena::getMessageSvc(), "VecHistogramFiller1D"); + log << MSG::ERROR << "CutMask does not match the size of plotted variable: " + << cutMaskValuePair.first << " " << valuesVector.size() << endmsg; + } std::lock_guard<std::mutex> lock(*(this->m_mutex)); for (unsigned i = 0; i < std::size(valuesVector); ++i) { - auto value = valuesVector[i]; - histogram->AddBinContent(i+1, value); - histogram->SetEntries(histogram->GetEntries() + value); + if (cutMaskAccessor(i)) { + auto value = valuesVector[i]; + histogram->AddBinContent(i+1, value); + histogram->SetEntries(histogram->GetEntries() + value); + } } return std::size(valuesVector); diff --git a/Control/AthenaMonitoringKernel/src/HistogramFiller/VecHistogramFiller1DWithOverflows.h b/Control/AthenaMonitoringKernel/src/HistogramFiller/VecHistogramFiller1DWithOverflows.h index 73ae3ecc7b44c97fd2b68116c1c4c1dea8e3be3b..7c78d17217a6c6532a47fe72a2e79a60ffbba28b 100644 --- a/Control/AthenaMonitoringKernel/src/HistogramFiller/VecHistogramFiller1DWithOverflows.h +++ b/Control/AthenaMonitoringKernel/src/HistogramFiller/VecHistogramFiller1DWithOverflows.h @@ -13,19 +13,35 @@ namespace Monitored { VecHistogramFiller1DWithOverflows(const HistogramDef& definition, std::shared_ptr<IHistogramProvider> provider) : HistogramFiller1D(definition, provider) {} + virtual VecHistogramFiller1DWithOverflows* clone() const override { + return new VecHistogramFiller1DWithOverflows( *this ); + } + virtual unsigned fill() override { if (m_monVariables.size() != 1) { return 0; } + // handling of the cutmask + auto cutMaskValuePair = getCutMaskFunc(); + if (cutMaskValuePair.first == 0) { return 0; } + auto cutMaskAccessor = cutMaskValuePair.second; + auto histogram = this->histogram<TH1>(); - auto valuesVector = m_monVariables[0].get().getVectorRepresentation(); + const auto valuesVector{m_monVariables[0].get().getVectorRepresentation()}; + if (ATH_UNLIKELY(cutMaskValuePair.first > 1 && cutMaskValuePair.first != valuesVector.size())) { + MsgStream log(Athena::getMessageSvc(), "VecHistogramFiller1DWithOverflows"); + log << MSG::ERROR << "CutMask does not match the size of plotted variable: " + << cutMaskValuePair.first << " " << valuesVector.size() << endmsg; + } std::lock_guard<std::mutex> lock(*(this->m_mutex)); for (unsigned i = 0; i < std::size(valuesVector); ++i) { - auto value = valuesVector[i]; - histogram->AddBinContent(i, value); - histogram->SetEntries(histogram->GetEntries() + value); + if (cutMaskAccessor(i)) { + auto value = valuesVector[i]; + histogram->AddBinContent(i, value); + histogram->SetEntries(histogram->GetEntries() + value); + } } return std::size(valuesVector); diff --git a/Control/AthenaMonitoringKernel/test/GenericMonFilling_test.cxx b/Control/AthenaMonitoringKernel/test/GenericMonFilling_test.cxx index 1d1ebb0b36d0b96d788a19d7e676344d8373b5ea..3be668b71361331ceb3beef1c9dff3f2855837d7 100644 --- a/Control/AthenaMonitoringKernel/test/GenericMonFilling_test.cxx +++ b/Control/AthenaMonitoringKernel/test/GenericMonFilling_test.cxx @@ -32,6 +32,7 @@ void resetHists( ITHistSvc* histSvc ) { resetHist( histSvc, "/EXPERT/TestGroup/Eta_vs_Phi" ); resetHist( histSvc, "/EXPERT/TestGroup/Eta" ); resetHist( histSvc, "/EXPERT/TestGroup/Phi" ); + resetHist( histSvc, "/EXPERT/TestGroup/Eta_CutMask"); } double contentInBin1DHist( ITHistSvc* histSvc, const std::string& histName, int bin ) { @@ -153,7 +154,7 @@ bool fill2DWorked( ToolHandle<GenericMonitoringTool>& monTool, ITHistSvc* histSv return true; } -bool fillExplcitelyWorked( ToolHandle<GenericMonitoringTool>& monTool, ITHistSvc* histSvc ) { +bool fillExplicitlyWorked( ToolHandle<GenericMonitoringTool>& monTool, ITHistSvc* histSvc ) { resetHists( histSvc ); auto roiPhi = Monitored::Scalar( "Phi", -99.0 ); auto roiEta = Monitored::Scalar( "Eta", -99.0 ); @@ -191,6 +192,34 @@ bool fillExplcitelyWorked( ToolHandle<GenericMonitoringTool>& monTool, ITHistSvc return true; } +bool fillWithCutMaskWorked( ToolHandle<GenericMonitoringTool>& monTool, ITHistSvc* histSvc ) { + resetHists( histSvc ); + for (int ctr = 0; ctr < 10; ++ctr) { + auto roiEta = Monitored::Scalar<double>( "Eta", -99 ); //explicit double + auto cutMask = Monitored::Scalar<bool>( "CutMask", (ctr % 2) == 0); + auto monitorIt = Monitored::Group( monTool, roiEta, cutMask ); + roiEta = -0.2; + monitorIt.fill(); + } + + VALUE( contentInBin1DHist( histSvc, "/EXPERT/TestGroup/Eta_CutMask", 1 ) ) EXPECTED( 5 ); + VALUE( contentInBin1DHist( histSvc, "/EXPERT/TestGroup/Eta_CutMask", 2 ) ) EXPECTED( 0 ); + + resetHists( histSvc ); + { + std::vector<float> etaVec{-0.2, 0.2, -0.4, 0.4, -0.6}; + auto roiEta = Monitored::Collection( "Eta", etaVec ); + std::vector<char> cutMaskVec = { 0, 1, 1, 1, 0 }; + auto cutMask = Monitored::Collection( "CutMask", cutMaskVec ); + auto monitorIt = Monitored::Group( monTool, roiEta, cutMask ); + } + + VALUE( contentInBin1DHist( histSvc, "/EXPERT/TestGroup/Eta_CutMask", 1 ) ) EXPECTED( 1 ); + VALUE( contentInBin1DHist( histSvc, "/EXPERT/TestGroup/Eta_CutMask", 2 ) ) EXPECTED( 2 ); + + return true; +} + class Scalar { public: Scalar() : m_value( 0 ) { } @@ -424,16 +453,28 @@ int main() { return -1; } + log << MSG::DEBUG << "Histograms defined: " << histSvc->getHists() << endmsg; + log << MSG::DEBUG << "fillFromScalarWorked" << endmsg; assert( fillFromScalarWorked( validMon, histSvc ) ); + log << MSG::DEBUG << "noToolBehaviourCorrect" << endmsg; assert( noToolBehaviourCorrect( emptyMon ) ); + log << MSG::DEBUG << "fillFromScalarIndependentScopesWorked" << endmsg; assert( fillFromScalarIndependentScopesWorked( validMon, histSvc ) ); + log << MSG::DEBUG << "fill2DWorked" << endmsg; assert( fill2DWorked( validMon, histSvc ) ); - assert( fillExplcitelyWorked( validMon, histSvc ) ); - assert( fillFromScalarIndependentScopesWorked( validMon, histSvc ) ); + log << MSG::DEBUG << "fillExplicitlyWorked" << endmsg; + assert( fillExplicitlyWorked( validMon, histSvc ) ); + log << MSG::DEBUG << "fillWithCutMaskWorked" << endmsg; + assert( fillWithCutMaskWorked( validMon, histSvc ) ); + log << MSG::DEBUG << "assignWorked" << endmsg; assert( assignWorked() ); + log << MSG::DEBUG << "operatorsWorked" << endmsg; assert( operatorsWorked() ); + log << MSG::DEBUG << "timerFillingWorked" << endmsg; assert( timerFillingWorked( validMon, histSvc ) ); + log << MSG::DEBUG << "stringFillingWorked" << endmsg; assert( stringFillingWorked( validMon, histSvc ) ); + log << MSG::DEBUG << "string2DFillingWorked" << endmsg; assert( string2DFillingWorked( validMon, histSvc ) ); log << MSG::DEBUG << "All OK" << endmsg; diff --git a/Control/AthenaMonitoringKernel/test/GenericMonParsing_test.cxx b/Control/AthenaMonitoringKernel/test/GenericMonParsing_test.cxx index f509681bb7837723cdec5c48726c2d44cf87f727..8f6831a9ad82cb7c94b871e4bad5c0d360143f35 100644 --- a/Control/AthenaMonitoringKernel/test/GenericMonParsing_test.cxx +++ b/Control/AthenaMonitoringKernel/test/GenericMonParsing_test.cxx @@ -23,6 +23,7 @@ json defaultJson() { j["title"] = "var"; j["type"] = "TH1F"; j["weight"] = ""; + j["cutMask"] = ""; j["xarray"] = json::array(); j["xbins"] = 100; j["xlabels"] = json::array(); @@ -69,6 +70,7 @@ bool parse1D_options() { check["path"] = "mypath/tohistograms"; check["type"] = "TH1D"; check["weight"] = "myweight"; + check["cutMask"] = "mycutmask"; auto def = HistogramDef::parse(check.dump()); VALUE ( def.ok ) EXPECTED ( true ); @@ -80,6 +82,7 @@ bool parse1D_options() { VALUE ( def.path ) EXPECTED ( "mypath/tohistograms" ); VALUE ( def.type ) EXPECTED ( "TH1D" ); VALUE ( def.weight ) EXPECTED ( "myweight" ); + VALUE ( def.cutMask ) EXPECTED ( "mycutmask" ); return true; } diff --git a/Control/AthenaMonitoringKernel/test/HistogramFillerFactoryTestSuite.cxx b/Control/AthenaMonitoringKernel/test/HistogramFillerFactoryTestSuite.cxx index 2708d013222db8e4e7c17d2cd8d87c4e28eb5f65..9c60db5cdbf16c5dad068947ffbf345e4f744b78 100644 --- a/Control/AthenaMonitoringKernel/test/HistogramFillerFactoryTestSuite.cxx +++ b/Control/AthenaMonitoringKernel/test/HistogramFillerFactoryTestSuite.cxx @@ -48,7 +48,7 @@ class HistogramProviderGetter : public HistogramFiller { : HistogramFiller(hf) {} virtual unsigned fill() { return 0; } - virtual HistogramFiller* clone() { return nullptr; } + virtual HistogramFiller* clone() const { return nullptr; } std::shared_ptr<IHistogramProvider> histogramProvider() { return m_histogramProvider; } }; diff --git a/Control/AthenaMonitoringKernel/test/mocks/MockMonitoredVariable.h b/Control/AthenaMonitoringKernel/test/mocks/MockMonitoredVariable.h index d170e7797162f713d57a65a7371338de06c8cfe6..0c1949d9e3bc9910367dd3f915de0f0122bf63a0 100644 --- a/Control/AthenaMonitoringKernel/test/mocks/MockMonitoredVariable.h +++ b/Control/AthenaMonitoringKernel/test/mocks/MockMonitoredVariable.h @@ -10,11 +10,12 @@ class MockMonitoredVariable : public Monitored::IMonitoredVariable { MockMonitoredVariable(const std::string& name) : IMonitoredVariable(name) {} std::function<std::vector<double>()> mock_getVectorRepresentation; - const std::vector<double> getVectorRepresentation() const override { + std::vector<double> getVectorRepresentation() const override { return mock_getVectorRepresentation ? mock_getVectorRepresentation() : std::vector<double>(); } bool hasStringRepresentation() const override { return false; } - std::vector<std::string> getStringVectorRepresentation() const override { return {}; } + std::vector<std::string> getStringVectorRepresentation() const override { return {}; } + size_t size() const override { return getVectorRepresentation().size(); } }; #endif /* AthenaMonitoringKernel_test_mocks_MockMonitoredVariable_h */ diff --git a/Control/AthenaMonitoringKernel/test/test_defineHistogram.py b/Control/AthenaMonitoringKernel/test/test_defineHistogram.py index 60864e4468001afe97b04d61c84220345ff1bd26..318eade857e6298f10142b8b9def9f175256ac1d 100644 --- a/Control/AthenaMonitoringKernel/test/test_defineHistogram.py +++ b/Control/AthenaMonitoringKernel/test/test_defineHistogram.py @@ -11,68 +11,73 @@ from AthenaMonitoringKernel.GenericMonitoringTool import defineHistogram class Test( unittest.TestCase ): def test_1D( self ): check = defineHistogram('var', 'TH1F', 'EXPERT', 'title', '', '', 10, 0.0, 10.0) - true = '{"alias": "var", "allvars": ["var"], "convention": "", "opt": "", "path": "EXPERT", "title": "title", "type": "TH1F", "weight": "", "xarray": [], "xbins": 10, "xlabels": [], "xmax": 10.0, "xmin": 0.0, "xvar": "var", "yarray": [], "ybins": 0.0, "ylabels": [], "ymax": 0.0, "ymin": 0.0, "yvar": "", "zbins": 0, "zlabels": [], "zmax": 0.0, "zmin": 0.0, "zvar": ""}' + true = '{"alias": "var", "allvars": ["var"], "convention": "", "opt": "", "path": "EXPERT", "title": "title", "type": "TH1F", "weight": "", "cutMask": "", "xarray": [], "xbins": 10, "xlabels": [], "xmax": 10.0, "xmin": 0.0, "xvar": "var", "yarray": [], "ybins": 0.0, "ylabels": [], "ymax": 0.0, "ymin": 0.0, "yvar": "", "zbins": 0, "zlabels": [], "zmax": 0.0, "zmin": 0.0, "zvar": ""}' self.assertEqual(json.loads(check), json.loads(true)) def test_1D_opt( self ): check = defineHistogram('var', opt='myopt') - true = '{"alias": "var", "allvars": ["var"], "convention": "", "opt": "myopt", "path": "", "title": "var", "type": "TH1F", "weight": "", "xarray": [], "xbins": 100, "xlabels": [], "xmax": 1, "xmin": 0, "xvar": "var", "yarray": [], "ybins": 0.0, "ylabels": [], "ymax": 0.0, "ymin": 0.0, "yvar": "", "zbins": 0, "zlabels": [], "zmax": 0.0, "zmin": 0.0, "zvar": ""}' + true = '{"alias": "var", "allvars": ["var"], "convention": "", "opt": "myopt", "path": "", "title": "var", "type": "TH1F", "weight": "", "cutMask": "", "xarray": [], "xbins": 100, "xlabels": [], "xmax": 1, "xmin": 0, "xvar": "var", "yarray": [], "ybins": 0.0, "ylabels": [], "ymax": 0.0, "ymin": 0.0, "yvar": "", "zbins": 0, "zlabels": [], "zmax": 0.0, "zmin": 0.0, "zvar": ""}' self.assertEqual(json.loads(check), json.loads(true)) def test_1D_weight( self ): check = defineHistogram('var', weight='myweight') - true = '{"alias": "var", "allvars": ["var"], "convention": "", "opt": "", "path": "", "title": "var", "type": "TH1F", "weight": "myweight", "xarray": [], "xbins": 100, "xlabels": [], "xmax": 1, "xmin": 0, "xvar": "var", "yarray": [], "ybins": 0.0, "ylabels": [], "ymax": 0.0, "ymin": 0.0, "yvar": "", "zbins": 0, "zlabels": [], "zmax": 0.0, "zmin": 0.0, "zvar": ""}' + true = '{"alias": "var", "allvars": ["var"], "convention": "", "opt": "", "path": "", "title": "var", "type": "TH1F", "weight": "myweight", "cutMask": "", "xarray": [], "xbins": 100, "xlabels": [], "xmax": 1, "xmin": 0, "xvar": "var", "yarray": [], "ybins": 0.0, "ylabels": [], "ymax": 0.0, "ymin": 0.0, "yvar": "", "zbins": 0, "zlabels": [], "zmax": 0.0, "zmin": 0.0, "zvar": ""}' + self.assertEqual(json.loads(check), json.loads(true)) + + def test_1D_cutmask( self ): + check = defineHistogram('var', cutmask='mycutmask') + true = '{"alias": "var", "allvars": ["var"], "convention": "", "opt": "", "path": "", "title": "var", "type": "TH1F", "weight": "", "cutMask": "mycutmask", "xarray": [], "xbins": 100, "xlabels": [], "xmax": 1, "xmin": 0, "xvar": "var", "yarray": [], "ybins": 0.0, "ylabels": [], "ymax": 0.0, "ymin": 0.0, "yvar": "", "zbins": 0, "zlabels": [], "zmax": 0.0, "zmin": 0.0, "zvar": ""}' self.assertEqual(json.loads(check), json.loads(true)) def test_1D_array( self ): check = defineHistogram('var', xbins=[0, 1, 2, 4, 8]) - true = '{"alias": "var", "allvars": ["var"], "convention": "", "opt": "", "path": "", "title": "var", "type": "TH1F", "weight": "", "xarray": [0, 1, 2, 4, 8], "xbins": 4, "xlabels": [], "xmax": 1, "xmin": 0, "xvar": "var", "yarray": [], "ybins": 0.0, "ylabels": [], "ymax": 0.0, "ymin": 0.0, "yvar": "", "zbins": 0, "zlabels": [], "zmax": 0.0, "zmin": 0.0, "zvar": ""}' + true = '{"alias": "var", "allvars": ["var"], "convention": "", "opt": "", "path": "", "title": "var", "type": "TH1F", "weight": "", "cutMask": "", "xarray": [0, 1, 2, 4, 8], "xbins": 4, "xlabels": [], "xmax": 1, "xmin": 0, "xvar": "var", "yarray": [], "ybins": 0.0, "ylabels": [], "ymax": 0.0, "ymin": 0.0, "yvar": "", "zbins": 0, "zlabels": [], "zmax": 0.0, "zmin": 0.0, "zvar": ""}' self.assertEqual(json.loads(check), json.loads(true)) def test_1D_title( self ): check = defineHistogram('var', title='mytitle') - true = '{"alias": "var", "allvars": ["var"], "convention": "", "opt": "", "path": "", "title": "mytitle", "type": "TH1F", "weight": "", "xarray": [], "xbins": 100, "xlabels": [], "xmax": 1, "xmin": 0, "xvar": "var", "yarray": [], "ybins": 0.0, "ylabels": [], "ymax": 0.0, "ymin": 0.0, "yvar": "", "zbins": 0, "zlabels": [], "zmax": 0.0, "zmin": 0.0, "zvar": ""}' + true = '{"alias": "var", "allvars": ["var"], "convention": "", "opt": "", "path": "", "title": "mytitle", "type": "TH1F", "weight": "", "cutMask": "", "xarray": [], "xbins": 100, "xlabels": [], "xmax": 1, "xmin": 0, "xvar": "var", "yarray": [], "ybins": 0.0, "ylabels": [], "ymax": 0.0, "ymin": 0.0, "yvar": "", "zbins": 0, "zlabels": [], "zmax": 0.0, "zmin": 0.0, "zvar": ""}' self.assertEqual(json.loads(check), json.loads(true)) def test_1D_labelsX( self ): check = defineHistogram('var', xlabels=["bin0", "bin1"]) - true = '{"alias": "var", "allvars": ["var"], "convention": "", "opt": "", "path": "", "title": "var", "type": "TH1F", "weight": "", "xarray": [], "xbins": 2, "xlabels": ["bin0", "bin1"], "xmax": 1, "xmin": 0, "xvar": "var", "yarray": [], "ybins": 0.0, "ylabels": [], "ymax": 0.0, "ymin": 0.0, "yvar": "", "zbins": 0, "zlabels": [], "zmax": 0.0, "zmin": 0.0, "zvar": ""}' + true = '{"alias": "var", "allvars": ["var"], "convention": "", "opt": "", "path": "", "title": "var", "type": "TH1F", "weight": "", "cutMask": "", "xarray": [], "xbins": 2, "xlabels": ["bin0", "bin1"], "xmax": 1, "xmin": 0, "xvar": "var", "yarray": [], "ybins": 0.0, "ylabels": [], "ymax": 0.0, "ymin": 0.0, "yvar": "", "zbins": 0, "zlabels": [], "zmax": 0.0, "zmin": 0.0, "zvar": ""}' self.assertEqual(json.loads(check), json.loads(true)) def test_1D_labelsY( self ): check = defineHistogram('var', ylabels=["bin0", "bin1"]) - true = '{"alias": "var", "allvars": ["var"], "convention": "", "opt": "", "path": "", "title": "var", "type": "TH1F", "weight": "", "xarray": [], "xbins": 100, "xlabels": [], "xmax": 1, "xmin": 0, "xvar": "var", "yarray": [], "ybins": 2, "ylabels": ["bin0", "bin1"], "ymax": 0.0, "ymin": 0.0, "yvar": "", "zbins": 0, "zlabels": [], "zmax": 0.0, "zmin": 0.0, "zvar": ""}' + true = '{"alias": "var", "allvars": ["var"], "convention": "", "opt": "", "path": "", "title": "var", "type": "TH1F", "weight": "", "cutMask": "", "xarray": [], "xbins": 100, "xlabels": [], "xmax": 1, "xmin": 0, "xvar": "var", "yarray": [], "ybins": 2, "ylabels": ["bin0", "bin1"], "ymax": 0.0, "ymin": 0.0, "yvar": "", "zbins": 0, "zlabels": [], "zmax": 0.0, "zmin": 0.0, "zvar": ""}' self.assertEqual(json.loads(check), json.loads(true)) def test_2D( self ): check = defineHistogram('varX,varY', type='TH2F', xbins=10, xmin=0.0, xmax=10.0, ybins=40, ymin=0.0, ymax=20.0) - true = '{"alias": "varX_vs_varY", "allvars": ["varX", "varY"], "convention": "", "opt": "", "path": "", "title": "varX,varY", "type": "TH2F", "weight": "", "xarray": [], "xbins": 10, "xlabels": [], "xmax": 10.0, "xmin": 0.0, "xvar": "varX", "yarray": [], "ybins": 40, "ylabels": [], "ymax": 20.0, "ymin": 0.0, "yvar": "varY", "zbins": 0, "zlabels": [], "zmax": 0.0, "zmin": 0.0, "zvar": ""}' + true = '{"alias": "varX_vs_varY", "allvars": ["varX", "varY"], "convention": "", "opt": "", "path": "", "title": "varX,varY", "type": "TH2F", "weight": "", "cutMask": "", "xarray": [], "xbins": 10, "xlabels": [], "xmax": 10.0, "xmin": 0.0, "xvar": "varX", "yarray": [], "ybins": 40, "ylabels": [], "ymax": 20.0, "ymin": 0.0, "yvar": "varY", "zbins": 0, "zlabels": [], "zmax": 0.0, "zmin": 0.0, "zvar": ""}' self.assertEqual(json.loads(check), json.loads(true)) def test_2D_array( self ): check = defineHistogram('varX,varY', 'TH2F', xbins=[0,1,2], ybins=[1,2,3,7]) - true = '{"alias": "varX_vs_varY", "allvars": ["varX", "varY"], "convention": "", "opt": "", "path": "", "title": "varX,varY", "type": "TH2F", "weight": "", "xarray": [0, 1, 2], "xbins": 2, "xlabels": [], "xmax": 1, "xmin": 0, "xvar": "varX", "yarray": [1, 2, 3, 7], "ybins": 3, "ylabels": [], "ymax": 0.0, "ymin": 0.0, "yvar": "varY", "zbins": 0, "zlabels": [], "zmax": 0.0, "zmin": 0.0, "zvar": ""}' + true = '{"alias": "varX_vs_varY", "allvars": ["varX", "varY"], "convention": "", "opt": "", "path": "", "title": "varX,varY", "type": "TH2F", "weight": "", "cutMask": "", "xarray": [0, 1, 2], "xbins": 2, "xlabels": [], "xmax": 1, "xmin": 0, "xvar": "varX", "yarray": [1, 2, 3, 7], "ybins": 3, "ylabels": [], "ymax": 0.0, "ymin": 0.0, "yvar": "varY", "zbins": 0, "zlabels": [], "zmax": 0.0, "zmin": 0.0, "zvar": ""}' self.assertEqual(json.loads(check), json.loads(true)) def test_2D_labelsXY( self ): check = defineHistogram('varX,varY', 'TH2F', xlabels=["bin0", "bin1"], ylabels=["bin0", "bin1", "bin2"]) - true = '{"alias": "varX_vs_varY", "allvars": ["varX", "varY"], "convention": "", "opt": "", "path": "", "title": "varX,varY", "type": "TH2F", "weight": "", "xarray": [], "xbins": 2, "xlabels": ["bin0", "bin1"], "xmax": 1, "xmin": 0, "xvar": "varX", "yarray": [], "ybins": 3, "ylabels": ["bin0", "bin1", "bin2"], "ymax": 0.0, "ymin": 0.0, "yvar": "varY", "zbins": 0, "zlabels": [], "zmax": 0.0, "zmin": 0.0, "zvar": ""}' + true = '{"alias": "varX_vs_varY", "allvars": ["varX", "varY"], "convention": "", "opt": "", "path": "", "title": "varX,varY", "type": "TH2F", "weight": "", "cutMask": "", "xarray": [], "xbins": 2, "xlabels": ["bin0", "bin1"], "xmax": 1, "xmin": 0, "xvar": "varX", "yarray": [], "ybins": 3, "ylabels": ["bin0", "bin1", "bin2"], "ymax": 0.0, "ymin": 0.0, "yvar": "varY", "zbins": 0, "zlabels": [], "zmax": 0.0, "zmin": 0.0, "zvar": ""}' self.assertEqual(json.loads(check), json.loads(true)) def test_3D( self ): check = defineHistogram('varX,varY,varZ', 'TProfile2D', xbins=10, xmin=0.0, xmax=10.0, ybins=40, ymin=0.0, ymax=20.0, zmin=-1.0, zmax=1.0) - true = '{"alias": "varX_vs_varY_vs_varZ", "allvars": ["varX", "varY", "varZ"], "convention": "", "opt": "", "path": "", "title": "varX,varY,varZ", "type": "TProfile2D", "weight": "", "xarray": [], "xbins": 10, "xlabels": [], "xmax": 10.0, "xmin": 0.0, "xvar": "varX", "yarray": [], "ybins": 40, "ylabels": [], "ymax": 20.0, "ymin": 0.0, "yvar": "varY", "zbins": 0, "zlabels": [], "zmax": 1.0, "zmin": -1.0, "zvar": "varZ"}' + true = '{"alias": "varX_vs_varY_vs_varZ", "allvars": ["varX", "varY", "varZ"], "convention": "", "opt": "", "path": "", "title": "varX,varY,varZ", "type": "TProfile2D", "weight": "", "cutMask": "", "xarray": [], "xbins": 10, "xlabels": [], "xmax": 10.0, "xmin": 0.0, "xvar": "varX", "yarray": [], "ybins": 40, "ylabels": [], "ymax": 20.0, "ymin": 0.0, "yvar": "varY", "zbins": 0, "zlabels": [], "zmax": 1.0, "zmin": -1.0, "zvar": "varZ"}' self.assertEqual(json.loads(check), json.loads(true)) def test_efficiency( self ): check = defineHistogram('var,pass', type='TEfficiency') - true = '{"alias": "var_vs_pass", "allvars": ["var", "pass"], "convention": "", "opt": "", "path": "", "title": "var,pass", "type": "TEfficiency", "weight": "", "xarray": [], "xbins": 100, "xlabels": [], "xmax": 1, "xmin": 0, "xvar": "var", "yarray": [], "ybins": 0.0, "ylabels": [], "ymax": 0.0, "ymin": 0.0, "yvar": "pass", "zbins": 0, "zlabels": [], "zmax": 0.0, "zmin": 0.0, "zvar": ""}' + true = '{"alias": "var_vs_pass", "allvars": ["var", "pass"], "convention": "", "opt": "", "path": "", "title": "var,pass", "type": "TEfficiency", "weight": "", "cutMask": "", "xarray": [], "xbins": 100, "xlabels": [], "xmax": 1, "xmin": 0, "xvar": "var", "yarray": [], "ybins": 0.0, "ylabels": [], "ymax": 0.0, "ymin": 0.0, "yvar": "pass", "zbins": 0, "zlabels": [], "zmax": 0.0, "zmin": 0.0, "zvar": ""}' self.assertEqual(json.loads(check), json.loads(true)) def test_offlineNamingConvention( self ): check = defineHistogram('var', path='EXPERT', convention='OFFLINE:lowStat') - true = '{"alias": "var", "allvars": ["var"], "convention": "OFFLINE:lowStat", "opt": "", "path": "EXPERT", "title": "var", "type": "TH1F", "weight": "", "xarray": [], "xbins": 100, "xlabels": [], "xmax": 1, "xmin": 0, "xvar": "var", "yarray": [], "ybins": 0.0, "ylabels": [], "ymax": 0.0, "ymin": 0.0, "yvar": "", "zbins": 0, "zlabels": [], "zmax": 0.0, "zmin": 0.0, "zvar": ""}' + true = '{"alias": "var", "allvars": ["var"], "convention": "OFFLINE:lowStat", "opt": "", "path": "EXPERT", "title": "var", "type": "TH1F", "weight": "", "cutMask": "", "xarray": [], "xbins": 100, "xlabels": [], "xmax": 1, "xmin": 0, "xvar": "var", "yarray": [], "ybins": 0.0, "ylabels": [], "ymax": 0.0, "ymin": 0.0, "yvar": "", "zbins": 0, "zlabels": [], "zmax": 0.0, "zmin": 0.0, "zvar": ""}' self.assertEqual(json.loads(check), json.loads(true)) def test_enforcePath( self ): diff --git a/DataQuality/DataQualityTools/python/DQTLumiMonAlg.py b/DataQuality/DataQualityTools/python/DQTLumiMonAlg.py index d6bfd47565458b54cacbcc1e03cbc7cf62b9a7c8..28df47023aa73c43a324a468d4a5b1e034e3e70a 100644 --- a/DataQuality/DataQualityTools/python/DQTLumiMonAlg.py +++ b/DataQuality/DataQualityTools/python/DQTLumiMonAlg.py @@ -20,7 +20,14 @@ def DQTLumiMonAlgConfig(flags, isOld=False): 'CATEGORY_monitoring_muonIso','EF_muX') DQTLumiMonAlgConfigByTriggerChain(helper, DQTLumiMonAlg, 'CATEGORY_primary_single_ele','EF_eX') - return helper.result() + if isOld: + return helper.result() + else: + result = helper.result() + from AtlasGeoModel.AtlasGeoModelConfig import AtlasGeometryCfg + result.merge(AtlasGeometryCfg(flags)) + return result + def DQTLumiMonAlgConfigByTriggerChain(helper, algConfObj, triggerChain='', triggerPath=''): monAlg = helper.addAlgorithm(algConfObj, 'DQTLumiMonAlg'+triggerPath) diff --git a/DataQuality/DataQualityTools/src/DQTDataFlowMonAlg.cxx b/DataQuality/DataQualityTools/src/DQTDataFlowMonAlg.cxx index e621ecf9b5d21ef3a2a8ec5172f9accd4e4a3357..a73005be38dedf3d38a189c5c84b15cf8fc8d5c6 100644 --- a/DataQuality/DataQualityTools/src/DQTDataFlowMonAlg.cxx +++ b/DataQuality/DataQualityTools/src/DQTDataFlowMonAlg.cxx @@ -45,8 +45,8 @@ DQTDataFlowMonAlg::fillHistograms( const EventContext& ctx ) const fill(group, weight, lb); } - std::vector<int> detstatevec(EventInfo::nDets+1); - std::vector<int> detstatevec_idx(EventInfo::nDets+1); + std::vector<int> detstatevec(xAOD::EventInfo::nDets+1); + std::vector<int> detstatevec_idx(xAOD::EventInfo::nDets+1); std::iota(detstatevec_idx.begin(), detstatevec_idx.end(), 0); auto detstates = Collection("detstates", detstatevec); diff --git a/InnerDetector/InDetMonitoring/TRTMonitoringRun3/TRTMonitoringRun3/TRTMonitoringRun3_Alg.h b/InnerDetector/InDetMonitoring/TRTMonitoringRun3/TRTMonitoringRun3/TRTMonitoringRun3_Alg.h index 10e716285328d089979b90847044bd48a0bcaf22..40ef71a326280b309c83b5796f8050f16888b38b 100644 --- a/InnerDetector/InDetMonitoring/TRTMonitoringRun3/TRTMonitoringRun3/TRTMonitoringRun3_Alg.h +++ b/InnerDetector/InDetMonitoring/TRTMonitoringRun3/TRTMonitoringRun3/TRTMonitoringRun3_Alg.h @@ -7,7 +7,6 @@ #include "AthenaMonitoring/AthMonitorAlgorithm.h" #include "AthenaMonitoringKernel/Monitored.h" -#include "AthenaMonitoringKernel/HistogramDef.h" #include "TRandom3.h" diff --git a/InnerDetector/InDetMonitoring/TRTMonitoringRun3/src/TRTMonitoringRun3_Alg.cxx b/InnerDetector/InDetMonitoring/TRTMonitoringRun3/src/TRTMonitoringRun3_Alg.cxx index 586e50f4985802fb3c0e9271c15f1a5aca34daea..99a8ca3d73cdc55c5611859efe54fe24e147e305 100644 --- a/InnerDetector/InDetMonitoring/TRTMonitoringRun3/src/TRTMonitoringRun3_Alg.cxx +++ b/InnerDetector/InDetMonitoring/TRTMonitoringRun3/src/TRTMonitoringRun3_Alg.cxx @@ -80,6 +80,8 @@ StatusCode TRTMonitoringRun3_Alg::initialize() { using namespace Monitored; ATH_MSG_VERBOSE("Initializing TRT Monitoring"); + // initialize superclass + ATH_CHECK( AthMonitorAlgorithm::initialize() ); // Retrieve detector manager. ATH_CHECK( detStore()->retrieve(m_mgr, "TRT") ); diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonDQAMonitoring/python/MuonDQAMonitoringConfig.py b/MuonSpectrometer/MuonValidation/MuonDQA/MuonDQAMonitoring/python/MuonDQAMonitoringConfig.py index 95b5580242b5df731ccc8d6151194ccc05fa980f..1d2d56d3f0c21f93009345b8b593678ca1df616c 100644 --- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonDQAMonitoring/python/MuonDQAMonitoringConfig.py +++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonDQAMonitoring/python/MuonDQAMonitoringConfig.py @@ -14,7 +14,9 @@ def MuonDQAMonitoringConfig(flags): result.merge(MdtMonitoringConfig(flags)) from TgcRawDataMonitoring.TgcRawDataMonitorAlgorithm import TgcRawDataMonitoringConfig + from MdtRawDataMonitoring.MDTMonitorAlgorithm import MdtMonitoringConfig result.merge(TgcRawDataMonitoringConfig(flags)) + result.merge(MdtMonitoringConfig(flags)) return result diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataMonAlg.h b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataMonAlg.h index 23034db18bdb60a567537b4181e2797259d7116a..343fa3a7d61c3bb49cf855ec2a3f47da12ac9a21 100755 --- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataMonAlg.h +++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataMonAlg.h @@ -58,12 +58,9 @@ namespace Muon { #include <set> //root includes -class TH1; class TH2; -class TString; -class TH1F_LW; -class TH2F_LW; -class TColor; +class MDTOverviewHistogramStruct; +class MDTSummaryHistogramStruct; namespace monAlg{ enum {L1_UNKNOWN, L1_BARREL, L1_ENDCAP}; @@ -115,11 +112,7 @@ class MdtRawDataMonAlg: public AthMonitorAlgorithm { private: TH2* m_mdthitspermultilayerLumi[4][4]; - TH2* m_mdteffpermultilayer[4][4]; TH2* m_mdthitsperchamber_InnerMiddleOuterLumi[2]; - TH2* m_mdthitsperchamber_InnerMiddleOuter_HighOcc[2]; - TH2* m_mdthitsperchamber_onSegm_InnerMiddleOuterLumi[2]; - TH2* m_mdteffperchamber_InnerMiddleOuter[4]; TH2* m_mdthitsperML_byLayer[3];//These are alternative Global hit coverage plots std::string m_title; @@ -135,8 +128,10 @@ class MdtRawDataMonAlg: public AthMonitorAlgorithm { "MuonDetectorManager", "Key of input MuonDetectorManager condition data"}; - virtual StatusCode fillMDTOverviewHistograms(const Muon::MdtPrepData*, bool &isNoiseBurstCandidate) const; - virtual StatusCode fillMDTSummaryHistograms( const Muon::MdtPrepData*, /*std::set<std::string>,*/ bool &isNoiseBurstCandidate, int lb, bool trig_barrel, bool trig_endcap ) const; + virtual void fillMDTOverviewVects(const Muon::MdtPrepData*, bool &isNoiseBurstCandidate, MDTOverviewHistogramStruct& vects) const; + virtual void fillMDTOverviewHistograms(const MDTOverviewHistogramStruct& vects) const; + virtual StatusCode fillMDTSummaryVects( const Muon::MdtPrepData*, /*std::set<std::string>,*/ bool &isNoiseBurstCandidate, bool trig_barrel, bool trig_endcap, MDTSummaryHistogramStruct vects[4][4][36] ) const; + virtual StatusCode fillMDTSummaryHistograms( const MDTSummaryHistogramStruct vects[4][4][36], int lb ) const; virtual StatusCode fillMDTHistograms( const Muon::MdtPrepData* ) const;//fill chamber by chamber histos @@ -168,9 +163,7 @@ class MdtRawDataMonAlg: public AthMonitorAlgorithm { ToolHandleArray<IDQFilterTool> m_DQFilterTools; bool m_atlas_ready; - // uint32_t m_time; uint32_t m_firstTime; - //int m_time; SG::ReadHandleKey<Trk::SegmentCollection> m_segm_type{this,"Eff_segm_type","MuonSegments","muon segments"}; diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/python/MDTMonitorAlgorithm.py b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/python/MDTMonitorAlgorithm.py index 02b28909b8ab1c91b35edf0fe3e662eab96d17e6..3827c86f7cb4763037db95a5ed8b62a9e5aacf3b 100644 --- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/python/MDTMonitorAlgorithm.py +++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/python/MDTMonitorAlgorithm.py @@ -126,17 +126,20 @@ def MdtMonitoringConfig(inputFlags): path='Overview', xbins=100, xmin=0., xmax=400. ) - mdtGroup.defineHistogram('adc_mon_noiseBurst;Overall_ADC_spectrum_NoiseBursts', type='TH1F', + mdtGroup.defineHistogram('adc_mon_nosel;Overall_ADC_spectrum_NoiseBursts', type='TH1F', + cutmask='noiseBurst', title='Overall_ADC_spectrum_NoiseBursts;[adc counts];Number of Entries', path='Overview', xbins=100, xmin=0., xmax=400. ) - mdtGroup.defineHistogram('tdc_mon_noiseBurst,adc_mon_noiseBurst;Overall_TDCADC_spectrum_NoiseBursts', type='TH2F', + mdtGroup.defineHistogram('tdc_mon_nosel,adc_mon_nosel;Overall_TDCADC_spectrum_NoiseBursts', type='TH2F', + cutmask='noiseBurst', title='Overall_TDCADC_spectrum_NoiseBursts;[nsec];[adc counts]', path='Overview', xbins=50, xmin=0., xmax=2000., ybins=20, ymin=0., ymax=400. ) - mdtGroup.defineHistogram('tdc_mon_noiseBurst;Overall_TDC_spectrum_NoiseBursts', type='TH1F', + mdtGroup.defineHistogram('tdc_mon_nosel;Overall_TDC_spectrum_NoiseBursts', type='TH1F', + cutmask='noiseBurst', title='Overall_TDC_spectrum_NoiseBursts;[nsec];Number of Entries', path='Overview', xbins=120, xmin=0., xmax=2000. ) @@ -309,12 +312,14 @@ def MdtMonitoringConfig(inputFlags): mdtPerChamberBAGroup.defineHistogram(var, title=title_mdttdc+";[nsec];Number of Entries", type='TH1F', path=ch, xbins=100, xmin=0., xmax=2000.) title_mdttdc_ml1_adccut=ch+"_MDT_Station_TDC_ML1_ADCCut" - var="tdc_perch_ml1_adccut_"+ch+";"+title_mdttdc_ml1_adccut - mdtPerChamberBAGroup.defineHistogram(var, title=title_mdttdc_ml1_adccut+";[nsec];Number of Entries", + var="tdc_perch_"+ch+";"+title_mdttdc_ml1_adccut + mdtPerChamberBAGroup.defineHistogram(var, title=title_mdttdc_ml1_adccut+";[nsec];Number of Entries", + cutmask='ml1_adccut', type='TH1F', path=ch, xbins=100, xmin=0., xmax=2000.) title_mdttdc_ml2_adccut=ch+"_MDT_Station_TDC_ML2_ADCCut" - var="tdc_perch_ml2_adccut_"+ch+";"+title_mdttdc_ml2_adccut - mdtPerChamberBAGroup.defineHistogram(var, title=title_mdttdc_ml2_adccut+";[nsec];Number of Entries", + var="tdc_perch_"+ch+";"+title_mdttdc_ml2_adccut + mdtPerChamberBAGroup.defineHistogram(var, title=title_mdttdc_ml2_adccut+";[nsec];Number of Entries", + cutmask='ml2_adccut', type='TH1F', path=ch, xbins=100, xmin=0., xmax=2000.) title_mdtadc= ch+"_MDT_Station_ADC" var="adc_perch_"+ch+";"+title_mdtadc @@ -332,6 +337,7 @@ def MdtMonitoringConfig(inputFlags): title_mdtlayer= ch+"_MDT_Station_LAYER_ADCCut" var="layer_perch_"+ch+";"+title_mdtlayer mdtPerChamberBAGroup.defineHistogram(var, type='TH1F', + cutmask='adccut_nonoise', title=title_mdtlayer+";layerID;Number of Entries", path=ch, xbins=10, xmin=0., xmax=10.) @@ -339,6 +345,7 @@ def MdtMonitoringConfig(inputFlags): var="tube_perch_"+ch+";"+title_mdttube binmax=tubeMax[ch] mdtPerChamberBAGroup.defineHistogram(var, type='TH1F', + cutmask='adccut', title=title_mdttube+";tubeID;Number of Entries", path=ch, xbins=binmax, xmin=0., xmax=binmax) #to do @@ -355,12 +362,14 @@ def MdtMonitoringConfig(inputFlags): mdtPerChamberBCGroup.defineHistogram(var, title=title_mdttdc+";[nsec];Number of Entries", type='TH1F', path=ch, xbins=100, xmin=0., xmax=2000.) title_mdttdc_ml1_adccut=ch+"_MDT_Station_TDC_ML1_ADCCut" - var="tdc_perch_ml1_adccut_"+ch+";"+title_mdttdc_ml1_adccut - mdtPerChamberBCGroup.defineHistogram(var, title=title_mdttdc_ml1_adccut+";[nsec];Number of Entries", + var="tdc_perch_"+ch+";"+title_mdttdc_ml1_adccut + mdtPerChamberBCGroup.defineHistogram(var, title=title_mdttdc_ml1_adccut+";[nsec];Number of Entries", + cutmask='ml1_adccut', type='TH1F', path=ch, xbins=100, xmin=0., xmax=2000.) title_mdttdc_ml2_adccut=ch+"_MDT_Station_TDC_ML2_ADCCut" - var="tdc_perch_ml2_adccut_"+ch+";"+title_mdttdc_ml2_adccut - mdtPerChamberBCGroup.defineHistogram(var, title=title_mdttdc_ml2_adccut+";[nsec];Number of Entries", + var="tdc_perch_"+ch+";"+title_mdttdc_ml2_adccut + mdtPerChamberBCGroup.defineHistogram(var, title=title_mdttdc_ml2_adccut+";[nsec];Number of Entries", + cutmask='ml2_adccut', type='TH1F', path=ch, xbins=100, xmin=0., xmax=2000.) title_mdtadc= ch+"_MDT_Station_ADC" var="adc_perch_"+ch+";"+title_mdtadc @@ -374,12 +383,14 @@ def MdtMonitoringConfig(inputFlags): title_mdtlayer= ch+"_MDT_Station_LAYER_DCCut" var="layer_perch_"+ch+";"+title_mdtlayer mdtPerChamberBCGroup.defineHistogram(var, type='TH1F', + cutmask='adccut_nonoise', title=title_mdtlayer+";layerID;Number of Entries", path=ch, xbins=10, xmin=0., xmax=10.) title_mdttube= ch+"_MDT_Station_TUBE_ADCCut" var="tube_perch_"+ch+";"+title_mdttube binmax=tubeMax[ch] mdtPerChamberBCGroup.defineHistogram(var, type='TH1F', + cutmask='adccut', title=title_mdttube+";tubeID;Number of Entries", path=ch, xbins=binmax, xmin=0., xmax=binmax) @@ -397,12 +408,14 @@ def MdtMonitoringConfig(inputFlags): mdtPerChamberEAGroup.defineHistogram(var, title=title_mdttdc+";[nsec];Number of Entries", type='TH1F', path=ch, xbins=100, xmin=0., xmax=2000.) title_mdttdc_ml1_adccut=ch+"_MDT_Station_TDC_ML1_ADCCut" - var="tdc_perch_ml1_adccut_"+ch+";"+title_mdttdc_ml1_adccut - mdtPerChamberEAGroup.defineHistogram(var, title=title_mdttdc_ml1_adccut+";[nsec];Number of Entries", + var="tdc_perch_"+ch+";"+title_mdttdc_ml1_adccut + mdtPerChamberEAGroup.defineHistogram(var, title=title_mdttdc_ml1_adccut+";[nsec];Number of Entries", + cutmask='ml1_adccut', type='TH1F', path=ch, xbins=100, xmin=0., xmax=2000.) title_mdttdc_ml2_adccut=ch+"_MDT_Station_TDC_ML2_ADCCut" - var="tdc_perch_ml2_adccut_"+ch+";"+title_mdttdc_ml2_adccut - mdtPerChamberEAGroup.defineHistogram(var, title=title_mdttdc_ml2_adccut+";[nsec];Number of Entries", + var="tdc_perch_"+ch+";"+title_mdttdc_ml2_adccut + mdtPerChamberEAGroup.defineHistogram(var, title=title_mdttdc_ml2_adccut+";[nsec];Number of Entries", + cutmask='ml2_adccut', type='TH1F', path=ch, xbins=100, xmin=0., xmax=2000.) title_mdtadc= ch+"_MDT_Station_ADC" var="adc_perch_"+ch+";"+title_mdtadc @@ -418,6 +431,7 @@ def MdtMonitoringConfig(inputFlags): title_mdtlayer= ch+"_MDT_Station_LAYER_DCCut" var="layer_perch_"+ch+";"+title_mdtlayer mdtPerChamberEAGroup.defineHistogram(var, type='TH1F', + cutmask='adccut_nonoise', title=title_mdtlayer+";layerID;Number of Entries", path=ch, xbins=10, xmin=0., xmax=10.) @@ -425,6 +439,7 @@ def MdtMonitoringConfig(inputFlags): var="tube_perch_"+ch+";"+title_mdttube binmax=tubeMax[ch] mdtPerChamberEAGroup.defineHistogram(var, type='TH1F', + cutmask='adccut', title=title_mdttube+";tubeID;Number of Entries", path=ch, xbins=binmax, xmin=0., xmax=binmax) @@ -443,12 +458,14 @@ def MdtMonitoringConfig(inputFlags): mdtPerChamberECGroup.defineHistogram(var, title=title_mdttdc+";[nsec];Number of Entries", type='TH1F', path=ch, xbins=100, xmin=0., xmax=2000.) title_mdttdc_ml1_adccut=ch+"_MDT_Station_TDC_ML1_ADCCut" - var="tdc_perch_ml1_adccut_"+ch+";"+title_mdttdc_ml1_adccut - mdtPerChamberECGroup.defineHistogram(var, title=title_mdttdc_ml1_adccut+";[nsec];Number of Entries", + var="tdc_perch_"+ch+";"+title_mdttdc_ml1_adccut + mdtPerChamberECGroup.defineHistogram(var, title=title_mdttdc_ml1_adccut+";[nsec];Number of Entries", + cutmask='ml1_adccut', type='TH1F', path=ch, xbins=100, xmin=0., xmax=2000.) title_mdttdc_ml2_adccut=ch+"_MDT_Station_TDC_ML2_ADCCut" - var="tdc_perch_ml2_adccut_"+ch+";"+title_mdttdc_ml2_adccut - mdtPerChamberECGroup.defineHistogram(var, title=title_mdttdc_ml2_adccut+";[nsec];Number of Entries", + var="tdc_perch_"+ch+";"+title_mdttdc_ml2_adccut + mdtPerChamberECGroup.defineHistogram(var, title=title_mdttdc_ml2_adccut+";[nsec];Number of Entries", + cutmask='ml2_adccut', type='TH1F', path=ch, xbins=100, xmin=0., xmax=2000.) title_mdtadc= ch+"_MDT_Station_ADC" var="adc_perch_"+ch+";"+title_mdtadc @@ -464,12 +481,14 @@ def MdtMonitoringConfig(inputFlags): title_mdtlayer= ch+"_MDT_Station_LAYER_ADCCut" var="layer_perch_"+ch+";"+title_mdtlayer mdtPerChamberECGroup.defineHistogram(var, type='TH1F', + cutmask='adccut_nonoise', title=title_mdtlayer+";layerID;Number of Entries", path=ch, xbins=10, xmin=0., xmax=10.) title_mdttube= ch+"_MDT_Station_TUBE_ADCCut" var="tube_perch_"+ch+";"+title_mdttube binmax=tubeMax[ch] mdtPerChamberECGroup.defineHistogram(var, type='TH1F', + cutmask='adccut', title=title_mdttube+";tubeID;Number of Entries", path=ch, xbins=binmax, xmin=0., xmax=binmax) #to-do diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/python/MdtRawMonLabels.py b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/python/MdtRawMonLabels.py index 399ae2e35f85195cb8905e681b02572aa0415a48..7033805ff41cc004feac178e9a39656933f79b15 100644 --- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/python/MdtRawMonLabels.py +++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/python/MdtRawMonLabels.py @@ -3,56 +3,56 @@ # NumberOfHitsInBAInnerPerMultiLayer_ADCCut_labelx=['BIA1', 'BIA2', 'BIA3', 'BIA4', 'BIA5', 'BIA6', 'BIA7', 'BIA8'] -NumberOfHitsInBAInnerPerMultiLayer_ADCCut_labely=['01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2'] +NumberOfHitsInBAInnerPerMultiLayer_ADCCut_labely=['01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2'] NumberOfHitsInBAMiddlePerMultiLayer_ADCCut_labelx=['BMA1', 'BMA2', 'BMA3', 'BMA4', 'BMA5', 'BMA6'] -NumberOfHitsInBAMiddlePerMultiLayer_ADCCut_labely=['01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2'] +NumberOfHitsInBAMiddlePerMultiLayer_ADCCut_labely=['01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2'] NumberOfHitsInBAOuterPerMultiLayer_ADCCut_labelx=['BOB0', 'BOA1', 'BOA2', 'BOA3', 'BOA4', 'BOA5', 'BOA6', 'BOA7', 'BOA8'] -NumberOfHitsInBAOuterPerMultiLayer_ADCCut_labely=['01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2'] +NumberOfHitsInBAOuterPerMultiLayer_ADCCut_labely=['01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2'] NumberOfHitsInBAExtraPerMultiLayer_ADCCut_labelx=['BEA1', 'BEA2'] -NumberOfHitsInBAExtraPerMultiLayer_ADCCut_labely=['02 1', '04 1', '06 1', '08 1', '10 1', '12 1', '14 1', '16 1', '02 1', '04 1', '06 1', '08 1', '10 1', '12 1', '14 1', '16 1', '02 1', '04 1', '06 1', '08 1', '10 1', '12 1', '14 1', '16 1'] +NumberOfHitsInBAExtraPerMultiLayer_ADCCut_labely=['02 1', '04 1', '06 1', '08 1', '10 1', '12 1', '14 1', '16 1'] NumberOfHitsInBCInnerPerMultiLayer_ADCCut_labelx=['BIC8', 'BIC7', 'BIC6', 'BIC5', 'BIC4', 'BIC3', 'BIC2', 'BIC1'] -NumberOfHitsInBCInnerPerMultiLayer_ADCCut_labely=['01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2'] +NumberOfHitsInBCInnerPerMultiLayer_ADCCut_labely=['01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2'] NumberOfHitsInBCMiddlePerMultiLayer_ADCCut_labelx=['BMC6', 'BMC5', 'BMC4', 'BMC3', 'BMC2', 'BMC1'] -NumberOfHitsInBCMiddlePerMultiLayer_ADCCut_labely=['01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2'] +NumberOfHitsInBCMiddlePerMultiLayer_ADCCut_labely=['01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2'] NumberOfHitsInBCOuterPerMultiLayer_ADCCut_labelx=['BOC8', 'BOC7', 'BOC6', 'BOC5', 'BOC4', 'BOC3', 'BOC2', 'BOC1'] -NumberOfHitsInBCOuterPerMultiLayer_ADCCut_labely=['01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2'] +NumberOfHitsInBCOuterPerMultiLayer_ADCCut_labely=['01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2'] NumberOfHitsInBCExtraPerMultiLayer_ADCCut_labelx=['BEC2', 'BEC1'] -NumberOfHitsInBCExtraPerMultiLayer_ADCCut_labely=['02 1', '04 1', '06 1', '08 1', '10 1', '12 1', '14 1', '16 1', '02 1', '04 1', '06 1', '08 1', '10 1', '12 1', '14 1', '16 1', '02 1', '04 1', '06 1', '08 1', '10 1', '12 1', '14 1', '16 1'] +NumberOfHitsInBCExtraPerMultiLayer_ADCCut_labely=['02 1', '04 1', '06 1', '08 1', '10 1', '12 1', '14 1', '16 1'] NumberOfHitsInEAInnerPerMultiLayer_ADCCut_labelx=['EIA1', 'EIA2', 'EIA3', 'EIA4', 'EIA5'] -NumberOfHitsInEAInnerPerMultiLayer_ADCCut_labely=['01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2'] +NumberOfHitsInEAInnerPerMultiLayer_ADCCut_labely=['01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2'] NumberOfHitsInEAMiddlePerMultiLayer_ADCCut_labelx=['EMA1', 'EMA2', 'EMA3', 'EMA4', 'EMA5'] -NumberOfHitsInEAMiddlePerMultiLayer_ADCCut_labely=['01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2'] +NumberOfHitsInEAMiddlePerMultiLayer_ADCCut_labely=['01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2'] NumberOfHitsInEAOuterPerMultiLayer_ADCCut_labelx=['EOA1', 'EOA2', 'EOA3', 'EOA4', 'EOA5', 'EOA6'] -NumberOfHitsInEAOuterPerMultiLayer_ADCCut_labely=['01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2'] +NumberOfHitsInEAOuterPerMultiLayer_ADCCut_labely=['01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2'] NumberOfHitsInEAExtraPerMultiLayer_ADCCut_labelx=['EEA1', 'EEA2'] -NumberOfHitsInEAExtraPerMultiLayer_ADCCut_labely=['01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2'] +NumberOfHitsInEAExtraPerMultiLayer_ADCCut_labely=['01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2'] NumberOfHitsInECInnerPerMultiLayer_ADCCut_labelx=['EIC5', 'EIC4', 'EIC3', 'EIC2', 'EIC1'] -NumberOfHitsInECInnerPerMultiLayer_ADCCut_labely=['01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2'] +NumberOfHitsInECInnerPerMultiLayer_ADCCut_labely=['01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2'] NumberOfHitsInECMiddlePerMultiLayer_ADCCut_labelx=['EMC5', 'EMC4', 'EMC3', 'EMC2', 'EMC1'] -NumberOfHitsInECMiddlePerMultiLayer_ADCCut_labely=['01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2'] +NumberOfHitsInECMiddlePerMultiLayer_ADCCut_labely=['01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2'] NumberOfHitsInECOuterPerMultiLayer_ADCCut_labelx=['EOC6', 'EOC5', 'EOC4', 'EOC3', 'EOC2', 'EOC1'] -NumberOfHitsInECOuterPerMultiLayer_ADCCut_labely=['01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2'] +NumberOfHitsInECOuterPerMultiLayer_ADCCut_labely=['01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2'] NumberOfHitsInECExtraPerMultiLayer_ADCCut_labelx=['EEC2', 'EEC1'] -NumberOfHitsInECExtraPerMultiLayer_ADCCut_labely=['01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2'] +NumberOfHitsInECExtraPerMultiLayer_ADCCut_labely=['01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2'] NumberOfHitsInBarrelPerChamber_ADCCut_labelx= ['BC8', 'BC7', 'BC6', 'BC5', 'BC4', 'BC3', 'BC2', 'BC1', 'BB0', 'BA1', 'BA2', 'BA3', 'BA4', 'BA5', 'BA6', 'BA7', 'BA8'] NumberOfHitsInBarrelPerChamber_ADCCut_labely=['E 02', 'E 04', 'E 06', 'E 08', 'E 10', 'E 12', 'E 14', 'E 16', 'I 01', 'I 02', 'I 03', 'I 04', 'I 05', 'I 06', 'I 07', 'I 08', 'I 09', 'I 10', 'I 11 M', 'I 11 R', 'I 12', 'I 13', 'I 14', 'I 15 M', 'I 15 R', 'I 16', 'M 01', 'M 02', 'M 03', 'M 04', 'M 05', 'M 06', 'M 07', 'M 08', 'M 09', 'M 10', 'M 11', 'M 12', 'M 13', 'M 14', 'M 15', 'M 16', 'O 01', 'O 02', 'O 03', 'O 04', 'O 05', 'O 06', 'O 07', 'O 08', 'O 09', 'O 10', 'O 11', 'O 12', 'O 13', 'O 14', 'O 15', 'O 16'] @@ -62,12 +62,12 @@ NumberOfHitsInEndCapPerChamber_ADCCut_labely=['E 01', 'E 02', 'E 03', 'E 04', 'E -NumberOfHitsInMDTInner_ADCCut_labelx=['EIC5', 'EIC4', 'EIC3', 'EIC2', 'EIC1', '', 'EEC2', 'EEC1', 'BEC2', 'BEC1', ' ', 'BIC8', 'BIC7', 'BIC6', 'BIC5', 'BIC4', 'BIC3', 'BIC2', 'BIC1', 'BIA1', 'BIA2', 'BIA3', 'BIA4', 'BIA5', 'BIA6', 'BIA7', 'BIA8', ' ', 'BEA1', 'BEA2', 'EEA1', 'EEA2', ' ', 'EIA1', 'EIA2', 'EIA3', 'EIA4', 'EIA5'] -NumberOfHitsInMDTInner_ADCCut_labely=['01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2'] +NumberOfHitsInMDTInner_ADCCut_labelx=['EIC5', 'EIC4', 'EIC3', 'EIC2', 'EIC1', '', 'EEC2', 'EEC1', 'BEC2', 'BEC1', '', 'BIC8', 'BIC7', 'BIC6', 'BIC5', 'BIC4', 'BIC3', 'BIC2', 'BIC1', 'BIA1', 'BIA2', 'BIA3', 'BIA4', 'BIA5', 'BIA6', 'BIA7', 'BIA8', '', 'BEA1', 'BEA2', 'EEA1', 'EEA2', '', 'EIA1', 'EIA2', 'EIA3', 'EIA4', 'EIA5'] +NumberOfHitsInMDTInner_ADCCut_labely=['01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1 R', '11 2 R', '11 1 M', '11 2 M', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1 R', '15 2 R', '15 1 M', '15 2 M', '16 1', '16 2'] -NumberOfHitsInMDTMiddle_ADCCut_labelx=['EMC5', 'EMC4', 'EMC3', 'EMC2', 'EMC1', '', 'BMC6', 'BMC5', 'BMC4', 'BMC3', 'BMC2', 'BMC1', 'BMA1', 'BMA2', 'BMA3', 'BMA4', 'BMA5', 'BMA6', ' ', 'EMA1', 'EMA2', 'EMA3', 'EMA4', 'EMA5'] -NumberOfHitsInMDTMiddle_ADCCut_labely=['01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2'] +NumberOfHitsInMDTMiddle_ADCCut_labelx=['EMC5', 'EMC4', 'EMC3', 'EMC2', 'EMC1', '', 'BMC6', 'BMC5', 'BMC4', 'BMC3', 'BMC2', 'BMC1', 'BMA1', 'BMA2', 'BMA3', 'BMA4', 'BMA5', 'BMA6', '', 'EMA1', 'EMA2', 'EMA3', 'EMA4', 'EMA5'] +NumberOfHitsInMDTMiddle_ADCCut_labely=['01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2'] -NumberOfHitsInMDTOuter_ADCCut_labelx=['EOC6', 'EOC5', 'EOC4', 'EOC3', 'EOC2', 'EOC1', '', 'BOC8', 'BOC7', 'BOC6', 'BOC5', 'BOC4', 'BOC3', 'BOC2', 'BOC1', 'BOB0', 'BOA1', 'BOA2', 'BOA3', 'BOA4', 'BOA5', 'BOA6', 'BOA7', 'BOA8', ' ', 'EOA1', 'EOA2', 'EOA3', 'EOA4', 'EOA5', 'EOA6'] -NumberOfHitsInMDTOuter_ADCCut_labely=['01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2', '01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2'] +NumberOfHitsInMDTOuter_ADCCut_labelx=['EOC6', 'EOC5', 'EOC4', 'EOC3', 'EOC2', 'EOC1', '', 'BOC8', 'BOC7', 'BOC6', 'BOC5', 'BOC4', 'BOC3', 'BOC2', 'BOC1', 'BOB0', 'BOA1', 'BOA2', 'BOA3', 'BOA4', 'BOA5', 'BOA6', 'BOA7', 'BOA8', '', 'EOA1', 'EOA2', 'EOA3', 'EOA4', 'EOA5', 'EOA6'] +NumberOfHitsInMDTOuter_ADCCut_labely=['01 1', '01 2', '02 1', '02 2', '03 1', '03 2', '04 1', '04 2', '05 1', '05 2', '06 1', '06 2', '07 1', '07 2', '08 1', '08 2', '09 1', '09 2', '10 1', '10 2', '11 1', '11 2', '12 1', '12 2', '13 1', '13 2', '14 1', '14 2', '15 1', '15 2', '16 1', '16 2'] diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/src/MdtRawDataMonAlg.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/src/MdtRawDataMonAlg.cxx index 0f0acb1c3e0262aa2aa791dc07088da8b05953f7..5a5b998d04b327f534442fed9a82a953b050852f 100755 --- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/src/MdtRawDataMonAlg.cxx +++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/src/MdtRawDataMonAlg.cxx @@ -71,6 +71,60 @@ using namespace std; //enum {enumBarrel, enumEndCap}; enum {enumInner, enumMiddle, enumOuter, enumExtra}; +struct MDTOverviewHistogramStruct { + std::vector<float> mdt_tube_x_barrel; + std::vector<float> mdt_tube_y_barrel; + std::vector<float> mdt_tube_z_barrel; + std::vector<float> mdt_tube_perp_barrel; + + std::vector<float> mdt_tube_x_ovl; + std::vector<float> mdt_tube_y_ovl; + std::vector<float> mdt_tube_z_ovl; + std::vector<float> mdt_tube_perp_ovl; + + std::vector<float> mdt_tube_x_endcap; + std::vector<float> mdt_tube_y_endcap; + std::vector<float> mdt_tube_z_endcap; + std::vector<float> mdt_tube_perp_endcap; + + std::vector<float> adc_mon_nosel; + std::vector<float> tdc_mon_nosel; + std::vector<float> tdc_mon; + std::vector<float> adc_mon; + std::vector<int> noiseBurst; + + std::vector<float> tdc_mon_noiseBurst; + std::vector<float> adc_mon_noiseBurst; + std::vector<float> adc_mon_noiseBurst_notNoisy; + std::vector<float> tdc_mon_noiseBurst_adcCut; + + std::vector<float> tdc_mon_adcCut; +}; + +struct MDTSummaryHistogramStruct { + std::vector<int> sector; + std::vector<int> stationEta; + std::vector<float> adc_mon; + std::vector<float> tdc_mon; + std::vector<float> tdc_mon_nb2; + std::vector<float> adc_mon_nb2; + std::vector<float> tdc_mon_nb1; + std::vector<float> adc_mon_nb1; + std::vector<float> adc_mon_adccut; + std::vector<float> tdc_mon_adccut; + std::vector<int> x_mon; + std::vector<int> y_mon; + std::vector<int> x_mon_noise; + std::vector<int> y_mon_noise; + std::vector<float> tdc_mon_nb3; + std::vector<int> x_bin_perML; + std::vector<int> y_bin_perML; + std::vector<int> bin_byLayer_x; + std::vector<int> bin_byLayer_y; + std::vector<float> tdc_mon_rpc; + std::vector<float> tdc_mon_tgc; +}; + ///////////////////////////////////////////////////////////////////////////// // ********************************************************************* // Public Methods @@ -82,8 +136,6 @@ MdtRawDataMonAlg::MdtRawDataMonAlg( const std::string& name, ISvcLocator* pSvcLo m_muonSelectionTool("CP::MuonSelectionTool/MuonSelectionTool"), m_DQFilterTools(this), m_atlas_ready(0), - // m_trig_BARREL(false), - // m_trig_ENDCAP(false), m_hist_hash_list(0), m_BMGpresent(false), m_BMGid(-1) @@ -303,7 +355,7 @@ StatusCode MdtRawDataMonAlg::initialize() chamber->SetMDTHitsPerChamber_IMO_Bin(dynamic_cast<TH2F*> (m_mdthitsperchamber_InnerMiddleOuterLumi[chamber->GetBarrelEndcapEnum()])); chamber->SetMDTHitsPerML_byLayer_Bins(dynamic_cast<TH2F*> (m_mdthitspermultilayerLumi[chamber->GetRegionEnum()][chamber->GetLayerEnum()]) - ,dynamic_cast<TH2F*> (m_mdthitsperML_byLayer[ (chamber->GetLayerEnum() < 3 ? chamber->GetLayerEnum() : 0) ])); + ,dynamic_cast<TH2F*> (m_mdthitsperML_byLayer[ (chamber->GetLayerEnum() < 3 ? chamber->GetLayerEnum() : 0) ])); /*DEV this was in bookHistogramsRecurrent, need to be reimplemented in someway // chamber->SetMDTHitsPerChamber_IMO_Bin(dynamic_cast<TH2F*> (m_mdthitsperchamber_InnerMiddleOuter_HighOcc[chamber->GetBarrelEndcapEnum()])); @@ -369,22 +421,10 @@ StatusCode MdtRawDataMonAlg::fillHistograms(const EventContext& ctx) const //DEV still needed ? does not compile if(muonRoIs.isPresent() && muonRoIs.isValid()){ ATH_MSG_VERBOSE( "Retrieved LVL1MuonRoIs object with key: " << m_l1RoiKey.key() ); - xAOD::MuonRoIContainer::const_iterator mu_it = muonRoIs->begin(); - xAOD::MuonRoIContainer::const_iterator mu_it_end= muonRoIs->end(); - - for( ; mu_it != mu_it_end; mu_it++){ - //ATH_MSG_ERROR( "(*mu_it)->getSource(): " << (*mu_it)->getSource() << ", is Muon_ROI::Endcap: " << ((*mu_it)->getSource()==(xAOD::MuonRoI::RoISource::Endcap)) << ", is Muon_ROI::Barrel: " << ((*mu_it)->getSource()==(xAOD::MuonRoI::RoISource::Barrel)) ); - if( (*mu_it)->getSource() == xAOD::MuonRoI::RoISource::Barrel) { - trig_BARREL =true; - break; - } - } - for( ; mu_it != mu_it_end; mu_it++){ - if( (*mu_it)->getSource() == xAOD::MuonRoI::RoISource::Endcap ) { - trig_ENDCAP = true; - break; - } - } + trig_BARREL = std::any_of(muonRoIs->begin(), muonRoIs->end(), + [](const auto& i){return i->getSource() == xAOD::MuonRoI::RoISource::Barrel;}); + trig_ENDCAP = std::any_of(muonRoIs->begin(), muonRoIs->end(), + [](const auto& i){return i->getSource() == xAOD::MuonRoI::RoISource::Endcap;}); } } catch (SG::ExcNoAuxStore & excpt){ ATH_MSG_INFO("SG::ExcNoAuxStore caught, "<<m_l1RoiKey.key()<<" not available."); @@ -489,6 +529,8 @@ StatusCode MdtRawDataMonAlg::fillHistograms(const EventContext& ctx) const } } + MDTOverviewHistogramStruct overviewPlots; + MDTSummaryHistogramStruct summaryPlots[4][4][36]; // [region][layer][phi] //loop in MdtPrepDataContainer for (Muon::MdtPrepDataContainer::const_iterator containerIt = mdt_container->begin(); containerIt != mdt_container->end(); ++containerIt) { if (containerIt == mdt_container->end() || (*containerIt)->size()==0) continue; //check if there are counts @@ -508,19 +550,12 @@ StatusCode MdtRawDataMonAlg::fillHistograms(const EventContext& ctx) const isHit_above_ADCCut = true; } - sc = fillMDTOverviewHistograms(*mdtCollection, isNoiseBurstCandidate); - if(sc.isSuccess()) { - ATH_MSG_DEBUG("Filled MDTOverviewHistograms" ); - } - else { - ATH_MSG_ERROR("Failed to fill MDTOverviewHistograms" ); - return sc; - } + fillMDTOverviewVects(*mdtCollection, isNoiseBurstCandidate, overviewPlots); //======================================================================= //======================================================================= //======================================================================= - sc = fillMDTSummaryHistograms(*mdtCollection, /* chambers_from_tracks,*/ isNoiseBurstCandidate, lumiblock, trig_BARREL, trig_ENDCAP); + sc = fillMDTSummaryVects(*mdtCollection, /* chambers_from_tracks,*/ isNoiseBurstCandidate, trig_BARREL, trig_ENDCAP, summaryPlots); if(sc.isSuccess()){ ATH_MSG_DEBUG("Filled MDTSummaryHistograms " ); } else { @@ -565,6 +600,10 @@ StatusCode MdtRawDataMonAlg::fillHistograms(const EventContext& ctx) const if( isHit_above_ADCCut ) nColl_ADCCut++; } //loop in MdtPrepDataContainer + fillMDTOverviewHistograms(overviewPlots); + fillMDTSummaryHistograms(summaryPlots, lumiblock); + + int nHighOccChambers = 0; map<string,float>::iterator iterstat; std::map<std::string,float> tubesperchamber_map; @@ -633,8 +672,7 @@ StatusCode MdtRawDataMonAlg::fillHistograms(const EventContext& ctx) const } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -StatusCode MdtRawDataMonAlg::fillMDTOverviewHistograms( const Muon::MdtPrepData* mdtCollection, bool &isNoiseBurstCandidate ) const { - StatusCode sc = StatusCode::SUCCESS; +void MdtRawDataMonAlg::fillMDTOverviewVects( const Muon::MdtPrepData* mdtCollection, bool &isNoiseBurstCandidate, MDTOverviewHistogramStruct& vects ) const { Identifier digcoll_id = (mdtCollection)->identify(); std::string hardware_name = getChamberName( mdtCollection ); @@ -645,7 +683,8 @@ StatusCode MdtRawDataMonAlg::fillMDTOverviewHistograms( const Muon::MdtPrepData* const MuonGM::MuonDetectorManager* MuonDetMgr = DetectorManagerHandle.cptr(); if(MuonDetMgr==nullptr){ ATH_MSG_ERROR("Null pointer to the read MuonDetectorManager conditions object"); - return StatusCode::FAILURE; + return; + //return StatusCode::FAILURE; } const MuonGM::MdtReadoutElement* pReadoutElementMDT = MuonDetMgr->getMdtReadoutElement(digcoll_id); @@ -663,63 +702,94 @@ StatusCode MdtRawDataMonAlg::fillMDTOverviewHistograms( const Muon::MdtPrepData* if( adc>m_ADCCut ) { //barrel if(fabs(mdt_tube_eta)>0. && fabs(mdt_tube_eta)<0.9) { - auto mdt_tube_x_barrel = Monitored::Scalar<float>("mdt_tube_x_barrel", mdtgPos.x()); - auto mdt_tube_y_barrel = Monitored::Scalar<float>("mdt_tube_y_barrel", mdtgPos.y()); - auto mdt_tube_z_barrel = Monitored::Scalar<float>("mdt_tube_z_barrel", mdtgPos.z()); - auto mdt_tube_perp_barrel = Monitored::Scalar<float>("mdt_tube_perp_barrel", mdtgPos.perp()); - fill("MdtMonitor",mdt_tube_z_barrel,mdt_tube_perp_barrel, mdt_tube_x_barrel,mdt_tube_y_barrel); + vects.mdt_tube_x_barrel.push_back(mdtgPos.x()); + vects.mdt_tube_y_barrel.push_back(mdtgPos.y()); + vects.mdt_tube_z_barrel.push_back(mdtgPos.z()); + vects.mdt_tube_perp_barrel.push_back(mdtgPos.perp()); } //OverLap -->Fill MDT Global RZ and YX if(fabs(mdt_tube_eta)>0.9 && fabs(mdt_tube_eta)<1.2) { - auto mdt_tube_x_ovl = Monitored::Scalar<float>("mdt_tube_x_ovl", mdtgPos.x()); - auto mdt_tube_y_ovl = Monitored::Scalar<float>("mdt_tube_y_ovl", mdtgPos.y()); - auto mdt_tube_z_ovl = Monitored::Scalar<float>("mdt_tube_z_ovl", mdtgPos.z()); - auto mdt_tube_perp_ovl = Monitored::Scalar<float>("mdt_tube_perp_ovl", mdtgPos.perp()); - fill("MdtMonitor",mdt_tube_z_ovl,mdt_tube_perp_ovl, mdt_tube_x_ovl,mdt_tube_y_ovl); + vects.mdt_tube_x_ovl.push_back(mdtgPos.x()); + vects.mdt_tube_y_ovl.push_back(mdtgPos.y()); + vects.mdt_tube_z_ovl.push_back(mdtgPos.z()); + vects.mdt_tube_perp_ovl.push_back(mdtgPos.perp()); } //EndCap -->Fill MDT Global RZ and YX if(fabs(mdt_tube_eta)>1.2 && fabs(mdt_tube_eta)<2.7){ - auto mdt_tube_x_endcap = Monitored::Scalar<float>("mdt_tube_x_endcap", mdtgPos.x()); - auto mdt_tube_y_endcap = Monitored::Scalar<float>("mdt_tube_y_endcap", mdtgPos.y()); - auto mdt_tube_z_endcap = Monitored::Scalar<float>("mdt_tube_z_endcap", mdtgPos.z()); - auto mdt_tube_perp_endcap = Monitored::Scalar<float>("mdt_tube_perp_endcap", mdtgPos.perp()); - fill("MdtMonitor",mdt_tube_z_endcap,mdt_tube_perp_endcap, mdt_tube_x_endcap,mdt_tube_y_endcap); - + vects.mdt_tube_x_endcap.push_back(mdtgPos.x()); + vects.mdt_tube_y_endcap.push_back(mdtgPos.y()); + vects.mdt_tube_z_endcap.push_back(mdtgPos.z()); + vects.mdt_tube_perp_endcap.push_back(mdtgPos.perp()); } } - auto adc_mon_nosel = Monitored::Scalar<float>("adc_mon_nosel", adc); - fill("MdtMonitor", adc_mon_nosel); + vects.adc_mon_nosel.push_back(adc); + vects.tdc_mon_nosel.push_back(tdc); if(!isNoisy && adc > 0){ - auto tdc_mon = Monitored::Scalar<float>("tdc_mon", tdc); - auto adc_mon = Monitored::Scalar<float>("adc_mon", adc); - fill("MdtMonitor", tdc_mon, adc_mon); + vects.tdc_mon.push_back(tdc); + vects.adc_mon.push_back(adc); } + vects.noiseBurst.push_back((int) isNoiseBurstCandidate); if(isNoiseBurstCandidate){ - auto tdc_mon_noiseBurst = Monitored::Scalar<float>("tdc_mon_noiseBurst", tdc); - auto adc_mon_noiseBurst = Monitored::Scalar<float>("adc_mon_noiseBurst", adc); - fill("MdtMonitor", tdc_mon_noiseBurst, adc_mon_noiseBurst); + vects.tdc_mon_noiseBurst.push_back(tdc); + vects.adc_mon_noiseBurst.push_back(adc); if(!isNoisy) { - auto adc_mon_noiseBurst_notNoisy = Monitored::Scalar<float>("adc_mon_noiseBurst_notNoisy", adc); - fill("MdtMonitor",adc_mon_noiseBurst_notNoisy); + vects.adc_mon_noiseBurst_notNoisy.push_back(adc); } if( adc > m_ADCCut) { - auto tdc_mon_noiseBurst_adcCut = Monitored::Scalar<float>("tdc_mon_noiseBurst_adcCut", tdc); - fill("MdtMonitor",tdc_mon_noiseBurst_adcCut); + vects.tdc_mon_noiseBurst_adcCut.push_back(tdc); } } if(adc > m_ADCCut){ - auto tdc_mon_adcCut = Monitored::Scalar<float>("tdc_mon_adcCut", tdc); - fill("MdtMonitor",tdc_mon_adcCut); + vects.tdc_mon_adcCut.push_back(tdc); } +} - return sc; +void MdtRawDataMonAlg::fillMDTOverviewHistograms( const MDTOverviewHistogramStruct& vects ) const { + auto mdt_tube_x_barrel = Monitored::Collection("mdt_tube_x_barrel", vects.mdt_tube_x_barrel); + auto mdt_tube_y_barrel = Monitored::Collection("mdt_tube_y_barrel", vects.mdt_tube_y_barrel); + auto mdt_tube_z_barrel = Monitored::Collection("mdt_tube_z_barrel", vects.mdt_tube_z_barrel); + auto mdt_tube_perp_barrel = Monitored::Collection("mdt_tube_perp_barrel", vects.mdt_tube_perp_barrel); + fill("MdtMonitor",mdt_tube_z_barrel,mdt_tube_perp_barrel, mdt_tube_x_barrel,mdt_tube_y_barrel); + + auto mdt_tube_x_ovl = Monitored::Collection("mdt_tube_x_ovl", vects.mdt_tube_x_ovl); + auto mdt_tube_y_ovl = Monitored::Collection("mdt_tube_y_ovl", vects.mdt_tube_y_ovl); + auto mdt_tube_z_ovl = Monitored::Collection("mdt_tube_z_ovl", vects.mdt_tube_z_ovl); + auto mdt_tube_perp_ovl = Monitored::Collection("mdt_tube_perp_ovl", vects.mdt_tube_perp_ovl); + fill("MdtMonitor",mdt_tube_z_ovl,mdt_tube_perp_ovl, mdt_tube_x_ovl,mdt_tube_y_ovl); + + auto mdt_tube_x_endcap = Monitored::Collection("mdt_tube_x_endcap", vects.mdt_tube_x_endcap); + auto mdt_tube_y_endcap = Monitored::Collection("mdt_tube_y_endcap", vects.mdt_tube_y_endcap); + auto mdt_tube_z_endcap = Monitored::Collection("mdt_tube_z_endcap", vects.mdt_tube_z_endcap); + auto mdt_tube_perp_endcap = Monitored::Collection("mdt_tube_perp_endcap", vects.mdt_tube_perp_endcap); + fill("MdtMonitor",mdt_tube_z_endcap,mdt_tube_perp_endcap, mdt_tube_x_endcap,mdt_tube_y_endcap); + + auto adc_mon_nosel = Monitored::Collection("adc_mon_nosel", vects.adc_mon_nosel); + auto tdc_mon_nosel = Monitored::Collection("tdc_mon_nosel", vects.tdc_mon_nosel); + auto noiseBurst = Monitored::Collection("noiseBurst", vects.noiseBurst); + fill("MdtMonitor", adc_mon_nosel, tdc_mon_nosel, noiseBurst); + + auto tdc_mon = Monitored::Collection("tdc_mon", vects.tdc_mon); + auto adc_mon = Monitored::Collection("adc_mon", vects.adc_mon); + fill("MdtMonitor", tdc_mon, adc_mon); + + //auto tdc_mon_noiseBurst = Monitored::Collection("tdc_mon_noiseBurst", vects.tdc_mon_noiseBurst); + //auto adc_mon_noiseBurst = Monitored::Collection("adc_mon_noiseBurst", vects.adc_mon_noiseBurst); + //fill("MdtMonitor", tdc_mon_noiseBurst, adc_mon_noiseBurst, noiseBurst); + + auto adc_mon_noiseBurst_notNoisy = Monitored::Collection("adc_mon_noiseBurst_notNoisy", vects.adc_mon_noiseBurst_notNoisy); + fill("MdtMonitor",adc_mon_noiseBurst_notNoisy); + + auto tdc_mon_noiseBurst_adcCut = Monitored::Collection("tdc_mon_noiseBurst_adcCut", vects.tdc_mon_noiseBurst_adcCut); + fill("MdtMonitor",tdc_mon_noiseBurst_adcCut); + auto tdc_mon_adcCut = Monitored::Collection("tdc_mon_adcCut", vects.tdc_mon_adcCut); + fill("MdtMonitor",tdc_mon_adcCut); } -StatusCode MdtRawDataMonAlg::fillMDTSummaryHistograms( const Muon::MdtPrepData* mdtCollection, /*std::set<std::string> chambers_from_tracks,*/ bool &isNoiseBurstCandidate, int lb, bool trig_barrel, bool trig_endcap ) const{ +StatusCode MdtRawDataMonAlg::fillMDTSummaryVects( const Muon::MdtPrepData* mdtCollection, /*std::set<std::string> chambers_from_tracks,*/ bool &isNoiseBurstCandidate, bool trig_barrel, bool trig_endcap, MDTSummaryHistogramStruct vects[4][4][36] ) const{ StatusCode sc = StatusCode::SUCCESS; Identifier digcoll_id = (mdtCollection)->identify(); @@ -743,6 +813,8 @@ StatusCode MdtRawDataMonAlg::fillMDTSummaryHistograms( const Muon::MdtPrepData* // int icrate = chamber->GetCrate(); // int stationPhi = chamber->GetStationPhi(); + auto& thisVects = vects[iregion][ilayer][stationPhi]; + std::string chambername = chamber->getName(); // bool is_on_track = false; // for(auto ch : chambers_from_tracks) { @@ -755,11 +827,8 @@ StatusCode MdtRawDataMonAlg::fillMDTSummaryHistograms( const Muon::MdtPrepData* float adc = mdtCollection->adc(); if(chambername.substr(0,3) == "BMG") adc /= 4.; - auto lb_mon = Monitored::Scalar<int>("lb_mon", lb); - auto sector = Monitored::Scalar<int>("sector",stationPhi+iregion*16); - auto stationEta = Monitored::Scalar<int>("stEta_"+region[iregion]+"_"+layer[ilayer]+"_phi"+std::to_string(stationPhi+1), chamber->GetStationEta()); + thisVects.sector.push_back(stationPhi+iregion*16); - fill("MdtMonitor",lb_mon, sector); // mdtoccvslb_summaryPerSector->Fill(lumiblock, stationPhi+iregion*16 ); //MDTBA/Overview/Hits // iregion = BA/BC/EA/EC --> 4 @@ -767,44 +836,37 @@ StatusCode MdtRawDataMonAlg::fillMDTSummaryHistograms( const Muon::MdtPrepData* // stationPhi --> 16 ====> 256 //std::string mon="MDTHits_ADCCut_"+region[iregion]+"_Mon_"+layer[ilayer]+"_Phi_"+std::to_string(stationPhi+1);; - std::string MDT_regionGroup="MDT_regionGroup"+region[iregion] ;//MDTXX/Overview, 4 gruppi - // int mlayer_n = m_mdtIdHelper->multilayer(digcoll_id); int mlayer_n = m_muonIdHelperTool->mdtIdHelper().multilayer(digcoll_id); if(!isNoisy && adc > 0){ - auto adc_mon = Monitored::Scalar<float>("adc_mon", adc); - auto tdc_mon = Monitored::Scalar<float>("tdc_mon", tdc); - fill(MDT_regionGroup, adc_mon, tdc_mon); + thisVects.adc_mon.push_back(adc); + thisVects.tdc_mon.push_back(tdc); if(isNoiseBurstCandidate) { - auto tdc_mon_nb2 = Monitored::Scalar<float>("tdc_mon_nb2", tdc); - auto adc_mon_nb2 = Monitored::Scalar<float>("adc_mon_nb2", adc); - fill(MDT_regionGroup, tdc_mon_nb2, adc_mon_nb2); + thisVects.tdc_mon_nb2.push_back(tdc); + thisVects.adc_mon_nb2.push_back(adc); } } if(!isNoisy){ // fill(MDT_regionGroup, adc_mon); if(isNoiseBurstCandidate){ - auto tdc_mon_nb1 = Monitored::Scalar<float>("tdc_mon_nb1", tdc); - auto adc_mon_nb1 = Monitored::Scalar<float>("adc_mon_nb1", adc); - fill(MDT_regionGroup, tdc_mon_nb1, adc_mon_nb1); + thisVects.tdc_mon_nb1.push_back(tdc); + thisVects.adc_mon_nb1.push_back(adc); } } if( adc >m_ADCCut && !isNoisy) { - auto adc_mon_adccut = Monitored::Scalar<float>("adc_mon_adccut", adc); - auto tdc_mon_adccut = Monitored::Scalar<float>("tdc_mon_adccut", tdc); - fill(MDT_regionGroup, stationEta, tdc_mon_adccut, adc_mon_adccut); - + thisVects.adc_mon_adccut.push_back(adc); + thisVects.tdc_mon_adccut.push_back(tdc); + thisVects.stationEta.push_back(chamber->GetStationEta()); int binx=chamber->GetMDTHitsPerChamber_IMO_BinX(); if(iregion<2) binx=binx-9; else binx=binx-7; int biny=chamber->GetMDTHitsPerChamber_IMO_BinY(); - string group = "MdtMonitor"; string varx = " "; string vary = " "; string varx_noise = " "; @@ -821,47 +883,33 @@ StatusCode MdtRawDataMonAlg::fillMDTSummaryHistograms( const Muon::MdtPrepData* vary_noise="y_mon_endcap_noise"; } - auto x_mon = Monitored::Scalar<int>(varx, binx); - auto y_mon = Monitored::Scalar<int>(vary, biny-1); - fill(group,x_mon,y_mon); + thisVects.x_mon.push_back(binx); + thisVects.y_mon.push_back(biny-1); if(isNoiseBurstCandidate){ - auto x_mon_noise = Monitored::Scalar<int>(varx_noise, binx); - auto y_mon_noise = Monitored::Scalar<int>(vary_noise, biny-1); - fill(group,x_mon_noise,y_mon_noise); - auto tdc_mon_nb3 = Monitored::Scalar<float>("tdc_mon_nb3", tdc); - fill(MDT_regionGroup, tdc_mon_nb3); + thisVects.x_mon_noise.push_back(binx); + thisVects.y_mon_noise.push_back(biny-1); + thisVects.tdc_mon_nb3.push_back(tdc); } - - - varx = "x_mon_"+region[iregion]+"_"+layer[ilayer]; - vary = "y_mon_"+region[iregion]+"_"+layer[ilayer]; - auto x_bin_perML = Monitored::Scalar<int>(varx, chamber->GetMDTHitsPerML_Binx()-1);//get the right bin!!!! + thisVects.x_bin_perML.push_back(chamber->GetMDTHitsPerML_Binx()-1);//get the right bin!!!! int biny_ml=0; if(mlayer_n==1) biny_ml=chamber->GetMDTHitsPerML_m1_Biny(); else if(mlayer_n==2) biny_ml=chamber->GetMDTHitsPerML_m2_Biny(); - auto y_bin_perML = Monitored::Scalar<int>(vary, biny_ml-1); - // fill(group,x_bin_perML,y_bin_perML); - fill(MDT_regionGroup,x_bin_perML,y_bin_perML); + thisVects.y_bin_perML.push_back(biny_ml-1); if(layer[ilayer]!="Extra"){ - varx="x_mon_"+layer[ilayer]; - vary="y_mon_"+layer[ilayer]; - auto bin_byLayer_x = Monitored::Scalar<int>(varx,chamber->GetMDTHitsPerML_byLayer_BinX()-1); - auto bin_byLayer_y = Monitored::Scalar<int>(vary,chamber->GetMDTHitsPerML_byLayer_BinY(mlayer_n)-1); + thisVects.bin_byLayer_x.push_back(chamber->GetMDTHitsPerML_byLayer_BinX()-1); + thisVects.bin_byLayer_y.push_back(chamber->GetMDTHitsPerML_byLayer_BinY(mlayer_n)-1); - fill("MdtMonitor",bin_byLayer_x,bin_byLayer_y); } // if( HasTrigBARREL() ) m_overalltdccutPRLumi_RPCtrig[iregion]->Fill(tdc); // if( HasTrigENDCAP() ) m_overalltdccutPRLumi_TGCtrig[iregion]->Fill(tdc); if( trig_barrel ) { - auto tdc_mon_rpc = Monitored::Scalar<float>("tdc_mon_rpc", tdc); - fill(MDT_regionGroup,tdc_mon_rpc); + thisVects.tdc_mon_rpc.push_back(tdc); } if( trig_endcap ) { - auto tdc_mon_tgc = Monitored::Scalar<float>("tdc_mon_tdc", tdc); - fill(MDT_regionGroup,tdc_mon_tgc); + thisVects.tdc_mon_tgc.push_back(tdc); } //DEV to DO @@ -890,6 +938,111 @@ StatusCode MdtRawDataMonAlg::fillMDTSummaryHistograms( const Muon::MdtPrepData* return sc; } +StatusCode MdtRawDataMonAlg::fillMDTSummaryHistograms( const MDTSummaryHistogramStruct vects[4][4][36], int lb ) const{ + + StatusCode sc = StatusCode::SUCCESS; + + std::string region[4]={"BA","BC","EA","EC"}; + std::string layer[4]={"Inner","Middle","Outer","Extra"}; + // std::string slayer[4]={"inner","middle","outer","extra"}; + + auto lb_mon = Monitored::Scalar<int>("lb_mon", lb); + + for (int iregion = 0; iregion < 4; ++iregion) { + std::string MDT_regionGroup="MDT_regionGroup"+region[iregion] ;//MDTXX/Overview, 4 gruppi + for (int ilayer = 0; ilayer < 4; ++ilayer) { + for (int stationPhi = 0; stationPhi < 36; ++stationPhi) { + auto& thisVects = vects[iregion][ilayer][stationPhi]; + auto sector = Monitored::Collection("sector",thisVects.sector); + auto stationEta = Monitored::Collection("stEta_"+region[iregion]+"_"+layer[ilayer]+"_phi"+std::to_string(stationPhi+1), thisVects.stationEta); + + const auto& tvec = std::vector<std::reference_wrapper<Monitored::IMonitoredVariable>>{lb_mon, sector}; + fill("MdtMonitor", lb_mon, sector); + + auto adc_mon = Monitored::Collection("adc_mon", thisVects.adc_mon); + auto tdc_mon = Monitored::Collection("tdc_mon", thisVects.tdc_mon); + fill(MDT_regionGroup, adc_mon, tdc_mon); + + auto tdc_mon_nb2 = Monitored::Collection("tdc_mon_nb2", thisVects.tdc_mon_nb2); + auto adc_mon_nb2 = Monitored::Collection("adc_mon_nb2", thisVects.adc_mon_nb2); + fill(MDT_regionGroup, tdc_mon_nb2, adc_mon_nb2); + + auto tdc_mon_nb1 = Monitored::Collection("tdc_mon_nb1", thisVects.tdc_mon_nb1); + auto adc_mon_nb1 = Monitored::Collection("adc_mon_nb1", thisVects.adc_mon_nb1); + fill(MDT_regionGroup, tdc_mon_nb1, adc_mon_nb1); + + auto adc_mon_adccut = Monitored::Collection("adc_mon_adccut", thisVects.adc_mon_adccut); + auto tdc_mon_adccut = Monitored::Collection("tdc_mon_adccut", thisVects.tdc_mon_adccut); + fill(MDT_regionGroup, stationEta, tdc_mon_adccut, adc_mon_adccut); + + string varx = iregion < 2 ? "x_mon_barrel" : "x_mon_endcap"; + string vary = iregion < 2 ? "y_mon_barrel" : "y_mon_endcap"; + string varx_noise = iregion < 2 ? "x_mon_barrel_noise" : "x_mon_endcap_noise"; + string vary_noise = iregion < 2 ? "y_mon_barrel_noise" : "y_mon_endcap_noise"; + + auto x_mon = Monitored::Collection(varx, thisVects.x_mon); + auto y_mon = Monitored::Collection(vary, thisVects.y_mon); + fill("MdtMonitor",x_mon,y_mon); + auto x_mon_noise = Monitored::Collection(varx_noise, thisVects.x_mon_noise); + auto y_mon_noise = Monitored::Collection(vary_noise, thisVects.y_mon_noise); + fill("MdtMonitor",x_mon_noise,y_mon_noise); + auto tdc_mon_nb3 = Monitored::Collection("tdc_mon_nb3", thisVects.tdc_mon_nb3); + fill(MDT_regionGroup, tdc_mon_nb3); + + varx = "x_mon_"+region[iregion]+"_"+layer[ilayer]; + vary = "y_mon_"+region[iregion]+"_"+layer[ilayer]; + + auto x_bin_perML = Monitored::Collection(varx, thisVects.x_bin_perML);//get the right bin!!!! + auto y_bin_perML = Monitored::Collection(vary, thisVects.y_bin_perML); + fill(MDT_regionGroup,x_bin_perML,y_bin_perML); + + if(layer[ilayer]!="Extra"){ + varx="x_mon_"+layer[ilayer]; + vary="y_mon_"+layer[ilayer]; + auto bin_byLayer_x = Monitored::Collection(varx, thisVects.bin_byLayer_x); + auto bin_byLayer_y = Monitored::Collection(vary, thisVects.bin_byLayer_y); + + fill("MdtMonitor",bin_byLayer_x,bin_byLayer_y); + } + + if (thisVects.tdc_mon_rpc.size() > 0) { + auto tdc_mon_rpc = Monitored::Collection("tdc_mon_rpc", thisVects.tdc_mon_rpc); + fill(MDT_regionGroup,tdc_mon_rpc); + } + + if (thisVects.tdc_mon_tgc.size() > 0) { + auto tdc_mon_tgc = Monitored::Collection("tdc_mon_tgc", thisVects.tdc_mon_tgc); + fill(MDT_regionGroup,tdc_mon_tgc); + } + + //DEV to DO + // Fill occupancy vs. Lumiblock + // if(ilayer != 3) m_mdtoccvslb[iregion][ilayer]->Fill(m_lumiblock,get_bin_for_LB_hist(iregion,ilayer,stationPhi,stationEta,isBIM)); + // else m_mdtoccvslb[iregion][2]->Fill(m_lumiblock,get_bin_for_LB_hist(iregion,ilayer,stationPhi,stationEta,isBIM)); // Put extras in with outer + + //correct readout crate info for BEE,BIS7/8 + /* + int crate_region = iregion; + if(chambername.substr(0,3)=="BEE" || (chambername.substr(0,3) == "BIS" && (stationEta == 7 || stationEta == 8) )){ + if(iregion==0) crate_region=2; + if(iregion==1) crate_region=3; + } + */ + //DEV to do + //use stationPhi+1 because that's the actual phi, not phi indexed from zero. + // m_mdtoccvslb_by_crate[crate_region][icrate-1]->Fill(m_lumiblock,get_bin_for_LB_crate_hist(crate_region,icrate,stationPhi+1,stationEta,chambername)); + + // if (is_on_track) { + // m_mdtoccvslb_ontrack_by_crate[crate_region][icrate-1]->Fill(m_lumiblock,get_bin_for_LB_crate_hist(crate_region,icrate,stationPhi+1,stationEta,chambername)); + // } + + } + } + } + + return sc; +} + StatusCode MdtRawDataMonAlg::fillMDTHistograms( const Muon::MdtPrepData* mdtCollection ) const{ //fill chamber by chamber histos @@ -939,40 +1092,19 @@ StatusCode MdtRawDataMonAlg::fillMDTHistograms( const Muon::MdtPrepData* mdtColl if(iregion==1) monPerCh+="BC"; if(iregion==2) monPerCh+="EA"; if(iregion==3) monPerCh+="EC"; - - auto tdc_perch = Monitored::Scalar<float>("tdc_perch_"+hardware_name,tdc); - auto adc_perch = Monitored::Scalar<float>("adc_perch_"+hardware_name, adc); - fill(monPerCh, tdc_perch, adc_perch ); - // fill(monPerCh, tdc_perch); - - int mdtMultLayer = m_muonIdHelperTool->mdtIdHelper().multilayer(digcoll_id); - if ( adc >m_ADCCut && !isNoisy ) { - if (mdtMultLayer==1) { - auto tdc_perch_ml1 = Monitored::Scalar<float>("tdc_perch_ml1_adccut_"+hardware_name,tdc); - fill(monPerCh, tdc_perch_ml1); - } - if (mdtMultLayer==2) { - auto tdc_perch_ml2 = Monitored::Scalar<float>("tdc_perch_ml2_adccut_"+hardware_name,tdc); - fill(monPerCh, tdc_perch_ml2); - } - auto layer_perch = Monitored::Scalar<int>("layer_perch_"+hardware_name, mdtlayer); - fill(monPerCh, layer_perch ); - } - - - if(adc>0) { - // fill(monPerCh, Monitored::Scalar<float>("tdc_perch2d", tdc), Monitored::Scalar<float>("adc_perch2d", adc) ); - } + int mdtMultLayer = m_muonIdHelperTool->mdtIdHelper().multilayer(digcoll_id); - // int mezz = mezzmdt(digcoll_id); - if ( adc >m_ADCCut ) { - auto tube_perch = Monitored::Scalar<int>("tube_perch_"+hardware_name, mdttube); - fill(monPerCh, tube_perch ); - // fill(monPerCh, Monitored::Scalar<int>("mezz_perch",mezz) ); - } + auto tdc_perch = Monitored::Scalar<float>("tdc_perch_"+hardware_name,tdc); + auto adc_perch = Monitored::Scalar<float>("adc_perch_"+hardware_name, adc); + auto layer_perch = Monitored::Scalar<int>("layer_perch_"+hardware_name, mdtlayer); + auto tube_perch = Monitored::Scalar<int>("tube_perch_"+hardware_name, mdttube); + auto ml1_adccut = Monitored::Scalar<int>("ml1_adccut", (int) (adc >m_ADCCut && !isNoisy && mdtMultLayer==1)); + auto ml2_adccut = Monitored::Scalar<int>("ml2_adccut", (int) (adc >m_ADCCut && !isNoisy && mdtMultLayer==2)); + auto adccut_nonoise = Monitored::Scalar<int>("adccut_nonoise", (int) (adc >m_ADCCut && !isNoisy)); + auto adccut = Monitored::Scalar<int>("adccut", (int) (adc >m_ADCCut)); - // if (chamber->mdtmezz) { if( adc > m_ADCCut) chamber->mdtmezz->Fill( mezzmdt( digcoll_id ) ); } + fill(monPerCh, tdc_perch, adc_perch, layer_perch, tube_perch, ml1_adccut, ml2_adccut, adccut_nonoise, adccut); return sc; } @@ -985,11 +1117,7 @@ StatusCode MdtRawDataMonAlg::fillMDTHistograms( const Muon::MdtPrepData* mdtColl StatusCode MdtRawDataMonAlg::procHistograms(bool isEndOfEventsBlock, bool isEndOfLumiBlock, bool isEndOfRun ) { -<<<<<<< HEAD if(endOfRunFlag()) { -======= - int mlayer_n = m_muonIdHelperTool->mdtIdHelper().multilayer(digcoll_id); ->>>>>>> upstream/master ATH_MSG_DEBUG("********Reached Last Event in MdtRawDataValAlg !!!" ); ATH_MSG_DEBUG("MdtRawDataValAlg finalize()" ); @@ -1121,13 +1249,8 @@ StatusCode MdtRawDataMonAlg::handleEvent_effCalc(const Trk::SegmentCollection* s m_mdthitsperchamber_onSegm_InnerMiddleOuterLumi[ibarrel_endcap]->SetEntries(m_mdthitsperchamber_onSegm_InnerMiddleOuterLumi[ibarrel_endcap]->GetEntries()+1); } } -<<<<<<< HEAD int mdtMultLayer = m_mdtIdHelper->multilayer(tmpid); -======= - int mdtMultLayer = m_muonIdHelperTool->mdtIdHelper().multilayer(tmpid); - //chamber->mdtadc_onSegm->Fill(mrot->prepRawData()->adc()); ->>>>>>> upstream/master if(chamber->mdtadc_onSegm_ML1 && mdtMultLayer == 1){ chamber->mdtadc_onSegm_ML1->Fill(adc); }