From d0cb549642fa604225321cb2ac057f8988a7eb61 Mon Sep 17 00:00:00 2001 From: Pavol Strizenec <Pavol.Strizenec@cern.ch> Date: Tue, 22 Nov 2016 02:01:07 +0100 Subject: [PATCH] switching off dumper in LArRODMonTool (LArMonTools-02-00-55) * switching off dumper in LArRODMonTool * tag LArMonTools-02-00-55 2016-11-21 Walter Lampl <walter.lampl@ cern.ch> * improve OFC/digit bounds check * tag LArMonTools-02-00-54 2016-10-31 Walter Lampl <walter.lampl@ cern.ch> * coverity fixes (uninit class members) * tag LArMonTools-02-00-53 2016-10-26 Walter Lampl <walter.lampl@ cern.ch> * fix (one-time) memory leak * tag LArMonTools-02-00-52 11-10-2016 Emma Kuwertz * Tagging LArMonTools-02-00-51. 05-10-2016 Emma Kuwertz * renaming MNB histograms to show correct flagging policy. ... (Long ChangeLog diff - truncated) Former-commit-id: e1e4d611273736b7bf35dd478da096c55a2181c2 --- .../LArMonTools/LArCollisionTimeMonTool.h | 6 +- .../LArMonTools/LArMonTools/LArCoverage.h | 2 +- .../LArMonTools/LArMonTools/LArDigitMon.h | 16 +- .../LArMonTools/LArMonTools/LArFEBMon.h | 7 +- .../LArMonTools/LArMonTools/LArNoisyROMon.h | 44 +- .../LArMonTools/LArMonTools/LArRODMonTool.h | 3 +- .../LArMonTools/LArRawChannelMonTool.h | 116 +-- .../LArMonTools/LArRawChannelMonTools.h | 100 +- .../src/LArCollisionTimeMonTool.cxx | 51 +- .../LArMonTools/src/LArCosmicsMonTool.cxx | 12 +- .../LArMonTools/src/LArCoverage.cxx | 63 +- .../LArMonTools/src/LArCoverageFCALBins.cxx | 12 +- .../LArMonTools/src/LArDigitMon.cxx | 112 +-- LArCalorimeter/LArMonTools/src/LArFEBMon.cxx | 20 +- .../src/LArHVCorrectionMonTool.cxx | 47 +- .../LArMonTools/src/LArNoisyROMon.cxx | 623 +++++------- .../LArMonTools/src/LArRODMonTool.cxx | 14 +- .../LArMonTools/src/LArRawChannelMonTool.cxx | 932 +++++++++--------- .../LArMonTools/src/LArRawChannelMonTools.cxx | 72 +- 19 files changed, 1103 insertions(+), 1149 deletions(-) diff --git a/LArCalorimeter/LArMonTools/LArMonTools/LArCollisionTimeMonTool.h b/LArCalorimeter/LArMonTools/LArMonTools/LArCollisionTimeMonTool.h index b08a72dc51d..4cb0f7d9ba4 100755 --- a/LArCalorimeter/LArMonTools/LArMonTools/LArCollisionTimeMonTool.h +++ b/LArCalorimeter/LArMonTools/LArMonTools/LArCollisionTimeMonTool.h @@ -92,7 +92,7 @@ class LArCollisionTimeMonTool: public ManagedMonitorToolBase TH2F_LW** m_LArCollTime_vs_BCID_h; TH1F_LW** m_LArCollAvgTime_h; TH2F_LW** m_LArCollAvgTime_vs_LB_h; - TH2F_LW** m_LArCollAvgTime_vs_BCID_h; + TH2F_LW** m_LArCollAvgTime_vs_BCID_h; int m_distance; // distance from train front to fill second histos bool m_IsOnline; @@ -103,7 +103,7 @@ class LArCollisionTimeMonTool: public ManagedMonitorToolBase float m_timeCut; int m_minCells; bool m_eWeighted; - bool newrun; + bool m_newrun; //ToolHandle<IBunchGroupTool> m_bunchGroupTool; ToolHandle<Trig::IBunchCrossingTool> m_bunchGroupTool; @@ -112,6 +112,8 @@ class LArCollisionTimeMonTool: public ManagedMonitorToolBase std::string m_histPath, m_key; + + void cleanup(); }; #endif diff --git a/LArCalorimeter/LArMonTools/LArMonTools/LArCoverage.h b/LArCalorimeter/LArMonTools/LArMonTools/LArCoverage.h index b53b9d04dbb..a08e9d8d2fa 100644 --- a/LArCalorimeter/LArMonTools/LArMonTools/LArCoverage.h +++ b/LArCalorimeter/LArMonTools/LArMonTools/LArCoverage.h @@ -103,7 +103,7 @@ class LArCoverage: public ManagedMonitorToolBase void SetBadChannelZaxisLabels(TH2I_LW* h); // To keep track of known disabled FEBs - void FillKnownMissingFEBs(const CaloDetDescrManager* m_CaloDetDescrMgr); + void FillKnownMissingFEBs(const CaloDetDescrManager* caloDetDescrMgr); // To fix empty bins in histos with variable bin size void FixEmptyBins(); diff --git a/LArCalorimeter/LArMonTools/LArMonTools/LArDigitMon.h b/LArCalorimeter/LArMonTools/LArMonTools/LArDigitMon.h index c03657dae91..e1d1e4e7a0b 100755 --- a/LArCalorimeter/LArMonTools/LArMonTools/LArDigitMon.h +++ b/LArCalorimeter/LArMonTools/LArMonTools/LArDigitMon.h @@ -151,14 +151,14 @@ private: }; /** Now define the 8 partitions of the LArCalorimeter*/ - partition BarrelA; - partition BarrelC; - partition EmecA; - partition EmecC; - partition HecA; - partition HecC; - partition FcalA; - partition FcalC; + partition m_BarrelA; + partition m_BarrelC; + partition m_EmecA; + partition m_EmecC; + partition m_HecA; + partition m_HecC; + partition m_FcalA; + partition m_FcalC; /**declare identifier*/ diff --git a/LArCalorimeter/LArMonTools/LArMonTools/LArFEBMon.h b/LArCalorimeter/LArMonTools/LArMonTools/LArFEBMon.h index 1665726640b..bbdc9dd199e 100755 --- a/LArCalorimeter/LArMonTools/LArMonTools/LArFEBMon.h +++ b/LArCalorimeter/LArMonTools/LArMonTools/LArFEBMon.h @@ -48,15 +48,15 @@ public: StatusCode bookHistograms(); StatusCode fillHistograms(); StatusCode procHistograms(); - + void AddHistos(TH2F_LW* h0,TH2F_LW* h1,TH2F_LW* h2); void AddHistos(TH1F_LW* h0,TH1F_LW* h1,TH1F_LW* h2, float s1, float s2); bool nbOfFebOK(float nfeb,TH1I_LW* h); private: - float FEBmin,FEBmax; - int FEBnbins; + float m_FEBmin,m_FEBmax; + int m_FEBnbins; /* global params */ int m_eventsCounter; bool m_ignoreMissingHeaderEMB; @@ -193,6 +193,7 @@ private: TH1F_LW* m_febInError[1524]; bool m_bfebIE[1524]; + bool m_anyfebIE; TTree* m_CorruptTree; diff --git a/LArCalorimeter/LArMonTools/LArMonTools/LArNoisyROMon.h b/LArCalorimeter/LArMonTools/LArMonTools/LArNoisyROMon.h index e505aa3bad4..210f101e29e 100644 --- a/LArCalorimeter/LArMonTools/LArMonTools/LArNoisyROMon.h +++ b/LArCalorimeter/LArMonTools/LArMonTools/LArNoisyROMon.h @@ -105,28 +105,28 @@ private: TH1I_LW* h_NoisyWEventTimeVeto=nullptr; }; - TH1I_LW* h_NoisyFEB=nullptr; - TH1F_LW* h_NoisyEventFrac=nullptr; - TH1F_LW* h_NoisyEventTimeVetoFrac=nullptr; - TH1I_LW* h_MNBTightFEB=nullptr; - TH1F_LW* h_MNBTightEventFrac=nullptr; - TH1F_LW* h_MNBTightEventTimeVetoFrac=nullptr; - TH1I_LW* h_MNBLooseFEB=nullptr; - TH1F_LW* h_MNBLooseEventFrac=nullptr; - TH1F_LW* h_MNBLooseEventTimeVetoFrac=nullptr; - TH1I_LW* h_CandidateMNBTightFEB=nullptr; - TH1I_LW* h_CandidateMNBLooseFEB=nullptr; - TH1F_LW* h_SaturatedTightFrac=nullptr; - TH1I_LW* h_NoisyEvent=nullptr; - TH1I_LW* h_NoisyEventTimeVeto=nullptr; - TH1I_LW* h_MNBTightEvent=nullptr; - TH1I_LW* h_MNBTightEventTimeVeto=nullptr; - TH1I_LW* h_MNBLooseEvent=nullptr; - TH1I_LW* h_MNBLooseEventTimeVeto=nullptr; - TH1I_LW* h_SaturatedTight=nullptr; - TH1I_LW* h_SaturatedTightTimeVeto=nullptr; - TH1F_LW* h_SaturatedTightTimeVetoFrac=nullptr; - TH1I_LW* h_LBN=nullptr; + TH1I_LW* m_h_NoisyFEB=nullptr; + TH1F_LW* m_h_NoisyEventFrac=nullptr; + TH1F_LW* m_h_NoisyEventTimeVetoFrac=nullptr; + TH1I_LW* m_h_MNBTightFEB=nullptr; + TH1F_LW* m_h_MNBTightEventFrac=nullptr; + TH1F_LW* m_h_MNBTightEventTimeVetoFrac=nullptr; + TH1I_LW* m_h_MNBLooseFEB=nullptr; + TH1F_LW* m_h_MNBLooseEventFrac=nullptr; + TH1F_LW* m_h_MNBLooseEventTimeVetoFrac=nullptr; + TH1I_LW* m_h_CandidateMNBTightFEB=nullptr; + TH1I_LW* m_h_CandidateMNBLooseFEB=nullptr; + TH1F_LW* m_h_SaturatedTightFrac=nullptr; + TH1I_LW* m_h_NoisyEvent=nullptr; + TH1I_LW* m_h_NoisyEventTimeVeto=nullptr; + TH1I_LW* m_h_MNBTightEvent=nullptr; + TH1I_LW* m_h_MNBTightEventTimeVeto=nullptr; + TH1I_LW* m_h_MNBLooseEvent=nullptr; + TH1I_LW* m_h_MNBLooseEventTimeVeto=nullptr; + TH1I_LW* m_h_SaturatedTight=nullptr; + TH1I_LW* m_h_SaturatedTightTimeVeto=nullptr; + TH1F_LW* m_h_SaturatedTightTimeVetoFrac=nullptr; + TH1I_LW* m_h_LBN=nullptr; void bookPartitionHistos(partitionHistos&, const std::string& name, MonGroup& group, MonGroup& groupfrac, MonGroup& groupfracbin); diff --git a/LArCalorimeter/LArMonTools/LArMonTools/LArRODMonTool.h b/LArCalorimeter/LArMonTools/LArMonTools/LArRODMonTool.h index 0d51d3267d4..8381565816d 100755 --- a/LArCalorimeter/LArMonTools/LArMonTools/LArRODMonTool.h +++ b/LArCalorimeter/LArMonTools/LArMonTools/LArRODMonTool.h @@ -273,7 +273,8 @@ private: int m_history_size; int m_history_granularity; int m_hsize; - bool *m_hdone; + //bool *m_hdone; + std::vector<bool> m_hdone; bool m_skipKnownProblematicChannels; bool m_skipNullPed; diff --git a/LArCalorimeter/LArMonTools/LArMonTools/LArRawChannelMonTool.h b/LArCalorimeter/LArMonTools/LArMonTools/LArRawChannelMonTool.h index 89854dbadfa..94c1d880b80 100755 --- a/LArCalorimeter/LArMonTools/LArMonTools/LArRawChannelMonTool.h +++ b/LArCalorimeter/LArMonTools/LArMonTools/LArRawChannelMonTool.h @@ -110,95 +110,95 @@ class LArRawChannelMonTool: public ManagedMonitorToolBase private: // --- Job Option Variables --- - bool _useElecNoiseOnly; - bool _monitor_occupancy; - bool _monitor_signal; - bool _monitor_positive_noise; - bool _monitor_negative_noise; - bool _monitor_time; - bool _monitor_quality; - bool _monitor_burst; - - bool _monitor_febs; - bool _monitor_feedthroughs; - bool _monitor_detectors; + bool m_useElecNoiseOnly; + bool m_monitor_occupancy; + bool m_monitor_signal; + bool m_monitor_positive_noise; + bool m_monitor_negative_noise; + bool m_monitor_time; + bool m_monitor_quality; + bool m_monitor_burst; + + bool m_monitor_febs; + bool m_monitor_feedthroughs; + bool m_monitor_detectors; // --- Naming Conventions --- - std::string _data_name_base; - std::string _LArRawChannel_container_key; + std::string m_data_name_base; + std::string m_LArRawChannel_container_key; // --- Monitoring Controls --- - std::vector<double> _occupancy_thresholds; - std::vector<double> _signal_thresholds; - std::vector<int> _pos_noise_thresholds; - std::vector<int> _neg_noise_thresholds; - double _bcid_signal_threshold; - short _time_threshold; - unsigned short _quality_threshold; - short _noise_threshold; - std::vector<double> _noise_burst_percent_thresholds; - std::vector<unsigned int> _noise_burst_nChannel_thresholds; - unsigned int _n_lumi_blocks; - std::vector<std::string> _noise_streams; + std::vector<double> m_occupancy_thresholds; + std::vector<double> m_signal_thresholds; + std::vector<int> m_pos_noise_thresholds; + std::vector<int> m_neg_noise_thresholds; + double m_bcid_signal_threshold; + short m_time_threshold; + unsigned short m_quality_threshold; + short m_noise_threshold; + std::vector<double> m_noise_burst_percent_thresholds; + std::vector<unsigned int> m_noise_burst_nChannel_thresholds; + unsigned int m_n_lumi_blocks; + std::vector<std::string> m_noise_streams; std::set<std::string> m_noise_streams_set; // --- tools --- - const LArOnlineID *_lar_online_id_ptr; //!< LAr online structure - const CaloDetDescrManager *_calo_description_mgr_ptr; - const CaloIdManager *_calo_id_mgr_ptr; //!< offline calo structure + const LArOnlineID *m_lar_online_id_ptr; //!< LAr online structure + const CaloDetDescrManager *m_calo_description_mgr_ptr; + const CaloIdManager *m_calo_id_mgr_ptr; //!< offline calo structure - ToolHandle<LArCablingService> _cabel_service_tool;//!< LAr connections - ToolHandle<ICaloNoiseTool> _calo_noise_tool; //!< Calorimeter noise - ToolHandle<ILArBadChannelMasker> _masking_tool; //!< LAr Masking + ToolHandle<LArCablingService> m_cabel_service_tool;//!< LAr connections + ToolHandle<ICaloNoiseTool> m_calo_noise_tool; //!< Calorimeter noise + ToolHandle<ILArBadChannelMasker> m_masking_tool; //!< LAr Masking // -- for ATLAS Ready Filter - bool isATLASReady() { return _atlas_ready; } + bool isATLASReady() { return m_atlas_ready; } void setIsATLASReady(); - ToolHandleArray<IDQFilterTool> _filterAtlasReady_tools; //!< DQ ATLAS Ready Filter Tool - bool _atlas_ready; + ToolHandleArray<IDQFilterTool> m_filterAtlasReady_tools; //!< DQ ATLAS Ready Filter Tool + bool m_atlas_ready; - LArOnlineIDStrHelper *_lar_online_id_str_helper_ptr; //!< naming convetions + LArOnlineIDStrHelper *m_lar_online_id_str_helper_ptr; //!< naming convetions //! Switches tool off if there is no data in _LArRawChannel_container_key - bool _has_lar_raw_channels; + bool m_has_lar_raw_channels; //! Use channels only if pedestal and adc2e value from DB and OFC was used - bool _db_and_ofc_only; + bool m_db_and_ofc_only; // --- Histograms --- //! pointers to per FEB histograms - std::map< LArMonTools::RawChHisto, std::vector<boost::shared_ptr<LArMonTools::IHistoProxyBase> > > _per_feb_hists; + std::map< LArMonTools::RawChHisto, std::vector<boost::shared_ptr<LArMonTools::IHistoProxyBase> > > m_per_feb_hists; //! pointers to per feedthrough 2D histograms - std::map< LArMonTools::RawChHisto, std::vector<boost::shared_ptr<LArMonTools::IHistoProxyBase> > > _per_feedthrough_hists; + std::map< LArMonTools::RawChHisto, std::vector<boost::shared_ptr<LArMonTools::IHistoProxyBase> > > m_per_feedthrough_hists; // per detector view std::map< LArMonTools::RawChHisto, std::map<LArMonTools::Detector,boost::shared_ptr<LArMonTools::IHistoProxyBase> > > - _per_detector_hists; + m_per_detector_hists; // global lar histograms // TProfile2D_LW* _global_lar_eta_phi_acc; // TProfile_LW* _global_bcid_occupancy; - std::map<LArMonTools::Detector,std::vector<TProfile2D_LW*> > _eta_phi_signal; - std::map<LArMonTools::Detector,std::vector<TH2F_LW*> > _eta_phi_noise; + std::map<LArMonTools::Detector,std::vector<TProfile2D_LW*> > m_eta_phi_signal; + std::map<LArMonTools::Detector,std::vector<TH2F_LW*> > m_eta_phi_noise; - std::map<LArMonTools::Detector,std::map< LArMonTools::Sampling, TH1I_LW* > > _phi_occupancy; - std::map<LArMonTools::Detector,std::map< LArMonTools::Sampling, TH1I_LW* > > _eta_occupancy; + std::map<LArMonTools::Detector,std::map< LArMonTools::Sampling, TH1I_LW* > > m_phi_occupancy; + std::map<LArMonTools::Detector,std::map< LArMonTools::Sampling, TH1I_LW* > > m_eta_occupancy; - std::vector<LArMonTools::Detector> _feb_hash_to_detector; - std::vector<IdentifierHash> _feb_hash_to_ft_hash; + std::vector<LArMonTools::Detector> m_feb_hash_to_detector; + std::vector<IdentifierHash> m_feb_hash_to_ft_hash; // std::map<LArMonTools::Detector,std::vector<int> > _superslot_to_sparse_bin_number; //! number of LArRawChannels connected in each detector - std::map<LArMonTools::Detector,unsigned int> _det_to_nchannels; + std::map<LArMonTools::Detector,unsigned int> m_det_to_nchannels; //! monitoring interval /*! Interval to book monitoring histograms with. Valid strings in job options are: "all", "fill", "run" , "minutes90", "minutes30", "minutes10", "lumiBlock", "eventsBlock", "file". Set though intervalStringToEnum. */ - Interval_t _interval; + Interval_t m_interval; //! monitoring level of detail @@ -208,13 +208,13 @@ class LArRawChannelMonTool: public ManagedMonitorToolBase Set though levelOfDetailStringToEnum */ - std::string _interval_str; //!< strings to set interval with job option + std::string m_interval_str; //!< strings to set interval with job option //! true if the event is in a stream specified by noise_stream job option - bool _is_noise_event; + bool m_is_noise_event; - std::map<LArMonTools::Detector,LArMonTools::SelectionContext> _selectionContext; - LArMonTools::QualitySelector _qualitySelector; + std::map<LArMonTools::Detector,LArMonTools::SelectionContext> m_selectionContext; + LArMonTools::QualitySelector m_qualitySelector; //! Calculates approximate time resolution of a channel /*! @@ -229,7 +229,7 @@ class LArRawChannelMonTool: public ManagedMonitorToolBase \f$b \approx 1\f$ns. @See LArMonTools::SelectionContext */ - LArMonTools::ResolutionCalculator _timeResolution; + LArMonTools::ResolutionCalculator m_timeResolution; // --- some tool specific helpers --- std::string threshold_histogram_title_snippet( const double& ); @@ -250,11 +250,11 @@ class LArRawChannelMonTool: public ManagedMonitorToolBase void fix_eta_phi_bins( const std::pair<LArMonTools::Detector,std::vector<TH2F_LW*> >& ); - LArMonTools::lar_axis_maker _phi_axes; //!< handle phi-axes - LArMonTools::lar_axis_maker _eta_axes; //!< handle eta-axes + LArMonTools::lar_axis_maker m_phi_axes; //!< handle phi-axes + LArMonTools::lar_axis_maker m_eta_axes; //!< handle eta-axes - unsigned int _event_counter; - unsigned int _noise_stream_event_counter; + unsigned int m_event_counter; + unsigned int m_noise_stream_event_counter; //! Lable histogram axis of 1440 bins with 24h clock //void label_gmt_axis( TAxis * ); diff --git a/LArCalorimeter/LArMonTools/LArMonTools/LArRawChannelMonTools.h b/LArCalorimeter/LArMonTools/LArMonTools/LArRawChannelMonTools.h index 8cc025f3c3a..47e94fc3281 100644 --- a/LArCalorimeter/LArMonTools/LArMonTools/LArRawChannelMonTools.h +++ b/LArCalorimeter/LArMonTools/LArMonTools/LArRawChannelMonTools.h @@ -134,8 +134,8 @@ namespace LArMonTools { void regions( const std::map<Detector, std::map<Sampling, std::deque<Region> > >& ); protected: - std::map<Detector, std::map<Sampling, std::deque<Region> > > _regions; //!< regions - std::map<Detector, std::map<Sampling, std::vector<double> > > _bins; + std::map<Detector, std::map<Sampling, std::deque<Region> > > m_regions; //!< regions + std::map<Detector, std::map<Sampling, std::vector<double> > > m_bins; //! takes edges and bin sizes and creates bin vector. void generate(); @@ -176,22 +176,22 @@ namespace LArMonTools { class HistoProxy : public IHistoProxyBase { private: - HISTOGRAM * _h_ptr; + HISTOGRAM * m_h_ptr; public: HistoProxy( ) - : _h_ptr( 0 ) {} + : m_h_ptr( 0 ) {} HistoProxy( HISTOGRAM * h_ptr ) - : _h_ptr( h_ptr ) {} + : m_h_ptr( h_ptr ) {} - virtual void Fill( double x ) { _h_ptr->Fill( x ); } - virtual void Fill( double x, double y ) { _h_ptr->Fill( x, y ); } - virtual void Fill( double x, double y, double z ) { _h_ptr->Fill( x, y, z ); } - virtual void Fill( double x, double y, double z, double w ) { _h_ptr->Fill( x, y, z, w ); } + virtual void Fill( double x ) { m_h_ptr->Fill( x ); } + virtual void Fill( double x, double y ) { m_h_ptr->Fill( x, y ); } + virtual void Fill( double x, double y, double z ) { m_h_ptr->Fill( x, y, z ); } + virtual void Fill( double x, double y, double z, double w ) { m_h_ptr->Fill( x, y, z, w ); } - virtual void Scale( double s = 1. ) { _h_ptr->Scale( s ); } - virtual void Reset( ){ _h_ptr->Reset( ); } + virtual void Scale( double s = 1. ) { m_h_ptr->Scale( s ); } + virtual void Reset( ){ m_h_ptr->Reset( ); } }; @@ -199,55 +199,55 @@ namespace LArMonTools { //The LWHistoProxy implementations: class LWHistoProxy1D : public IHistoProxyBase { private: - LWHist1D * _h_ptr; + LWHist1D * m_h_ptr; public: - LWHistoProxy1D( ) : _h_ptr( 0 ) {} - LWHistoProxy1D( LWHist1D * h_ptr ) : _h_ptr( h_ptr ) {} - virtual void Fill( double x ) { _h_ptr->Fill( x );} - virtual void Fill( double x, double y ) { _h_ptr->Fill( x, y ); } + LWHistoProxy1D( ) : m_h_ptr( 0 ) {} + LWHistoProxy1D( LWHist1D * h_ptr ) : m_h_ptr( h_ptr ) {} + virtual void Fill( double x ) { m_h_ptr->Fill( x );} + virtual void Fill( double x, double y ) { m_h_ptr->Fill( x, y ); } virtual void Fill( double, double, double) {} virtual void Fill( double, double, double, double ) {} - virtual void Scale( double s = 1. ) { _h_ptr->scaleContentsAndErrors( s ); } - virtual void Reset(){ _h_ptr->Reset(); } + virtual void Scale( double s = 1. ) { m_h_ptr->scaleContentsAndErrors( s ); } + virtual void Reset(){ m_h_ptr->Reset(); } }; class LWHistoProxy2D : public IHistoProxyBase { private: - LWHist2D * _h_ptr; + LWHist2D * m_h_ptr; public: - LWHistoProxy2D( ) : _h_ptr( 0 ) {} - LWHistoProxy2D( LWHist2D * h_ptr ) : _h_ptr( h_ptr ) {} + LWHistoProxy2D( ) : m_h_ptr( 0 ) {} + LWHistoProxy2D( LWHist2D * h_ptr ) : m_h_ptr( h_ptr ) {} virtual void Fill( double ) {} - virtual void Fill( double x, double y ) { _h_ptr->Fill( x, y ); } - virtual void Fill( double x, double y, double z ) { _h_ptr->Fill( x, y, z ); } + virtual void Fill( double x, double y ) { m_h_ptr->Fill( x, y ); } + virtual void Fill( double x, double y, double z ) { m_h_ptr->Fill( x, y, z ); } virtual void Fill( double, double, double, double ) { } - virtual void Scale( double s = 1.) { _h_ptr->scaleContentsAndErrors( s ); } - virtual void Reset(){ _h_ptr->Reset(); } + virtual void Scale( double s = 1.) { m_h_ptr->scaleContentsAndErrors( s ); } + virtual void Reset(){ m_h_ptr->Reset(); } }; class LWHistoProxyProfile : public IHistoProxyBase { private: - TProfile_LW * _h_ptr; + TProfile_LW * m_h_ptr; public: - LWHistoProxyProfile( ) : _h_ptr( 0 ) {} - LWHistoProxyProfile( TProfile_LW* h_ptr ) : _h_ptr( h_ptr ) {} + LWHistoProxyProfile( ) : m_h_ptr( 0 ) {} + LWHistoProxyProfile( TProfile_LW* h_ptr ) : m_h_ptr( h_ptr ) {} virtual void Fill( double ) {} - virtual void Fill( double x, double y ) { _h_ptr->Fill( x, y ); } - virtual void Fill( double x, double y, double z ) { _h_ptr->Fill( x, y, z ); } + virtual void Fill( double x, double y ) { m_h_ptr->Fill( x, y ); } + virtual void Fill( double x, double y, double z ) { m_h_ptr->Fill( x, y, z ); } virtual void Fill( double, double, double, double ) { } virtual void Scale( double) { } - virtual void Reset(){ _h_ptr->Reset(); } + virtual void Reset(){ m_h_ptr->Reset(); } }; class LWHistoProxyProfile2D : public IHistoProxyBase { private: - TProfile2D_LW * _h_ptr; + TProfile2D_LW * m_h_ptr; public: - LWHistoProxyProfile2D( ) : _h_ptr( 0 ) {} - LWHistoProxyProfile2D( TProfile2D_LW* h_ptr ) : _h_ptr( h_ptr ) {} + LWHistoProxyProfile2D( ) : m_h_ptr( 0 ) {} + LWHistoProxyProfile2D( TProfile2D_LW* h_ptr ) : m_h_ptr( h_ptr ) {} virtual void Fill( double ) {} virtual void Fill( double, double ) { } - virtual void Fill( double x, double y, double z ) { _h_ptr->Fill( x, y, z ); } - virtual void Fill( double x, double y, double z, double w ) { _h_ptr->Fill( x, y,z,w ); } + virtual void Fill( double x, double y, double z ) { m_h_ptr->Fill( x, y, z ); } + virtual void Fill( double x, double y, double z, double w ) { m_h_ptr->Fill( x, y,z,w ); } virtual void Scale( double) { } - virtual void Reset(){ _h_ptr->Reset(); } + virtual void Reset(){ m_h_ptr->Reset(); } }; class SelectionContext{ @@ -261,7 +261,7 @@ namespace LArMonTools { // Getters: int positive_noise() const; int negative_noise() const; - inline double quality() const { return _quality; } + inline double quality() const { return m_quality; } double energy() const; @@ -274,11 +274,11 @@ namespace LArMonTools { void energy( const double& ); private: - int _positive_noise; - int _negative_noise; + int m_positive_noise; + int m_negative_noise; - double _quality; - double _energy; + double m_quality; + double m_energy; }; @@ -295,9 +295,9 @@ namespace LArMonTools { @See SelectionContext */ inline bool Select( const LArRawChannel& a ) { - return _pSelectionContext && + return m_pSelectionContext && a.energy() > 0.1 * CLHEP::MeV && - a.quality() > _pSelectionContext->quality(); + a.quality() > m_pSelectionContext->quality(); } @@ -315,7 +315,7 @@ namespace LArMonTools { private: //! Context holds information to select channels. Must be set properly for each channel - const SelectionContext * _pSelectionContext; + const SelectionContext * m_pSelectionContext; }; @@ -332,9 +332,9 @@ namespace LArMonTools { void result( const double & ); private: - double _moment0; - double _moment1; - double _mean; + double m_moment0; + double m_moment1; + double m_mean; }; @@ -349,8 +349,8 @@ namespace LArMonTools { private: - double _a; - double _b; + double m_a; + double m_b; }; diff --git a/LArCalorimeter/LArMonTools/src/LArCollisionTimeMonTool.cxx b/LArCalorimeter/LArMonTools/src/LArCollisionTimeMonTool.cxx index 5d9d95bb9ec..2406b3bf877 100755 --- a/LArCalorimeter/LArMonTools/src/LArCollisionTimeMonTool.cxx +++ b/LArCalorimeter/LArMonTools/src/LArCollisionTimeMonTool.cxx @@ -49,7 +49,7 @@ LArCollisionTimeMonTool::LArCollisionTimeMonTool(const std::string& type, m_timeCut(5.0), m_minCells(2), m_eWeighted(true), - newrun(true), + m_newrun(true), //m_bunchGroupTool("BunchGroupTool"), m_bunchGroupTool("BunchCrossingTool"), m_bcid_init(false) @@ -66,19 +66,23 @@ LArCollisionTimeMonTool::LArCollisionTimeMonTool(const std::string& type, m_eventsCounter = 0; - m_LArCollTime_h = NULL; - m_LArCollTime_lb_h = NULL; - m_LArCollTime_lb_timeCut_h = NULL; - m_LArCollTime_lb_singlebeam_timeCut_h = NULL; - m_LArCollTime_vs_LB_h = NULL; - m_LArCollTime_vs_BCID_h = NULL; - m_LArCollAvgTime_h = NULL; - m_LArCollAvgTime_vs_LB_h = NULL; + m_LArCollTime_h = nullptr; + m_LArCollTime_lb_h = nullptr; + m_LArCollTime_lb_timeCut_h = nullptr; + m_LArCollTime_lb_singlebeam_timeCut_h = nullptr; + m_LArCollTime_vs_LB_h = nullptr; + m_LArCollTime_vs_BCID_h = nullptr; + m_LArCollAvgTime_h = nullptr; + m_LArCollAvgTime_vs_LB_h = nullptr; + m_LArCollAvgTime_vs_BCID_h = nullptr; + + m_nhist=1; } /*---------------------------------------------------------*/ LArCollisionTimeMonTool::~LArCollisionTimeMonTool() { + cleanup(); } /*---------------------------------------------------------*/ @@ -95,6 +99,8 @@ LArCollisionTimeMonTool::initialize() { StatusCode LArCollisionTimeMonTool::bookHistograms() { + cleanup(); //to be sure... + if(m_IsOnline) m_nhist=2; else m_nhist=1; // So far 2 histos, all bcid and inside the train m_LArCollTime_h=new TH1F_LW*[m_nhist]; @@ -115,7 +121,7 @@ LArCollisionTimeMonTool::bookHistograms() { MonGroup generalGroupShift( this, "/LAr/"+m_histPath+"/", run, ATTRIB_MANAGED); MonGroup generalGroupLB( this, "/LAr/"+m_histPath+"/", run, ATTRIB_X_VS_LB, "", "merge"); //if(isNewRun ){ // Commented by B.Trocme to comply with new ManagedMonitorToolBase - newrun=true; + m_newrun=true; // // Create top folder for histos // @@ -299,3 +305,28 @@ StatusCode LArCollisionTimeMonTool::procHistograms() msg(MSG::DEBUG) << "End of procHistograms " << endmsg; return StatusCode::SUCCESS; } + + +void LArCollisionTimeMonTool::cleanup() { + //Delete the array of pointers to histograms + //The histograms themselves should be owned by THistSvc at this point + delete[] m_LArCollTime_h; + m_LArCollTime_h=nullptr; + delete[] m_LArCollTime_lb_h; + m_LArCollTime_lb_h=nullptr; + delete[] m_LArCollTime_lb_timeCut_h; + m_LArCollTime_lb_timeCut_h=nullptr; + delete[] m_LArCollTime_lb_singlebeam_timeCut_h; + m_LArCollTime_lb_singlebeam_timeCut_h=nullptr; + delete[] m_LArCollTime_vs_LB_h; + m_LArCollTime_vs_LB_h=nullptr; + delete[] m_LArCollTime_vs_BCID_h; + m_LArCollTime_vs_BCID_h=nullptr; + delete[] m_LArCollAvgTime_h; + m_LArCollAvgTime_h=nullptr; + delete[] m_LArCollAvgTime_vs_LB_h; + m_LArCollAvgTime_vs_LB_h=nullptr; + delete[] m_LArCollAvgTime_vs_BCID_h; + m_LArCollAvgTime_vs_BCID_h=nullptr; +} + diff --git a/LArCalorimeter/LArMonTools/src/LArCosmicsMonTool.cxx b/LArCalorimeter/LArMonTools/src/LArCosmicsMonTool.cxx index def92dd304d..aee3be14e8f 100755 --- a/LArCalorimeter/LArMonTools/src/LArCosmicsMonTool.cxx +++ b/LArCalorimeter/LArMonTools/src/LArCosmicsMonTool.cxx @@ -254,8 +254,6 @@ LArCosmicsMonTool::fillHistograms() { // Increment event counter m_eventsCounter++; - // to fix HEC phi range - static CaloPhiRange m_phiHelper; @@ -302,7 +300,7 @@ LArCosmicsMonTool::fillHistograms() { } // Fix phi range in HEC - if (m_LArOnlineIDHelper->isHECchannel(id)) phi = m_phiHelper.fix(phi); + if (m_LArOnlineIDHelper->isHECchannel(id)) phi = CaloPhiRange::fix(phi); // Retrieve pedestals CaloGain::CaloGain gain = pLArDigit->gain(); @@ -449,13 +447,13 @@ StatusCode LArCosmicsMonTool::initMonInfo() StatusCode LArCosmicsMonTool::returnEtaPhiCoord(Identifier offlineID,float& eta,float& phi) { // Get Calo detector description element to retrieve true eta/phi - const CaloDetDescrElement* m_CaloDetElement = m_CaloDetDescrMgr->get_element(offlineID); + const CaloDetDescrElement* caloDetElement = m_CaloDetDescrMgr->get_element(offlineID); - if(m_CaloDetElement == 0 ){ + if(caloDetElement == 0 ){ return StatusCode::FAILURE; }else{ - eta = m_CaloDetElement->eta_raw(); - phi = m_CaloDetElement->phi_raw(); + eta = caloDetElement->eta_raw(); + phi = caloDetElement->phi_raw(); return StatusCode::SUCCESS; } } diff --git a/LArCalorimeter/LArMonTools/src/LArCoverage.cxx b/LArCalorimeter/LArMonTools/src/LArCoverage.cxx index 8a5dad1f444..9b3909996d7 100755 --- a/LArCalorimeter/LArMonTools/src/LArCoverage.cxx +++ b/LArCalorimeter/LArMonTools/src/LArCoverage.cxx @@ -603,7 +603,6 @@ LArCoverage::fillHistograms() { if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "in fillHists()" << endmsg; - static CaloPhiRange m_phiHelper; m_eventsCounter++; if(m_eventsCounter > m_nevents ) return StatusCode::SUCCESS; @@ -638,20 +637,20 @@ LArCoverage::fillHistograms() // Get Physical Coordinates float etaChan = 0; float phiChan = 0.; - const CaloDetDescrElement* m_CaloDetElement = m_CaloDetDescrMgr->get_element(offlineID); - if(m_CaloDetElement == 0 ){ + const CaloDetDescrElement* caloDetElement = m_CaloDetDescrMgr->get_element(offlineID); + if(caloDetElement == 0 ){ msg(MSG::ERROR) << "Cannot retrieve (eta,phi) coordinates for raw channels" << endmsg; continue; }else{ - etaChan = m_CaloDetElement->eta_raw(); - phiChan = m_CaloDetElement->phi_raw(); + etaChan = caloDetElement->eta_raw(); + phiChan = caloDetElement->phi_raw(); } // Fix phi range in HEC - if (m_LArOnlineIDHelper->isHECchannel(id)) phiChan = m_phiHelper.fix(phiChan); + if (m_LArOnlineIDHelper->isHECchannel(id)) phiChan = CaloPhiRange::fix(phiChan); // Retrieve expected noise - float noise = m_caloNoiseTool->getNoise(m_CaloDetElement,ICalorimeterNoiseTool::ELECTRONICNOISE); + float noise = m_caloNoiseTool->getNoise(caloDetElement,ICalorimeterNoiseTool::ELECTRONICNOISE); if(m_eventsCounter == 1){ @@ -872,7 +871,7 @@ void LArCoverage::SetBadChannelZaxisLabels(TH2I_LW* h){ h->SetMaximum(10.); } /*---------------------------------------------------------*/ -void LArCoverage::FillKnownMissingFEBs(const CaloDetDescrManager* m_CaloDetDescrMgr){ +void LArCoverage::FillKnownMissingFEBs(const CaloDetDescrManager* caloDetDescrMgr){ // Loop over all FEBs for (std::vector<HWIdentifier>::const_iterator allFeb = m_LArOnlineIDHelper->feb_begin(); @@ -910,13 +909,13 @@ void LArCoverage::FillKnownMissingFEBs(const CaloDetDescrManager* m_CaloDetDescr Identifier offid = m_larCablingService->cnvToIdentifier(chid); int sampling = m_LArEM_IDHelper->sampling(offid); float eta, phi; - const CaloDetDescrElement* m_CaloDetElement = m_CaloDetDescrMgr->get_element(offid); - if(m_CaloDetElement == 0 ){ + const CaloDetDescrElement* caloDetElement = caloDetDescrMgr->get_element(offid); + if(caloDetElement == 0 ){ msg(MSG::ERROR) << "Cannot retrieve (eta,phi) coordinates for raw channels" << endmsg; continue; }else{ - eta = m_CaloDetElement->eta_raw(); - phi = m_CaloDetElement->phi_raw(); + eta = caloDetElement->eta_raw(); + phi = caloDetElement->phi_raw(); } int ix = m_hCoverageEMBA[sampling]->GetXaxis()->FindBin(eta); int iy = m_hCoverageEMBA[sampling]->GetYaxis()->FindBin(phi); @@ -942,13 +941,13 @@ void LArCoverage::FillKnownMissingFEBs(const CaloDetDescrManager* m_CaloDetDescr Identifier offid = m_larCablingService->cnvToIdentifier(chid); int sampling = m_LArEM_IDHelper->sampling(offid); float eta, phi; - const CaloDetDescrElement* m_CaloDetElement = m_CaloDetDescrMgr->get_element(offid); - if(m_CaloDetElement == 0 ){ + const CaloDetDescrElement* caloDetElement = caloDetDescrMgr->get_element(offid); + if(caloDetElement == 0 ){ msg(MSG::ERROR) << "Cannot retrieve (eta,phi) coordinates for raw channels" << endmsg; continue; }else{ - eta = m_CaloDetElement->eta_raw(); - phi = m_CaloDetElement->phi_raw(); + eta = caloDetElement->eta_raw(); + phi = caloDetElement->phi_raw(); } int ix = m_hCoverageEMBC[sampling]->GetXaxis()->FindBin(eta); int iy = m_hCoverageEMBC[sampling]->GetYaxis()->FindBin(phi); @@ -979,13 +978,13 @@ void LArCoverage::FillKnownMissingFEBs(const CaloDetDescrManager* m_CaloDetDescr Identifier offid = m_larCablingService->cnvToIdentifier(chid); int sampling = m_LArEM_IDHelper->sampling(offid); float eta, phi; - const CaloDetDescrElement* m_CaloDetElement = m_CaloDetDescrMgr->get_element(offid); - if(m_CaloDetElement == 0 ){ + const CaloDetDescrElement* caloDetElement = caloDetDescrMgr->get_element(offid); + if(caloDetElement == 0 ){ msg(MSG::ERROR) << "Cannot retrieve (eta,phi) coordinates for raw channels" << endmsg; continue; }else{ - eta = m_CaloDetElement->eta_raw(); - phi = m_CaloDetElement->phi_raw(); + eta = caloDetElement->eta_raw(); + phi = caloDetElement->phi_raw(); } int ix = m_hCoverageEMECA[sampling]->GetXaxis()->FindBin(eta); int iy = m_hCoverageEMECA[sampling]->GetYaxis()->FindBin(phi); @@ -1011,13 +1010,13 @@ void LArCoverage::FillKnownMissingFEBs(const CaloDetDescrManager* m_CaloDetDescr Identifier offid = m_larCablingService->cnvToIdentifier(chid); int sampling = m_LArHEC_IDHelper->sampling(offid); float eta, phi; - const CaloDetDescrElement* m_CaloDetElement = m_CaloDetDescrMgr->get_element(offid); - if(m_CaloDetElement == 0 ){ + const CaloDetDescrElement* caloDetElement = caloDetDescrMgr->get_element(offid); + if(caloDetElement == 0 ){ msg(MSG::ERROR) << "Cannot retrieve (eta,phi) coordinates for raw channels" << endmsg; continue; }else{ - eta = m_CaloDetElement->eta_raw(); - phi = m_CaloDetElement->phi_raw(); + eta = caloDetElement->eta_raw(); + phi = caloDetElement->phi_raw(); } int ix = m_hCoverageHECA[sampling]->GetXaxis()->FindBin(eta); int iy = m_hCoverageHECA[sampling]->GetYaxis()->FindBin(phi); @@ -1077,13 +1076,13 @@ void LArCoverage::FillKnownMissingFEBs(const CaloDetDescrManager* m_CaloDetDescr Identifier offid = m_larCablingService->cnvToIdentifier(chid); int sampling = m_LArEM_IDHelper->sampling(offid); float eta, phi; - const CaloDetDescrElement* m_CaloDetElement = m_CaloDetDescrMgr->get_element(offid); - if(m_CaloDetElement == 0 ){ + const CaloDetDescrElement* caloDetElement = caloDetDescrMgr->get_element(offid); + if(caloDetElement == 0 ){ msg(MSG::ERROR) << "Cannot retrieve (eta,phi) coordinates for raw channels" << endmsg; continue; }else{ - eta = m_CaloDetElement->eta_raw(); - phi = m_CaloDetElement->phi_raw(); + eta = caloDetElement->eta_raw(); + phi = caloDetElement->phi_raw(); } int ix = m_hCoverageEMECC[sampling]->GetXaxis()->FindBin(eta); int iy = m_hCoverageEMECC[sampling]->GetYaxis()->FindBin(phi); @@ -1109,13 +1108,13 @@ void LArCoverage::FillKnownMissingFEBs(const CaloDetDescrManager* m_CaloDetDescr Identifier offid = m_larCablingService->cnvToIdentifier(chid); int sampling = m_LArHEC_IDHelper->sampling(offid); float eta, phi; - const CaloDetDescrElement* m_CaloDetElement = m_CaloDetDescrMgr->get_element(offid); - if(m_CaloDetElement == 0 ){ + const CaloDetDescrElement* caloDetElement = caloDetDescrMgr->get_element(offid); + if(caloDetElement == 0 ){ msg(MSG::ERROR) << "Cannot retrieve (eta,phi) coordinates for raw channels" << endmsg; continue; }else{ - eta = m_CaloDetElement->eta_raw(); - phi = m_CaloDetElement->phi_raw(); + eta = caloDetElement->eta_raw(); + phi = caloDetElement->phi_raw(); } int ix = m_hCoverageHECC[sampling]->GetXaxis()->FindBin(eta); int iy = m_hCoverageHECC[sampling]->GetYaxis()->FindBin(phi); diff --git a/LArCalorimeter/LArMonTools/src/LArCoverageFCALBins.cxx b/LArCalorimeter/LArMonTools/src/LArCoverageFCALBins.cxx index 6c2f1f0de8a..7174c24bec2 100644 --- a/LArCalorimeter/LArMonTools/src/LArCoverageFCALBins.cxx +++ b/LArCalorimeter/LArMonTools/src/LArCoverageFCALBins.cxx @@ -42,7 +42,7 @@ const unsigned short * LArCoverageFCALBins::getBins(int /*iSide*/, int iSamp, in static const unsigned short dummy[] = {0}; - static const unsigned short m_FCal_Bins_AC1[16*63][77] = { + static const unsigned short FCal_Bins_AC1[16*63][77] = { {21773,21288,21289,21530,21531,21772,21773,22014,22015,0} ,{17421,17178,17179,17420,17421,17422,17662,17663,0} ,{18389,17904,17905,18146,18147,18388,18389,18630,18631,0} @@ -1053,7 +1053,7 @@ const unsigned short * LArCoverageFCALBins::getBins(int /*iSide*/, int iSamp, in ,{16599,16598,16599,16600,16601,16840,16841,16842,16843,0} }; - static const unsigned short m_FCal_Bins_AC2[16*32][77] = { + static const unsigned short FCal_Bins_AC2[16*32][77] = { {15692,15473,15474,15475,15476,15691,15692,15693,15694,15909,15910,15911,15912,0} ,{15038,14819,14820,14821,14822,15037,15038,15039,15040,15255,15256,15257,15258,0} ,{14384,14165,14166,14167,14168,14383,14384,14385,14386,14601,14602,14603,14604,0} @@ -1566,7 +1566,7 @@ const unsigned short * LArCoverageFCALBins::getBins(int /*iSide*/, int iSamp, in ,{13647,13427,13428,13429,13430,13645,13646,13647,13648,13863,13864,13865,13866,0} }; - static const unsigned short m_FCal_Bins_AC3[16*16][77] = { + static const unsigned short FCal_Bins_AC3[16*16][77] = { {12319,11914,11915,12116,12117,12118,12318,12319,12520,12521,12522,12722,12723,12924,12925,0} ,{14937,14326,14327,14328,14329,14330,14331,14332,14333,14334,14335,14528,14529,14530,14531,14532,14533,14534,14535,14536,14537,14730,14731,14732,14733,14734,14735,14736,14737,14738,14739,14932,14933,14934,14935,14936,14937,14938,14939,14940,14941,14942,14943,15134,15135,15136,15137,15138,15139,15140,15141,15142,15143,15336,15337,15338,15339,15340,15341,15342,15343,15344,15345,15538,15539,15540,15541,15542,15543,15744,15745,15946,15947,0} ,{13524,13114,13115,13116,13117,13118,13119,13120,13121,13122,13123,13124,13125,13126,13127,13316,13317,13318,13319,13320,13321,13322,13323,13324,13325,13326,13327,13328,13329,13518,13519,13520,13521,13522,13523,13524,13525,13526,13527,13528,13529,13720,13721,13722,13723,13724,13725,13726,13727,13728,13729,13730,13731,13922,13923,13924,13925,13926,13927,13928,13929,13930,13931,14124,14125,14126,14127,14128,14129,14130,14131,14132,14133,0} @@ -1827,13 +1827,13 @@ const unsigned short * LArCoverageFCALBins::getBins(int /*iSide*/, int iSamp, in switch (iSamp) { case 1: - return m_FCal_Bins_AC1[63*iPhi+iEta]; + return FCal_Bins_AC1[63*iPhi+iEta]; break; case 2: - return m_FCal_Bins_AC2[32*iPhi+iEta]; + return FCal_Bins_AC2[32*iPhi+iEta]; break; case 3: - return m_FCal_Bins_AC3[16*iPhi+iEta]; + return FCal_Bins_AC3[16*iPhi+iEta]; break; default: return dummy; diff --git a/LArCalorimeter/LArMonTools/src/LArDigitMon.cxx b/LArCalorimeter/LArMonTools/src/LArDigitMon.cxx index 3947c2df91d..0af61548d23 100755 --- a/LArCalorimeter/LArMonTools/src/LArDigitMon.cxx +++ b/LArCalorimeter/LArMonTools/src/LArDigitMon.cxx @@ -127,14 +127,14 @@ StatusCode LArDigitMon::finalize() { msg(MSG::INFO)<<"Finalize LArDigitMon" << endmsg; - DeleteHist(BarrelA); - DeleteHist(BarrelC); - DeleteHist(EmecA); - DeleteHist(EmecC); - DeleteHist(HecA); - DeleteHist(HecC); - DeleteHist(FcalA); - DeleteHist(FcalC); + DeleteHist(m_BarrelA); + DeleteHist(m_BarrelC); + DeleteHist(m_EmecA); + DeleteHist(m_EmecC); + DeleteHist(m_HecA); + DeleteHist(m_HecC); + DeleteHist(m_FcalA); + DeleteHist(m_FcalC); return StatusCode::SUCCESS; @@ -221,32 +221,32 @@ LArDigitMon::bookHistograms() MonGroup GroupBarrelExpert( this, "/LAr/Digits/Barrel", run, ATTRIB_MANAGED ); MonGroup GroupBarrelExpertEff( this, "/LAr/Digits/Barrel", run, ATTRIB_MANAGED ,"","weightedEff"); - LArDigitMon::BookPartitions(BarrelA,"BarrelA",GroupBarrelShift,GroupBarrelExpert,GroupBarrelExpertEff); - LArDigitMon::BookPartitions(BarrelC,"BarrelC",GroupBarrelShift,GroupBarrelExpert,GroupBarrelExpertEff); + LArDigitMon::BookPartitions(m_BarrelA,"BarrelA",GroupBarrelShift,GroupBarrelExpert,GroupBarrelExpertEff); + LArDigitMon::BookPartitions(m_BarrelC,"BarrelC",GroupBarrelShift,GroupBarrelExpert,GroupBarrelExpertEff); /**Book Histogram of EMEC*/ MonGroup GroupEMECShift( this, "/LAr/Digits/EMEC", run, ATTRIB_MANAGED ); MonGroup GroupEMECExpert( this, "/LAr/Digits/EMEC", run, ATTRIB_MANAGED ); MonGroup GroupEMECExpertEff( this, "/LAr/Digits/EMEC", run, ATTRIB_MANAGED,"","weightedEff"); - LArDigitMon::BookPartitions(EmecA,"EmecA",GroupEMECShift,GroupEMECExpert,GroupEMECExpertEff); - LArDigitMon::BookPartitions(EmecC,"EmecC",GroupEMECShift,GroupEMECExpert,GroupEMECExpertEff); + LArDigitMon::BookPartitions(m_EmecA,"EmecA",GroupEMECShift,GroupEMECExpert,GroupEMECExpertEff); + LArDigitMon::BookPartitions(m_EmecC,"EmecC",GroupEMECShift,GroupEMECExpert,GroupEMECExpertEff); /**Book Histogram of HEC*/ MonGroup GroupHECShift( this, "/LAr/Digits/HEC", run, ATTRIB_MANAGED ); MonGroup GroupHECExpert( this, "/LAr/Digits/HEC", run, ATTRIB_MANAGED ); MonGroup GroupHECExpertEff( this, "/LAr/Digits/HEC", run, ATTRIB_MANAGED,"","weightedEff"); - LArDigitMon::BookPartitions(HecA,"HecA",GroupHECShift,GroupHECExpert,GroupHECExpertEff); - LArDigitMon::BookPartitions(HecC,"HecC",GroupHECShift,GroupHECExpert,GroupHECExpertEff); + LArDigitMon::BookPartitions(m_HecA,"HecA",GroupHECShift,GroupHECExpert,GroupHECExpertEff); + LArDigitMon::BookPartitions(m_HecC,"HecC",GroupHECShift,GroupHECExpert,GroupHECExpertEff); /**Book Histogram of FCAL.*/ MonGroup GroupFCALShift( this, "/LAr/Digits/FCAL", run, ATTRIB_MANAGED ); MonGroup GroupFCALExpert( this, "/LAr/Digits/FCAL", run, ATTRIB_MANAGED ); MonGroup GroupFCALExpertEff( this, "/LAr/Digits/FCAL", run, ATTRIB_MANAGED,"","weightedEff"); - LArDigitMon::BookPartitions(FcalA,"FcalA",GroupFCALShift,GroupFCALExpert,GroupFCALExpertEff); - LArDigitMon::BookPartitions(FcalC,"FcalC",GroupFCALShift,GroupFCALExpert,GroupFCALExpertEff); + LArDigitMon::BookPartitions(m_FcalA,"FcalA",GroupFCALShift,GroupFCALExpert,GroupFCALExpertEff); + LArDigitMon::BookPartitions(m_FcalC,"FcalC",GroupFCALShift,GroupFCALExpert,GroupFCALExpertEff); /**Book summary histo*/ @@ -426,14 +426,14 @@ LArDigitMon::fillHistograms() /** Now set histos titles, in order that it contains the range*/ LArDigitMon::HistTitleSum(m_summary); - LArDigitMon::OutHistTitle(BarrelA); - LArDigitMon::OutHistTitle(BarrelC); - LArDigitMon::OutHistTitle(EmecA); - LArDigitMon::OutHistTitle(EmecC); - LArDigitMon::OutHistTitle(HecA); - LArDigitMon::OutHistTitle(HecC); - LArDigitMon::OutHistTitle(FcalA); - LArDigitMon::OutHistTitle(FcalC); + LArDigitMon::OutHistTitle(m_BarrelA); + LArDigitMon::OutHistTitle(m_BarrelC); + LArDigitMon::OutHistTitle(m_EmecA); + LArDigitMon::OutHistTitle(m_EmecC); + LArDigitMon::OutHistTitle(m_HecA); + LArDigitMon::OutHistTitle(m_HecC); + LArDigitMon::OutHistTitle(m_FcalA); + LArDigitMon::OutHistTitle(m_FcalC); }//Range and sample max are known now.... @@ -512,14 +512,14 @@ LArDigitMon::fillHistograms() }/** End of loop on LArDigit*/ // Loop on all partition histograms to renormalise by the number of channels - ScalePartition(BarrelA); - ScalePartition(BarrelC); - ScalePartition(EmecA); - ScalePartition(EmecC); - ScalePartition(HecA); - ScalePartition(HecC); - ScalePartition(FcalA); - ScalePartition(FcalC); + ScalePartition(m_BarrelA); + ScalePartition(m_BarrelC); + ScalePartition(m_EmecA); + ScalePartition(m_EmecC); + ScalePartition(m_HecA); + ScalePartition(m_HecC); + ScalePartition(m_FcalA); + ScalePartition(m_FcalC); return StatusCode::SUCCESS; } @@ -531,24 +531,24 @@ StatusCode LArDigitMon::procHistograms() if(endOfRunFlag() || endOfEventsBlockFlag() ) { - FillSumary(BarrelA); - FillSumary(BarrelC); - FillSumary(EmecA); - FillSumary(EmecC); - FillSumary(HecA); - FillSumary(HecC); - FillSumary(FcalA); - FillSumary(FcalC); + FillSumary(m_BarrelA); + FillSumary(m_BarrelC); + FillSumary(m_EmecA); + FillSumary(m_EmecC); + FillSumary(m_HecA); + FillSumary(m_HecC); + FillSumary(m_FcalA); + FillSumary(m_FcalC); /** Properly Delete the LW hists*/ if(endOfRunFlag()){ - EndOfRun(BarrelA); - EndOfRun(BarrelC); - EndOfRun(EmecA); - EndOfRun(EmecC); - EndOfRun(HecA); - EndOfRun(HecC); - EndOfRun(FcalA); - EndOfRun(FcalC); + EndOfRun(m_BarrelA); + EndOfRun(m_BarrelC); + EndOfRun(m_EmecA); + EndOfRun(m_EmecC); + EndOfRun(m_HecA); + EndOfRun(m_HecC); + EndOfRun(m_FcalA); + EndOfRun(m_FcalC); } return StatusCode::SUCCESS; @@ -822,29 +822,29 @@ LArDigitMon::partition& LArDigitMon::WhatPartition(HWIdentifier id) /** return EM Barrel*/ if (m_LArOnlineIDHelper->isEmBarrelOnline(id)) { - if((m_LArOnlineIDHelper->pos_neg(m_feedthroughID))==0) return BarrelC; - else return BarrelA; + if((m_LArOnlineIDHelper->pos_neg(m_feedthroughID))==0) return m_BarrelC; + else return m_BarrelA; } /** return EM Endcap*/ else if (m_LArOnlineIDHelper-> isEMECchannel(id)) { - if((m_LArOnlineIDHelper->pos_neg(m_feedthroughID))==0) return EmecC; - else return EmecA; + if((m_LArOnlineIDHelper->pos_neg(m_feedthroughID))==0) return m_EmecC; + else return m_EmecA; } /** return HEC*/ else if (m_LArOnlineIDHelper->isHECchannel(id)) { - if((m_LArOnlineIDHelper->pos_neg(m_feedthroughID))==0) return HecC; - else return HecA; + if((m_LArOnlineIDHelper->pos_neg(m_feedthroughID))==0) return m_HecC; + else return m_HecA; } /** return FCAL*/ else { - if((m_LArOnlineIDHelper->pos_neg(m_feedthroughID))==0) return FcalC; - else return FcalA; + if((m_LArOnlineIDHelper->pos_neg(m_feedthroughID))==0) return m_FcalC; + else return m_FcalA; } } diff --git a/LArCalorimeter/LArMonTools/src/LArFEBMon.cxx b/LArCalorimeter/LArMonTools/src/LArFEBMon.cxx index 2bddd316234..a752bd176bd 100755 --- a/LArCalorimeter/LArMonTools/src/LArFEBMon.cxx +++ b/LArCalorimeter/LArMonTools/src/LArFEBMon.cxx @@ -70,7 +70,8 @@ LArFEBMon::LArFEBMon(const std::string& type, m_hecASummary(), m_fcalCSummary(), m_fcalASummary(), - m_febInError() + m_febInError(), + m_anyfebIE(false) { declareProperty("IgnoreMissingHeaderEMB",m_ignoreMissingHeaderEMB = false); declareProperty("IgnoreMissingHeaderPS",m_ignoreMissingHeaderPS = false); @@ -94,9 +95,9 @@ LArFEBMon::LArFEBMon(const std::string& type, m_bfebIE[i] = false; } - FEBmin = -20.5; - FEBmax = 1599.5; - FEBnbins = 1620; + m_FEBmin = -20.5; + m_FEBmax = 1599.5; + m_FEBnbins = 1620; m_LArAllErrors_dE = NULL; m_rejectedYield = NULL; @@ -271,7 +272,7 @@ StatusCode LArFEBMon::bookHistograms() { sc = sc && perPartitionDataGroup.regHist(m_nbOfEvts2D); // Global nb of readout FEB - m_nbOfFebBlocksTotal = TH1I_LW::create("NbOfReadoutFEBGlobal","# of readout FEB/DSP header",FEBnbins,FEBmin,FEBmax); + m_nbOfFebBlocksTotal = TH1I_LW::create("NbOfReadoutFEBGlobal","# of readout FEB/DSP header",m_FEBnbins,m_FEBmin,m_FEBmax); sc = sc && perPartitionDataGroup.regHist(m_nbOfFebBlocksTotal); // DSP threshold @@ -569,6 +570,7 @@ StatusCode LArFEBMon::fillHistograms() { // Loop over all febs to plot the error from statusword // This is mandatory to also monitor the FEBs with missing headers + m_anyfebIE = false; for (std::vector<HWIdentifier>::const_iterator allFeb = m_onlineHelper->feb_begin(); allFeb != m_onlineHelper->feb_end(); ++allFeb) { HWIdentifier febid = HWIdentifier(*allFeb); @@ -614,6 +616,7 @@ StatusCode LArFEBMon::fillHistograms() { m_febErrorTypeTree.push_back(m_rejectionBits.to_ulong()); } } + if(m_currentFebStatus) m_anyfebIE = m_currentFebStatus; } // Check and reset the rejected histo per partition // Use the ENTRIES variable to store the LB and reset if needed! @@ -711,6 +714,9 @@ StatusCode LArFEBMon::fillHistograms() { if (m_rejectedLBProfile->GetEntries() != lumi_block) m_rejectedLBProfile->Reset(); } + + if(m_anyfebIE) { m_CorruptTree->Fill(); } + if ((m_eventRejected) || nbOfFebOK(nbOfFeb,m_nbOfFebBlocksTotal) || nbOfFeb < nFEBnominal){ if ((m_eventRejected) || nbOfFebOK(nbOfFeb,m_nbOfFebBlocksTotal)) m_rejectedYieldLB->Fill(lumi_block,100); else m_rejectedYieldLB->Fill(lumi_block,50); @@ -722,7 +728,6 @@ StatusCode LArFEBMon::fillHistograms() { if (m_isOnline) { if (lar_inerror) m_rejectedLBProfile->Fill(0.5,100); else m_rejectedLBProfile->Fill(0.5,50); } - m_CorruptTree->Fill(); } else{ m_rejectedYieldLB->Fill(lumi_block,0); m_rejectedYieldLBout->Fill(lumi_block,0); @@ -1349,5 +1354,6 @@ bool LArFEBMon::nbOfFebOK(float nfeb,TH1I_LW* h){ ixmax=ix; } } - return (nfeb<((FEBmax-FEBmin)/FEBnbins)*((float)(ixmax-1))+FEBmin); + return (nfeb<((m_FEBmax-m_FEBmin)/m_FEBnbins)*((float)(ixmax-1))+m_FEBmin); } + diff --git a/LArCalorimeter/LArMonTools/src/LArHVCorrectionMonTool.cxx b/LArCalorimeter/LArMonTools/src/LArHVCorrectionMonTool.cxx index 88747473c40..3160a837e56 100644 --- a/LArCalorimeter/LArMonTools/src/LArHVCorrectionMonTool.cxx +++ b/LArCalorimeter/LArMonTools/src/LArHVCorrectionMonTool.cxx @@ -276,7 +276,6 @@ LArHVCorrectionMonTool::fillHistograms() { if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "in fillHists()" << endmsg; - static CaloPhiRange m_phiHelper; m_eventsCounter++; if(m_eventsCounter == 1){ // Fill only at the beginning of LB. m_eventsCounter is reset at the begining of each LB. @@ -293,7 +292,7 @@ LArHVCorrectionMonTool::fillHistograms() int lumi_block = thisEventInfo->lumiBlock(); // Counter for deviating channels in each partition - float m_nonNominal[] = {0.,0.,0.,0.,0.,0.,0.,0.}; + float nonNominal[] = {0.,0.,0.,0.,0.,0.,0.,0.}; // Retrieve Raw Channels Container const LArRawChannelContainer* pRawChannelsContainer; @@ -319,17 +318,17 @@ LArHVCorrectionMonTool::fillHistograms() // Get Physical Coordinates float etaChan = 0; float phiChan = 0.; - const CaloDetDescrElement* m_CaloDetElement = m_CaloDetDescrMgr->get_element(offlineID); - if(m_CaloDetElement == 0 ){ + const CaloDetDescrElement* caloDetElement = m_CaloDetDescrMgr->get_element(offlineID); + if(caloDetElement == 0 ){ msg(MSG::ERROR) << "Cannot retrieve (eta,phi) coordinates for raw channels" << endmsg; continue; }else{ - etaChan = m_CaloDetElement->eta_raw(); - phiChan = m_CaloDetElement->phi_raw(); + etaChan = caloDetElement->eta_raw(); + phiChan = caloDetElement->phi_raw(); } // Fix phi range in HEC - if (m_LArOnlineIDHelper->isHECchannel(id)) phiChan = m_phiHelper.fix(phiChan); + if (m_LArOnlineIDHelper->isHECchannel(id)) phiChan = CaloPhiRange::fix(phiChan); // Retrieve HV correction info float hvdev = 0; @@ -347,39 +346,39 @@ LArHVCorrectionMonTool::fillHistograms() // A-Side if(etaChan >= 0){ if(m_LArOnlineIDHelper->isEMBchannel(id)){ - m_nonNominal[0]++; + nonNominal[0]++; m_hLArHVCorrectionEMB[0]->Fill(etaChan,phiChan, hvdev); } if(m_LArOnlineIDHelper->isEMECchannel(id)){ - m_nonNominal[1]++; + nonNominal[1]++; m_hLArHVCorrectionEMEC[0]->Fill(etaChan,phiChan, hvdev); } if(m_LArOnlineIDHelper->isHECchannel(id)){ - m_nonNominal[2]++; + nonNominal[2]++; m_hLArHVCorrectionHEC[0]->Fill(etaChan,phiChan, hvdev); } if(m_LArOnlineIDHelper->isFCALchannel(id)){ - m_nonNominal[3]++; + nonNominal[3]++; m_hLArHVCorrectionFCAL[0]->Fill(etaChan,phiChan, hvdev); } // C-side } else { if(m_LArOnlineIDHelper->isEMBchannel(id)){ - m_nonNominal[4]++; + nonNominal[4]++; m_hLArHVCorrectionEMB[1]->Fill(etaChan,phiChan, hvdev); } if(m_LArOnlineIDHelper->isEMECchannel(id)){ - m_nonNominal[5]++; + nonNominal[5]++; m_hLArHVCorrectionEMEC[1]->Fill(etaChan,phiChan, hvdev); } if(m_LArOnlineIDHelper->isHECchannel(id)){ //std::cout << "HECC, hvdev=" << hvdev << ", onlCorr=" << hvonline << ", oflCorr=" << hvcorr << std::endl; - m_nonNominal[6]++; + nonNominal[6]++; m_hLArHVCorrectionHEC[1]->Fill(etaChan,phiChan, hvdev); } if(m_LArOnlineIDHelper->isFCALchannel(id)){ - m_nonNominal[7]++; + nonNominal[7]++; m_hLArHVCorrectionFCAL[1]->Fill(etaChan,phiChan, hvdev); } } @@ -387,15 +386,15 @@ LArHVCorrectionMonTool::fillHistograms() }// end Raw Channels Loop // Fill number of problematic cell per LUMI_BLOCK - m_hNDeviatingChannelsEMB[0]->Fill(lumi_block,m_nonNominal[0]); - m_hNDeviatingChannelsEMEC[0]->Fill(lumi_block,m_nonNominal[1]); - m_hNDeviatingChannelsHEC[0]->Fill(lumi_block,m_nonNominal[2]); - m_hNDeviatingChannelsFCAL[0]->Fill(lumi_block,m_nonNominal[3]); - - m_hNDeviatingChannelsEMB[1]->Fill(lumi_block,m_nonNominal[4]); - m_hNDeviatingChannelsEMEC[1]->Fill(lumi_block,m_nonNominal[5]); - m_hNDeviatingChannelsHEC[1]->Fill(lumi_block,m_nonNominal[6]); - m_hNDeviatingChannelsFCAL[1]->Fill(lumi_block,m_nonNominal[7]); + m_hNDeviatingChannelsEMB[0]->Fill(lumi_block,nonNominal[0]); + m_hNDeviatingChannelsEMEC[0]->Fill(lumi_block,nonNominal[1]); + m_hNDeviatingChannelsHEC[0]->Fill(lumi_block,nonNominal[2]); + m_hNDeviatingChannelsFCAL[0]->Fill(lumi_block,nonNominal[3]); + + m_hNDeviatingChannelsEMB[1]->Fill(lumi_block,nonNominal[4]); + m_hNDeviatingChannelsEMEC[1]->Fill(lumi_block,nonNominal[5]); + m_hNDeviatingChannelsHEC[1]->Fill(lumi_block,nonNominal[6]); + m_hNDeviatingChannelsFCAL[1]->Fill(lumi_block,nonNominal[7]); } else { diff --git a/LArCalorimeter/LArMonTools/src/LArNoisyROMon.cxx b/LArCalorimeter/LArMonTools/src/LArNoisyROMon.cxx index c18ee964765..cced9f487a3 100644 --- a/LArCalorimeter/LArMonTools/src/LArNoisyROMon.cxx +++ b/LArCalorimeter/LArMonTools/src/LArNoisyROMon.cxx @@ -47,28 +47,28 @@ LArNoisyROMon::LArNoisyROMon(const std::string& type, m_CandidateMNB.v_candidate_MNBTightFEB = new std::vector<int>; m_CandidateMNB.v_candidate_MNBLooseFEB = new std::vector<int>; - h_NoisyFEB = NULL; - h_NoisyEventFrac = NULL; - h_NoisyEventTimeVetoFrac = NULL; - h_MNBTightFEB = NULL; - h_MNBTightEventFrac = NULL; - h_MNBTightEventTimeVetoFrac = NULL; - h_MNBLooseFEB = NULL; - h_MNBLooseEventFrac = NULL; - h_MNBLooseEventTimeVetoFrac = NULL; - h_CandidateMNBTightFEB = NULL; - h_CandidateMNBLooseFEB = NULL; - h_SaturatedTightFrac = NULL; - h_NoisyEvent = NULL; - h_NoisyEventTimeVeto = NULL; - h_MNBTightEvent = NULL; - h_MNBTightEventTimeVeto = NULL; - h_MNBLooseEvent = NULL; - h_MNBLooseEventTimeVeto = NULL; - h_SaturatedTight = NULL; - h_SaturatedTightTimeVeto = NULL; - h_SaturatedTightTimeVetoFrac = NULL; - h_LBN = NULL; + m_h_NoisyFEB = NULL; + m_h_NoisyEventFrac = NULL; + m_h_NoisyEventTimeVetoFrac = NULL; + m_h_MNBTightFEB = NULL; + m_h_MNBTightEventFrac = NULL; + m_h_MNBTightEventTimeVetoFrac = NULL; + m_h_MNBLooseFEB = NULL; + m_h_MNBLooseEventFrac = NULL; + m_h_MNBLooseEventTimeVetoFrac = NULL; + m_h_CandidateMNBTightFEB = NULL; + m_h_CandidateMNBLooseFEB = NULL; + m_h_SaturatedTightFrac = NULL; + m_h_NoisyEvent = NULL; + m_h_NoisyEventTimeVeto = NULL; + m_h_MNBTightEvent = NULL; + m_h_MNBTightEventTimeVeto = NULL; + m_h_MNBLooseEvent = NULL; + m_h_MNBLooseEventTimeVeto = NULL; + m_h_SaturatedTight = NULL; + m_h_SaturatedTightTimeVeto = NULL; + m_h_SaturatedTightTimeVetoFrac = NULL; + m_h_LBN = NULL; } LArNoisyROMon::~LArNoisyROMon() @@ -128,34 +128,34 @@ StatusCode LArNoisyROMon::bookHistograms() bookPartitionHistos(m_EMECC,"EMECC",GroupEMEC,GroupEMECFrac,GroupEMECFracBin); - + // Book general histograms hTitle = "Number of noisy FEB "+m_NoisyFEBDefStr+ " per event"; - h_NoisyFEB = TH1I_LW::create("NoisyFEB", hTitle.c_str(), 50,0.,50.); - h_NoisyFEB->GetXaxis()->SetTitle("# of noisy FEB"); - overall.regHist(h_NoisyFEB).ignore(); + m_h_NoisyFEB = TH1I_LW::create("NoisyFEB", hTitle.c_str(), 50,0.,50.); + m_h_NoisyFEB->GetXaxis()->SetTitle("# of noisy FEB"); + overall.regHist(m_h_NoisyFEB).ignore(); - hTitle = "Number of tight noisy FEB "+m_NoisyFEBDefStr+ " per event"; - h_MNBTightFEB = TH1I_LW::create("NoisyFEB", hTitle.c_str(), 50,0.,50.); - h_MNBTightFEB->GetXaxis()->SetTitle("# of noisy FEB"); - overall.regHist(h_MNBTightFEB).ignore(); + hTitle = "Number of MNB tight noisy FEB "+m_NoisyFEBDefStr+ " per event"; + m_h_MNBTightFEB = TH1I_LW::create("NoisyFEBNMBTight", hTitle.c_str(), 50,0.,50.); + m_h_MNBTightFEB->GetXaxis()->SetTitle("# of noisy FEB"); + overall.regHist(m_h_MNBTightFEB).ignore(); - hTitle = "Number of tight noisy FEB "+m_NoisyFEBDefStr+ " per event"; - h_MNBLooseFEB = TH1I_LW::create("NoisyFEB", hTitle.c_str(), 50,0.,50.); - h_MNBLooseFEB->GetXaxis()->SetTitle("# of noisy FEB"); - overall.regHist(h_MNBLooseFEB).ignore(); + hTitle = "Number of MNB loose noisy FEB "+m_NoisyFEBDefStr+ " per event"; + m_h_MNBLooseFEB = TH1I_LW::create("NoisyFEBMNBLoose", hTitle.c_str(), 50,0.,50.); + m_h_MNBLooseFEB->GetXaxis()->SetTitle("# of noisy FEB"); + overall.regHist(m_h_MNBLooseFEB).ignore(); hTitle = "Number of tight noisy FEB "+m_NoisyFEBDefStr+ " per event"; - h_CandidateMNBTightFEB = TH1I_LW::create("NoisyFEB", hTitle.c_str(), 50,0.,50.); - h_CandidateMNBTightFEB->GetXaxis()->SetTitle("# of noisy FEB"); - overall.regHist(h_CandidateMNBTightFEB).ignore(); + m_h_CandidateMNBTightFEB = TH1I_LW::create("NoisyFEBMNBCandTight", hTitle.c_str(), 50,0.,50.); + m_h_CandidateMNBTightFEB->GetXaxis()->SetTitle("# of noisy FEB"); + overall.regHist(m_h_CandidateMNBTightFEB).ignore(); hTitle = "Number of tight noisy FEB "+m_NoisyFEBDefStr+ " per event"; - h_CandidateMNBLooseFEB = TH1I_LW::create("NoisyFEB", hTitle.c_str(), 50,0.,50.); - h_CandidateMNBLooseFEB->GetXaxis()->SetTitle("# of noisy FEB"); - overall.regHist(h_CandidateMNBLooseFEB).ignore(); + m_h_CandidateMNBLooseFEB = TH1I_LW::create("NoisyFEBMNBCandLoose", hTitle.c_str(), 50,0.,50.); + m_h_CandidateMNBLooseFEB->GetXaxis()->SetTitle("# of noisy FEB"); + overall.regHist(m_h_CandidateMNBLooseFEB).ignore(); } m_NoiseTimeTree = new TTree("LArNoise","LAr noisy events"); @@ -175,64 +175,64 @@ StatusCode LArNoisyROMon::bookHistograms() if(m_doHisto) { MonGroup overallPerCent(this, "/LAr/NoisyRO", run, ATTRIB_MANAGED, "", "perBinEffPerCent" ); - h_NoisyEventFrac = TH1F_LW::create("NoisyEvent", "Yield of events flagged as LArNoisyRO_Std", m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); - h_NoisyEventFrac->GetXaxis()->SetTitle("Luminosity Block"); - overallPerCent.regHist(h_NoisyEventFrac).ignore(); - h_NoisyEvent = TH1I_LW::create("temp_NoisyEvent", hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); - h_NoisyEvent->GetXaxis()->SetTitle("Luminosity Block"); - - h_MNBTightEventFrac = TH1F_LW::create("MNBTightEvent", "Yield of events flagged as LArMNBTightRO_Std", m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); - h_MNBTightEventFrac->GetXaxis()->SetTitle("Luminosity Block"); - overallPerCent.regHist(h_MNBTightEventFrac).ignore(); - h_MNBTightEvent = TH1I_LW::create("temp_MNBTightEvent", hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); - h_MNBTightEvent->GetXaxis()->SetTitle("Luminosity Block"); - - h_MNBLooseEventFrac = TH1F_LW::create("MNBLooseEvent", "Yield of events flagged as LArMNBLooseRO_Std", m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); - h_MNBLooseEventFrac->GetXaxis()->SetTitle("Luminosity Block"); - overallPerCent.regHist(h_MNBLooseEventFrac).ignore(); - h_MNBLooseEvent = TH1I_LW::create("temp_MNBLooseEvent", hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); - h_MNBLooseEvent->GetXaxis()->SetTitle("Luminosity Block"); - - h_LBN = TH1I_LW::create("LBN", "LBN ", m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); + m_h_NoisyEventFrac = TH1F_LW::create("NoisyEvent", "Yield of events flagged as LArNoisyRO_Std", m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); + m_h_NoisyEventFrac->GetXaxis()->SetTitle("Luminosity Block"); + overallPerCent.regHist(m_h_NoisyEventFrac).ignore(); + m_h_NoisyEvent = TH1I_LW::create("temp_NoisyEvent", hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); + m_h_NoisyEvent->GetXaxis()->SetTitle("Luminosity Block"); + + m_h_MNBTightEventFrac = TH1F_LW::create("MNBTightEvent", "Yield of events flagged as LArMNBTightRO_Std", m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); + m_h_MNBTightEventFrac->GetXaxis()->SetTitle("Luminosity Block"); + overallPerCent.regHist(m_h_MNBTightEventFrac).ignore(); + m_h_MNBTightEvent = TH1I_LW::create("temp_MNBTightEvent", hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); + m_h_MNBTightEvent->GetXaxis()->SetTitle("Luminosity Block"); + + m_h_MNBLooseEventFrac = TH1F_LW::create("MNBLooseEvent", "Yield of events flagged as LArMNBLooseRO_Std", m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); + m_h_MNBLooseEventFrac->GetXaxis()->SetTitle("Luminosity Block"); + overallPerCent.regHist(m_h_MNBLooseEventFrac).ignore(); + m_h_MNBLooseEvent = TH1I_LW::create("temp_MNBLooseEvent", hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); + m_h_MNBLooseEvent->GetXaxis()->SetTitle("Luminosity Block"); + + m_h_LBN = TH1I_LW::create("LBN", "LBN ", m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); - h_NoisyEventTimeVetoFrac = TH1F_LW::create("NoisyEvent_TimeVeto", "Yield of events flagged as LArNoisyRO_Std not vetoed by time window", m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); - h_NoisyEventTimeVetoFrac->GetXaxis()->SetTitle("Luminosity Block"); - overallPerCent.regHist(h_NoisyEventTimeVetoFrac).ignore(); + m_h_NoisyEventTimeVetoFrac = TH1F_LW::create("NoisyEvent_TimeVeto", "Yield of events flagged as LArNoisyRO_Std not vetoed by time window", m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); + m_h_NoisyEventTimeVetoFrac->GetXaxis()->SetTitle("Luminosity Block"); + overallPerCent.regHist(m_h_NoisyEventTimeVetoFrac).ignore(); // Histogram below is temporary. Normalized at the end of run to produce the above histograms - h_NoisyEventTimeVeto = TH1I_LW::create("temp_NoisyEvent_TimeVeto", hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); - h_NoisyEventTimeVeto->GetXaxis()->SetTitle("Luminosity Block"); + m_h_NoisyEventTimeVeto = TH1I_LW::create("temp_NoisyEvent_TimeVeto", hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); + m_h_NoisyEventTimeVeto->GetXaxis()->SetTitle("Luminosity Block"); - h_MNBTightEventTimeVetoFrac = TH1F_LW::create("MNBTightEvent_TimeVeto", "Yield of events flagged as LArMNBTightRO_Std not vetoed by time window", m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); - h_MNBTightEventTimeVetoFrac->GetXaxis()->SetTitle("Luminosity Block"); - overallPerCent.regHist(h_MNBTightEventTimeVetoFrac).ignore(); + m_h_MNBTightEventTimeVetoFrac = TH1F_LW::create("MNBTightEvent_TimeVeto", "Yield of events flagged as LArMNBTightRO_Std not vetoed by time window", m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); + m_h_MNBTightEventTimeVetoFrac->GetXaxis()->SetTitle("Luminosity Block"); + overallPerCent.regHist(m_h_MNBTightEventTimeVetoFrac).ignore(); // Histogram below is temporary. Normalized at the end of run to produce the above histograms - h_MNBTightEventTimeVeto = TH1I_LW::create("temp_MNBTightEvent_TimeVeto", hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); - h_MNBTightEventTimeVeto->GetXaxis()->SetTitle("Luminosity Block"); + m_h_MNBTightEventTimeVeto = TH1I_LW::create("temp_MNBTightEvent_TimeVeto", hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); + m_h_MNBTightEventTimeVeto->GetXaxis()->SetTitle("Luminosity Block"); - h_MNBLooseEventTimeVetoFrac = TH1F_LW::create("MNBLooseEvent_TimeVeto", "Yield of events flagged as LArMNBLooseRO_Std not vetoed by time window", m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); - h_MNBLooseEventTimeVetoFrac->GetXaxis()->SetTitle("Luminosity Block"); - overallPerCent.regHist(h_MNBLooseEventTimeVetoFrac).ignore(); + m_h_MNBLooseEventTimeVetoFrac = TH1F_LW::create("MNBLooseEvent_TimeVeto", "Yield of events flagged as LArMNBLooseRO_Std not vetoed by time window", m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); + m_h_MNBLooseEventTimeVetoFrac->GetXaxis()->SetTitle("Luminosity Block"); + overallPerCent.regHist(m_h_MNBLooseEventTimeVetoFrac).ignore(); // Histogram below is temporary. Normalized at the end of run to produce the above histograms - h_MNBLooseEventTimeVeto = TH1I_LW::create("temp_MNBLooseEvent_TimeVeto", hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); - h_MNBLooseEventTimeVeto->GetXaxis()->SetTitle("Luminosity Block"); + m_h_MNBLooseEventTimeVeto = TH1I_LW::create("temp_MNBLooseEvent_TimeVeto", hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); + m_h_MNBLooseEventTimeVeto->GetXaxis()->SetTitle("Luminosity Block"); hTitle = "Yield of events flagged as LArNoisyROSaturated"; - h_SaturatedTightFrac = TH1F_LW::create("SaturatedTightEvent", hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); - h_SaturatedTightFrac->GetXaxis()->SetTitle("Luminosity Block"); - h_SaturatedTightFrac->GetYaxis()->SetTitle("Yield(%)"); - overallPerCent.regHist(h_SaturatedTightFrac).ignore(); + m_h_SaturatedTightFrac = TH1F_LW::create("SaturatedTightEvent", hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); + m_h_SaturatedTightFrac->GetXaxis()->SetTitle("Luminosity Block"); + m_h_SaturatedTightFrac->GetYaxis()->SetTitle("Yield(%)"); + overallPerCent.regHist(m_h_SaturatedTightFrac).ignore(); // Histogram below is temporary. Normalized at the end of run to produce the above histograms - h_SaturatedTight = TH1I_LW::create("temp_SaturatedTight", hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); - h_SaturatedTight->GetXaxis()->SetTitle("Luminosity Block"); + m_h_SaturatedTight = TH1I_LW::create("temp_SaturatedTight", hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); + m_h_SaturatedTight->GetXaxis()->SetTitle("Luminosity Block"); hTitle = "Yield of events flagged as LArNoisyROSaturated not vetoed by time window"; - h_SaturatedTightTimeVetoFrac = TH1F_LW::create("SaturatedTightEvent_TimeVeto", hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); - h_SaturatedTightTimeVetoFrac->GetXaxis()->SetTitle("Luminosity Block"); - h_SaturatedTightTimeVetoFrac->GetYaxis()->SetTitle("Yield(%)"); - overallPerCent.regHist(h_SaturatedTightTimeVetoFrac).ignore(); + m_h_SaturatedTightTimeVetoFrac = TH1F_LW::create("SaturatedTightEvent_TimeVeto", hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); + m_h_SaturatedTightTimeVetoFrac->GetXaxis()->SetTitle("Luminosity Block"); + m_h_SaturatedTightTimeVetoFrac->GetYaxis()->SetTitle("Yield(%)"); + overallPerCent.regHist(m_h_SaturatedTightTimeVetoFrac).ignore(); // Histogram below is temporary. Normalized at the end of run to produce the above histograms - h_SaturatedTightTimeVeto = TH1I_LW::create("temp_SaturatedTight_TimeVeto", hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); - h_SaturatedTightTimeVeto->GetXaxis()->SetTitle("Luminosity Block"); + m_h_SaturatedTightTimeVeto = TH1I_LW::create("temp_SaturatedTight_TimeVeto", hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); + m_h_SaturatedTightTimeVeto->GetXaxis()->SetTitle("Luminosity Block"); } return StatusCode::SUCCESS; @@ -382,7 +382,7 @@ StatusCode LArNoisyROMon::fillHistograms() } } } - h_NoisyFEB->Fill(NbNoisyFEB); + m_h_NoisyFEB->Fill(NbNoisyFEB); // Loop on all FEBs noisy in MNB-tight definition // And fill the 2D maps of fraction of fraction of noisy events @@ -408,7 +408,7 @@ StatusCode LArNoisyROMon::fillHistograms() else { if((noisyRO->MNBTightFlaggedPartitions() & LArNoisyROSummary::EMBCMask) != 0) - m_BarrelC.h_MNBTightFEBFracPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1); + m_BarrelC.h_MNBTightFEBFracPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1); } } else @@ -436,7 +436,7 @@ StatusCode LArNoisyROMon::fillHistograms() } else { - if((noisyRO->MNBTightFlaggedPartitions() & LArNoisyROSummary::EMECCMask) != 0) + if((noisyRO->MNBTightFlaggedPartitions() & LArNoisyROSummary::EMECCMask) != 0) m_EMECC.h_MNBTightFEBFracPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1); } } @@ -455,7 +455,7 @@ StatusCode LArNoisyROMon::fillHistograms() } } } - h_MNBTightFEB->Fill(NbMNBTightFEB); + m_h_MNBTightFEB->Fill(NbMNBTightFEB); // Loop on all FEBs noisy in MNB-loose definition // And fill the 2D maps of fraction of fraction of noisy events @@ -528,7 +528,7 @@ StatusCode LArNoisyROMon::fillHistograms() } } } - h_MNBLooseFEB->Fill(NbMNBLooseFEB); + m_h_MNBLooseFEB->Fill(NbMNBLooseFEB); // Loop on all FEBs noisy in MNB-tight definition // And fill the 2D maps of fraction of fraction of noisy events @@ -577,7 +577,7 @@ StatusCode LArNoisyROMon::fillHistograms() } } } - h_CandidateMNBTightFEB->Fill(NbCandidateMNBTightFEB); + m_h_CandidateMNBTightFEB->Fill(NbCandidateMNBTightFEB); // Loop on all FEBs noisy in MNB-loose definition // And fill the 2D maps of fraction of fraction of noisy events @@ -626,19 +626,19 @@ StatusCode LArNoisyROMon::fillHistograms() } } } - h_CandidateMNBLooseFEB->Fill(NbCandidateMNBLooseFEB); + m_h_CandidateMNBLooseFEB->Fill(NbCandidateMNBLooseFEB); // End of 2D map of FEB found as noisy (in any definition : Std, MNB-Tight or MNB-Loose) // Now fill 1D histograms of fraction of events found as noisy vetoed or not - h_LBN->Fill(LBN); + m_h_LBN->Fill(LBN); // Event found noisy by Std method uint8_t BadFEBPartitions = noisyRO->BadFEBFlaggedPartitions(); if ( BadFEBPartitions != 0) { - h_NoisyEvent->Fill(LBN); + m_h_NoisyEvent->Fill(LBN); if ( ! burstveto ) { - h_NoisyEventTimeVeto->Fill(LBN); + m_h_NoisyEventTimeVeto->Fill(LBN); } if ( (BadFEBPartitions & LArNoisyROSummary::EMECAMask) != 0 ) { @@ -669,8 +669,8 @@ StatusCode LArNoisyROMon::fillHistograms() // event flagged by # of saturated quality cells if ( eventInfo->isEventFlagBitSet(xAOD::EventInfo::LAr,LArEventBitInfo::TIGHTSATURATEDQ) ) { - h_SaturatedTight->Fill(LBN); - if ( !burstveto ) h_SaturatedTightTimeVeto->Fill(LBN); + m_h_SaturatedTight->Fill(LBN); + if ( !burstveto ) m_h_SaturatedTightTimeVeto->Fill(LBN); if ( (LArNoisyROSummary::EMECAMask) != 0 ) { m_EMECA.h_SaturatedNoisyEvent->Fill(LBN); @@ -698,10 +698,10 @@ StatusCode LArNoisyROMon::fillHistograms() uint8_t MNBTightPartitions = noisyRO->MNBTightFlaggedPartitions(); if ( MNBTightPartitions != 0) { - h_MNBTightEvent->Fill(LBN); + m_h_MNBTightEvent->Fill(LBN); if ( ! burstveto ) { - h_MNBTightEventTimeVeto->Fill(LBN); + m_h_MNBTightEventTimeVeto->Fill(LBN); } if ( (MNBTightPartitions & LArNoisyROSummary::EMECAMask) != 0 ) { @@ -733,10 +733,10 @@ StatusCode LArNoisyROMon::fillHistograms() uint8_t MNBLoosePartitions = noisyRO->MNBLooseFlaggedPartitions(); if ( MNBLoosePartitions != 0) { - h_MNBLooseEvent->Fill(LBN); + m_h_MNBLooseEvent->Fill(LBN); if ( ! burstveto ) { - h_MNBLooseEventTimeVeto->Fill(LBN); + m_h_MNBLooseEventTimeVeto->Fill(LBN); } if ( (MNBLoosePartitions & LArNoisyROSummary::EMECAMask) != 0 ) { @@ -883,129 +883,129 @@ StatusCode LArNoisyROMon::procHistograms() m_EMECC.h_CandidateMNBLooseFEBFracPerEvt->scaleContentsAndErrors(scale); m_EMECC.h_CandidateMNBLooseFEBFracPerEvt->SetEntries(m_eventCounter); - Divide(h_NoisyEventFrac,h_NoisyEvent,h_LBN); - h_NoisyEventFrac->SetEntries(m_eventCounter); + Divide(m_h_NoisyEventFrac,m_h_NoisyEvent,m_h_LBN); + m_h_NoisyEventFrac->SetEntries(m_eventCounter); - Divide(h_MNBTightEventFrac,h_MNBTightEvent,h_LBN); - h_MNBTightEventFrac->SetEntries(m_eventCounter); + Divide(m_h_MNBTightEventFrac,m_h_MNBTightEvent,m_h_LBN); + m_h_MNBTightEventFrac->SetEntries(m_eventCounter); - Divide(h_MNBLooseEventFrac,h_MNBLooseEvent,h_LBN); - h_MNBLooseEventFrac->SetEntries(m_eventCounter); + Divide(m_h_MNBLooseEventFrac,m_h_MNBLooseEvent,m_h_LBN); + m_h_MNBLooseEventFrac->SetEntries(m_eventCounter); - Divide(m_BarrelA.h_NoisyEventFrac,m_BarrelA.h_NoisyEvent,h_LBN); + Divide(m_BarrelA.h_NoisyEventFrac,m_BarrelA.h_NoisyEvent,m_h_LBN); m_BarrelA.h_NoisyEventFrac->SetEntries(m_eventCounter); - Divide(m_BarrelC.h_NoisyEventFrac,m_BarrelC.h_NoisyEvent,h_LBN); + Divide(m_BarrelC.h_NoisyEventFrac,m_BarrelC.h_NoisyEvent,m_h_LBN); m_BarrelC.h_NoisyEventFrac->SetEntries(m_eventCounter); - Divide(m_EMECA.h_NoisyEventFrac,m_EMECA.h_NoisyEvent,h_LBN); + Divide(m_EMECA.h_NoisyEventFrac,m_EMECA.h_NoisyEvent,m_h_LBN); m_EMECA.h_NoisyEventFrac->SetEntries(m_eventCounter); - Divide(m_EMECC.h_NoisyEventFrac,m_EMECC.h_NoisyEvent,h_LBN); + Divide(m_EMECC.h_NoisyEventFrac,m_EMECC.h_NoisyEvent,m_h_LBN); m_EMECC.h_NoisyEventFrac->SetEntries(m_eventCounter); - Divide(m_BarrelA.h_SaturatedNoisyEventFrac,m_BarrelA.h_SaturatedNoisyEvent,h_LBN); + Divide(m_BarrelA.h_SaturatedNoisyEventFrac,m_BarrelA.h_SaturatedNoisyEvent,m_h_LBN); m_BarrelA.h_SaturatedNoisyEventFrac->SetEntries(m_eventCounter); - Divide(m_BarrelC.h_SaturatedNoisyEventFrac,m_BarrelC.h_SaturatedNoisyEvent,h_LBN); + Divide(m_BarrelC.h_SaturatedNoisyEventFrac,m_BarrelC.h_SaturatedNoisyEvent,m_h_LBN); m_BarrelC.h_SaturatedNoisyEventFrac->SetEntries(m_eventCounter); - Divide(m_EMECA.h_SaturatedNoisyEventFrac,m_EMECA.h_SaturatedNoisyEvent,h_LBN); + Divide(m_EMECA.h_SaturatedNoisyEventFrac,m_EMECA.h_SaturatedNoisyEvent,m_h_LBN); m_EMECA.h_SaturatedNoisyEventFrac->SetEntries(m_eventCounter); - Divide(m_EMECC.h_SaturatedNoisyEventFrac,m_EMECC.h_SaturatedNoisyEvent,h_LBN); + Divide(m_EMECC.h_SaturatedNoisyEventFrac,m_EMECC.h_SaturatedNoisyEvent,m_h_LBN); m_EMECC.h_SaturatedNoisyEventFrac->SetEntries(m_eventCounter); - Divide(m_BarrelA.h_MNBTightEventFrac,m_BarrelA.h_MNBTightEvent,h_LBN); + Divide(m_BarrelA.h_MNBTightEventFrac,m_BarrelA.h_MNBTightEvent,m_h_LBN); m_BarrelA.h_MNBTightEventFrac->SetEntries(m_eventCounter); - Divide(m_BarrelC.h_MNBTightEventFrac,m_BarrelC.h_MNBTightEvent,h_LBN); + Divide(m_BarrelC.h_MNBTightEventFrac,m_BarrelC.h_MNBTightEvent,m_h_LBN); m_BarrelC.h_MNBTightEventFrac->SetEntries(m_eventCounter); - Divide(m_EMECA.h_MNBTightEventFrac,m_EMECA.h_MNBTightEvent,h_LBN); + Divide(m_EMECA.h_MNBTightEventFrac,m_EMECA.h_MNBTightEvent,m_h_LBN); m_EMECA.h_MNBTightEventFrac->SetEntries(m_eventCounter); - Divide(m_EMECC.h_MNBTightEventFrac,m_EMECC.h_MNBTightEvent,h_LBN); + Divide(m_EMECC.h_MNBTightEventFrac,m_EMECC.h_MNBTightEvent,m_h_LBN); m_EMECC.h_MNBTightEventFrac->SetEntries(m_eventCounter); - Divide(m_BarrelA.h_MNBLooseEventFrac,m_BarrelA.h_MNBLooseEvent,h_LBN); + Divide(m_BarrelA.h_MNBLooseEventFrac,m_BarrelA.h_MNBLooseEvent,m_h_LBN); m_BarrelA.h_MNBLooseEventFrac->SetEntries(m_eventCounter); - Divide(m_BarrelC.h_MNBLooseEventFrac,m_BarrelC.h_MNBLooseEvent,h_LBN); + Divide(m_BarrelC.h_MNBLooseEventFrac,m_BarrelC.h_MNBLooseEvent,m_h_LBN); m_BarrelC.h_MNBLooseEventFrac->SetEntries(m_eventCounter); - Divide(m_EMECA.h_MNBLooseEventFrac,m_EMECA.h_MNBLooseEvent,h_LBN); + Divide(m_EMECA.h_MNBLooseEventFrac,m_EMECA.h_MNBLooseEvent,m_h_LBN); m_EMECA.h_MNBLooseEventFrac->SetEntries(m_eventCounter); - Divide(m_EMECC.h_MNBLooseEventFrac,m_EMECC.h_MNBLooseEvent,h_LBN); + Divide(m_EMECC.h_MNBLooseEventFrac,m_EMECC.h_MNBLooseEvent,m_h_LBN); m_EMECC.h_MNBLooseEventFrac->SetEntries(m_eventCounter); - Divide(m_BarrelA.h_NoisyWEventFrac,m_BarrelA.h_NoisyWEvent,h_LBN); + Divide(m_BarrelA.h_NoisyWEventFrac,m_BarrelA.h_NoisyWEvent,m_h_LBN); m_BarrelA.h_NoisyWEventFrac->SetEntries(m_eventCounter); - Divide(m_BarrelC.h_NoisyWEventFrac,m_BarrelC.h_NoisyWEvent,h_LBN); + Divide(m_BarrelC.h_NoisyWEventFrac,m_BarrelC.h_NoisyWEvent,m_h_LBN); m_BarrelC.h_NoisyWEventFrac->SetEntries(m_eventCounter); - Divide(m_EMECA.h_NoisyWEventFrac,m_EMECA.h_NoisyWEvent,h_LBN); + Divide(m_EMECA.h_NoisyWEventFrac,m_EMECA.h_NoisyWEvent,m_h_LBN); m_EMECA.h_NoisyWEventFrac->SetEntries(m_eventCounter); - Divide(m_EMECC.h_NoisyWEventFrac,m_EMECC.h_NoisyWEvent,h_LBN); + Divide(m_EMECC.h_NoisyWEventFrac,m_EMECC.h_NoisyWEvent,m_h_LBN); m_EMECC.h_NoisyWEventFrac->SetEntries(m_eventCounter); - Divide(h_NoisyEventTimeVetoFrac,h_NoisyEventTimeVeto,h_LBN); - h_NoisyEventTimeVetoFrac->SetEntries(m_eventCounter); - Divide(m_BarrelA.h_NoisyEventTimeVetoFrac,m_BarrelA.h_NoisyEventTimeVeto,h_LBN); + Divide(m_h_NoisyEventTimeVetoFrac,m_h_NoisyEventTimeVeto,m_h_LBN); + m_h_NoisyEventTimeVetoFrac->SetEntries(m_eventCounter); + Divide(m_BarrelA.h_NoisyEventTimeVetoFrac,m_BarrelA.h_NoisyEventTimeVeto,m_h_LBN); m_BarrelA.h_NoisyEventTimeVetoFrac->SetEntries(m_eventCounter); - Divide(m_BarrelC.h_NoisyEventTimeVetoFrac,m_BarrelC.h_NoisyEventTimeVeto,h_LBN); + Divide(m_BarrelC.h_NoisyEventTimeVetoFrac,m_BarrelC.h_NoisyEventTimeVeto,m_h_LBN); m_BarrelC.h_NoisyEventTimeVetoFrac->SetEntries(m_eventCounter); - Divide(m_EMECA.h_NoisyEventTimeVetoFrac,m_EMECA.h_NoisyEventTimeVeto,h_LBN); + Divide(m_EMECA.h_NoisyEventTimeVetoFrac,m_EMECA.h_NoisyEventTimeVeto,m_h_LBN); m_EMECA.h_NoisyEventTimeVetoFrac->SetEntries(m_eventCounter); - Divide(m_EMECC.h_NoisyEventTimeVetoFrac,m_EMECC.h_NoisyEventTimeVeto,h_LBN); + Divide(m_EMECC.h_NoisyEventTimeVetoFrac,m_EMECC.h_NoisyEventTimeVeto,m_h_LBN); m_EMECC.h_NoisyEventTimeVetoFrac->SetEntries(m_eventCounter); - Divide(m_BarrelA.h_SaturatedNoisyEventTimeVetoFrac,m_BarrelA.h_SaturatedNoisyEventTimeVeto,h_LBN); + Divide(m_BarrelA.h_SaturatedNoisyEventTimeVetoFrac,m_BarrelA.h_SaturatedNoisyEventTimeVeto,m_h_LBN); m_BarrelA.h_SaturatedNoisyEventTimeVetoFrac->SetEntries(m_eventCounter); - Divide(m_BarrelC.h_SaturatedNoisyEventTimeVetoFrac,m_BarrelC.h_SaturatedNoisyEventTimeVeto,h_LBN); + Divide(m_BarrelC.h_SaturatedNoisyEventTimeVetoFrac,m_BarrelC.h_SaturatedNoisyEventTimeVeto,m_h_LBN); m_BarrelC.h_SaturatedNoisyEventTimeVetoFrac->SetEntries(m_eventCounter); - Divide(m_EMECA.h_SaturatedNoisyEventTimeVetoFrac,m_EMECA.h_SaturatedNoisyEventTimeVeto,h_LBN); + Divide(m_EMECA.h_SaturatedNoisyEventTimeVetoFrac,m_EMECA.h_SaturatedNoisyEventTimeVeto,m_h_LBN); m_EMECA.h_SaturatedNoisyEventTimeVetoFrac->SetEntries(m_eventCounter); - Divide(m_EMECC.h_SaturatedNoisyEventTimeVetoFrac,m_EMECC.h_SaturatedNoisyEventTimeVeto,h_LBN); + Divide(m_EMECC.h_SaturatedNoisyEventTimeVetoFrac,m_EMECC.h_SaturatedNoisyEventTimeVeto,m_h_LBN); m_EMECC.h_SaturatedNoisyEventTimeVetoFrac->SetEntries(m_eventCounter); - Divide(h_MNBTightEventTimeVetoFrac,h_MNBTightEventTimeVeto,h_LBN); - h_MNBTightEventTimeVetoFrac->SetEntries(m_eventCounter); - Divide(m_BarrelA.h_MNBTightEventTimeVetoFrac,m_BarrelA.h_MNBTightEventTimeVeto,h_LBN); + Divide(m_h_MNBTightEventTimeVetoFrac,m_h_MNBTightEventTimeVeto,m_h_LBN); + m_h_MNBTightEventTimeVetoFrac->SetEntries(m_eventCounter); + Divide(m_BarrelA.h_MNBTightEventTimeVetoFrac,m_BarrelA.h_MNBTightEventTimeVeto,m_h_LBN); m_BarrelA.h_MNBTightEventTimeVetoFrac->SetEntries(m_eventCounter); - Divide(m_BarrelC.h_MNBTightEventTimeVetoFrac,m_BarrelC.h_MNBTightEventTimeVeto,h_LBN); + Divide(m_BarrelC.h_MNBTightEventTimeVetoFrac,m_BarrelC.h_MNBTightEventTimeVeto,m_h_LBN); m_BarrelC.h_MNBTightEventTimeVetoFrac->SetEntries(m_eventCounter); - Divide(m_EMECA.h_MNBTightEventTimeVetoFrac,m_EMECA.h_MNBTightEventTimeVeto,h_LBN); + Divide(m_EMECA.h_MNBTightEventTimeVetoFrac,m_EMECA.h_MNBTightEventTimeVeto,m_h_LBN); m_EMECA.h_MNBTightEventTimeVetoFrac->SetEntries(m_eventCounter); - Divide(m_EMECC.h_MNBTightEventTimeVetoFrac,m_EMECC.h_MNBTightEventTimeVeto,h_LBN); + Divide(m_EMECC.h_MNBTightEventTimeVetoFrac,m_EMECC.h_MNBTightEventTimeVeto,m_h_LBN); m_EMECC.h_MNBTightEventTimeVetoFrac->SetEntries(m_eventCounter); - Divide(h_MNBLooseEventTimeVetoFrac,h_MNBLooseEventTimeVeto,h_LBN); - h_MNBLooseEventTimeVetoFrac->SetEntries(m_eventCounter); - Divide(m_BarrelA.h_MNBLooseEventTimeVetoFrac,m_BarrelA.h_MNBLooseEventTimeVeto,h_LBN); + Divide(m_h_MNBLooseEventTimeVetoFrac,m_h_MNBLooseEventTimeVeto,m_h_LBN); + m_h_MNBLooseEventTimeVetoFrac->SetEntries(m_eventCounter); + Divide(m_BarrelA.h_MNBLooseEventTimeVetoFrac,m_BarrelA.h_MNBLooseEventTimeVeto,m_h_LBN); m_BarrelA.h_MNBLooseEventTimeVetoFrac->SetEntries(m_eventCounter); - Divide(m_BarrelC.h_MNBLooseEventTimeVetoFrac,m_BarrelC.h_MNBLooseEventTimeVeto,h_LBN); + Divide(m_BarrelC.h_MNBLooseEventTimeVetoFrac,m_BarrelC.h_MNBLooseEventTimeVeto,m_h_LBN); m_BarrelC.h_MNBLooseEventTimeVetoFrac->SetEntries(m_eventCounter); - Divide(m_EMECA.h_MNBLooseEventTimeVetoFrac,m_EMECA.h_MNBLooseEventTimeVeto,h_LBN); + Divide(m_EMECA.h_MNBLooseEventTimeVetoFrac,m_EMECA.h_MNBLooseEventTimeVeto,m_h_LBN); m_EMECA.h_MNBLooseEventTimeVetoFrac->SetEntries(m_eventCounter); - Divide(m_EMECC.h_MNBLooseEventTimeVetoFrac,m_EMECC.h_MNBLooseEventTimeVeto,h_LBN); + Divide(m_EMECC.h_MNBLooseEventTimeVetoFrac,m_EMECC.h_MNBLooseEventTimeVeto,m_h_LBN); m_EMECC.h_MNBLooseEventTimeVetoFrac->SetEntries(m_eventCounter); - Divide(m_BarrelA.h_NoisyWEventTimeVetoFrac,m_BarrelA.h_NoisyWEventTimeVeto,h_LBN); + Divide(m_BarrelA.h_NoisyWEventTimeVetoFrac,m_BarrelA.h_NoisyWEventTimeVeto,m_h_LBN); m_BarrelA.h_NoisyWEventTimeVetoFrac->SetEntries(m_eventCounter); - Divide(m_BarrelC.h_NoisyWEventTimeVetoFrac,m_BarrelC.h_NoisyWEventTimeVeto,h_LBN); + Divide(m_BarrelC.h_NoisyWEventTimeVetoFrac,m_BarrelC.h_NoisyWEventTimeVeto,m_h_LBN); m_BarrelC.h_NoisyWEventTimeVetoFrac->SetEntries(m_eventCounter); - Divide(m_EMECA.h_NoisyWEventTimeVetoFrac,m_EMECA.h_NoisyWEventTimeVeto,h_LBN); + Divide(m_EMECA.h_NoisyWEventTimeVetoFrac,m_EMECA.h_NoisyWEventTimeVeto,m_h_LBN); m_EMECA.h_NoisyWEventTimeVetoFrac->SetEntries(m_eventCounter); - Divide(m_EMECC.h_NoisyWEventTimeVetoFrac,m_EMECC.h_NoisyWEventTimeVeto,h_LBN); + Divide(m_EMECC.h_NoisyWEventTimeVetoFrac,m_EMECC.h_NoisyWEventTimeVeto,m_h_LBN); m_EMECC.h_NoisyWEventTimeVetoFrac->SetEntries(m_eventCounter); - Divide(h_SaturatedTightFrac,h_SaturatedTight,h_LBN); - h_SaturatedTightFrac->SetEntries(m_eventCounter); - Divide(h_SaturatedTightTimeVetoFrac,h_SaturatedTightTimeVeto,h_LBN); - h_SaturatedTightTimeVetoFrac->SetEntries(m_eventCounter); + Divide(m_h_SaturatedTightFrac,m_h_SaturatedTight,m_h_LBN); + m_h_SaturatedTightFrac->SetEntries(m_eventCounter); + Divide(m_h_SaturatedTightTimeVetoFrac,m_h_SaturatedTightTimeVeto,m_h_LBN); + m_h_SaturatedTightTimeVetoFrac->SetEntries(m_eventCounter); }//end if m_eventCounter>0 } if ( endOfRunFlag() ) { // delete temposary histograms - if ( h_LBN ) { -// LWHist::safeDelete(h_LBN); -// h_LBN = NULL; - h_LBN->Reset(); + if ( m_h_LBN ) { +// LWHist::safeDelete(m_h_LBN); +// m_h_LBN = NULL; + m_h_LBN->Reset(); } - if ( h_NoisyEvent ) { -// LWHist::safeDelete(h_NoisyEvent); -// h_NoisyEvent = NULL; - h_NoisyEvent->Reset(); + if ( m_h_NoisyEvent ) { +// LWHist::safeDelete(m_h_NoisyEvent); +// m_h_NoisyEvent = NULL; + m_h_NoisyEvent->Reset(); } if ( m_BarrelA.h_NoisyEvent ) { // LWHist::safeDelete(m_BarrelA.h_NoisyEvent); @@ -1027,10 +1027,10 @@ StatusCode LArNoisyROMon::procHistograms() // m_EMECC.h_NoisyEvent = NULL; m_EMECC.h_NoisyEvent->Reset(); } - if ( h_NoisyEventTimeVeto ) { -// LWHist::safeDelete(h_NoisyEventTimeVeto); -// h_NoisyEventTimeVeto = NULL; - h_NoisyEventTimeVeto->Reset(); + if ( m_h_NoisyEventTimeVeto ) { +// LWHist::safeDelete(m_h_NoisyEventTimeVeto); +// m_h_NoisyEventTimeVeto = NULL; + m_h_NoisyEventTimeVeto->Reset(); } if ( m_BarrelA.h_NoisyEventTimeVeto ) { // LWHist::safeDelete(m_BarrelA.h_NoisyEventTimeVeto); @@ -1052,10 +1052,10 @@ StatusCode LArNoisyROMon::procHistograms() // m_EMECC.h_NoisyEventTimeVeto = NULL; m_EMECC.h_NoisyEventTimeVeto->Reset(); } - if ( h_MNBTightEvent ) { -// LWHist::safeDelete(h_MNBTightEvent); -// h_MNBTightEvent = NULL; - h_MNBTightEvent->Reset(); + if ( m_h_MNBTightEvent ) { +// LWHist::safeDelete(m_h_MNBTightEvent); +// m_h_MNBTightEvent = NULL; + m_h_MNBTightEvent->Reset(); } if ( m_BarrelA.h_MNBTightEvent ) { // LWHist::safeDelete(m_BarrelA.h_MNBTightEvent); @@ -1077,10 +1077,10 @@ StatusCode LArNoisyROMon::procHistograms() // m_EMECC.h_MNBTightEvent = NULL; m_EMECC.h_MNBTightEvent->Reset(); } - if ( h_MNBTightEventTimeVeto ) { + if ( m_h_MNBTightEventTimeVeto ) { // LWHist::safeDelete(h_MNBTightEventTimeVeto); // h_MNBTightEventTimeVeto = NULL; - h_MNBTightEventTimeVeto->Reset(); + m_h_MNBTightEventTimeVeto->Reset(); } if ( m_BarrelA.h_MNBTightEventTimeVeto ) { // LWHist::safeDelete(m_BarrelA.h_MNBTightEventTimeVeto); @@ -1103,10 +1103,10 @@ StatusCode LArNoisyROMon::procHistograms() m_EMECC.h_MNBTightEventTimeVeto->Reset(); } - if ( h_MNBLooseEvent ) { -// LWHist::safeDelete(h_MNBLooseEvent); -// h_MNBLooseEvent = NULL; - h_MNBLooseEvent->Reset(); + if ( m_h_MNBLooseEvent ) { +// LWHist::safeDelete(m_h_MNBLooseEvent); +// m_h_MNBLooseEvent = NULL; + m_h_MNBLooseEvent->Reset(); } if ( m_BarrelA.h_MNBLooseEvent ) { // LWHist::safeDelete(m_BarrelA.h_MNBLooseEvent); @@ -1128,10 +1128,10 @@ StatusCode LArNoisyROMon::procHistograms() // m_EMECC.h_MNBLooseEvent = NULL; m_EMECC.h_MNBLooseEvent->Reset(); } - if ( h_MNBLooseEventTimeVeto ) { -// LWHist::safeDelete(h_MNBLooseEventTimeVeto); -// h_MNBLooseEventTimeVeto = NULL; - h_MNBLooseEventTimeVeto->Reset(); + if ( m_h_MNBLooseEventTimeVeto ) { +// LWHist::safeDelete(m_h_MNBLooseEventTimeVeto); +// m_h_MNBLooseEventTimeVeto = NULL; + m_h_MNBLooseEventTimeVeto->Reset(); } if ( m_BarrelA.h_MNBLooseEventTimeVeto ) { // LWHist::safeDelete(m_BarrelA.h_MNBLooseEventTimeVeto); @@ -1153,10 +1153,10 @@ StatusCode LArNoisyROMon::procHistograms() // m_EMECC.h_MNBLooseEventTimeVeto = NULL; m_EMECC.h_MNBLooseEventTimeVeto->Reset(); } - if ( h_SaturatedTight ) { -// LWHist::safeDelete(h_SaturatedTight); -// h_SaturatedTight = NULL; - h_SaturatedTight->Reset(); + if ( m_h_SaturatedTight ) { +// LWHist::safeDelete(m_h_SaturatedTight); +// m_h_SaturatedTight = NULL; + m_h_SaturatedTight->Reset(); } if ( m_BarrelA.h_SaturatedNoisyEvent ) { // LWHist::safeDelete(m_BarrelA.h_SaturatedNoisyEvent); @@ -1178,10 +1178,10 @@ StatusCode LArNoisyROMon::procHistograms() // m_EMECC.h_SaturatedNoisyEvent = NULL; m_EMECC.h_SaturatedNoisyEvent->Reset(); } - if ( h_SaturatedTightTimeVeto ) { -// LWHist::safeDelete(h_SaturatedTightTimeVeto); -// h_SaturatedTightTimeVeto = NULL; - h_SaturatedTightTimeVeto->Reset(); + if ( m_h_SaturatedTightTimeVeto ) { +// LWHist::safeDelete(m_h_SaturatedTightTimeVeto); +// m_h_SaturatedTightTimeVeto = NULL; + m_h_SaturatedTightTimeVeto->Reset(); } if ( m_BarrelA.h_SaturatedNoisyEventTimeVeto ) { // LWHist::safeDelete(m_BarrelA.h_SaturatedNoisyEventTimeVeto); @@ -1294,7 +1294,7 @@ void LArNoisyROMon::bookPartitionHistos(partitionHistos& partition, const std::s } hName = "MNBTightFEBFracPerEvt_"+name; - hTitle = "Yield of events with FEB MNB Tight "+m_NoisyFEBDefStr+" - "+name; + hTitle = "Yield of events with FEB MNB Tight (>17 chan with Q>4000) - "+name; partition.h_MNBTightFEBFracPerEvt = TH2F_LW::create(hName.c_str(), hTitle.c_str(), slot,slot_low,slot_up,FEB,FEB_low,FEB_up); partition.h_MNBTightFEBFracPerEvt->GetXaxis()->SetTitle("Slot"); partition.h_MNBTightFEBFracPerEvt->GetYaxis()->SetTitle("Feedthrough"); @@ -1308,7 +1308,7 @@ void LArNoisyROMon::bookPartitionHistos(partitionHistos& partition, const std::s } hName = "MNBLooseFEBFracPerEvt_"+name; - hTitle = "Yield of events with FEB MNB Loose "+m_NoisyFEBDefStr+" - "+name; + hTitle = "Yield of events with FEB MNB Loose (>5 chan with Q>4000) - "+name; partition.h_MNBLooseFEBFracPerEvt = TH2F_LW::create(hName.c_str(), hTitle.c_str(), slot,slot_low,slot_up,FEB,FEB_low,FEB_up); partition.h_MNBLooseFEBFracPerEvt->GetXaxis()->SetTitle("Slot"); partition.h_MNBLooseFEBFracPerEvt->GetYaxis()->SetTitle("Feedthrough"); @@ -1322,7 +1322,7 @@ void LArNoisyROMon::bookPartitionHistos(partitionHistos& partition, const std::s } hName = "CandidateMNBTightFEBFracPerEvt_"+name; - hTitle = "Yield of events with FEB MNB Tight Candidate "+m_NoisyFEBDefStr+" - "+name; + hTitle = "Yield of events with FEB MNB Tight Candidate (>17 chan with Q>4000) - "+name; partition.h_CandidateMNBTightFEBFracPerEvt = TH2F_LW::create(hName.c_str(), hTitle.c_str(), slot,slot_low,slot_up,FEB,FEB_low,FEB_up); partition.h_CandidateMNBTightFEBFracPerEvt->GetXaxis()->SetTitle("Slot"); partition.h_CandidateMNBTightFEBFracPerEvt->GetYaxis()->SetTitle("Feedthrough"); @@ -1336,7 +1336,7 @@ void LArNoisyROMon::bookPartitionHistos(partitionHistos& partition, const std::s } hName = "CandidateMNBLooseFEBFracPerEvt_"+name; - hTitle = "Yield of events with FEB MNB Loose Candidate "+m_NoisyFEBDefStr+" - "+name; + hTitle = "Yield of events with FEB MNB Loose Candidate (>5 chan with Q>4000) - "+name; partition.h_CandidateMNBLooseFEBFracPerEvt = TH2F_LW::create(hName.c_str(), hTitle.c_str(), slot,slot_low,slot_up,FEB,FEB_low,FEB_up); partition.h_CandidateMNBLooseFEBFracPerEvt->GetXaxis()->SetTitle("Slot"); partition.h_CandidateMNBLooseFEBFracPerEvt->GetYaxis()->SetTitle("Feedthrough"); @@ -1370,7 +1370,7 @@ void LArNoisyROMon::bookPartitionHistos(partitionHistos& partition, const std::s partition.h_SaturatedNoisyEvent->GetXaxis()->SetTitle("Luminosity Block"); hName = "MNBTightEvent_"+name; - partition.h_MNBTightEventFrac = TH1F_LW::create(hName.c_str(),"Yield of events flagged as LArMNBTightRO_Std", m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); + partition.h_MNBTightEventFrac = TH1F_LW::create(hName.c_str(),"Yield of events flagged as LArMNBTight", m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); partition.h_MNBTightEventFrac->GetXaxis()->SetTitle("Luminosity Block"); groupfracbin.regHist(partition.h_MNBTightEventFrac).ignore(); // Histogram below is temporary. Normalized at the end of run to produce the above histograms @@ -1379,7 +1379,7 @@ void LArNoisyROMon::bookPartitionHistos(partitionHistos& partition, const std::s partition.h_MNBTightEvent->GetXaxis()->SetTitle("Luminosity Block"); hName = "MNBLooseEvent_"+name; - partition.h_MNBLooseEventFrac = TH1F_LW::create(hName.c_str(),"Yield of events flagged as LArMNBLooseRO_Std", m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); + partition.h_MNBLooseEventFrac = TH1F_LW::create(hName.c_str(),"Yield of events flagged as LArMNBLoose", m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); partition.h_MNBLooseEventFrac->GetXaxis()->SetTitle("Luminosity Block"); groupfracbin.regHist(partition.h_MNBLooseEventFrac).ignore(); // Histogram below is temporary. Normalized at the end of run to produce the above histograms @@ -1417,7 +1417,7 @@ void LArNoisyROMon::bookPartitionHistos(partitionHistos& partition, const std::s partition.h_SaturatedNoisyEventTimeVeto->GetXaxis()->SetTitle("Luminosity Block"); hName = "MNBTightEvent_TimeVeto_"+name; - partition.h_MNBTightEventTimeVetoFrac = TH1F_LW::create(hName.c_str(), "Yield of events flagged as LArMNBTightRO_Std not vetoed by time window", m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); + partition.h_MNBTightEventTimeVetoFrac = TH1F_LW::create(hName.c_str(), "Yield of events flagged as LArMNBTight not vetoed by time window", m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); partition.h_MNBTightEventTimeVetoFrac->GetXaxis()->SetTitle("Luminosity Block"); groupfracbin.regHist(partition.h_MNBTightEventTimeVetoFrac).ignore(); @@ -1425,8 +1425,8 @@ void LArNoisyROMon::bookPartitionHistos(partitionHistos& partition, const std::s partition.h_MNBTightEventTimeVeto = TH1I_LW::create(hName.c_str(), hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); partition.h_MNBTightEventTimeVeto->GetXaxis()->SetTitle("Luminosity Block"); - hName = "MNBLooseEvent_TimeVeto_"+name; - partition.h_MNBLooseEventTimeVetoFrac = TH1F_LW::create(hName.c_str(), "Yield of events flagged as LArMNBLooseRO_Std not vetoed by time window", m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); + hName = "MNBLooseEvent_TimeVeto_"+name; + partition.h_MNBLooseEventTimeVetoFrac = TH1F_LW::create(hName.c_str(), "Yield of events flagged as LArMNBLoose not vetoed by time window", m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); partition.h_MNBLooseEventTimeVetoFrac->GetXaxis()->SetTitle("Luminosity Block"); groupfracbin.regHist(partition.h_MNBLooseEventTimeVetoFrac).ignore(); @@ -1509,172 +1509,85 @@ StatusCode LArNoisyROMon::finalize() msg(MSG::INFO) << " in LArNoisyROMon::finalize() " << endmsg; // delete temposary histograms - if ( h_LBN ) { - LWHist::safeDelete(h_LBN); - h_LBN = NULL; - } - if ( h_NoisyEvent ) { - LWHist::safeDelete(h_NoisyEvent); - h_NoisyEvent = NULL; - } - if ( m_BarrelA.h_NoisyEvent ) { - LWHist::safeDelete(m_BarrelA.h_NoisyEvent); - m_BarrelA.h_NoisyEvent = NULL; - } - if ( m_BarrelC.h_NoisyEvent ) { - LWHist::safeDelete(m_BarrelC.h_NoisyEvent); - m_BarrelC.h_NoisyEvent = NULL; - } - if ( m_EMECA.h_NoisyEvent ) { - LWHist::safeDelete(m_EMECA.h_NoisyEvent); - m_EMECA.h_NoisyEvent = NULL; - } - if ( m_EMECC.h_NoisyEvent ) { - LWHist::safeDelete(m_EMECC.h_NoisyEvent); - m_EMECC.h_NoisyEvent = NULL; - } - if ( h_NoisyEventTimeVeto ) { - LWHist::safeDelete(h_NoisyEventTimeVeto); - h_NoisyEventTimeVeto = NULL; - } - if ( m_BarrelA.h_NoisyEventTimeVeto ) { - LWHist::safeDelete(m_BarrelA.h_NoisyEventTimeVeto); - m_BarrelA.h_NoisyEventTimeVeto = NULL; - } - if ( m_BarrelC.h_NoisyEventTimeVeto ) { - LWHist::safeDelete(m_BarrelC.h_NoisyEventTimeVeto); - m_BarrelC.h_NoisyEventTimeVeto = NULL; - } - if ( m_EMECA.h_NoisyEventTimeVeto ) { - LWHist::safeDelete(m_EMECA.h_NoisyEventTimeVeto); - m_EMECA.h_NoisyEventTimeVeto = NULL; - } - if ( m_EMECC.h_NoisyEventTimeVeto ) { - LWHist::safeDelete(m_EMECC.h_NoisyEventTimeVeto); - m_EMECC.h_NoisyEventTimeVeto = NULL; - } -if ( h_MNBTightEvent ) { - LWHist::safeDelete(h_MNBTightEvent); - h_MNBTightEvent = NULL; - } - if ( m_BarrelA.h_MNBTightEvent ) { - LWHist::safeDelete(m_BarrelA.h_MNBTightEvent); - m_BarrelA.h_MNBTightEvent = NULL; - } - if ( m_BarrelC.h_MNBTightEvent ) { - LWHist::safeDelete(m_BarrelC.h_MNBTightEvent); - m_BarrelC.h_MNBTightEvent = NULL; - } - if ( m_EMECA.h_MNBTightEvent ) { - LWHist::safeDelete(m_EMECA.h_MNBTightEvent); - m_EMECA.h_MNBTightEvent = NULL; - } - if ( m_EMECC.h_MNBTightEvent ) { - LWHist::safeDelete(m_EMECC.h_MNBTightEvent); - m_EMECC.h_MNBTightEvent = NULL; - } - if ( h_MNBTightEventTimeVeto ) { - LWHist::safeDelete(h_MNBTightEventTimeVeto); - h_MNBTightEventTimeVeto = NULL; - } - if ( m_BarrelA.h_MNBTightEventTimeVeto ) { - LWHist::safeDelete(m_BarrelA.h_MNBTightEventTimeVeto); - m_BarrelA.h_MNBTightEventTimeVeto = NULL; - } - if ( m_BarrelC.h_MNBTightEventTimeVeto ) { - LWHist::safeDelete(m_BarrelC.h_MNBTightEventTimeVeto); - m_BarrelC.h_MNBTightEventTimeVeto = NULL; - } - if ( m_EMECA.h_MNBTightEventTimeVeto ) { - LWHist::safeDelete(m_EMECA.h_MNBTightEventTimeVeto); - m_EMECA.h_MNBTightEventTimeVeto = NULL; - } - if ( m_EMECC.h_MNBTightEventTimeVeto ) { - LWHist::safeDelete(m_EMECC.h_MNBTightEventTimeVeto); - m_EMECC.h_MNBTightEventTimeVeto = NULL; + if ( m_h_LBN ) { + LWHist::safeDelete(m_h_LBN); + m_h_LBN = nullptr; } - if ( h_MNBLooseEvent ) { - LWHist::safeDelete(h_MNBLooseEvent); - h_MNBLooseEvent = NULL; - } - if ( m_BarrelA.h_MNBLooseEvent ) { - LWHist::safeDelete(m_BarrelA.h_MNBLooseEvent); - m_BarrelA.h_MNBLooseEvent = NULL; - } - if ( m_BarrelC.h_MNBLooseEvent ) { - LWHist::safeDelete(m_BarrelC.h_MNBLooseEvent); - m_BarrelC.h_MNBLooseEvent = NULL; + if ( m_h_NoisyEvent ) { + LWHist::safeDelete(m_h_NoisyEvent); + m_h_NoisyEvent = nullptr; } - if ( m_EMECA.h_MNBLooseEvent ) { - LWHist::safeDelete(m_EMECA.h_MNBLooseEvent); - m_EMECA.h_MNBLooseEvent = NULL; - } - if ( m_EMECC.h_MNBLooseEvent ) { - LWHist::safeDelete(m_EMECC.h_MNBLooseEvent); - m_EMECC.h_MNBLooseEvent = NULL; - } - if ( h_MNBLooseEventTimeVeto ) { - LWHist::safeDelete(h_MNBLooseEventTimeVeto); - h_MNBLooseEventTimeVeto = NULL; - } - if ( m_BarrelA.h_MNBLooseEventTimeVeto ) { - LWHist::safeDelete(m_BarrelA.h_MNBLooseEventTimeVeto); - m_BarrelA.h_MNBLooseEventTimeVeto = NULL; - } - if ( m_BarrelC.h_MNBLooseEventTimeVeto ) { - LWHist::safeDelete(m_BarrelC.h_MNBLooseEventTimeVeto); - m_BarrelC.h_MNBLooseEventTimeVeto = NULL; - } - if ( m_EMECA.h_MNBLooseEventTimeVeto ) { - LWHist::safeDelete(m_EMECA.h_MNBLooseEventTimeVeto); - m_EMECA.h_MNBLooseEventTimeVeto = NULL; - } - if ( m_EMECC.h_MNBLooseEventTimeVeto ) { - LWHist::safeDelete(m_EMECC.h_MNBLooseEventTimeVeto); - m_EMECC.h_MNBLooseEventTimeVeto = NULL; - } - if ( h_SaturatedTight ) { - LWHist::safeDelete(h_SaturatedTight); - h_SaturatedTight = NULL; - } - if ( m_BarrelA.h_SaturatedNoisyEvent ) { - LWHist::safeDelete(m_BarrelA.h_SaturatedNoisyEvent); - m_BarrelA.h_SaturatedNoisyEvent = NULL; - } - if ( m_BarrelC.h_SaturatedNoisyEvent ) { - LWHist::safeDelete(m_BarrelC.h_SaturatedNoisyEvent); - m_BarrelC.h_SaturatedNoisyEvent = NULL; + + if ( m_h_NoisyEventTimeVeto ) { + LWHist::safeDelete(m_h_NoisyEventTimeVeto); + m_h_NoisyEventTimeVeto = nullptr; } - if ( m_EMECA.h_SaturatedNoisyEvent ) { - LWHist::safeDelete(m_EMECA.h_SaturatedNoisyEvent); - m_EMECA.h_SaturatedNoisyEvent = NULL; + + if ( m_h_MNBTightEvent ) { + LWHist::safeDelete(m_h_MNBTightEvent); + m_h_MNBTightEvent = nullptr; } - if ( m_EMECC.h_SaturatedNoisyEvent ) { - LWHist::safeDelete(m_EMECC.h_SaturatedNoisyEvent); - m_EMECC.h_SaturatedNoisyEvent = NULL; + + if ( m_h_MNBTightEventTimeVeto ) { + LWHist::safeDelete(m_h_MNBTightEventTimeVeto); + m_h_MNBTightEventTimeVeto = nullptr; } - if ( h_SaturatedTightTimeVeto ) { - LWHist::safeDelete(h_SaturatedTightTimeVeto); - h_SaturatedTightTimeVeto = NULL; + + if ( m_h_MNBLooseEvent ) { + LWHist::safeDelete(m_h_MNBLooseEvent); + m_h_MNBLooseEvent = nullptr; } - if ( m_BarrelA.h_SaturatedNoisyEventTimeVeto ) { - LWHist::safeDelete(m_BarrelA.h_SaturatedNoisyEventTimeVeto); - m_BarrelA.h_SaturatedNoisyEventTimeVeto = NULL; + + if ( m_h_MNBLooseEventTimeVeto ) { + LWHist::safeDelete(m_h_MNBLooseEventTimeVeto); + m_h_MNBLooseEventTimeVeto = nullptr; } - if ( m_BarrelC.h_SaturatedNoisyEventTimeVeto ) { - LWHist::safeDelete(m_BarrelC.h_SaturatedNoisyEventTimeVeto); - m_BarrelC.h_SaturatedNoisyEventTimeVeto = NULL; + + if ( m_h_SaturatedTight ) { + LWHist::safeDelete(m_h_SaturatedTight); + m_h_SaturatedTight = nullptr; } - if ( m_EMECA.h_SaturatedNoisyEventTimeVeto ) { - LWHist::safeDelete(m_EMECA.h_SaturatedNoisyEventTimeVeto); - m_EMECA.h_SaturatedNoisyEventTimeVeto = NULL; + + if ( m_h_SaturatedTightTimeVeto ) { + LWHist::safeDelete(m_h_SaturatedTightTimeVeto); + m_h_SaturatedTightTimeVeto = nullptr; } - if ( m_EMECC.h_SaturatedNoisyEventTimeVeto ) { - LWHist::safeDelete(m_EMECC.h_SaturatedNoisyEventTimeVeto); - m_EMECC.h_SaturatedNoisyEventTimeVeto = NULL; + + + for (partitionHistos* part : {&m_BarrelA, &m_BarrelC, &m_EMECA, &m_EMECC}) { + LWHist::safeDelete(part->h_NoisyEvent); + part->h_NoisyEvent = nullptr; + + LWHist::safeDelete(part->h_NoisyWEvent); + part->h_NoisyWEvent = nullptr; + + LWHist::safeDelete(part->h_NoisyEventTimeVeto); + part->h_NoisyEventTimeVeto = nullptr; + + LWHist::safeDelete(part->h_MNBTightEvent); + part->h_MNBTightEvent = nullptr; + + LWHist::safeDelete(part->h_MNBTightEventTimeVeto); + part->h_MNBTightEventTimeVeto = nullptr; + + LWHist::safeDelete(part->h_MNBLooseEvent); + part->h_MNBLooseEvent = nullptr; + + LWHist::safeDelete(part->h_MNBLooseEventTimeVeto); + part->h_MNBLooseEventTimeVeto = nullptr; + + LWHist::safeDelete(part->h_SaturatedNoisyEvent); + part->h_SaturatedNoisyEvent = nullptr; + + LWHist::safeDelete(part->h_SaturatedNoisyEventTimeVeto); + part->h_SaturatedNoisyEventTimeVeto = nullptr; + + LWHist::safeDelete(part->h_NoisyWEventTimeVeto); + part->h_NoisyWEventTimeVeto=nullptr; } + return StatusCode::SUCCESS; } diff --git a/LArCalorimeter/LArMonTools/src/LArRODMonTool.cxx b/LArCalorimeter/LArMonTools/src/LArRODMonTool.cxx index bbfa9f6eeb0..6bf8786da89 100755 --- a/LArCalorimeter/LArMonTools/src/LArRODMonTool.cxx +++ b/LArCalorimeter/LArMonTools/src/LArRODMonTool.cxx @@ -164,6 +164,9 @@ LArRODMonTool::LArRODMonTool(const std::string& type, m_last_lb = -1; m_curr_lb = -1; + + m_calo_description_mgr=nullptr; + m_hsize=0; } /*---------------------------------------------------------*/ @@ -287,7 +290,7 @@ LArRODMonTool::initialize() { return StatusCode::FAILURE; } ATH_MSG_INFO("Resetting history size: "<<m_hsize); - m_hdone=new bool[m_hsize]; + m_hdone.assign(m_hsize,false); return StatusCode::SUCCESS; } @@ -1203,7 +1206,7 @@ StatusCode LArRODMonTool::compareChannels(const HWIdentifier chid,const LArRawCh hg.m_hOut_E_FT_vs_SLOT_shadow[(m_curr_lb % m_history_size) / m_history_granularity ]->Fill(slot_fD,feedthrough_fD); } //adding dumper - if(ndump<max_dump) { + if(m_IsOnline && ndump<max_dump) { const int channel=m_LArOnlineIDHelper->channel(chid); const HWIdentifier febid=m_LArOnlineIDHelper->feb_Id(chid); msg(MSG::INFO) << "Channel: " << channel << " of FEB " << febid << endmsg; @@ -1257,13 +1260,14 @@ StatusCode LArRODMonTool::compareChannels(const HWIdentifier chid,const LArRawCh msg(MSG::INFO) << "Noise for mu=20: "<<noise<<endmsg; msg(MSG::INFO) << "HVScaleCorr: "<<hvscale<<endmsg; double emon=0.; - for (unsigned k=0; k<samples.size(); ++k) emon += (samples.at(k)-ped)*this_OFC_a_test.at(k); + const unsigned nOFCSamp=std::min(samples.size(),this_OFC_a_test.size()); + for (unsigned k=0; k<nOFCSamp; ++k) emon += (samples.at(k)-ped)*this_OFC_a_test.at(k); emon *= escale; emon += ramp0; msg(MSG::INFO) << "intercept + Escale*Sum[(sample-ped)*OFCa] "<<emon<<endmsg; ++ndump; - } - } + } // DE cut + } // dumper }// end energy histograms if (keepT) { //Time histograms diff --git a/LArCalorimeter/LArMonTools/src/LArRawChannelMonTool.cxx b/LArCalorimeter/LArMonTools/src/LArRawChannelMonTool.cxx index 810c1499573..b33dbe613c5 100755 --- a/LArCalorimeter/LArMonTools/src/LArRawChannelMonTool.cxx +++ b/LArCalorimeter/LArMonTools/src/LArRawChannelMonTool.cxx @@ -86,73 +86,73 @@ LArRawChannelMonTool::LArRawChannelMonTool( const std::string & type, const std::string & name, const IInterface* parent ) : ManagedMonitorToolBase(type, name, parent) - , _occupancy_thresholds( 8, 500. * MeV ) - , _signal_thresholds(8, 500. * MeV ) - , _pos_noise_thresholds( 8, 3 ) - , _neg_noise_thresholds( 8, 3 ) - , _bcid_signal_threshold( 500. * MeV ) - , _time_threshold ( 5 ) - , _quality_threshold( 4000 ) - , _noise_burst_percent_thresholds( 8, 1. ) - , _noise_burst_nChannel_thresholds( 8, 10 ) - , _n_lumi_blocks( 1500 ) - , _lar_online_id_ptr ( 0 ) - , _calo_description_mgr_ptr( 0 ) - , _calo_id_mgr_ptr( 0 ) - , _cabel_service_tool ( "LArCablingService" ) - , _masking_tool ( "BadLArRawChannelMask" ) - , _atlas_ready( false ) - , _lar_online_id_str_helper_ptr ( 0 ) - , _has_lar_raw_channels( false ) + , m_occupancy_thresholds( 8, 500. * MeV ) + , m_signal_thresholds(8, 500. * MeV ) + , m_pos_noise_thresholds( 8, 3 ) + , m_neg_noise_thresholds( 8, 3 ) + , m_bcid_signal_threshold( 500. * MeV ) + , m_time_threshold ( 5 ) + , m_quality_threshold( 4000 ) + , m_noise_burst_percent_thresholds( 8, 1. ) + , m_noise_burst_nChannel_thresholds( 8, 10 ) + , m_n_lumi_blocks( 1500 ) + , m_lar_online_id_ptr ( 0 ) + , m_calo_description_mgr_ptr( 0 ) + , m_calo_id_mgr_ptr( 0 ) + , m_cabel_service_tool ( "LArCablingService" ) + , m_masking_tool ( "BadLArRawChannelMask" ) + , m_atlas_ready( false ) + , m_lar_online_id_str_helper_ptr ( 0 ) + , m_has_lar_raw_channels( false ) // , _global_bcid_occupancy(0) // , _global_lar_eta_phi_acc( 0 ) - , _interval( lowStat ) - , _is_noise_event( false ) - , _timeResolution( 30, 1 ) - , _event_counter( 0 ) - , _noise_stream_event_counter( 0 ) + , m_interval( lowStat ) + , m_is_noise_event( false ) + , m_timeResolution( 30, 1 ) + , m_event_counter( 0 ) + , m_noise_stream_event_counter( 0 ) { - declareProperty( "dataNameBase", _data_name_base = "LArRawChannel" ); + declareProperty( "dataNameBase", m_data_name_base = "LArRawChannel" ); declareProperty( "LArRawChannelContainerKey", - _LArRawChannel_container_key = "LArRawChannels" ); - declareProperty( "calo_noise_tool", _calo_noise_tool ); - declareProperty( "masking_tool", _masking_tool ); - declareProperty( "ATLASReadyFilterTool", _filterAtlasReady_tools ); + m_LArRawChannel_container_key = "LArRawChannels" ); + declareProperty( "calo_noise_tool", m_calo_noise_tool ); + declareProperty( "masking_tool", m_masking_tool ); + declareProperty( "ATLASReadyFilterTool", m_filterAtlasReady_tools ); - declareProperty( "occupancy_thresholds", _occupancy_thresholds ); - declareProperty( "signal_thresholds", _signal_thresholds ); - declareProperty( "pos_noise_thresholds", _pos_noise_thresholds ); - declareProperty( "neg_noise_thresholds", _neg_noise_thresholds ); + declareProperty( "occupancy_thresholds", m_occupancy_thresholds ); + declareProperty( "signal_thresholds", m_signal_thresholds ); + declareProperty( "pos_noise_thresholds", m_pos_noise_thresholds ); + declareProperty( "neg_noise_thresholds", m_neg_noise_thresholds ); - declareProperty( "bcid_signal_threshold", _bcid_signal_threshold = 500. * MeV ); - declareProperty( "time_threshold", _time_threshold = 5 ); - declareProperty( "quality_threshold", _quality_threshold = 4000 ); - declareProperty( "noise_threshold", _noise_threshold = 3 ); - declareProperty( "noise_burst_percent_threshold", _noise_burst_percent_thresholds ); - declareProperty( "noise_burst_nChannel_threshold", _noise_burst_nChannel_thresholds ); + declareProperty( "bcid_signal_threshold", m_bcid_signal_threshold = 500. * MeV ); + declareProperty( "time_threshold", m_time_threshold = 5 ); + declareProperty( "quality_threshold", m_quality_threshold = 4000 ); + declareProperty( "noise_threshold", m_noise_threshold = 3 ); + declareProperty( "noise_burst_percent_threshold", m_noise_burst_percent_thresholds ); + declareProperty( "noise_burst_nChannel_threshold", m_noise_burst_nChannel_thresholds ); - declareProperty( "UseElecNoiseOnly", _useElecNoiseOnly = false ); + declareProperty( "UseElecNoiseOnly", m_useElecNoiseOnly = false ); - declareProperty( "monitor_occupancy", _monitor_occupancy = false ); - declareProperty( "monitor_signal", _monitor_signal = true ); - declareProperty( "monitor_positive_noise", _monitor_positive_noise = true ); - declareProperty( "monitor_negative_noise", _monitor_negative_noise = true); - declareProperty( "monitor_time", _monitor_time = true ); - declareProperty( "monitor_quality", _monitor_quality = false ); - declareProperty( "monitor_burst", _monitor_burst = true ); + declareProperty( "monitor_occupancy", m_monitor_occupancy = false ); + declareProperty( "monitor_signal", m_monitor_signal = true ); + declareProperty( "monitor_positive_noise", m_monitor_positive_noise = true ); + declareProperty( "monitor_negative_noise", m_monitor_negative_noise = true); + declareProperty( "monitor_time", m_monitor_time = true ); + declareProperty( "monitor_quality", m_monitor_quality = false ); + declareProperty( "monitor_burst", m_monitor_burst = true ); - declareProperty( "monitor_febs", _monitor_febs = false ); - declareProperty( "monitor_feedthroughs", _monitor_feedthroughs = false ); - declareProperty( "monitor_detectors", _monitor_detectors = true ); + declareProperty( "monitor_febs", m_monitor_febs = false ); + declareProperty( "monitor_feedthroughs", m_monitor_feedthroughs = false ); + declareProperty( "monitor_detectors", m_monitor_detectors = true ); - declareProperty( "db_and_ofc_only", _db_and_ofc_only = true ); + declareProperty( "db_and_ofc_only", m_db_and_ofc_only = true ); - declareProperty( "interval", _interval_str = "lowStat" ); + declareProperty( "interval", m_interval_str = "lowStat" ); - declareProperty( "n_lumi_blocks", _n_lumi_blocks = 1500 ); + declareProperty( "n_lumi_blocks", m_n_lumi_blocks = 1500 ); - declareProperty( "noise_streams", _noise_streams); + declareProperty( "noise_streams", m_noise_streams); } @@ -160,7 +160,7 @@ LArRawChannelMonTool::LArRawChannelMonTool( const std::string & type, /*----------------------------------------------------------------------------*/ LArRawChannelMonTool::~LArRawChannelMonTool() { - delete _lar_online_id_str_helper_ptr; + delete m_lar_online_id_str_helper_ptr; } /*----------------------------------------------------------------------------*/ @@ -168,10 +168,10 @@ StatusCode LArRawChannelMonTool::initialize() { ATH_MSG(DEBUG) << "===> start " << name() << "::initialize <=== " << endmsg; - _event_counter = 0; - _noise_stream_event_counter = 0; + m_event_counter = 0; + m_noise_stream_event_counter = 0; - _interval = intervalStringToEnum( _interval_str ); + m_interval = intervalStringToEnum( m_interval_str ); // --- non-trivial ManagedMonitorToolBase intialize routine --- if ( ManagedMonitorToolBase::initialize().isSuccess() ) { @@ -187,7 +187,7 @@ StatusCode LArRawChannelMonTool::initialize() } // --- get LArOnlineID --- - if ( detStore()->retrieve( _lar_online_id_ptr, "LArOnlineID" ).isSuccess() ) { + if ( detStore()->retrieve( m_lar_online_id_ptr, "LArOnlineID" ).isSuccess() ) { ATH_MSG(DEBUG) << "connected non-tool: LArOnlineID" << endmsg; @@ -201,7 +201,7 @@ StatusCode LArRawChannelMonTool::initialize() // --- get CaloDetDescrManager --- - if ( detStore()->retrieve( _calo_description_mgr_ptr ).isSuccess() ) { + if ( detStore()->retrieve( m_calo_description_mgr_ptr ).isSuccess() ) { ATH_MSG(DEBUG) << "connected non-tool: CaloDetDescrManager " << endmsg; @@ -214,7 +214,7 @@ StatusCode LArRawChannelMonTool::initialize() } // --- get CaloIDManager --- - if ( detStore()->retrieve( _calo_id_mgr_ptr ).isSuccess() ) { + if ( detStore()->retrieve( m_calo_id_mgr_ptr ).isSuccess() ) { ATH_MSG(DEBUG) << "connected non-tool: CaloIdManager" << endmsg; @@ -228,70 +228,70 @@ StatusCode LArRawChannelMonTool::initialize() // --- get LArCablingService --- - if ( !RetrieveHandle( _cabel_service_tool ) ) return StatusCode::FAILURE; + if ( !RetrieveHandle( m_cabel_service_tool ) ) return StatusCode::FAILURE; // --- get CaloNoiseTool --- - if ( !RetrieveHandle( _calo_noise_tool ) ) return StatusCode::FAILURE; + if ( !RetrieveHandle( m_calo_noise_tool ) ) return StatusCode::FAILURE; // --- get bad channel mask --- - if ( !RetrieveHandle( _masking_tool ) ) return StatusCode::FAILURE; + if ( !RetrieveHandle( m_masking_tool ) ) return StatusCode::FAILURE; - StatusCode sc = _filterAtlasReady_tools.retrieve(); + StatusCode sc = m_filterAtlasReady_tools.retrieve(); if( !sc ) { - ATH_MSG_ERROR("Could Not Retrieve AtlasFilterTool " << _filterAtlasReady_tools); + ATH_MSG_ERROR("Could Not Retrieve AtlasFilterTool " << m_filterAtlasReady_tools); return StatusCode::FAILURE; } // --- // Get Michel's LArOnlineIDStrHelper: All names are Expert view - _lar_online_id_str_helper_ptr = new - LArOnlineIDStrHelper( _lar_online_id_ptr,LArOnlineIDStrHelper::LARONLINEID); - if ( msgLvl(MSG::DEBUG) ) _lar_online_id_str_helper_ptr->test(); + m_lar_online_id_str_helper_ptr = new + LArOnlineIDStrHelper( m_lar_online_id_ptr,LArOnlineIDStrHelper::LARONLINEID); + if ( msgLvl(MSG::DEBUG) ) m_lar_online_id_str_helper_ptr->test(); // --- // Create FEB -> Detector and FEB -> Feedthrough maps - Identifier::size_type feb_hash_max = _lar_online_id_ptr->febHashMax(); - _feb_hash_to_detector.resize( feb_hash_max ); - _feb_hash_to_ft_hash.resize( feb_hash_max ); + Identifier::size_type feb_hash_max = m_lar_online_id_ptr->febHashMax(); + m_feb_hash_to_detector.resize( feb_hash_max ); + m_feb_hash_to_ft_hash.resize( feb_hash_max ); - citer_vect_hwid end_feb = _lar_online_id_ptr->feb_end(); - for ( citer_vect_hwid itr_feb = _lar_online_id_ptr->feb_begin(); + citer_vect_hwid end_feb = m_lar_online_id_ptr->feb_end(); + for ( citer_vect_hwid itr_feb = m_lar_online_id_ptr->feb_begin(); itr_feb != end_feb ; ++itr_feb) { HWIdentifier feb_id = *itr_feb; - HWIdentifier feedthrough_id = _lar_online_id_ptr->feedthrough_Id( feb_id ); + HWIdentifier feedthrough_id = m_lar_online_id_ptr->feedthrough_Id( feb_id ); - IdentifierHash feb_hash = _lar_online_id_ptr->feb_Hash( feb_id ); - IdentifierHash ft_hash = _lar_online_id_ptr->feedthrough_Hash( feedthrough_id ); + IdentifierHash feb_hash = m_lar_online_id_ptr->feb_Hash( feb_id ); + IdentifierHash ft_hash = m_lar_online_id_ptr->feedthrough_Hash( feedthrough_id ); - std::string ft_name = _lar_online_id_ptr->feedthrough_name( feb_id ); + std::string ft_name = m_lar_online_id_ptr->feedthrough_name( feb_id ); Detector det(UNDEF); // Determine if the FEB is on the Airport's or Charlie's side - if ( _lar_online_id_ptr->pos_neg( *itr_feb ) ) { + if ( m_lar_online_id_ptr->pos_neg( *itr_feb ) ) { // Determine if the FEB is in: the EMB, EMEC, HEC, FCAL - if ( _lar_online_id_ptr->isEMBchannel (*itr_feb) ) det = EMBA; - else if( _lar_online_id_ptr->isEMECchannel(*itr_feb) ) det = EMECA; - else if( _lar_online_id_ptr->isHECchannel (*itr_feb) ) det = HECA; - else if( _lar_online_id_ptr->isFCALchannel(*itr_feb) ) det = FCALA; + if ( m_lar_online_id_ptr->isEMBchannel (*itr_feb) ) det = EMBA; + else if( m_lar_online_id_ptr->isEMECchannel(*itr_feb) ) det = EMECA; + else if( m_lar_online_id_ptr->isHECchannel (*itr_feb) ) det = HECA; + else if( m_lar_online_id_ptr->isFCALchannel(*itr_feb) ) det = FCALA; } else { // Determine if the FEB is in: the EMB, EMEC, HEC, FCAL - if ( _lar_online_id_ptr->isEMBchannel (*itr_feb) ) det = EMBC; - else if( _lar_online_id_ptr->isEMECchannel(*itr_feb) ) det = EMECC; - else if( _lar_online_id_ptr->isHECchannel (*itr_feb) ) det = HECC; - else if( _lar_online_id_ptr->isFCALchannel(*itr_feb) ) det = FCALC; + if ( m_lar_online_id_ptr->isEMBchannel (*itr_feb) ) det = EMBC; + else if( m_lar_online_id_ptr->isEMECchannel(*itr_feb) ) det = EMECC; + else if( m_lar_online_id_ptr->isHECchannel (*itr_feb) ) det = HECC; + else if( m_lar_online_id_ptr->isFCALchannel(*itr_feb) ) det = FCALC; } try { - _feb_hash_to_detector.at( feb_hash ) = det; - _feb_hash_to_ft_hash.at( feb_hash ) = ft_hash; + m_feb_hash_to_detector.at( feb_hash ) = det; + m_feb_hash_to_ft_hash.at( feb_hash ) = ft_hash; } catch ( std::out_of_range &err ) { @@ -304,18 +304,18 @@ StatusCode LArRawChannelMonTool::initialize() // --- loop over channels to determine number of channels in each detector --- // (looping over all channels so this can easlily be done for FEBs and // feedthroughs later ... ) - //_det_to_nchannels = boost::assign::map_list_of(EMBA,0)(EMECA,0)(HECA,0)(FCALA,0)(EMBC,0)(EMECC,0)(HECC,0)(FCALC,0); - _det_to_nchannels[EMBA] = 0; - _det_to_nchannels[EMECA] = 0; - _det_to_nchannels[HECA] = 0; - _det_to_nchannels[FCALA] = 0; - _det_to_nchannels[EMBC] = 0; - _det_to_nchannels[EMECC] = 0; - _det_to_nchannels[HECC] = 0; - _det_to_nchannels[FCALC] = 0; - - citer_vect_hwid channel_end = _lar_online_id_ptr->channel_end(); - for ( citer_vect_hwid channel_itr = _lar_online_id_ptr->channel_begin(); + //m_det_to_nchannels = boost::assign::map_list_of(EMBA,0)(EMECA,0)(HECA,0)(FCALA,0)(EMBC,0)(EMECC,0)(HECC,0)(FCALC,0); + m_det_to_nchannels[EMBA] = 0; + m_det_to_nchannels[EMECA] = 0; + m_det_to_nchannels[HECA] = 0; + m_det_to_nchannels[FCALA] = 0; + m_det_to_nchannels[EMBC] = 0; + m_det_to_nchannels[EMECC] = 0; + m_det_to_nchannels[HECC] = 0; + m_det_to_nchannels[FCALC] = 0; + + citer_vect_hwid channel_end = m_lar_online_id_ptr->channel_end(); + for ( citer_vect_hwid channel_itr = m_lar_online_id_ptr->channel_begin(); channel_itr != channel_end ; ++channel_itr ) { // fixme: skip masked and disconnected channels @@ -323,32 +323,32 @@ StatusCode LArRawChannelMonTool::initialize() Detector det(UNDEF); // Determine if the FEB is on the Airport's or Charlie's side - if ( _lar_online_id_ptr->pos_neg( *channel_itr ) ) { + if ( m_lar_online_id_ptr->pos_neg( *channel_itr ) ) { // Determine if the FEB is in: the EMB, EMEC, HEC, FCAL - if ( _lar_online_id_ptr->isEMBchannel (*channel_itr) ) det = EMBA; - else if( _lar_online_id_ptr->isEMECchannel(*channel_itr) ) det = EMECA; - else if( _lar_online_id_ptr->isHECchannel (*channel_itr) ) det = HECA; - else if( _lar_online_id_ptr->isFCALchannel(*channel_itr) ) det = FCALA; + if ( m_lar_online_id_ptr->isEMBchannel (*channel_itr) ) det = EMBA; + else if( m_lar_online_id_ptr->isEMECchannel(*channel_itr) ) det = EMECA; + else if( m_lar_online_id_ptr->isHECchannel (*channel_itr) ) det = HECA; + else if( m_lar_online_id_ptr->isFCALchannel(*channel_itr) ) det = FCALA; } else { // Determine if the FEB is in: the EMB, EMEC, HEC, FCAL - if ( _lar_online_id_ptr->isEMBchannel (*channel_itr) ) det = EMBC; - else if( _lar_online_id_ptr->isEMECchannel(*channel_itr) ) det = EMECC; - else if( _lar_online_id_ptr->isHECchannel (*channel_itr) ) det = HECC; - else if( _lar_online_id_ptr->isFCALchannel(*channel_itr) ) det = FCALC; + if ( m_lar_online_id_ptr->isEMBchannel (*channel_itr) ) det = EMBC; + else if( m_lar_online_id_ptr->isEMECchannel(*channel_itr) ) det = EMECC; + else if( m_lar_online_id_ptr->isHECchannel (*channel_itr) ) det = HECC; + else if( m_lar_online_id_ptr->isFCALchannel(*channel_itr) ) det = FCALC; } - _det_to_nchannels[det] += 1; + m_det_to_nchannels[det] += 1; } if (msgLvl(MSG::DEBUG)) { msg(MSG::DEBUG) << "Number of channels in detectors: " << std::endl; typedef std::map<Detector,unsigned int> det_int_map_t; - foreach( det_int_map_t::value_type i, _det_to_nchannels){ + foreach( det_int_map_t::value_type i, m_det_to_nchannels){ msg(MSG::DEBUG) << detector_str( i.first ) << " has " << i.second << "channels " << std::endl; } msg(MSG::DEBUG) << endmsg; @@ -357,11 +357,11 @@ StatusCode LArRawChannelMonTool::initialize() std::deque<Detector> detectors = list_of( EMBA )( EMBC )( EMECA )( EMECC )( HECA )( HECC )( FCALA )( FCALC ); foreach( const Detector & det, detectors ){ - _selectionContext[det].quality( _quality_threshold ); + m_selectionContext[det].quality( m_quality_threshold ); } - m_noise_streams_set.insert(_noise_streams.begin(),_noise_streams.end()); + m_noise_streams_set.insert(m_noise_streams.begin(),m_noise_streams.end()); ATH_MSG(DEBUG) << "===> end " << name() << "::initialize <=== " << endmsg; return StatusCode::SUCCESS; @@ -379,7 +379,7 @@ StatusCode LArRawChannelMonTool::bookHistograms() // --- determine whether new histograms need booking --- bool is_new_interval = true; -// switch ( _interval ) { +// switch ( m_interval ) { // // case eventsBlock: // is_new_interval = isNewEventsBlock; @@ -403,7 +403,7 @@ StatusCode LArRawChannelMonTool::bookHistograms() // case file: // case all: // default: -// msg(MSG::WARNING) << "given bad interval job-option: " << _interval_str +// msg(MSG::WARNING) << "given bad interval job-option: " << m_interval_str // << " ... booking histograms per run ..." << endmsg; // is_new_interval = isNewRun; // } @@ -413,76 +413,76 @@ StatusCode LArRawChannelMonTool::bookHistograms() if ( is_new_interval ) { // --- exit if no LArRawChannelContainer exists --- - _has_lar_raw_channels = evtStore()->contains<LArRawChannelContainer>(_LArRawChannel_container_key); - if ( !_has_lar_raw_channels ) return StatusCode::SUCCESS; + m_has_lar_raw_channels = evtStore()->contains<LArRawChannelContainer>(m_LArRawChannel_container_key); + if ( !m_has_lar_raw_channels ) return StatusCode::SUCCESS; // --- To remeber which ft have been booked in which detector --- map_det_idhash_str_th2 det_ft_type_hists; - Identifier::size_type feb_hash_max = _lar_online_id_ptr->febHashMax(); + Identifier::size_type feb_hash_max = m_lar_online_id_ptr->febHashMax(); // --- Per FEB Histograms --- - _per_feb_hists.clear(); - _per_feb_hists[occ_h] = std::vector<shared_ptr<IHistoProxyBase> >( feb_hash_max ); - _per_feb_hists[sig_h] = std::vector<shared_ptr<IHistoProxyBase> >( feb_hash_max ); - _per_feb_hists[gain_h] = std::vector<shared_ptr<IHistoProxyBase> >( feb_hash_max ); - _per_feb_hists[pos_noise_h] = std::vector<shared_ptr<IHistoProxyBase> >( feb_hash_max ); - _per_feb_hists[neg_noise_h] = std::vector<shared_ptr<IHistoProxyBase> >( feb_hash_max ); - _per_feb_hists[time_h] = std::vector<shared_ptr<IHistoProxyBase> >( feb_hash_max ); - _per_feb_hists[quality_h] = std::vector<shared_ptr<IHistoProxyBase> >( feb_hash_max ); - - std::vector<shared_ptr<IHistoProxyBase> >& per_feb_occu = _per_feb_hists[occ_h]; - std::vector<shared_ptr<IHistoProxyBase> >& per_feb_sign = _per_feb_hists[sig_h]; - //std::vector<shared_ptr<IHistoProxyBase> >& per_feb_gain = _per_feb_hists[gain_h]; - std::vector<shared_ptr<IHistoProxyBase> >& per_feb_posn = _per_feb_hists[pos_noise_h]; - std::vector<shared_ptr<IHistoProxyBase> >& per_feb_negn = _per_feb_hists[neg_noise_h]; - std::vector<shared_ptr<IHistoProxyBase> >& per_feb_time = _per_feb_hists[time_h]; - std::vector<shared_ptr<IHistoProxyBase> >& per_feb_qual = _per_feb_hists[quality_h]; + m_per_feb_hists.clear(); + m_per_feb_hists[occ_h] = std::vector<shared_ptr<IHistoProxyBase> >( feb_hash_max ); + m_per_feb_hists[sig_h] = std::vector<shared_ptr<IHistoProxyBase> >( feb_hash_max ); + m_per_feb_hists[gain_h] = std::vector<shared_ptr<IHistoProxyBase> >( feb_hash_max ); + m_per_feb_hists[pos_noise_h] = std::vector<shared_ptr<IHistoProxyBase> >( feb_hash_max ); + m_per_feb_hists[neg_noise_h] = std::vector<shared_ptr<IHistoProxyBase> >( feb_hash_max ); + m_per_feb_hists[time_h] = std::vector<shared_ptr<IHistoProxyBase> >( feb_hash_max ); + m_per_feb_hists[quality_h] = std::vector<shared_ptr<IHistoProxyBase> >( feb_hash_max ); + + std::vector<shared_ptr<IHistoProxyBase> >& per_feb_occu = m_per_feb_hists[occ_h]; + std::vector<shared_ptr<IHistoProxyBase> >& per_feb_sign = m_per_feb_hists[sig_h]; + //std::vector<shared_ptr<IHistoProxyBase> >& per_feb_gain = m_per_feb_hists[gain_h]; + std::vector<shared_ptr<IHistoProxyBase> >& per_feb_posn = m_per_feb_hists[pos_noise_h]; + std::vector<shared_ptr<IHistoProxyBase> >& per_feb_negn = m_per_feb_hists[neg_noise_h]; + std::vector<shared_ptr<IHistoProxyBase> >& per_feb_time = m_per_feb_hists[time_h]; + std::vector<shared_ptr<IHistoProxyBase> >& per_feb_qual = m_per_feb_hists[quality_h]; // --- Per Feedthrough Histograms --- - _per_feedthrough_hists.clear(); - _per_feedthrough_hists[occ_h] = std::vector<shared_ptr<IHistoProxyBase> >( feb_hash_max ); - _per_feedthrough_hists[sig_h] = std::vector<shared_ptr<IHistoProxyBase> >( feb_hash_max ); - _per_feedthrough_hists[pos_noise_h] = std::vector<shared_ptr<IHistoProxyBase> >( feb_hash_max ); - _per_feedthrough_hists[neg_noise_h] = std::vector<shared_ptr<IHistoProxyBase> >( feb_hash_max ); - _per_feedthrough_hists[quality_h] = std::vector<shared_ptr<IHistoProxyBase> >( feb_hash_max ); - - std::vector<shared_ptr<IHistoProxyBase> >& per_ft_occu = _per_feedthrough_hists[occ_h]; - std::vector<shared_ptr<IHistoProxyBase> >& per_ft_sign = _per_feedthrough_hists[sig_h]; - std::vector<shared_ptr<IHistoProxyBase> >& per_ft_posn = _per_feedthrough_hists[pos_noise_h]; - std::vector<shared_ptr<IHistoProxyBase> >& per_ft_negn = _per_feedthrough_hists[neg_noise_h]; - std::vector<shared_ptr<IHistoProxyBase> >& per_ft_qual = _per_feedthrough_hists[quality_h]; + m_per_feedthrough_hists.clear(); + m_per_feedthrough_hists[occ_h] = std::vector<shared_ptr<IHistoProxyBase> >( feb_hash_max ); + m_per_feedthrough_hists[sig_h] = std::vector<shared_ptr<IHistoProxyBase> >( feb_hash_max ); + m_per_feedthrough_hists[pos_noise_h] = std::vector<shared_ptr<IHistoProxyBase> >( feb_hash_max ); + m_per_feedthrough_hists[neg_noise_h] = std::vector<shared_ptr<IHistoProxyBase> >( feb_hash_max ); + m_per_feedthrough_hists[quality_h] = std::vector<shared_ptr<IHistoProxyBase> >( feb_hash_max ); + + std::vector<shared_ptr<IHistoProxyBase> >& per_ft_occu = m_per_feedthrough_hists[occ_h]; + std::vector<shared_ptr<IHistoProxyBase> >& per_ft_sign = m_per_feedthrough_hists[sig_h]; + std::vector<shared_ptr<IHistoProxyBase> >& per_ft_posn = m_per_feedthrough_hists[pos_noise_h]; + std::vector<shared_ptr<IHistoProxyBase> >& per_ft_negn = m_per_feedthrough_hists[neg_noise_h]; + std::vector<shared_ptr<IHistoProxyBase> >& per_ft_qual = m_per_feedthrough_hists[quality_h]; // --- clear per detector maps --- - _per_detector_hists.clear(); - std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_occu = _per_detector_hists[occ_h]; - std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_sign = _per_detector_hists[sig_h]; - std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_gain = _per_detector_hists[gain_h]; - std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_posn = _per_detector_hists[pos_noise_h]; - std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_negn = _per_detector_hists[neg_noise_h]; - std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_burs = _per_detector_hists[burst_h]; - std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_timeVetoBurs = _per_detector_hists[timeVetoBurst_h]; - std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_nfrac= _per_detector_hists[noise_fraction_h]; - std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_nfracNeg= _per_detector_hists[noise_fraction_Neg_h]; - std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_nfrac_W= _per_detector_hists[noise_fraction_W_h]; - std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_nfracNoLArNoisyRO= _per_detector_hists[noise_fraction_NoLArNoisyRO_h]; - std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_nfracTimeVetoLArNoisyRO= _per_detector_hists[noise_fraction_TimeVetoLArNoisyRO_h]; - - std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_pede = _per_detector_hists[pedestal_evolution_h]; - std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_sumE_BCID = _per_detector_hists[sumE_vs_BCID_h]; - - std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_mfebt= _per_detector_hists[mean_feb_time_h]; - // map<Detector,shared_ptr<IHistoProxyBase> >& per_det_dtdet= _per_detector_hists["det_time_diff"];// VB - // map<Detector,shared_ptr<IHistoProxyBase> >& per_det_lbdt = _per_detector_hists["det_lb_time_diff"];// VB - // map<Detector,shared_ptr<IHistoProxyBase> >& per_det_lbvdt= _per_detector_hists["lb_v_time_diff"];// VB - - std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_qual = _per_detector_hists[quality_h]; - std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_qnChan= _per_detector_hists[quality_nChannel_h]; - std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_qburs= _per_detector_hists[quality_burst_h]; - // std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_nChan_qburs= _per_detector_hists[quality_nChannel_burst_h]; - // std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_mevbc= _per_detector_hists[E_v_bc_h]; + m_per_detector_hists.clear(); + std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_occu = m_per_detector_hists[occ_h]; + std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_sign = m_per_detector_hists[sig_h]; + std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_gain = m_per_detector_hists[gain_h]; + std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_posn = m_per_detector_hists[pos_noise_h]; + std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_negn = m_per_detector_hists[neg_noise_h]; + std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_burs = m_per_detector_hists[burst_h]; + std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_timeVetoBurs = m_per_detector_hists[timeVetoBurst_h]; + std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_nfrac= m_per_detector_hists[noise_fraction_h]; + std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_nfracNeg= m_per_detector_hists[noise_fraction_Neg_h]; + std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_nfrac_W= m_per_detector_hists[noise_fraction_W_h]; + std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_nfracNoLArNoisyRO= m_per_detector_hists[noise_fraction_NoLArNoisyRO_h]; + std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_nfracTimeVetoLArNoisyRO= m_per_detector_hists[noise_fraction_TimeVetoLArNoisyRO_h]; + + std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_pede = m_per_detector_hists[pedestal_evolution_h]; + std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_sumE_BCID = m_per_detector_hists[sumE_vs_BCID_h]; + + std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_mfebt= m_per_detector_hists[mean_feb_time_h]; + // map<Detector,shared_ptr<IHistoProxyBase> >& per_det_dtdet= m_per_detector_hists["det_time_diff"];// VB + // map<Detector,shared_ptr<IHistoProxyBase> >& per_det_lbdt = m_per_detector_hists["det_lb_time_diff"];// VB + // map<Detector,shared_ptr<IHistoProxyBase> >& per_det_lbvdt= m_per_detector_hists["lb_v_time_diff"];// VB + + std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_qual = m_per_detector_hists[quality_h]; + std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_qnChan= m_per_detector_hists[quality_nChannel_h]; + std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_qburs= m_per_detector_hists[quality_burst_h]; + // std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_nChan_qburs= m_per_detector_hists[quality_nChannel_burst_h]; + // std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_mevbc= m_per_detector_hists[E_v_bc_h]; - citer_vect_hwid end_feb = _lar_online_id_ptr->feb_end(); + citer_vect_hwid end_feb = m_lar_online_id_ptr->feb_end(); @@ -492,62 +492,62 @@ StatusCode LArRawChannelMonTool::bookHistograms() std::map<Detector,std::map<RawChHisto,shared_ptr<LWHistFactoryBase> > > det_histogram_factories; shared_ptr<LWHistFactoryBase> factory_ptr; // --- FEB histogram factories --- - if ( _monitor_febs ) { + if ( m_monitor_febs ) { foreach ( const Detector& det, detectors ) { - if ( _monitor_occupancy ) { + if ( m_monitor_occupancy ) { std::string title = "Number" + - threshold_histogram_title_snippet(_occupancy_thresholds.at(det)) - + _data_name_base + " in "; + threshold_histogram_title_snippet(m_occupancy_thresholds.at(det)) + + m_data_name_base + " in "; factory_ptr.reset(new LWHist1DFactory<TH1I_LW>(title.c_str(),128,-0.5,127.5)); factory_ptr->SetXTitle("Channel"); feb_histogram_factories[det][occ_h] = factory_ptr; } - if ( _monitor_signal ) { + if ( m_monitor_signal ) { std::string title= "Average Energy (MeV)" + - threshold_histogram_title_snippet( _signal_thresholds.at(det) ) + - _data_name_base + " in "; + threshold_histogram_title_snippet( m_signal_thresholds.at(det) ) + + m_data_name_base + " in "; factory_ptr.reset( new LWHistProfileFactory(title.c_str(), 128, -0.5, 127.5) ); factory_ptr->SetXTitle("Channel"); factory_ptr->SetYTitle("Average Signal (MeV)"); feb_histogram_factories[det][sig_h] = factory_ptr; } - if ( _monitor_positive_noise ) { + if ( m_monitor_positive_noise ) { std::string title= "Percentage of events above positive " + - threshold_histogram_title_snippet(_pos_noise_thresholds.at(det))+ - _data_name_base + " in "; + threshold_histogram_title_snippet(m_pos_noise_thresholds.at(det))+ + m_data_name_base + " in "; factory_ptr.reset(new LWHist1DFactory<TH1F_LW>(title.c_str(),128, -0.5, 127.5)); factory_ptr->SetXTitle("Channel"); factory_ptr->SetYTitle("Percentage Accepted"); feb_histogram_factories[det][pos_noise_h] = factory_ptr; } - if ( _monitor_negative_noise ) { + if ( m_monitor_negative_noise ) { std::string title= "Percentage of events below negative " + - threshold_histogram_title_snippet(_neg_noise_thresholds.at(det)) + - _data_name_base + " in "; + threshold_histogram_title_snippet(m_neg_noise_thresholds.at(det)) + + m_data_name_base + " in "; factory_ptr.reset(new LWHist1DFactory<TH1F_LW>(title.c_str(),128, -0.5, 127.5)); factory_ptr->SetXTitle("Channel"); factory_ptr->SetYTitle("Percentage Accepted"); feb_histogram_factories[det][neg_noise_h] = factory_ptr; } - if ( _monitor_time ) { + if ( m_monitor_time ) { std::string title= "Time (ns)" + - threshold_histogram_title_snippet( _time_threshold ) + - _data_name_base + " in "; + threshold_histogram_title_snippet( m_time_threshold ) + + m_data_name_base + " in "; factory_ptr.reset(new LWHist1DFactory<TH1F_LW>(title.c_str(),101, -50.5, 50.5)); factory_ptr->SetXTitle( "Time (ns)" ); feb_histogram_factories[det][time_h] = factory_ptr; } - if ( _monitor_quality ) { + if ( m_monitor_quality ) { std::string title = "Perceantage of events above " + - lexical_cast<std::string>( _quality_threshold ) + " q-factor as" + - " function of " + _data_name_base + " in "; + lexical_cast<std::string>( m_quality_threshold ) + " q-factor as" + + " function of " + m_data_name_base + " in "; factory_ptr.reset(new LWHist1DFactory<TH1I_LW>(title.c_str(),128,-0.5,127.5)); factory_ptr->SetXTitle( "Quality Factor" ); feb_histogram_factories[det][quality_h] = factory_ptr; @@ -555,26 +555,26 @@ StatusCode LArRawChannelMonTool::bookHistograms() } } - if ( _monitor_feedthroughs ) { + if ( m_monitor_feedthroughs ) { foreach( const Detector &det, detectors ) { int n_slots = n_slots_in_feedthroughs( det ); double x_slots_max = double( n_slots ) + 0.5; - if ( _monitor_occupancy ) { + if ( m_monitor_occupancy ) { std::string title = "Number" + - threshold_histogram_title_snippet( _occupancy_thresholds.at(det) ) + - _data_name_base + " in "; + threshold_histogram_title_snippet( m_occupancy_thresholds.at(det) ) + + m_data_name_base + " in "; factory_ptr.reset(new LWHist2DFactory<TH2I_LW>(title.c_str(),128, -0.5, 127.5, n_slots, 0.5, x_slots_max)); factory_ptr->SetXTitle( "Channel" ); factory_ptr->SetYTitle( "Front End Board" ); ft_histogram_factories[det][occ_h] = factory_ptr; } - if ( _monitor_signal ) { + if ( m_monitor_signal ) { std::string title = "Mean Energy (MeV)" + - threshold_histogram_title_snippet( _signal_thresholds.at(det) ) + - _data_name_base + " in "; + threshold_histogram_title_snippet( m_signal_thresholds.at(det) ) + + m_data_name_base + " in "; factory_ptr.reset(new LWHistProfile2DFactory(title.c_str(),128, -0.5, 127.5, n_slots, 0.5, x_slots_max )); factory_ptr->SetXTitle("Channel"); factory_ptr->SetYTitle("Front End Board"); @@ -582,10 +582,10 @@ StatusCode LArRawChannelMonTool::bookHistograms() ft_histogram_factories[det][sig_h] = factory_ptr; } - if ( _monitor_positive_noise ) { + if ( m_monitor_positive_noise ) { std::string title = "Percentage of events above " + - threshold_histogram_title_snippet( _pos_noise_thresholds.at(det) ) + - _data_name_base + " in "; + threshold_histogram_title_snippet( m_pos_noise_thresholds.at(det) ) + + m_data_name_base + " in "; factory_ptr.reset(new LWHist2DFactory<TH2F_LW>(title.c_str(),128, -0.5, 127.5, n_slots, 0.5, x_slots_max )); factory_ptr->SetXTitle( "Channel" ); factory_ptr->SetYTitle( "Front End Board" ); @@ -593,10 +593,10 @@ StatusCode LArRawChannelMonTool::bookHistograms() ft_histogram_factories[det][pos_noise_h] = factory_ptr; } - if ( _monitor_negative_noise ) { + if ( m_monitor_negative_noise ) { std::string title = "Percentage of events below " + - threshold_histogram_title_snippet( _neg_noise_thresholds.at(det) ) + - _data_name_base + " in "; + threshold_histogram_title_snippet( m_neg_noise_thresholds.at(det) ) + + m_data_name_base + " in "; factory_ptr.reset(new LWHist2DFactory<TH2F_LW>(title.c_str(), 128, -0.5, 127.5, n_slots, 0.5, x_slots_max )); factory_ptr->SetXTitle( "Channel" ); factory_ptr->SetYTitle( "Front End Board" ); @@ -604,10 +604,10 @@ StatusCode LArRawChannelMonTool::bookHistograms() ft_histogram_factories[det][neg_noise_h] = factory_ptr; } - if ( _monitor_quality ) { + if ( m_monitor_quality ) { std::string title = "Percentage of events above " + - lexical_cast<std::string>( _quality_threshold ) + " q-factor as a function of " + - _data_name_base + " in "; + lexical_cast<std::string>( m_quality_threshold ) + " q-factor as a function of " + + m_data_name_base + " in "; factory_ptr.reset(new LWHist2DFactory<TH2F_LW>(title.c_str(), 128, -0.5, 127.5, n_slots, 0.5, x_slots_max )); factory_ptr->SetXTitle( "Channel" ); factory_ptr->SetYTitle( "Front End Board" ); @@ -618,70 +618,70 @@ StatusCode LArRawChannelMonTool::bookHistograms() } - if ( _monitor_detectors ) { + if ( m_monitor_detectors ) { foreach( Detector det, detectors ) { - std::vector<double> axis = detector_superslot_axis( det, _lar_online_id_ptr ); + std::vector<double> axis = detector_superslot_axis( det, m_lar_online_id_ptr ); int n_bins = axis.size() - 1; - if ( _monitor_occupancy ) { - std::string title = "Number" + threshold_histogram_title_snippet( _occupancy_thresholds.at(det) ) + - "FEB and " + _data_name_base + " in " + detector_str( det ); + if ( m_monitor_occupancy ) { + std::string title = "Number" + threshold_histogram_title_snippet( m_occupancy_thresholds.at(det) ) + + "FEB and " + m_data_name_base + " in " + detector_str( det ); factory_ptr.reset(new LWHist2DFactory<TH2I_LW>(title.c_str(), n_bins, &axis[0], 128, -0.5, 127.5 )); factory_ptr->SetXTitle("Halfcrate (+ increasing slot)"); factory_ptr->SetYTitle("Channel"); - factory_ptr->setXAxisBinLabelsAllFebs(_lar_online_id_str_helper_ptr,detector_str(det)); + factory_ptr->setXAxisBinLabelsAllFebs(m_lar_online_id_str_helper_ptr,detector_str(det)); det_histogram_factories[det][occ_h] = factory_ptr; } - if ( _monitor_signal ) { - std::string title = "Average Energy (MeV)" + threshold_histogram_title_snippet( _signal_thresholds.at(det) ) + - "FEB and " + _data_name_base + " in " + detector_str( det ) + " (no LArEventInfo::ERROR)"; + if ( m_monitor_signal ) { + std::string title = "Average Energy (MeV)" + threshold_histogram_title_snippet( m_signal_thresholds.at(det) ) + + "FEB and " + m_data_name_base + " in " + detector_str( det ) + " (no LArEventInfo::ERROR)"; factory_ptr.reset(new LWHistProfile2DFactory(title.c_str(), n_bins, &axis[0],128, -0.5, 127.5)); factory_ptr->SetXTitle("Halfcrate (+ increasing slot)"); factory_ptr->SetYTitle("Channel"); factory_ptr->SetZTitle("Average Energy (MeV)"); - factory_ptr->setXAxisBinLabelsAllFebs(_lar_online_id_str_helper_ptr,detector_str(det)); + factory_ptr->setXAxisBinLabelsAllFebs(m_lar_online_id_str_helper_ptr,detector_str(det)); det_histogram_factories[det][sig_h] = factory_ptr; - title = "Average gain FEB and " + _data_name_base + " in " + detector_str( det ) + " (no LArEventInfo::ERROR)"; + title = "Average gain FEB and " + m_data_name_base + " in " + detector_str( det ) + " (no LArEventInfo::ERROR)"; factory_ptr.reset(new LWHistProfile2DFactory(title.c_str(), n_bins, &axis[0],128, -0.5, 127.5)); factory_ptr->SetXTitle("Halfcrate (+ increasing slot)"); factory_ptr->SetYTitle("Channel"); factory_ptr->SetZTitle("Average gain"); - factory_ptr->setXAxisBinLabelsAllFebs(_lar_online_id_str_helper_ptr,detector_str(det)); + factory_ptr->setXAxisBinLabelsAllFebs(m_lar_online_id_str_helper_ptr,detector_str(det)); det_histogram_factories[det][gain_h] = factory_ptr; } - if ( _monitor_positive_noise ) { + if ( m_monitor_positive_noise ) { std::string his_title = "Percentage of events above positive " + - threshold_histogram_title_snippet( _pos_noise_thresholds.at(det) ) + - "FEB and " + _data_name_base + " in " + detector_str( det ) + " (no LArEventInfo::ERROR)"; + threshold_histogram_title_snippet( m_pos_noise_thresholds.at(det) ) + + "FEB and " + m_data_name_base + " in " + detector_str( det ) + " (no LArEventInfo::ERROR)"; factory_ptr.reset(new LWHistProfile2DFactory(his_title.c_str(), n_bins, &axis[0], 128, -0.5, 127.5 )); factory_ptr->SetXTitle("Halfcrate (+ increasing slot)"); factory_ptr->SetYTitle("Channel"); factory_ptr->SetZTitle("Percentage Accepted"); - factory_ptr->setXAxisBinLabelsAllFebs(_lar_online_id_str_helper_ptr,detector_str(det)); + factory_ptr->setXAxisBinLabelsAllFebs(m_lar_online_id_str_helper_ptr,detector_str(det)); det_histogram_factories[det][pos_noise_h] = factory_ptr; } - if ( _monitor_negative_noise ) { + if ( m_monitor_negative_noise ) { std::string his_title = "Percentage of events below negative " + - threshold_histogram_title_snippet( _neg_noise_thresholds.at(det) ) + - "FEB and " + _data_name_base + " in " + detector_str( det ) + " (no LArEventInfo::ERROR)"; + threshold_histogram_title_snippet( m_neg_noise_thresholds.at(det) ) + + "FEB and " + m_data_name_base + " in " + detector_str( det ) + " (no LArEventInfo::ERROR)"; factory_ptr.reset(new LWHistProfile2DFactory(his_title.c_str(),n_bins,&axis[0],128,-0.5,127.5 )); factory_ptr->SetXTitle("Halfcrate (+ increasing slot)"); factory_ptr->SetYTitle("Channel"); factory_ptr->SetZTitle("Percentage Accepted"); - factory_ptr->setXAxisBinLabelsAllFebs(_lar_online_id_str_helper_ptr,detector_str(det)); + factory_ptr->setXAxisBinLabelsAllFebs(m_lar_online_id_str_helper_ptr,detector_str(det)); det_histogram_factories[det][neg_noise_h] = factory_ptr; } - if ( _monitor_burst){ - // if ( _monitor_positive_noise ) { - std::string his_title = "Yield of channels with +E > " + lexical_cast<std::string>( _noise_threshold ) +" #sigma -"+ detector_str( det ); + if ( m_monitor_burst){ + // if ( m_monitor_positive_noise ) { + std::string his_title = "Yield of channels with +E > " + lexical_cast<std::string>( m_noise_threshold ) +" #sigma -"+ detector_str( det ); factory_ptr.reset(new LWHist1DFactory<TH1F_LW>(his_title.c_str(),375, 0., 7.5 )); factory_ptr->SetXTitle("Percent of Channels"); factory_ptr->SetYTitle("Number of Events per 0.02 %"); @@ -689,9 +689,9 @@ StatusCode LArRawChannelMonTool::bookHistograms() } - if ( _monitor_burst){ - // if ( _monitor_negative_noise ) { - std::string his_title = "Yield of channels with -E > " + lexical_cast<std::string>( _noise_threshold ) +" #sigma - " + detector_str( det ); + if ( m_monitor_burst){ + // if ( m_monitor_negative_noise ) { + std::string his_title = "Yield of channels with -E > " + lexical_cast<std::string>( m_noise_threshold ) +" #sigma - " + detector_str( det ); factory_ptr.reset(new LWHist1DFactory<TH1F_LW>(his_title.c_str(),375, 0., 7.5 )); factory_ptr->SetXTitle("Percent of Channels"); factory_ptr->SetYTitle("Number of Events per 0.02 %"); @@ -699,9 +699,9 @@ StatusCode LArRawChannelMonTool::bookHistograms() } // Noise fraction (Positive only) histogram when not flagged by LArNoisyROAlg_W - if ( _monitor_burst){ - // if ( _monitor_negative_noise ) { - std::string his_title = "Yield of channels with +E > " + lexical_cast<std::string>( _noise_threshold ) +" #sigma (no LArNoisyRO_StdOpt) -"+ detector_str( det ); + if ( m_monitor_burst){ + // if ( m_monitor_negative_noise ) { + std::string his_title = "Yield of channels with +E > " + lexical_cast<std::string>( m_noise_threshold ) +" #sigma (no LArNoisyRO_StdOpt) -"+ detector_str( det ); factory_ptr.reset(new LWHist1DFactory<TH1F_LW>(his_title.c_str(),375, 0., 7.5 )); factory_ptr->SetXTitle("Percent of Channels"); factory_ptr->SetYTitle("Number of Events per 0.02 %"); @@ -710,9 +710,9 @@ StatusCode LArRawChannelMonTool::bookHistograms() // Noise fraction (Positive only) histogram when not flagged by LArNoisyROAlg - if ( _monitor_burst){ - // if ( _monitor_positive_noise ) { - std::string his_title = "Yield of channels with +E > " + lexical_cast<std::string>( _noise_threshold ) +" #sigma (no LArNoisyRO_Std) -"+ detector_str( det ); + if ( m_monitor_burst){ + // if ( m_monitor_positive_noise ) { + std::string his_title = "Yield of channels with +E > " + lexical_cast<std::string>( m_noise_threshold ) +" #sigma (no LArNoisyRO_Std) -"+ detector_str( det ); factory_ptr.reset(new LWHist1DFactory<TH1F_LW>(his_title.c_str(),375, 0., 7.5 )); factory_ptr->SetXTitle("Percent of Channels"); factory_ptr->SetYTitle("Number of Events per 0.02 %"); @@ -720,68 +720,68 @@ StatusCode LArRawChannelMonTool::bookHistograms() } // Noise fraction (Positive only) histogram when flagged by LArNoisyROAlg but without time bit set (time veto) - if ( _monitor_burst){ - // if ( _monitor_positive_noise ) { - std::string his_title = "Yield of channels with +E > " + lexical_cast<std::string>( _noise_threshold ) +" #sigma (time vetoed) -"+ detector_str( det ); + if ( m_monitor_burst){ + // if ( m_monitor_positive_noise ) { + std::string his_title = "Yield of channels with +E > " + lexical_cast<std::string>( m_noise_threshold ) +" #sigma (time vetoed) -"+ detector_str( det ); factory_ptr.reset(new LWHist1DFactory<TH1F_LW>(his_title.c_str(),375, 0., 7.5 )); factory_ptr->SetXTitle("Percent of Channels"); factory_ptr->SetYTitle("Number of Events per 0.02 %"); det_histogram_factories[det][noise_fraction_TimeVetoLArNoisyRO_h] = factory_ptr; } - if ( _monitor_signal ) { + if ( m_monitor_signal ) { std::string his_title = "Energy sum (time vetoed) " + detector_str( det ); - factory_ptr.reset(new LWHistProfileFactory(his_title.c_str(),_n_lumi_blocks, 0.5, double(_n_lumi_blocks)+0.5 )); + factory_ptr.reset(new LWHistProfileFactory(his_title.c_str(),m_n_lumi_blocks, 0.5, double(m_n_lumi_blocks)+0.5 )); factory_ptr->SetXTitle("Luminosity Block"); factory_ptr->SetYTitle("Mean total energy(MeV)"); det_histogram_factories[det][pedestal_evolution_h] = factory_ptr; } - if ( _monitor_burst ) { - std::string his_title = "# of Events With Y_{3#sigma}>" + std::string( Form( "%.2f", _noise_burst_percent_thresholds[det]) ) + " % - " + detector_str(det); + if ( m_monitor_burst ) { + std::string his_title = "# of Events With Y_{3#sigma}>" + std::string( Form( "%.2f", m_noise_burst_percent_thresholds[det]) ) + " % - " + detector_str(det); // TH1F graft( ("det_burst_graft"+detector_str(det)).c_str(), his_title.c_str(), 1440, -0.5, 1439.5 ); - factory_ptr.reset(new LWHist1DFactory<TH1F_LW>(his_title.c_str(),_n_lumi_blocks, 0.5, double(_n_lumi_blocks)+0.5)); + factory_ptr.reset(new LWHist1DFactory<TH1F_LW>(his_title.c_str(),m_n_lumi_blocks, 0.5, double(m_n_lumi_blocks)+0.5)); factory_ptr->SetXTitle("Luminosity Block"); factory_ptr->SetYTitle("Number of Events per lumi block"); det_histogram_factories[det][burst_h] = factory_ptr; } // With Time Veto - if ( _monitor_burst ) { - std::string his_title = "# of Events With Y_{3#sigma}>" + std::string( Form( "%.2f", _noise_burst_percent_thresholds[det]) ) + " % (time vetoed)- " + detector_str(det); + if ( m_monitor_burst ) { + std::string his_title = "# of Events With Y_{3#sigma}>" + std::string( Form( "%.2f", m_noise_burst_percent_thresholds[det]) ) + " % (time vetoed)- " + detector_str(det); // TH1F graft( ("det_burst_graft"+detector_str(det)).c_str(), his_title.c_str(), 1440, -0.5, 1439.5 ); - factory_ptr.reset(new LWHist1DFactory<TH1F_LW>(his_title.c_str(),_n_lumi_blocks, 0.5, double(_n_lumi_blocks)+0.5)); + factory_ptr.reset(new LWHist1DFactory<TH1F_LW>(his_title.c_str(),m_n_lumi_blocks, 0.5, double(m_n_lumi_blocks)+0.5)); factory_ptr->SetXTitle("Luminosity Block"); factory_ptr->SetYTitle("Number of Events per lumi block"); det_histogram_factories[det][timeVetoBurst_h] = factory_ptr; } - if ( _monitor_time ) { - std::string his_title = "Average time of " + _data_name_base + + if ( m_monitor_time ) { + std::string his_title = "Average time of " + m_data_name_base + " in each FEB of the " + detector_str(det) + " Reporting E > " + - lexical_cast<std::string>( _time_threshold ) + " #sigma"; + lexical_cast<std::string>( m_time_threshold ) + " #sigma"; factory_ptr.reset(new LWHist1DFactory<TH1F_LW>(his_title.c_str(),101, -50.5, 50.5)); factory_ptr->SetXTitle("<t_{FEB}> - <t_{event}> (ns)"); factory_ptr->SetYTitle("Number of FEBs per ns"); det_histogram_factories[det][mean_feb_time_h] = factory_ptr; } - if ( _monitor_quality ) { + if ( m_monitor_quality ) { std::string his_title = "Percentage of events above " + - lexical_cast<std::string>( _quality_threshold ) +" q-factor as function"+ - " of FEB and " + _data_name_base + " in " + detector_str( det ) + " (no LArEventInfo::ERROR)"; + lexical_cast<std::string>( m_quality_threshold ) +" q-factor as function"+ + " of FEB and " + m_data_name_base + " in " + detector_str( det ) + " (no LArEventInfo::ERROR)"; factory_ptr.reset(new LWHistProfile2DFactory(his_title.c_str(),n_bins,&axis[0],128,-0.5,127.5 )); factory_ptr->SetXTitle("Halfcrate (+ increasing slot)"); factory_ptr->SetYTitle("Channel"); factory_ptr->SetZTitle("Percentage Accepted"); - factory_ptr->setXAxisBinLabelsAllFebs(_lar_online_id_str_helper_ptr,detector_str(det)); + factory_ptr->setXAxisBinLabelsAllFebs(m_lar_online_id_str_helper_ptr,detector_str(det)); det_histogram_factories[det][quality_h] = factory_ptr; } - if ( _monitor_quality ) { + if ( m_monitor_quality ) { std::string his_title = "Number of Channels in the " + detector_str( det ) + - " with q-factor > " + lexical_cast<std::string>( _quality_threshold ); + " with q-factor > " + lexical_cast<std::string>( m_quality_threshold ); factory_ptr.reset(new LWHist1DFactory<TH1F_LW>(his_title.c_str(),50, -0.5, 49.5 )); factory_ptr->SetXTitle("Number of Channels"); factory_ptr->SetYTitle("Number of Events per channel"); @@ -789,18 +789,18 @@ StatusCode LArRawChannelMonTool::bookHistograms() } - if ( _monitor_quality ) { + if ( m_monitor_quality ) { std::string his_title = "Number Of Events With More Than " + - std::string( Form( "%.2f", _noise_burst_percent_thresholds[det]) ) + + std::string( Form( "%.2f", m_noise_burst_percent_thresholds[det]) ) + " % Of All Channels In The " + detector_str(det) + " Reporting q-factor > " + - lexical_cast<std::string>( _quality_threshold ); - factory_ptr.reset(new LWHist1DFactory<TH1F_LW>(his_title.c_str(),_n_lumi_blocks, 0.5, double(_n_lumi_blocks)+0.5)); + lexical_cast<std::string>( m_quality_threshold ); + factory_ptr.reset(new LWHist1DFactory<TH1F_LW>(his_title.c_str(),m_n_lumi_blocks, 0.5, double(m_n_lumi_blocks)+0.5)); factory_ptr->SetXTitle("Luminosity Block"); factory_ptr->SetYTitle("Number of Events per lumi block"); det_histogram_factories[det][quality_burst_h] = factory_ptr; } - if ( _monitor_signal ) { + if ( m_monitor_signal ) { std::string his_title = "Energy sum per bunch crossing - " + detector_str( det ); factory_ptr.reset(new LWHistProfileFactory(his_title.c_str(),3564, 0.5, 3564.5 )); factory_ptr->SetXTitle("Bunch Crossing Number"); @@ -813,27 +813,27 @@ StatusCode LArRawChannelMonTool::bookHistograms() } - for ( citer_vect_hwid itr_feb = _lar_online_id_ptr->feb_begin(); + for ( citer_vect_hwid itr_feb = m_lar_online_id_ptr->feb_begin(); itr_feb != end_feb ; ++itr_feb) { try { - HWIdentifier feedthrough_online_id = _lar_online_id_ptr->feedthrough_Id(*itr_feb); - IdentifierHash feb_hash = _lar_online_id_ptr->feb_Hash( *itr_feb ); - IdentifierHash ft_hash = _feb_hash_to_ft_hash.at( feb_hash ); - Detector feb_pos = _feb_hash_to_detector.at( feb_hash ); + HWIdentifier feedthrough_online_id = m_lar_online_id_ptr->feedthrough_Id(*itr_feb); + IdentifierHash feb_hash = m_lar_online_id_ptr->feb_Hash( *itr_feb ); + IdentifierHash ft_hash = m_feb_hash_to_ft_hash.at( feb_hash ); + Detector feb_pos = m_feb_hash_to_detector.at( feb_hash ); std::map<RawChHisto,shared_ptr<LWHistFactoryBase> > &the_feb_histo_factories = feb_histogram_factories[feb_pos]; std::map<RawChHisto,shared_ptr<LWHistFactoryBase> > &the_ft_histo_factories = ft_histogram_factories[feb_pos]; std::string dir_name = m_path + "/" + detector_str( feb_pos ); // --- Book and Register per FEB histograms --- - if ( _monitor_febs ) { + if ( m_monitor_febs ) { - std::string feb_name = _lar_online_id_str_helper_ptr->feb_str( *itr_feb ); + std::string feb_name = m_lar_online_id_str_helper_ptr->feb_str( *itr_feb ); std::string his_name; - if ( _monitor_occupancy ) { + if ( m_monitor_occupancy ) { std::string dir_name_occ = dir_name + "/per_feb_occupancy"; his_name = detector_str( feb_pos ) + "Occupancy"+feb_name; LWHist* histo = the_feb_histo_factories[occ_h]->create(his_name,feb_name); @@ -842,7 +842,7 @@ StatusCode LArRawChannelMonTool::bookHistograms() else return StatusCode::FAILURE; } - if ( _monitor_signal ) { + if ( m_monitor_signal ) { std::string dir_name_sig = dir_name + "/per_feb_signal"; his_name = detector_str( feb_pos ) + "Signal" + feb_name + "_AVG"; LWHist* histo = ( the_feb_histo_factories[sig_h]->create(his_name,feb_name) ); @@ -851,7 +851,7 @@ StatusCode LArRawChannelMonTool::bookHistograms() else return StatusCode::FAILURE; } - if ( _monitor_positive_noise ) { + if ( m_monitor_positive_noise ) { std::string dir_name_acc = dir_name + "/per_feb_acceptance"; his_name = detector_str( feb_pos ) + "Acceptance" + feb_name + "_AVG"; LWHist* histo = ( the_feb_histo_factories[pos_noise_h]->create(his_name,feb_name) ); @@ -860,7 +860,7 @@ StatusCode LArRawChannelMonTool::bookHistograms() else return StatusCode::FAILURE; } - if ( _monitor_negative_noise ) { + if ( m_monitor_negative_noise ) { std::string dir_name_acc = dir_name + "/per_feb_noise_acceptance"; his_name = detector_str( feb_pos ) + "NoiseAcceptance" + feb_name + "_AVG"; LWHist* histo = ( the_feb_histo_factories[neg_noise_h]->create(his_name,feb_name) ); @@ -870,7 +870,7 @@ StatusCode LArRawChannelMonTool::bookHistograms() else return StatusCode::FAILURE; } - if ( _monitor_time ) { + if ( m_monitor_time ) { std::string this_dir_name = dir_name + "/per_feb_time"; his_name = detector_str( feb_pos ) + "Time" + feb_name; LWHist* histo = ( the_feb_histo_factories[time_h]->create(his_name,feb_name) ); @@ -879,7 +879,7 @@ StatusCode LArRawChannelMonTool::bookHistograms() else return StatusCode::FAILURE; } - if ( _monitor_quality ) { + if ( m_monitor_quality ) { std::string this_dir_name = dir_name + "/per_feb_quality"; his_name = detector_str( feb_pos ) + "_quality_" + feb_name; LWHist *histo = ( the_feb_histo_factories[quality_h]->create(his_name,feb_name) ); @@ -891,7 +891,7 @@ StatusCode LArRawChannelMonTool::bookHistograms() } // --- Book and register per Feedthrough Histograms --- - if ( _monitor_feedthroughs ) { + if ( m_monitor_feedthroughs ) { ATH_MSG(DEBUG) << " - Booking per feedthrough histos" << endmsg; @@ -917,36 +917,36 @@ StatusCode LArRawChannelMonTool::bookHistograms() // --- If histos already booked use same feedthrough histo --- if ( !is_new_ft ) { - if ( _monitor_occupancy ) { + if ( m_monitor_occupancy ) { per_ft_occu.at( feb_hash ) = det_ft_type_hists[feb_pos][ft_hash][occ_h]; } - if ( _monitor_signal ) { + if ( m_monitor_signal ) { per_ft_sign.at( feb_hash ) = det_ft_type_hists[feb_pos][ft_hash][sig_h]; } - if ( _monitor_positive_noise ) { + if ( m_monitor_positive_noise ) { per_ft_posn.at( feb_hash ) = det_ft_type_hists[feb_pos][ft_hash][pos_noise_h]; } - if ( _monitor_negative_noise ) { + if ( m_monitor_negative_noise ) { per_ft_negn.at( feb_hash ) = det_ft_type_hists[feb_pos][ft_hash][neg_noise_h]; } - if ( _monitor_quality ) { + if ( m_monitor_quality ) { per_ft_qual.at( feb_hash ) = det_ft_type_hists[feb_pos][ft_hash][quality_h]; } } else { - std::string ft_name = _lar_online_id_str_helper_ptr->feedthrough_str( *itr_feb ); + std::string ft_name = m_lar_online_id_str_helper_ptr->feedthrough_str( *itr_feb ); // --- new occupancy histogram --- - if ( _monitor_occupancy ) { + if ( m_monitor_occupancy ) { std::string the_dir_name = dir_name + "/per_ft_occupancy"; std::string his_name = detector_str( feb_pos ) + "Occupancy" + ft_name; LWHist2D* histo = static_cast<LWHist2D*>( the_ft_histo_factories[occ_h]->create(his_name,ft_name) ); - _lar_online_id_str_helper_ptr->setAxisBinLabelsFebs( histo->GetYaxis(), feedthrough_online_id ); + m_lar_online_id_str_helper_ptr->setAxisBinLabelsFebs( histo->GetYaxis(), feedthrough_online_id ); if ( registerHistogram( histo, the_dir_name ) ) { shared_ptr<IHistoProxyBase> b( createLWHistProxy(histo) ); per_ft_occu.at( feb_hash ) = b; @@ -955,11 +955,11 @@ StatusCode LArRawChannelMonTool::bookHistograms() } // --- new signal histogram --- - if ( _monitor_signal ) { + if ( m_monitor_signal ) { std::string the_dir_name = dir_name + "/per_ft_signal"; std::string his_name = detector_str( feb_pos ) + "Signal" + ft_name + "_AVG"; LWHist2D* histo = static_cast<LWHist2D*>( the_ft_histo_factories[sig_h]->create(his_name,ft_name) ); - _lar_online_id_str_helper_ptr->setAxisBinLabelsFebs( histo->GetYaxis(), feedthrough_online_id ); + m_lar_online_id_str_helper_ptr->setAxisBinLabelsFebs( histo->GetYaxis(), feedthrough_online_id ); if ( registerHistogram( histo, the_dir_name ) ) { shared_ptr<IHistoProxyBase> b( createLWHistProxy(histo) ); per_ft_sign.at( feb_hash ) = b; @@ -968,11 +968,11 @@ StatusCode LArRawChannelMonTool::bookHistograms() } // --- new acceptance histogram --- - if ( _monitor_positive_noise ) { + if ( m_monitor_positive_noise ) { std::string the_dir_name = dir_name + "/per_ft_acceptance"; std::string his_name = detector_str( feb_pos ) + "Acceptance" + ft_name + "_AVG"; LWHist2D* histo = static_cast<LWHist2D*>( the_ft_histo_factories[pos_noise_h]->create(his_name,ft_name) ); - _lar_online_id_str_helper_ptr->setAxisBinLabelsFebs( histo->GetYaxis(), feedthrough_online_id ); + m_lar_online_id_str_helper_ptr->setAxisBinLabelsFebs( histo->GetYaxis(), feedthrough_online_id ); if ( registerHistogram( histo, the_dir_name, "effAsPerCent" ) ) { shared_ptr<IHistoProxyBase> b( createLWHistProxy(histo) ); per_ft_posn.at( feb_hash ) = b; @@ -981,12 +981,12 @@ StatusCode LArRawChannelMonTool::bookHistograms() } // --- new per feedthrough noise acceptance --- - if ( _monitor_negative_noise ) { + if ( m_monitor_negative_noise ) { std::string the_dir_name = dir_name + "/per_ft_noise_acceptance"; std::string his_name = detector_str( feb_pos ) + "NoiseAcceptance" + ft_name + "_AVG"; LWHist2D* histo = static_cast<LWHist2D*>( the_ft_histo_factories[neg_noise_h]->create(his_name,ft_name) ); - _lar_online_id_str_helper_ptr->setAxisBinLabelsFebs( histo->GetYaxis(), feedthrough_online_id ); + m_lar_online_id_str_helper_ptr->setAxisBinLabelsFebs( histo->GetYaxis(), feedthrough_online_id ); if ( registerHistogram( histo, the_dir_name, "effAsPerCent" ) ) { shared_ptr<IHistoProxyBase> b( createLWHistProxy(histo) ); per_ft_negn.at( feb_hash ) = b; @@ -995,12 +995,12 @@ StatusCode LArRawChannelMonTool::bookHistograms() } // --- new per feedthrough quality acceptance --- - if ( _monitor_quality ) { + if ( m_monitor_quality ) { std::string the_dir_name = dir_name + "/per_ft_quality"; std::string his_name = detector_str( feb_pos ) + "Quality" + ft_name + "_AVG"; LWHist2D* histo = static_cast<LWHist2D*>( the_ft_histo_factories[quality_h]->create(his_name,ft_name) ); - _lar_online_id_str_helper_ptr->setAxisBinLabelsFebs( histo->GetYaxis(), feedthrough_online_id ); + m_lar_online_id_str_helper_ptr->setAxisBinLabelsFebs( histo->GetYaxis(), feedthrough_online_id ); if ( registerHistogram( histo, the_dir_name, "effAsPerCent" ) ) { shared_ptr<IHistoProxyBase> b( createLWHistProxy(histo) ); per_ft_qual.at( feb_hash ) = b; @@ -1022,14 +1022,14 @@ StatusCode LArRawChannelMonTool::bookHistograms() } // --- end loop over FEBs --- // --- per detector histograms --- - if ( _monitor_detectors ) { + if ( m_monitor_detectors ) { // --- occupancy histograms --- foreach( Detector det, detectors ) { std::map<RawChHisto,shared_ptr<LWHistFactoryBase> > &the_det_histo_factories = det_histogram_factories[det]; - if ( _monitor_occupancy ) { + if ( m_monitor_occupancy ) { std::string his_name = detector_str( det ) + "_occupancy"; std::string dir_name = m_path + "/" + detector_str( det ); LWHist2D* histo = static_cast<LWHist2D*>( the_det_histo_factories[occ_h]->create( his_name ) ); @@ -1040,7 +1040,7 @@ StatusCode LArRawChannelMonTool::bookHistograms() } else return StatusCode::FAILURE; } - if ( _monitor_signal ) { + if ( m_monitor_signal ) { std::string his_name = detector_str( det ) + "_signal" + "_AVG"; std::string dir_name = m_path + "/" + detector_str( det ); LWHist2D* histo = static_cast<LWHist2D*>( the_det_histo_factories[sig_h]->create( his_name ) ); @@ -1060,7 +1060,7 @@ StatusCode LArRawChannelMonTool::bookHistograms() } else return StatusCode::FAILURE; } - if ( _monitor_positive_noise ) { + if ( m_monitor_positive_noise ) { std::string his_name = detector_str( det ) + "_acceptance" + "_AVG"; std::string dir_name = m_path + "/" + detector_str( det ); LWHist2D* histo = static_cast<LWHist2D*>( the_det_histo_factories[pos_noise_h]->create( his_name ) ); @@ -1072,7 +1072,7 @@ StatusCode LArRawChannelMonTool::bookHistograms() } - if ( _monitor_negative_noise ) { + if ( m_monitor_negative_noise ) { std::string his_name = detector_str( det ) + "_noise_acceptance" + "_AVG"; std::string dir_name = m_path + "/" + detector_str( det ); LWHist2D* histo = static_cast<LWHist2D*>( the_det_histo_factories[neg_noise_h]->create( his_name ) ); @@ -1083,7 +1083,7 @@ StatusCode LArRawChannelMonTool::bookHistograms() } - if ( _monitor_time ) { + if ( m_monitor_time ) { std::string his_name = detector_str( det ) + "_mean_feb_time"; std::string dir_name = m_path + "/" + detector_str( det ); LWHist* histo = ( the_det_histo_factories[mean_feb_time_h]->create( his_name ) ); @@ -1093,7 +1093,7 @@ StatusCode LArRawChannelMonTool::bookHistograms() } else return StatusCode::FAILURE; } - if ( _monitor_quality ) { + if ( m_monitor_quality ) { std::string his_name = detector_str( det ) + "_quality" + "_AVG"; std::string dir_name = m_path + "/" + detector_str( det ); LWHist2D* histo = static_cast<LWHist2D*>( the_det_histo_factories[quality_h]->create( his_name ) ); @@ -1104,7 +1104,7 @@ StatusCode LArRawChannelMonTool::bookHistograms() } - if ( _monitor_quality ) { + if ( m_monitor_quality ) { std::string his_name = detector_str( det ) + "_quality_nChannel"; std::string dir_name = m_path + "/" + detector_str( det ); LWHist* histo = ( the_det_histo_factories[quality_nChannel_h]->create( his_name ) ); @@ -1115,7 +1115,7 @@ StatusCode LArRawChannelMonTool::bookHistograms() } - if ( _monitor_quality ) { + if ( m_monitor_quality ) { std::string his_name = detector_str( det ) + "_quality_burst"; std::string dir_name = m_path + "/" + detector_str( det ); LWHist* histo = ( the_det_histo_factories[quality_burst_h]->create( his_name ) ); @@ -1126,8 +1126,8 @@ StatusCode LArRawChannelMonTool::bookHistograms() } // per_det_nfra - if ( _monitor_burst){ - // if ( _monitor_positive_noise ) { + if ( m_monitor_burst){ + // if ( m_monitor_positive_noise ) { std::string his_name = detector_str( det ) + "_noise_fraction"; std::string dir_name = m_path + "/" + detector_str( det ); LWHist* histo = ( the_det_histo_factories[noise_fraction_h]->create( his_name ) ); @@ -1137,8 +1137,8 @@ StatusCode LArRawChannelMonTool::bookHistograms() } else return StatusCode::FAILURE; } - if ( _monitor_burst){ - // if ( _monitor_negative_noise ) { + if ( m_monitor_burst){ + // if ( m_monitor_negative_noise ) { std::string his_name = detector_str( det ) + "_noise_fraction_Neg"; std::string dir_name = m_path + "/" + detector_str( det ); LWHist* histo = ( the_det_histo_factories[noise_fraction_Neg_h]->create( his_name ) ); @@ -1149,8 +1149,8 @@ StatusCode LArRawChannelMonTool::bookHistograms() } - if ( _monitor_burst){ - // if ( _monitor_positive_noise ) { + if ( m_monitor_burst){ + // if ( m_monitor_positive_noise ) { std::string his_name = detector_str( det ) + "_noise_fraction_W"; std::string dir_name = m_path + "/" + detector_str( det ); LWHist* histo = ( the_det_histo_factories[noise_fraction_W_h]->create( his_name ) ); @@ -1163,8 +1163,8 @@ StatusCode LArRawChannelMonTool::bookHistograms() // per_det_nfra (for positive energy only ) when Not flagged by LArNoisyROAlg - if ( _monitor_burst){ - // if ( _monitor_positive_noise ) { + if ( m_monitor_burst){ + // if ( m_monitor_positive_noise ) { std::string his_name = detector_str( det ) + "_noise_fraction_NoLArNoisyRO"; std::string dir_name = m_path + "/" + detector_str( det ); LWHist* histo = ( the_det_histo_factories[noise_fraction_NoLArNoisyRO_h]->create( his_name ) ); @@ -1175,8 +1175,8 @@ StatusCode LArRawChannelMonTool::bookHistograms() } // per_det_nfra (for positive energy only ) when Not flagged by LArNoisyROAlg within time window of 500ms ( no LArEventInfo::ERROR) - if ( _monitor_burst){ - // if ( _monitor_positive_noise ) { + if ( m_monitor_burst){ + // if ( m_monitor_positive_noise ) { std::string his_name = detector_str( det ) + "_noise_fraction_TimeVetoLArNoisyRO"; std::string dir_name = m_path + "/" + detector_str( det ); LWHist* histo = ( the_det_histo_factories[noise_fraction_TimeVetoLArNoisyRO_h]->create( his_name ) ); @@ -1187,7 +1187,7 @@ StatusCode LArRawChannelMonTool::bookHistograms() } // per detector pedestal evolution - if ( _monitor_signal ) { + if ( m_monitor_signal ) { std::string his_name = detector_str( det ) + "_pedestal_evolution"; std::string dir_name = m_path + "/" + detector_str( det ); LWHist* histo = ( the_det_histo_factories[pedestal_evolution_h]->create( his_name ) ); @@ -1198,7 +1198,7 @@ StatusCode LArRawChannelMonTool::bookHistograms() } // per detector sumE vs BCID - if ( _monitor_signal ) { + if ( m_monitor_signal ) { std::string his_name = detector_str( det ) + "_sumE_vs_BCID"; std::string dir_name = m_path + "/" + detector_str( det ); LWHist* histo = ( the_det_histo_factories[sumE_vs_BCID_h]->create( his_name ) ); @@ -1208,7 +1208,7 @@ StatusCode LArRawChannelMonTool::bookHistograms() } else return StatusCode::FAILURE; } - if ( _monitor_burst ) { + if ( m_monitor_burst ) { std::string his_name = detector_str( det ) + "_burst"; std::string dir_name = m_path + "/" + detector_str( det ); LWHist* histo = ( the_det_histo_factories[burst_h]->create( his_name ) ); @@ -1219,7 +1219,7 @@ StatusCode LArRawChannelMonTool::bookHistograms() } // With LArNoisyRO Time Veto - if ( _monitor_burst ) { + if ( m_monitor_burst ) { std::string his_name = detector_str( det ) + "_timeVetoBurst"; std::string dir_name = m_path + "/" + detector_str( det ); LWHist* histo = ( the_det_histo_factories[timeVetoBurst_h]->create( his_name ) ); @@ -1254,14 +1254,14 @@ StatusCode LArRawChannelMonTool::fillHistograms() // ATH_MSG(DEBUG) << "Vikas Says: ATLAS READY Flag is set to " << isATLASReady() << endmsg; // --- check set in bookHistogram --- - if ( !_has_lar_raw_channels ) return StatusCode::SUCCESS; + if ( !m_has_lar_raw_channels ) return StatusCode::SUCCESS; // --- retrieve raw channels --- const LArRawChannelContainer *raw_channels = 0; - if ( !evtStore()->retrieve( raw_channels, _LArRawChannel_container_key ).isSuccess() ) { + if ( !evtStore()->retrieve( raw_channels, m_LArRawChannel_container_key ).isSuccess() ) { msg(MSG::WARNING) << "Cannot retrieve LArRawChannelContainer with key: " - << _LArRawChannel_container_key << endmsg; + << m_LArRawChannel_container_key << endmsg; return StatusCode::FAILURE; } @@ -1310,11 +1310,11 @@ StatusCode LArRawChannelMonTool::fillHistograms() - if (m_noise_streams_set.size() == 0) _is_noise_event=true; + if (m_noise_streams_set.size() == 0) m_is_noise_event=true; const std::vector<xAOD::EventInfo::StreamTag>& event_stream_tags=event_info->streamTags(); for (const xAOD::EventInfo::StreamTag& stream_tag: event_stream_tags) { if (m_noise_streams_set.find(stream_tag.name())!=m_noise_streams_set.end()) { - _is_noise_event = true; + m_is_noise_event = true; break; } } @@ -1324,14 +1324,14 @@ StatusCode LArRawChannelMonTool::fillHistograms() const TriggerInfo* trig; trig = event_info->triggerInfo(); if( trig ) { - _is_noise_event = _noise_streams.size() == 0; + m_is_noise_event = m_noise_streams.size() == 0; //Loop on the JO defined streams std::vector<TriggerInfo::StreamTag> event_stream_tags = trig->streamTags(); - foreach( const std::string & stream_name, _noise_streams ) { + foreach( const std::string & stream_name, m_noise_streams ) { foreach( const TriggerInfo::StreamTag stream_tag, event_stream_tags ) { ATH_MSG(DEBUG) << "Keeping Stream Tag: " << stream_tag.type() << "_" << stream_tag.name() << endmsg; if( stream_name == stream_tag.name()) { - _is_noise_event = true; + m_is_noise_event = true; break; } } @@ -1341,42 +1341,42 @@ StatusCode LArRawChannelMonTool::fillHistograms() } else ATH_MSG(DEBUG) << "Cannot retrieve EventInfo" << endmsg; - ++_event_counter; - if ( _is_noise_event ) ++_noise_stream_event_counter; - - std::vector<shared_ptr<IHistoProxyBase> >& per_feb_occu = _per_feb_hists[occ_h]; - std::vector<shared_ptr<IHistoProxyBase> >& per_feb_sign = _per_feb_hists[sig_h]; - std::vector<shared_ptr<IHistoProxyBase> >& per_feb_posn = _per_feb_hists[pos_noise_h]; - std::vector<shared_ptr<IHistoProxyBase> >& per_feb_negn = _per_feb_hists[neg_noise_h]; - std::vector<shared_ptr<IHistoProxyBase> >& per_feb_time = _per_feb_hists[time_h]; - std::vector<shared_ptr<IHistoProxyBase> >& per_feb_qual = _per_feb_hists[quality_h]; - - std::vector<shared_ptr<IHistoProxyBase> >& per_ft_occu = _per_feedthrough_hists[occ_h]; - std::vector<shared_ptr<IHistoProxyBase> >& per_ft_sign = _per_feedthrough_hists[sig_h]; - std::vector<shared_ptr<IHistoProxyBase> >& per_ft_posn = _per_feedthrough_hists[pos_noise_h]; - std::vector<shared_ptr<IHistoProxyBase> >& per_ft_negn = _per_feedthrough_hists[neg_noise_h]; - std::vector<shared_ptr<IHistoProxyBase> >& per_ft_qual = _per_feedthrough_hists[quality_h]; - - std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_occu = _per_detector_hists[occ_h]; - std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_sign = _per_detector_hists[sig_h]; - std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_gain = _per_detector_hists[gain_h]; - std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_posn = _per_detector_hists[pos_noise_h]; - std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_negn = _per_detector_hists[neg_noise_h]; - std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_qual = _per_detector_hists[quality_h]; - // std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_mfebt= _per_detector_hists[mean_feb_time_h]; - std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_qnChan= _per_detector_hists[quality_nChannel_h]; - std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_qburs= _per_detector_hists[quality_burst_h]; - // std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_nChan_qburs= _per_detector_hists[quality_nChannel_burst_h]; - // std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_mevbc= _per_detector_hists[E_v_bc_h]; - std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_nfrac= _per_detector_hists[noise_fraction_h]; - std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_nfracNeg= _per_detector_hists[noise_fraction_Neg_h]; - std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_nfrac_W= _per_detector_hists[noise_fraction_W_h]; - std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_nfracNoLArNoisyRO= _per_detector_hists[noise_fraction_NoLArNoisyRO_h]; - std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_nfracTimeVetoLArNoisyRO= _per_detector_hists[noise_fraction_TimeVetoLArNoisyRO_h]; - std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_burs = _per_detector_hists[burst_h]; - std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_timeVetoBurs = _per_detector_hists[timeVetoBurst_h]; - std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_pede = _per_detector_hists[pedestal_evolution_h]; - std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_sumE_BCID = _per_detector_hists[sumE_vs_BCID_h]; + ++m_event_counter; + if ( m_is_noise_event ) ++m_noise_stream_event_counter; + + std::vector<shared_ptr<IHistoProxyBase> >& per_feb_occu = m_per_feb_hists[occ_h]; + std::vector<shared_ptr<IHistoProxyBase> >& per_feb_sign = m_per_feb_hists[sig_h]; + std::vector<shared_ptr<IHistoProxyBase> >& per_feb_posn = m_per_feb_hists[pos_noise_h]; + std::vector<shared_ptr<IHistoProxyBase> >& per_feb_negn = m_per_feb_hists[neg_noise_h]; + std::vector<shared_ptr<IHistoProxyBase> >& per_feb_time = m_per_feb_hists[time_h]; + std::vector<shared_ptr<IHistoProxyBase> >& per_feb_qual = m_per_feb_hists[quality_h]; + + std::vector<shared_ptr<IHistoProxyBase> >& per_ft_occu = m_per_feedthrough_hists[occ_h]; + std::vector<shared_ptr<IHistoProxyBase> >& per_ft_sign = m_per_feedthrough_hists[sig_h]; + std::vector<shared_ptr<IHistoProxyBase> >& per_ft_posn = m_per_feedthrough_hists[pos_noise_h]; + std::vector<shared_ptr<IHistoProxyBase> >& per_ft_negn = m_per_feedthrough_hists[neg_noise_h]; + std::vector<shared_ptr<IHistoProxyBase> >& per_ft_qual = m_per_feedthrough_hists[quality_h]; + + std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_occu = m_per_detector_hists[occ_h]; + std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_sign = m_per_detector_hists[sig_h]; + std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_gain = m_per_detector_hists[gain_h]; + std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_posn = m_per_detector_hists[pos_noise_h]; + std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_negn = m_per_detector_hists[neg_noise_h]; + std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_qual = m_per_detector_hists[quality_h]; + // std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_mfebt= m_per_detector_hists[mean_feb_time_h]; + std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_qnChan= m_per_detector_hists[quality_nChannel_h]; + std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_qburs= m_per_detector_hists[quality_burst_h]; + // std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_nChan_qburs= m_per_detector_hists[quality_nChannel_burst_h]; + // std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_mevbc= m_per_detector_hists[E_v_bc_h]; + std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_nfrac= m_per_detector_hists[noise_fraction_h]; + std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_nfracNeg= m_per_detector_hists[noise_fraction_Neg_h]; + std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_nfrac_W= m_per_detector_hists[noise_fraction_W_h]; + std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_nfracNoLArNoisyRO= m_per_detector_hists[noise_fraction_NoLArNoisyRO_h]; + std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_nfracTimeVetoLArNoisyRO= m_per_detector_hists[noise_fraction_TimeVetoLArNoisyRO_h]; + std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_burs = m_per_detector_hists[burst_h]; + std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_timeVetoBurs = m_per_detector_hists[timeVetoBurst_h]; + std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_pede = m_per_detector_hists[pedestal_evolution_h]; + std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_sumE_BCID = m_per_detector_hists[sumE_vs_BCID_h]; shared_ptr<IHistoProxyBase> perdethist_occu; shared_ptr<IHistoProxyBase> perdethist_sign; @@ -1394,8 +1394,8 @@ StatusCode LArRawChannelMonTool::fillHistograms() // TH1I_LW* perdetsamplinghist_phi_occupancy(0); // TH1I_LW* perdetsamplinghist_eta_occupancy(0); - // std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_dtdet= _per_detector_hists["det_time_diff"];//VB - // std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_lbdt = _per_detector_hists["det_lb_time_diff"];// VB + // std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_dtdet= m_per_detector_hists["det_time_diff"];//VB + // std::map<Detector,shared_ptr<IHistoProxyBase> >& per_det_lbdt = m_per_detector_hists["det_lb_time_diff"];// VB // int channels_above_bcid_threshold = 0; @@ -1443,14 +1443,14 @@ StatusCode LArRawChannelMonTool::fillHistograms() try { - offline_id = _cabel_service_tool->cnvToIdentifier( hardware_id ); - calo_element_ptr = _calo_description_mgr_ptr->get_element( offline_id ); + offline_id = m_cabel_service_tool->cnvToIdentifier( hardware_id ); + calo_element_ptr = m_calo_description_mgr_ptr->get_element( offline_id ); // --- skip unconnected channels --- if ( !calo_element_ptr ) continue; // --- skipp masked channels --- - if ( _masking_tool->cellShouldBeMasked( hardware_id ) ) continue; + if ( m_masking_tool->cellShouldBeMasked( hardware_id ) ) continue; // --- monitor properly reconstructed channels only --- @@ -1458,14 +1458,14 @@ StatusCode LArRawChannelMonTool::fillHistograms() // raw channels from OFC iteration, all calib constants found in DB // --- provenance&0x1000 == 0x1000 : // raw channels from DSP. If no constant loaded in DSP, energy==0 - if ( !( _db_and_ofc_only || + if ( !( m_db_and_ofc_only || (chan.provenance()&0x00ff) == 0x00A5 || (chan.provenance()&0x1000) == 0x1000 ) ) continue; - feb_id = _lar_online_id_ptr->feb_Id( hardware_id ); - feb_hash = _lar_online_id_ptr->feb_Hash( feb_id ); + feb_id = m_lar_online_id_ptr->feb_Id( hardware_id ); + feb_hash = m_lar_online_id_ptr->feb_Hash( feb_id ); - det = _feb_hash_to_detector.at( feb_hash ); + det = m_feb_hash_to_detector.at( feb_hash ); bool detchanged=(det!=lastdet); if (detchanged) { //There are ~200k cells, but we only change detector ~10 @@ -1481,48 +1481,48 @@ StatusCode LArRawChannelMonTool::fillHistograms() it = per_det_negn.find(det); perdethist_negn = (it==per_det_negn.end()?hnull:it->second); it = per_det_qual.find(det); perdethist_qual = (it==per_det_qual.end()?hnull:it->second); // it = per_det_mevbc.find(det); perdethist_mevbc = (it==per_det_mevbc.end()?hnull:it->second); - detthreshold_occupancy = _occupancy_thresholds.at( det ); - detthreshold_signal = _signal_thresholds.at( det ); - detthreshold_pos_noise = _pos_noise_thresholds.at( det ); - detthreshold_neg_noise = _neg_noise_thresholds.at( det ); + detthreshold_occupancy = m_occupancy_thresholds.at( det ); + detthreshold_signal = m_signal_thresholds.at( det ); + detthreshold_pos_noise = m_pos_noise_thresholds.at( det ); + detthreshold_neg_noise = m_neg_noise_thresholds.at( det ); } lastdet=det; // sampling = static_cast<Sampling>( channel_sampling( det, offline_id ) ); //if ( sampling == -1 ) continue; // skip channel if sampling is undetermined - slot_number = _lar_online_id_ptr->slot( hardware_id ); - feedthrough_number = _lar_online_id_ptr->feedthrough( hardware_id ); + slot_number = m_lar_online_id_ptr->slot( hardware_id ); + feedthrough_number = m_lar_online_id_ptr->feedthrough( hardware_id ); - number = _lar_online_id_ptr->channel( hardware_id ) - 1; + number = m_lar_online_id_ptr->channel( hardware_id ) - 1; energy = chan.energy() * MeV ; // energy is in fixed in MeV by DSP time = chan.time() * picosecond; // time is fixed in ps by DSP gain = chan.gain(); //eta = calo_element_ptr->eta(); //phi = calo_element_ptr->phi(); // This noise get the value at HIGH gain - // noise = _calo_noise_tool->getNoise( calo_element_ptr, ICalorimeterNoiseTool::TOTALNOISE ); + // noise = m_calo_noise_tool->getNoise( calo_element_ptr, ICalorimeterNoiseTool::TOTALNOISE ); // Get hold of noise (electronic + Pileup) at the gain the channel is configured to. - noise = _calo_noise_tool->totalNoiseRMS( calo_element_ptr, chan.gain()); - if (_useElecNoiseOnly) noise = _calo_noise_tool->elecNoiseRMS( calo_element_ptr, chan.gain(), -1); // Setting NminBias to -1 as it is not set in ICaloNoiseTool by default + noise = m_calo_noise_tool->totalNoiseRMS( calo_element_ptr, chan.gain()); + if (m_useElecNoiseOnly) noise = m_calo_noise_tool->elecNoiseRMS( calo_element_ptr, chan.gain(), -1); // Setting NminBias to -1 as it is not set in ICaloNoiseTool by default /* if (noise1 != noise) { std::cout << "Vikas says: Detector and channel HWID are " << det << " " << chan.hardwareID() << std::endl; std::cout << "Vikas says PROBLEM: noise1 - noise is " << noise1-noise << std::endl; std::cout << "Vikas says : noise and channel gain are " << noise << " " << chan.gain()<< std::endl; - std::cout << "Vikas says : Elec noise and pileup noise are " << _calo_noise_tool->getNoise( calo_element_ptr, ICalorimeterNoiseTool::ELECTRONICNOISE ) - << " " << _calo_noise_tool->getNoise( calo_element_ptr, ICalorimeterNoiseTool::PILEUPNOISE )<< std::endl; - std::cout << "Vikas says : noise1 (gain 2-LOW), noise1 (gain 1-MED), noise1 (gain 0-High ) are " << _calo_noise_tool->totalNoiseRMS( calo_element_ptr, CaloGain::LARLOWGAIN) - << " " << _calo_noise_tool->totalNoiseRMS( calo_element_ptr, CaloGain::LARMEDIUMGAIN) - << " " << _calo_noise_tool->totalNoiseRMS( calo_element_ptr, CaloGain::LARHIGHGAIN ) << std::endl; + std::cout << "Vikas says : Elec noise and pileup noise are " << m_calo_noise_tool->getNoise( calo_element_ptr, ICalorimeterNoiseTool::ELECTRONICNOISE ) + << " " << m_calo_noise_tool->getNoise( calo_element_ptr, ICalorimeterNoiseTool::PILEUPNOISE )<< std::endl; + std::cout << "Vikas says : noise1 (gain 2-LOW), noise1 (gain 1-MED), noise1 (gain 0-High ) are " << m_calo_noise_tool->totalNoiseRMS( calo_element_ptr, CaloGain::LARLOWGAIN) + << " " << m_calo_noise_tool->totalNoiseRMS( calo_element_ptr, CaloGain::LARMEDIUMGAIN) + << " " << m_calo_noise_tool->totalNoiseRMS( calo_element_ptr, CaloGain::LARHIGHGAIN ) << std::endl; } */ significance = energy / noise ; //quality = short( chan.quality() ); - if (detchanged) _qualitySelector.selectionContext( &_selectionContext[det] ); + if (detchanged) m_qualitySelector.selectionContext( &m_selectionContext[det] ); } catch ( const LArOnlID_Exception &err ) { @@ -1543,36 +1543,36 @@ StatusCode LArRawChannelMonTool::fillHistograms() } // --- Fill per FEB Histograms --- - if ( _monitor_febs ) { + if ( m_monitor_febs ) { try { - if ( _is_noise_event && _monitor_occupancy && energy > detthreshold_occupancy ) { + if ( m_is_noise_event && m_monitor_occupancy && energy > detthreshold_occupancy ) { shared_ptr<IHistoProxyBase> const histo_cptr = per_feb_occu.at( feb_hash ); if ( histo_cptr ) histo_cptr->Fill( number ); } - if ( _is_noise_event && _monitor_signal && energy > detthreshold_signal ) { + if ( m_is_noise_event && m_monitor_signal && energy > detthreshold_signal ) { shared_ptr<IHistoProxyBase> const histo_cptr = per_feb_sign.at( feb_hash ); if ( histo_cptr ) histo_cptr->Fill( number, energy ); } - if ( _is_noise_event && _monitor_positive_noise && significance > detthreshold_pos_noise ) { + if ( m_is_noise_event && m_monitor_positive_noise && significance > detthreshold_pos_noise ) { shared_ptr<IHistoProxyBase> const histo_cptr = per_feb_posn.at( feb_hash ); if ( histo_cptr ) histo_cptr->Fill( number ); } - if ( _is_noise_event && _monitor_negative_noise && (-1.) * significance > detthreshold_neg_noise ) { + if ( m_is_noise_event && m_monitor_negative_noise && (-1.) * significance > detthreshold_neg_noise ) { shared_ptr<IHistoProxyBase> const histo_cptr = per_feb_negn.at( feb_hash ); if ( histo_cptr ) histo_cptr->Fill( number ); } - if ( _monitor_time && significance > _time_threshold ) { + if ( m_monitor_time && significance > m_time_threshold ) { shared_ptr<IHistoProxyBase> const histo_cptr = per_feb_time.at( feb_hash ); if ( histo_cptr ) histo_cptr->Fill( time ); } - if ( _monitor_quality && _qualitySelector.Select( chan ) ) { + if ( m_monitor_quality && m_qualitySelector.Select( chan ) ) { shared_ptr<IHistoProxyBase> const histo_cptr = per_feb_qual.at( feb_hash ); if ( histo_cptr ) histo_cptr->Fill( number ); } @@ -1591,31 +1591,31 @@ StatusCode LArRawChannelMonTool::fillHistograms() // --- Fill per Feethrough Histograms --- - if ( _monitor_feedthroughs ) { + if ( m_monitor_feedthroughs ) { try { - if ( _is_noise_event && _monitor_occupancy && energy > detthreshold_occupancy ) { + if ( m_is_noise_event && m_monitor_occupancy && energy > detthreshold_occupancy ) { shared_ptr<IHistoProxyBase> histo = per_ft_occu.at( feb_hash ); if ( histo ) histo->Fill( number, slot_number ); } - if ( _is_noise_event && _monitor_signal && energy > detthreshold_signal ) { + if ( m_is_noise_event && m_monitor_signal && energy > detthreshold_signal ) { shared_ptr<IHistoProxyBase> histo = per_ft_sign.at( feb_hash ); if ( histo ) histo->Fill( number, slot_number, energy ); } - if ( _is_noise_event && _monitor_positive_noise && significance > detthreshold_pos_noise ) { + if ( m_is_noise_event && m_monitor_positive_noise && significance > detthreshold_pos_noise ) { shared_ptr<IHistoProxyBase>histo = per_ft_posn.at( feb_hash ); if ( histo ) histo->Fill( number, slot_number ); } - if ( _is_noise_event && _monitor_negative_noise && (-1.) * significance > detthreshold_neg_noise ) { + if ( m_is_noise_event && m_monitor_negative_noise && (-1.) * significance > detthreshold_neg_noise ) { shared_ptr<IHistoProxyBase> const histo_cptr = per_ft_negn.at( feb_hash ); if ( histo_cptr ) histo_cptr->Fill( number, slot_number ); } - if ( _monitor_quality && _qualitySelector.Select( chan ) ) { + if ( m_monitor_quality && m_qualitySelector.Select( chan ) ) { shared_ptr<IHistoProxyBase> const histo_cptr = per_ft_qual.at( feb_hash ); if ( histo_cptr ) histo_cptr->Fill( number, slot_number ); } @@ -1631,11 +1631,11 @@ StatusCode LArRawChannelMonTool::fillHistograms() // --- Fill per detector histograms --- - if ( _monitor_detectors ) { + if ( m_monitor_detectors ) { // --- Skip channel if detector is undefined --- if ( det == UNDEF ) continue;//TK: Only having this check inside - //the _monitor_detectors block + //the m_monitor_detectors block //causes interference between the //various options. @@ -1653,14 +1653,14 @@ StatusCode LArRawChannelMonTool::fillHistograms() // --- Fill occupancy histogram --- - if ( _is_noise_event && _monitor_occupancy && energy > detthreshold_occupancy ) { + if ( m_is_noise_event && m_monitor_occupancy && energy > detthreshold_occupancy ) { if (perdethist_occu) perdethist_occu->Fill( super_slot_number, number ); } // --- fill signal histogram --- // Sep 30, 2011. Now with no LArEventInfo::ERROR and isATLASReady - if ( _is_noise_event && _monitor_signal && energy > detthreshold_signal && isATLASReady() ) { + if ( m_is_noise_event && m_monitor_signal && energy > detthreshold_signal && isATLASReady() ) { if (perdethist_sign && !isEventFlaggedByLArNoisyROAlgInTimeW) perdethist_sign->Fill( x_bin, y_bin, energy ); if (perdethist_gain && !isEventFlaggedByLArNoisyROAlgInTimeW) perdethist_gain->Fill( x_bin, y_bin, gain ); } @@ -1669,7 +1669,7 @@ StatusCode LArRawChannelMonTool::fillHistograms() // --- fill acceptance histogram --- // Sep 30, 2011. Now with no LArEventInfo::ERROR and isATLASReady - if ( _is_noise_event && _monitor_positive_noise && significance > detthreshold_pos_noise && isATLASReady() && !isEventFlaggedByLArNoisyROAlgInTimeW) { + if ( m_is_noise_event && m_monitor_positive_noise && significance > detthreshold_pos_noise && isATLASReady() && !isEventFlaggedByLArNoisyROAlgInTimeW) { if (perdethist_posn) perdethist_posn->Fill( x_bin, y_bin, 100 ); } else { if (perdethist_posn) perdethist_posn->Fill( x_bin, y_bin, 0 ); @@ -1677,14 +1677,14 @@ StatusCode LArRawChannelMonTool::fillHistograms() // --- per detector noise acceptance --- // Sep 30, 2011. Now with no LArEventInfo::ERROR and isATLASReady - if ( _is_noise_event && _monitor_negative_noise && (-1.) * significance > detthreshold_neg_noise && isATLASReady() && !isEventFlaggedByLArNoisyROAlgInTimeW) { + if ( m_is_noise_event && m_monitor_negative_noise && (-1.) * significance > detthreshold_neg_noise && isATLASReady() && !isEventFlaggedByLArNoisyROAlgInTimeW) { if (perdethist_negn) perdethist_negn->Fill( x_bin, y_bin, 100 ); } else { if (perdethist_negn) perdethist_negn->Fill( x_bin, y_bin, 0 ); } // Sep 30, 2011. Now with no LArEventInfo::ERROR and isATLASReady - if ( _monitor_quality && _qualitySelector.Select( chan ) && isATLASReady() && !isEventFlaggedByLArNoisyROAlgInTimeW) { + if ( m_monitor_quality && m_qualitySelector.Select( chan ) && isATLASReady() && !isEventFlaggedByLArNoisyROAlgInTimeW) { if (perdethist_qual) perdethist_qual->Fill( x_bin, y_bin, 100 ); } else { if (perdethist_qual) perdethist_qual->Fill( x_bin, y_bin, 0 ); @@ -1692,18 +1692,18 @@ StatusCode LArRawChannelMonTool::fillHistograms() /* // --- per detector mean energy vs bunch crossing --- - if ( _monitor_signal ) { + if ( m_monitor_signal ) { if(perdethist_mevbc) perdethist_mevbc->Fill( bunch_crossing_id, energy ); } */ - // if ( significance > _noise_threshold ) det_n_noisy_channels[det] += 1; + // if ( significance > m_noise_threshold ) det_n_noisy_channels[det] += 1; if ( significance > detthreshold_pos_noise ) det_n_noisy_channels[det] += 1; if ( (-1.) * significance > detthreshold_neg_noise ) det_n_noisy_channels_Neg[det] += 1; - if ( _qualitySelector.Select( chan ) ) det_n_possibly_problematic_channels[det] += 1; - if ( _monitor_time && significance > _time_threshold ) { - double res = _timeResolution( significance ); + if ( m_qualitySelector.Select( chan ) ) det_n_possibly_problematic_channels[det] += 1; + if ( m_monitor_time && significance > m_time_threshold ) { + double res = m_timeResolution( significance ); double weight = res > 0. ? 1 / (res*res) : 0.; event_mean_time.Add( time, weight ); mean_detector_times[det].Add( time, weight ); @@ -1748,10 +1748,10 @@ StatusCode LArRawChannelMonTool::fillHistograms() // {// --- fill global lar histograms --- // -// // if ( _is_noise_event ) +// // if ( m_is_noise_event ) // // _global_lar_eta_phi_acc->Fill( eta, phi, (significance > detthreshold_neg_noise?1.:0.) ); // -// if ( energy > _bcid_signal_threshold ) channels_above_bcid_threshold++; +// if ( energy > m_bcid_signal_threshold ) channels_above_bcid_threshold++; // // } // --- end global lar histograms --- @@ -1761,26 +1761,26 @@ StatusCode LArRawChannelMonTool::fillHistograms() std::vector<Detector> detectors = list_of( EMBA )( EMBC )( EMECA )( EMECC )( HECA )( HECC )( FCALA )( FCALC ); - if ( _monitor_burst ) { + if ( m_monitor_burst ) { foreach( Detector det, detectors ) { double noisy_channel_percent = double(det_n_noisy_channels[det]) / - double(_det_to_nchannels[det]) * 100.; + double(m_det_to_nchannels[det]) * 100.; double noisy_channel_percent_Neg = double(det_n_noisy_channels_Neg[det]) / - double(_det_to_nchannels[det]) * 100.; + double(m_det_to_nchannels[det]) * 100.; citer_det_th2ptr hist_itr = per_det_burs.find( det ); - if ( noisy_channel_percent > _noise_burst_percent_thresholds[det] && hist_itr != per_det_burs.end() ) { + if ( noisy_channel_percent > m_noise_burst_percent_thresholds[det] && hist_itr != per_det_burs.end() ) { shared_ptr<IHistoProxyBase> histo = hist_itr->second; // if ( histo ) histo->Fill( event_time_minutes ); if ( histo ) histo->Fill( lumi_block ); } hist_itr = per_det_timeVetoBurs.find( det ); - if ( noisy_channel_percent > _noise_burst_percent_thresholds[det] && !isEventFlaggedByLArNoisyROAlgInTimeW && hist_itr != per_det_timeVetoBurs.end() ) { + if ( noisy_channel_percent > m_noise_burst_percent_thresholds[det] && !isEventFlaggedByLArNoisyROAlgInTimeW && hist_itr != per_det_timeVetoBurs.end() ) { shared_ptr<IHistoProxyBase> histo = hist_itr->second; // if ( histo ) histo->Fill( event_time_minutes ); if ( histo ) histo->Fill( lumi_block ); @@ -1823,7 +1823,7 @@ StatusCode LArRawChannelMonTool::fillHistograms() double possibly_problematic_channel_percent = double(det_n_possibly_problematic_channels[det]) / - double(_det_to_nchannels[det]) * 100.; + double(m_det_to_nchannels[det]) * 100.; hist_itr = per_det_qnChan.find( det ); if ( hist_itr != per_det_qnChan.end() ) { @@ -1832,7 +1832,7 @@ StatusCode LArRawChannelMonTool::fillHistograms() } hist_itr = per_det_qburs.find( det ); - if ( possibly_problematic_channel_percent > _noise_burst_percent_thresholds[det] && + if ( possibly_problematic_channel_percent > m_noise_burst_percent_thresholds[det] && hist_itr != per_det_qburs.end() ) { shared_ptr<IHistoProxyBase> histo = hist_itr->second; // if ( histo ) histo->Fill( event_time_minutes ); @@ -1842,7 +1842,7 @@ StatusCode LArRawChannelMonTool::fillHistograms() /* // Sep 30, 2011. Now with no LArEventInfo::ERROR hist_itr = per_det_nChan_qburs.find( det ); - if ( det_n_possibly_problematic_channels[det] > _noise_burst_nChannel_thresholds[det] && + if ( det_n_possibly_problematic_channels[det] > m_noise_burst_nChannel_thresholds[det] && hist_itr != per_det_nChan_qburs.end() ) { shared_ptr<IHistoProxyBase> histo = hist_itr->second; // if ( histo ) histo->Fill( event_time_minutes ); @@ -1852,13 +1852,13 @@ StatusCode LArRawChannelMonTool::fillHistograms() // Sep 30, 2011. Now with no LArEventInfo::ERROR hist_itr = per_det_pede.find(det); - if ( _monitor_signal && hist_itr != per_det_pede.end() ) { + if ( m_monitor_signal && hist_itr != per_det_pede.end() ) { shared_ptr<IHistoProxyBase> histo = hist_itr->second; if ( histo && !isEventFlaggedByLArNoisyROAlgInTimeW) histo->Fill( lumi_block ,per_detector_total_energy[det] ); } hist_itr = per_det_sumE_BCID.find(det); - if ( _monitor_signal && hist_itr != per_det_sumE_BCID.end() ) { + if ( m_monitor_signal && hist_itr != per_det_sumE_BCID.end() ) { shared_ptr<IHistoProxyBase> histo = hist_itr->second; if ( histo ) histo->Fill( bunch_crossing_id ,per_detector_total_energy[det] ); } @@ -1867,7 +1867,7 @@ StatusCode LArRawChannelMonTool::fillHistograms() } - if ( _monitor_time ) { + if ( m_monitor_time ) { double t = event_mean_time.result(); typedef std::map<HWIdentifier, MeanCalculator> element_mean_calculator; typedef std::map<Detector,element_mean_calculator > det_element_mean_calculator; @@ -1875,13 +1875,13 @@ StatusCode LArRawChannelMonTool::fillHistograms() const Detector & detector = a.first; foreach( const element_mean_calculator::value_type & b, a.second ) { const MeanCalculator &avg= b.second; - _per_detector_hists[mean_feb_time_h][detector]->Fill( (avg.result() - t) / nanosecond ); + m_per_detector_hists[mean_feb_time_h][detector]->Fill( (avg.result() - t) / nanosecond ); } } } /* - if ( _monitor_time ) { // C-A side averge time plots// VB + if ( m_monitor_time ) { // C-A side averge time plots// VB typedef std::map<Detector,MeanCalculator> det_mean_calculator; det_mean_calculator::const_iterator itr_end = mean_detector_times.end(); @@ -1892,9 +1892,9 @@ StatusCode LArRawChannelMonTool::fillHistograms() per_det_dtdet[EMBC]->Fill( -1. * dt ); // per_det_lbdt[EMBA]->Fill( dt ); per_det_lbdt[EMBC]->Fill( -1. * dt ); - if ( lumi_block < _n_lumi_blocks ) { - _per_detector_hists["lb_v_time_diff"][EMBA]->Fill( lumi_block, dt ); - _per_detector_hists["lb_v_time_diff"][EMBC]->Fill( lumi_block, -1. * dt ); + if ( lumi_block < m_n_lumi_blocks ) { + m_per_detector_hists["lb_v_time_diff"][EMBA]->Fill( lumi_block, dt ); + m_per_detector_hists["lb_v_time_diff"][EMBC]->Fill( lumi_block, -1. * dt ); } } @@ -1905,9 +1905,9 @@ StatusCode LArRawChannelMonTool::fillHistograms() per_det_dtdet[EMECC]->Fill( -1. * dt ); // per_det_lbdt[EMECA]->Fill( dt ); per_det_lbdt[EMECC]->Fill( -1. * dt ); - if ( lumi_block < _n_lumi_blocks ) { - _per_detector_hists["lb_v_time_diff"][EMECA]->Fill( lumi_block, dt ); - _per_detector_hists["lb_v_time_diff"][EMECC]->Fill( lumi_block, -1. * dt ); + if ( lumi_block < m_n_lumi_blocks ) { + m_per_detector_hists["lb_v_time_diff"][EMECA]->Fill( lumi_block, dt ); + m_per_detector_hists["lb_v_time_diff"][EMECC]->Fill( lumi_block, -1. * dt ); } } @@ -1918,9 +1918,9 @@ StatusCode LArRawChannelMonTool::fillHistograms() per_det_dtdet[HECC]->Fill( -1. * dt ); // per_det_lbdt[HECA]->Fill( dt ); per_det_lbdt[HECC]->Fill( -1. * dt ); - if ( lumi_block < _n_lumi_blocks ) { - _per_detector_hists["lb_v_time_diff"][HECA]->Fill( lumi_block, dt ); - _per_detector_hists["lb_v_time_diff"][HECC]->Fill( lumi_block, -1. * dt ); + if ( lumi_block < m_n_lumi_blocks ) { + m_per_detector_hists["lb_v_time_diff"][HECA]->Fill( lumi_block, dt ); + m_per_detector_hists["lb_v_time_diff"][HECC]->Fill( lumi_block, -1. * dt ); } } @@ -1931,9 +1931,9 @@ StatusCode LArRawChannelMonTool::fillHistograms() per_det_dtdet[FCALC]->Fill( -1. * dt ); // per_det_lbdt[FCALA]->Fill( dt ); per_det_lbdt[FCALC]->Fill( -1. * dt ); - if ( lumi_block < _n_lumi_blocks ) { - _per_detector_hists["lb_v_time_diff"][FCALA]->Fill( lumi_block, dt ); - _per_detector_hists["lb_v_time_diff"][FCALC]->Fill( lumi_block, -1. * dt ); + if ( lumi_block < m_n_lumi_blocks ) { + m_per_detector_hists["lb_v_time_diff"][FCALA]->Fill( lumi_block, dt ); + m_per_detector_hists["lb_v_time_diff"][FCALC]->Fill( lumi_block, -1. * dt ); } } @@ -1952,89 +1952,89 @@ StatusCode LArRawChannelMonTool::procHistograms() ATH_MSG(DEBUG) << "===> start " << name() << "::procHistograms <=== " << endmsg; bool is_new_interval = false; - switch ( _interval ) { + switch ( m_interval ) { // BT : what about endOfEventsBlock???? case lumiBlock: is_new_interval = endOfLumiBlockFlag(); break; case lowStat: - is_new_interval = newLowStat; + is_new_interval = newLowStatFlag(); break; case run: is_new_interval = endOfRunFlag(); break; default: - msg(MSG::WARNING) << "given bad interval job-option: " << _interval_str + msg(MSG::WARNING) << "given bad interval job-option: " << m_interval_str << " ... booking histograms per run ..." << endmsg; - is_new_interval = endOfRunFlag(); + is_new_interval = endOfRunFlag(); } if ( is_new_interval ) { - if ( _event_counter != 0 ) { + if ( m_event_counter != 0 ) { // divide the efficiency histograms by number of events // scale per feedthrough efficiency histograms - if ( _monitor_febs ) { + if ( m_monitor_febs ) { std::vector<std::vector<shared_ptr<IHistoProxyBase> >*> per_feb_hists_to_scale; - if ( _monitor_quality ) per_feb_hists_to_scale.push_back(&_per_feb_hists[quality_h]); + if ( m_monitor_quality ) per_feb_hists_to_scale.push_back(&m_per_feb_hists[quality_h]); foreach( const std::vector<shared_ptr<IHistoProxyBase> >* const th1_vect_cptr, per_feb_hists_to_scale ) foreach( shared_ptr<IHistoProxyBase> const histo_cptr, *th1_vect_cptr ) if ( histo_cptr ) - histo_cptr->Scale( 100. / float( _event_counter ) ); + histo_cptr->Scale( 100. / float( m_event_counter ) ); } // scale per feedthrough efficiency histograms - if ( _monitor_feedthroughs ) { + if ( m_monitor_feedthroughs ) { std::vector<std::vector<shared_ptr<IHistoProxyBase> >*> per_ft_hists_to_scale; - if ( _monitor_quality ) per_ft_hists_to_scale.push_back(&_per_feedthrough_hists[quality_h]); + if ( m_monitor_quality ) per_ft_hists_to_scale.push_back(&m_per_feedthrough_hists[quality_h]); foreach( const std::vector<shared_ptr<IHistoProxyBase> >* const th2_vect_cptr, per_ft_hists_to_scale ) foreach( shared_ptr<IHistoProxyBase> const histo_cptr, *th2_vect_cptr ) if ( histo_cptr ) - histo_cptr->Scale( 100. / float( _event_counter ) ); + histo_cptr->Scale( 100. / float( m_event_counter ) ); } // --- reset event counter --- - _event_counter = 0; + m_event_counter = 0; } - if ( _noise_stream_event_counter != 0 ) { + if ( m_noise_stream_event_counter != 0 ) { // divide the efficiency histograms by number of events // scale per feedthrough efficiency histograms - if ( _monitor_febs ) { + if ( m_monitor_febs ) { std::vector<std::vector<shared_ptr<IHistoProxyBase> >*> per_feb_hists_to_scale; - if ( _monitor_positive_noise ) per_feb_hists_to_scale.push_back(&_per_feb_hists[pos_noise_h]); - if ( _monitor_negative_noise ) per_feb_hists_to_scale.push_back(&_per_feb_hists[neg_noise_h]); + if ( m_monitor_positive_noise ) per_feb_hists_to_scale.push_back(&m_per_feb_hists[pos_noise_h]); + if ( m_monitor_negative_noise ) per_feb_hists_to_scale.push_back(&m_per_feb_hists[neg_noise_h]); foreach( const std::vector<shared_ptr<IHistoProxyBase> >* const th1_vect_cptr, per_feb_hists_to_scale ) foreach( shared_ptr<IHistoProxyBase> const histo_cptr, *th1_vect_cptr ) if ( histo_cptr ) - histo_cptr->Scale( 100. / float( _noise_stream_event_counter ) ); + histo_cptr->Scale( 100. / float( m_noise_stream_event_counter ) ); } // scale per feedthrough efficiency histograms - if ( _monitor_feedthroughs ) { + if ( m_monitor_feedthroughs ) { std::vector<std::vector<shared_ptr<IHistoProxyBase> >*> per_ft_hists_to_scale; - if ( _monitor_positive_noise ) per_ft_hists_to_scale.push_back(&_per_feedthrough_hists[pos_noise_h]); - if ( _monitor_negative_noise ) per_ft_hists_to_scale.push_back(&_per_feedthrough_hists[neg_noise_h]); + if ( m_monitor_positive_noise ) per_ft_hists_to_scale.push_back(&m_per_feedthrough_hists[pos_noise_h]); + if ( m_monitor_negative_noise ) per_ft_hists_to_scale.push_back(&m_per_feedthrough_hists[neg_noise_h]); foreach( const std::vector<shared_ptr<IHistoProxyBase> >* const th2_vect_cptr, per_ft_hists_to_scale ) foreach( shared_ptr<IHistoProxyBase> const histo_cptr, *th2_vect_cptr ) if ( histo_cptr ) - histo_cptr->Scale( 100. / float( _noise_stream_event_counter ) ); + histo_cptr->Scale( 100. / float( m_noise_stream_event_counter ) ); } // --- reset event counter --- - _noise_stream_event_counter = 0; + m_noise_stream_event_counter = 0; } @@ -2089,7 +2089,7 @@ std::string LArRawChannelMonTool::threshold_histogram_title_snippet( const int& bool LArRawChannelMonTool::registerHistogram( LWHist* histo, const std::string& dir, const std::string& merge){ - MonGroup histGroup(this,dir,_interval,ATTRIB_MANAGED,"",merge); + MonGroup histGroup(this,dir,m_interval,ATTRIB_MANAGED,"",merge); if ( !histGroup.regHist(histo).isSuccess() ) { msg(MSG::ERROR) << "Cannot book: " << histo->GetName() << endmsg; @@ -2114,12 +2114,12 @@ IHistoProxyBase * LArRawChannelMonTool::createLWHistProxy(LWHist*h) { void LArRawChannelMonTool::setIsATLASReady(){ bool filterresult(true); - if (! _filterAtlasReady_tools.empty()) { - ToolHandleArray<IDQFilterTool>::const_iterator ifilter(_filterAtlasReady_tools.begin()), filterend(_filterAtlasReady_tools.end()); + if (! m_filterAtlasReady_tools.empty()) { + ToolHandleArray<IDQFilterTool>::const_iterator ifilter(m_filterAtlasReady_tools.begin()), filterend(m_filterAtlasReady_tools.end()); for (; filterresult && (ifilter != filterend); ++ifilter) { filterresult = (filterresult && (*ifilter)->accept()); } } - _atlas_ready = filterresult; + m_atlas_ready = filterresult; } diff --git a/LArCalorimeter/LArMonTools/src/LArRawChannelMonTools.cxx b/LArCalorimeter/LArMonTools/src/LArRawChannelMonTools.cxx index 704530513cf..8b56c40d836 100644 --- a/LArCalorimeter/LArMonTools/src/LArRawChannelMonTools.cxx +++ b/LArCalorimeter/LArMonTools/src/LArRawChannelMonTools.cxx @@ -328,7 +328,7 @@ lar_axis_maker::lar_axis_maker() lar_axis_maker::lar_axis_maker( const map<Detector, map<Sampling, deque<Region> > > ®ions ) - : _regions( regions ) + : m_regions( regions ) { generate(); @@ -344,7 +344,7 @@ lar_axis_maker::~lar_axis_maker() const vector<double> lar_axis_maker::operator() (const Detector &d, const Sampling &s) { - return _bins[d][s]; + return m_bins[d][s]; } @@ -352,10 +352,10 @@ const vector<double> lar_axis_maker::operator() (const Detector &d, const Sampli void lar_axis_maker::generate() { - _bins.clear(); + m_bins.clear(); // for each detector - foreach( const det_region_map_t::value_type &det_regions, _regions ) { + foreach( const det_region_map_t::value_type &det_regions, m_regions ) { const Detector &det = det_regions.first; @@ -363,7 +363,7 @@ void lar_axis_maker::generate() foreach( const sam_region_map_t::value_type &sam_regions, det_regions.second ) { const Sampling &samp = sam_regions.first; - _bins[det][samp] = vector<double>(); + m_bins[det][samp] = vector<double>(); // for each region foreach( const Region ®ion, sam_regions.second ) { @@ -377,7 +377,7 @@ void lar_axis_maker::generate() if ( size <= 0 ) break; while ( diff > 1.0e-10 ) { // float computaation => // 0 + 1 - 1 != 0 ... - _bins[det][samp].push_back( lo ); + m_bins[det][samp].push_back( lo ); lo += size; last_diff = diff; diff = fabs( lo - up ); @@ -387,7 +387,7 @@ void lar_axis_maker::generate() } - _bins[det][samp].push_back( sam_regions.second.back().upper ); + m_bins[det][samp].push_back( sam_regions.second.back().upper ); } @@ -396,12 +396,12 @@ void lar_axis_maker::generate() } -const map<Detector, map<Sampling, deque<Region> > > &lar_axis_maker::regions() const { return _regions; } +const map<Detector, map<Sampling, deque<Region> > > &lar_axis_maker::regions() const { return m_regions; } void lar_axis_maker::regions( const map<Detector, map<Sampling, deque<Region> > >& regions ) { - _regions = regions; + m_regions = regions; generate(); } @@ -422,39 +422,39 @@ bool LArMonTools::operator< ( const Region &lhs, const Region &rhs ) SelectionContext::SelectionContext() - : _positive_noise(0), - _negative_noise(0), - _quality( DBL_MAX ), - _energy(0) + : m_positive_noise(0), + m_negative_noise(0), + m_quality( DBL_MAX ), + m_energy(0) {} SelectionContext::SelectionContext( const double& quality ) - : _positive_noise(0), - _negative_noise(0), - _quality( quality ), - _energy(0) + : m_positive_noise(0), + m_negative_noise(0), + m_quality( quality ), + m_energy(0) {} SelectionContext::~SelectionContext() {} // Setters: -void SelectionContext::quality( const double& quality) { _quality = quality; } +void SelectionContext::quality( const double& quality) { m_quality = quality; } QualitySelector::QualitySelector() - : _pSelectionContext(0) + : m_pSelectionContext(0) {} // Getters: -const SelectionContext * QualitySelector::selectionContext() const { return _pSelectionContext; } +const SelectionContext * QualitySelector::selectionContext() const { return m_pSelectionContext; } // Setters: void QualitySelector::selectionContext( const SelectionContext * pSelectionContext ) { - _pSelectionContext = pSelectionContext; + m_pSelectionContext = pSelectionContext; } @@ -464,38 +464,38 @@ QualitySelector::~QualitySelector() {} MeanCalculator::MeanCalculator() - : _moment0( 0. ) - , _moment1( 0. ) - , _mean( 0. ) + : m_moment0( 0. ) + , m_moment1( 0. ) + , m_mean( 0. ) {} MeanCalculator::~MeanCalculator() {} double& MeanCalculator::Add( const double & x , const double & w ) { - _moment0 += w; - _moment1 += x * w; - _mean = ( _moment0 > 0. ) - ? _moment1 / _moment0 + m_moment0 += w; + m_moment1 += x * w; + m_mean = ( m_moment0 > 0. ) + ? m_moment1 / m_moment0 : 0.; - return _mean; + return m_mean; } -double MeanCalculator::result() const { return _mean; } +double MeanCalculator::result() const { return m_mean; } -void MeanCalculator::result( const double & mean) { _mean = mean; } +void MeanCalculator::result( const double & mean) { m_mean = mean; } ResolutionCalculator::ResolutionCalculator() - : _a ( 0. ) - , _b ( 0. ) + : m_a ( 0. ) + , m_b ( 0. ) {} ResolutionCalculator::ResolutionCalculator( const double &a, const double &b ) - : _a ( a ) - , _b ( b ) + : m_a ( a ) + , m_b ( b ) {} @@ -505,7 +505,7 @@ ResolutionCalculator::~ResolutionCalculator() {} double ResolutionCalculator::operator() ( const double& x ){ double numerator = x*x; - double denominator = _a * _a + _b * _b * x * x; + double denominator = m_a * m_a + m_b * m_b * x * x; return (denominator > 0. ) ? sqrt( numerator / denominator ) -- GitLab