CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
SiStripMonitorDigi Class Reference

#include <DQM/SiStripMonitorDigi/src/SiStripMonitorDigi.cc>

Inheritance diagram for SiStripMonitorDigi:
DQMEDAnalyzer edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Classes

struct  DigiFailureMEs
 
struct  LayerMEs
 
struct  ModMEs
 
struct  SubDetMEs
 

Public Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &) override
 
virtual void beginLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
void dqmBeginRun (const edm::Run &r, const edm::EventSetup &c) override
 
virtual void endLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &) override
 
virtual void endRun (const edm::Run &, const edm::EventSetup &) override
 
 SiStripMonitorDigi (const edm::ParameterSet &)
 
 ~SiStripMonitorDigi ()
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Public Attributes

std::string topFolderName_
 

Private Member Functions

void AddApvShotsToSubDet (const std::vector< APVShot > &, std::vector< APVShot > &)
 
bool AllDigis (const edm::EventSetup &es)
 
void bookLayer (DQMStore::IBooker &ibooker)
 
MonitorElementbookME1D (DQMStore::IBooker &ibooker, const char *ParameterSetLabel, const char *HistoName)
 
MonitorElementbookMETrend (DQMStore::IBooker &ibooker, const char *ParameterSetLabel, const char *HistoName)
 
void bookTrendMEs (DQMStore::IBooker &ibooker, const TString &name, int32_t layer, uint32_t id, std::string flag)
 
void createLayerMEs (DQMStore::IBooker &ibooker, std::string label, int ndet)
 
void createMEs (DQMStore::IBooker &ibooker, const edm::EventSetup &es)
 
void createModuleMEs (DQMStore::IBooker &ibooker, ModMEs &mod_single, uint32_t detid)
 
void createSubDetMEs (DQMStore::IBooker &ibooker, std::string label)
 
void createSubDetTH2 (DQMStore::IBooker &ibooker, std::string label)
 
void FillApvShotsMap (TkHistoMap *, const std::vector< APVShot > &, uint32_t id, int)
 
void fillDigiADCsMEs (int value, std::string name)
 
void fillME (MonitorElement *ME, float value1)
 
void fillME (MonitorElement *ME, float value1, float value2)
 
void fillME (MonitorElement *ME, float value1, float value2, float value3)
 
void fillME (MonitorElement *ME, float value1, float value2, float value3, float value4)
 
void fillTrend (MonitorElement *me, float value, float timeinorbit)
 
int getDigiSourceIndex (uint32_t id)
 
void ResetModuleMEs (uint32_t idet)
 

Private Attributes

edm::InputTag apvPhaseProducer_
 
edm::EDGetTokenT< APVCyclePhaseCollectionapvPhaseProducerToken_
 
bool calculate_strip_occupancy
 
edm::ParameterSet conf_
 
bool createTrendMEs
 
SiStripDCSStatusdcsStatus_
 
std::map< std::pair< std::string, int32_t >, bool > DetectedLayers
 
std::vector< const edm::DetSetVector< SiStripDigi > * > digi_detset_handles
 
DigiFailureMEs digiFailureMEs
 
std::map< uint32_t, ModMEsDigiMEs
 
std::vector< edm::InputTagdigiProducerList
 
std::vector< edm::EDGetTokenT< edm::DetSetVector< SiStripDigi > > > digiProducerTokenList
 
bool digitkhistomapon
 
DQMStoredqmStore_
 
int eventNb
 
int firstEvent
 
SiStripFolderOrganizer folder_organizer
 
bool globalsummaryapvshotson
 
bool globalswitchapvshotsApvon
 
bool globalswitchapvshotsonprof
 
bool globalswitchchargemedianapvshotson
 
bool globalswitchnapvshotson
 
bool globalswitchnstripsapvshotson
 
edm::EDGetTokenT< L1GlobalTriggerEvmReadoutRecordgtEvmToken_
 
edm::InputTag historyProducer_
 
edm::EDGetTokenT< EventWithHistoryhistoryProducerToken_
 
int ignoreFirstNLumisections_
 
int integrateNLumisections_
 
bool isStableBeams
 
std::map< std::string, std::vector< uint32_t > > LayerDetMap
 
std::map< std::string, LayerMEsLayerMEsMap
 
bool layerswitchadccooleston
 
bool layerswitchadchotteston
 
bool layerswitchdigiadcprofon
 
bool layerswitchdigiadcson
 
bool layerswitchnumdigisapvon
 
bool layerswitchnumdigison
 
bool layerswitchnumdigisprofon
 
bool layerswitchstripoccupancyon
 
unsigned long long m_cacheID_
 
MonitorElementMedianChargeApvShotsGlobal
 
bool Mod_On_
 
std::vector< uint32_t > ModulesToBeExcluded_
 
bool moduleswitchadccooleston
 
bool moduleswitchadchotteston
 
bool moduleswitchdigiadcson
 
bool moduleswitchnumdigison
 
bool moduleswitchnumdigispstripon
 
bool moduleswitchstripoccupancyon
 
TString name
 
MonitorElementNApvApvShotsGlobal
 
MonitorElementNApvShotsGlobal
 
MonitorElementNApvShotsGlobalProf
 
int nFedTECm
 
int nFedTECp
 
int nFedTIB
 
int nFedTIDm
 
int nFedTIDp
 
int nFedTOB
 
bool reset_each_run
 
int runNb
 
int SBDeclaredAt
 
bool SBTransitionDone
 
bool select_all_detectors
 
bool shotschargehistomapon
 
bool shotshistomapon
 
bool shotsstripshistomapon
 
MonitorElementShotsVsTimeApvShotsGlobal
 
bool show_control_view
 
bool show_mechanical_structure_view
 
bool show_readout_view
 
edm::ESHandle< SiStripDetCablingSiStripDetCabling_
 
MonitorElementStripMultiplicityApvShotsGlobal
 
std::map< std::string, SubDetMEsSubDetMEsMap
 
std::map< std::string, std::string > SubDetPhasePartMap
 
bool subdetswitchapvcycleprofon
 
bool subdetswitchapvcycleth2on
 
bool subdetswitchapvshotsApvon
 
bool subdetswitchapvshotsonprof
 
bool subdetswitchchargemedianapvshotson
 
bool subdetswitchnapvshotson
 
bool subdetswitchnstripsapvshotson
 
bool subdetswitchtotdigifailureon
 
bool subdetswitchtotdigiprofon
 
TkHistoMaptkmapdigi
 
TkHistoMaptkmapMedianChargeApvshots
 
TkHistoMaptkmapNApvshots
 
TkHistoMaptkmapNstripApvshot
 
int TotalNShots
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr< dqmDetails::NoCacheglobalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr< dqmDetails::NoCacheglobalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Data Quality Monitoring source of the Silicon Strip Tracker. Produces histograms related to digis.

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 34 of file SiStripMonitorDigi.h.

Constructor & Destructor Documentation

SiStripMonitorDigi::SiStripMonitorDigi ( const edm::ParameterSet iConfig)
explicit

Definition at line 47 of file SiStripMonitorDigi.cc.

References apvPhaseProducer_, apvPhaseProducerToken_, conf_, edm::EDConsumerBase::consumes(), edm::EDConsumerBase::consumesCollector(), createTrendMEs, dcsStatus_, digiProducerList, digiProducerTokenList, digitkhistomapon, eventNb, firstEvent, edm::ParameterSet::getParameter(), globalsummaryapvshotson, globalswitchapvshotsApvon, globalswitchapvshotsonprof, globalswitchchargemedianapvshotson, globalswitchnapvshotson, globalswitchnstripsapvshotson, gtEvmToken_, historyProducer_, historyProducerToken_, ignoreFirstNLumisections_, integrateNLumisections_, isStableBeams, layerswitchadccooleston, layerswitchadchotteston, layerswitchdigiadcprofon, layerswitchdigiadcson, layerswitchnumdigison, layerswitchnumdigisprofon, layerswitchstripoccupancyon, Max(), Mod_On_, moduleswitchadccooleston, moduleswitchadchotteston, moduleswitchdigiadcson, moduleswitchnumdigison, moduleswitchnumdigispstripon, moduleswitchstripoccupancyon, SBDeclaredAt, SBTransitionDone, shotschargehistomapon, shotshistomapon, shotsstripshistomapon, AlCaHLTBitMon_QueryRunRegistry::string, SubDetPhasePartMap, subdetswitchapvcycleprofon, subdetswitchapvcycleth2on, subdetswitchapvshotsApvon, subdetswitchapvshotsonprof, subdetswitchchargemedianapvshotson, subdetswitchnapvshotson, subdetswitchnstripsapvshotson, subdetswitchtotdigifailureon, subdetswitchtotdigiprofon, GlobalPosition_Frontier_DevDB_cff::tag, and topFolderName_.

47  :
49  conf_(iConfig),
51  show_readout_view (false),
52  show_control_view (false),
53  select_all_detectors (true),
54  reset_each_run (false),
56  m_cacheID_(0)
57 {
58  firstEvent = -1;
59  eventNb = 0;
60 
61  // Detector Partitions
62  SubDetPhasePartMap["TIB"] = "TI";
63  SubDetPhasePartMap["TID__MINUS"] = "TI";
64  SubDetPhasePartMap["TID__PLUS"] = "TI";
65  SubDetPhasePartMap["TOB"] = "TO";
66  SubDetPhasePartMap["TEC__MINUS"] = "TM";
67  SubDetPhasePartMap["TEC__PLUS"] = "TP";
68 
69  topFolderName_ = conf_.getParameter<std::string>("TopFolderName");
70 
71  // get Digi Producer List
72  digiProducerList = conf_.getParameter<std::vector<edm::InputTag> >("DigiProducersList");
73  for (auto const& tag : digiProducerList) {
75  }
76 
77  //get on/off option for every cluster from cfi
78  edm::ParameterSet ParametersNumberOfDigis = conf_.getParameter<edm::ParameterSet>("TH1NumberOfDigis");
79  layerswitchnumdigison = ParametersNumberOfDigis.getParameter<bool>("layerswitchon");
80  moduleswitchnumdigison = ParametersNumberOfDigis.getParameter<bool>("moduleswitchon");
81 
82  edm::ParameterSet ParametersNumberOfDigisPerStrip = conf_.getParameter<edm::ParameterSet>("TH1NumberOfDigisPerStrip");
83  moduleswitchnumdigispstripon = ParametersNumberOfDigisPerStrip.getParameter<bool>("moduleswitchon");
84 
85  edm::ParameterSet ParametersADCsHottestStrip = conf_.getParameter<edm::ParameterSet>("TH1ADCsHottestStrip");
86  layerswitchadchotteston = ParametersADCsHottestStrip.getParameter<bool>("layerswitchon");
87  moduleswitchadchotteston = ParametersADCsHottestStrip.getParameter<bool>("moduleswitchon");
88 
89  edm::ParameterSet ParametersADCsCoolestStrip = conf_.getParameter<edm::ParameterSet>("TH1ADCsCoolestStrip");
90  layerswitchadccooleston = ParametersADCsCoolestStrip.getParameter<bool>("layerswitchon");
91  moduleswitchadccooleston = ParametersADCsCoolestStrip.getParameter<bool>("moduleswitchon");
92 
93  edm::ParameterSet ParametersDigiADCs = conf_.getParameter<edm::ParameterSet>("TH1DigiADCs");
94  layerswitchdigiadcson = ParametersDigiADCs.getParameter<bool>("layerswitchon");
95  moduleswitchdigiadcson = ParametersDigiADCs.getParameter<bool>("moduleswitchon");
96 
97  edm::ParameterSet ParametersStripOccupancy = conf_.getParameter<edm::ParameterSet>("TH1StripOccupancy");
98  layerswitchstripoccupancyon = ParametersStripOccupancy.getParameter<bool>("layerswitchon");
99  moduleswitchstripoccupancyon = ParametersStripOccupancy.getParameter<bool>("moduleswitchon");
100 
101  edm::ParameterSet ParametersDigiProf = conf_.getParameter<edm::ParameterSet>("TProfNumberOfDigi");
102  layerswitchnumdigisprofon = ParametersDigiProf.getParameter<bool>("layerswitchon");
103 
104  edm::ParameterSet ParametersDigiADC = conf_.getParameter<edm::ParameterSet>("TProfDigiADC");
105  layerswitchdigiadcprofon = ParametersDigiProf.getParameter<bool>("layerswitchon");
106 
107  edm::ParameterSet ParametersTotDigiProf = conf_.getParameter<edm::ParameterSet>("TProfTotalNumberOfDigis");
108  subdetswitchtotdigiprofon = ParametersTotDigiProf.getParameter<bool>("subdetswitchon");
109 
110  edm::ParameterSet ParametersTotDigiFailure = conf_.getParameter<edm::ParameterSet>("TotalNumberOfDigisFailure");
111  subdetswitchtotdigifailureon = ParametersTotDigiFailure.getParameter<bool>("subdetswitchon");
112 
113  edm::ParameterSet ParametersDigiApvProf = conf_.getParameter<edm::ParameterSet>("TProfDigiApvCycle");
114  subdetswitchapvcycleprofon = ParametersDigiApvProf.getParameter<bool>("subdetswitchon");
115 
116  edm::ParameterSet ParametersDigiApvTH2 = conf_.getParameter<edm::ParameterSet>("TH2DigiApvCycle");
117  subdetswitchapvcycleth2on = ParametersDigiApvTH2.getParameter<bool>("subdetswitchon");
118 
119  edm::ParameterSet ParametersNApvShots = conf_.getParameter<edm::ParameterSet>("TH1NApvShots");
120  subdetswitchnapvshotson = ParametersNApvShots.getParameter<bool>("subdetswitchon");
121 
122  edm::ParameterSet ParametersNStripApvShots = conf_.getParameter<edm::ParameterSet>("TH1NStripsApvShots");
123  subdetswitchnstripsapvshotson = ParametersNStripApvShots.getParameter<bool>("subdetswitchon");
124 
125  edm::ParameterSet ParametersChargeMedianApvShots = conf_.getParameter<edm::ParameterSet>("TH1ChargeMedianApvShots");
126  subdetswitchchargemedianapvshotson = ParametersChargeMedianApvShots.getParameter<bool>("subdetswitchon");
127 
128  edm::ParameterSet ParametersApvNumberApvShots = conf_.getParameter<edm::ParameterSet>("TH1ApvNumApvShots");
129  subdetswitchapvshotsApvon = ParametersChargeMedianApvShots.getParameter<bool>("subdetswitchon");
130 
131  edm::ParameterSet ParametersNApvShotsProf = conf_.getParameter<edm::ParameterSet>("TProfNShotsVsTime");
132  subdetswitchapvshotsonprof = ParametersNApvShotsProf.getParameter<bool>("subdetswitchon");
133 
134  //Global Histograms
135 
136  edm::ParameterSet ParametersGlobalNApvShots = conf_.getParameter<edm::ParameterSet>("TH1NApvShots");
137  globalswitchnapvshotson = ParametersGlobalNApvShots.getParameter<bool>("globalswitchon");
138 
139  edm::ParameterSet ParametersGlobalNApvShotsProf = conf_.getParameter<edm::ParameterSet>("TProfGlobalNShots");
140  globalsummaryapvshotson = ParametersGlobalNApvShotsProf.getParameter<bool>("globalswitchon");
141 
142  edm::ParameterSet ParametersGlobalNStripApvShots = conf_.getParameter<edm::ParameterSet>("TH1NStripsApvShots");
143  globalswitchnstripsapvshotson = ParametersGlobalNStripApvShots.getParameter<bool>("globalswitchon");
144 
145  edm::ParameterSet ParametersGlobalApvNumApvShots = conf_.getParameter<edm::ParameterSet>("TH1ApvNumApvShots");
146  globalswitchapvshotsApvon = ParametersGlobalApvNumApvShots.getParameter<bool>("globalswitchon");
147 
148  edm::ParameterSet ParametersGlobalChargeMedianApvShots = conf_.getParameter<edm::ParameterSet>("TH1ChargeMedianApvShots");
149  globalswitchchargemedianapvshotson = ParametersGlobalChargeMedianApvShots.getParameter<bool>("globalswitchon");
150 
151  edm::ParameterSet ParametersGlobalNApvShotsTimeProf = conf_.getParameter<edm::ParameterSet>("TProfNShotsVsTime");
152  globalswitchapvshotsonprof = ParametersGlobalNApvShotsTimeProf.getParameter<bool>("globalswitchon");
153 
154  //Digi and APV Shots Maps
155 
156  digitkhistomapon = conf_.getParameter<bool>("TkHistoMap_On");
157 
158  shotshistomapon = conf_.getParameter<bool>("TkHistoMapNApvShots_On");
159  shotsstripshistomapon = conf_.getParameter<bool>("TkHistoMapNStripApvShots_On");
160  shotschargehistomapon = conf_.getParameter<bool>("TkHistoMapMedianChargeApvShots_On");
161 
162  createTrendMEs = conf_.getParameter<bool>("CreateTrendMEs");
163  Mod_On_ = conf_.getParameter<bool>("Mod_On");
164  // xLumiProf = conf_.getParameter<int>("xLumiProf");
165  // Event History Producer
166  historyProducer_ = conf_.getParameter<edm::InputTag>("HistoryProducer");
167  historyProducerToken_ = consumes<EventWithHistory>(conf_.getParameter<edm::InputTag>("HistoryProducer") );
168 
169  // Apv Phase Producer
170  apvPhaseProducer_ = conf_.getParameter<edm::InputTag>("ApvPhaseProducer");
171  apvPhaseProducerToken_ = consumes<APVCyclePhaseCollection>(conf_.getParameter<edm::InputTag>("ApvPhaseProducer") );
172 
173  gtEvmToken_ = consumes<L1GlobalTriggerEvmReadoutRecord>(edm::InputTag("gtEvmDigis") );
174 
175  // Create DCS Status
176  bool checkDCS = conf_.getParameter<bool>("UseDCSFiltering");
177  if (checkDCS) dcsStatus_ = new SiStripDCSStatus(consumesCollector());
178  else dcsStatus_ = 0;
179 
180  //initialize boolean for the data-presence check (needed for TotalNumberOfDigisFailure histogram)
181  isStableBeams = false;
182  SBTransitionDone = false;
183  SBDeclaredAt = 0;
184  ignoreFirstNLumisections_ = TMath::Max ( 0 , ParametersTotDigiFailure.getParameter<int32_t>("ignoreFirstNLumisections") );
185  integrateNLumisections_ = TMath::Max ( 1 , ParametersTotDigiFailure.getParameter<int32_t>("integrateNLumisections") );
186 }
T getParameter(std::string const &) const
edm::InputTag historyProducer_
std::map< std::string, std::string > SubDetPhasePartMap
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
unsigned long long m_cacheID_
SiStripDCSStatus * dcsStatus_
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
edm::EDGetTokenT< EventWithHistory > historyProducerToken_
edm::EDGetTokenT< L1GlobalTriggerEvmReadoutRecord > gtEvmToken_
std::vector< edm::EDGetTokenT< edm::DetSetVector< SiStripDigi > > > digiProducerTokenList
T Max(T a, T b)
Definition: MathUtil.h:44
edm::InputTag apvPhaseProducer_
std::string topFolderName_
edm::ParameterSet conf_
std::vector< edm::InputTag > digiProducerList
edm::EDGetTokenT< APVCyclePhaseCollection > apvPhaseProducerToken_
SiStripFolderOrganizer folder_organizer
SiStripMonitorDigi::~SiStripMonitorDigi ( )

Definition at line 189 of file SiStripMonitorDigi.cc.

References dcsStatus_.

189  {
190  if (dcsStatus_) delete dcsStatus_;
191 }
SiStripDCSStatus * dcsStatus_

Member Function Documentation

void SiStripMonitorDigi::AddApvShotsToSubDet ( const std::vector< APVShot > &  moduleShots,
std::vector< APVShot > &  subdetShots 
)
private

Definition at line 1206 of file SiStripMonitorDigi.cc.

References mps_fire::i.

Referenced by analyze(), and fillME().

1206  {
1207 
1208  for (uint i=0; i<moduleShots.size(); i++){
1209  subdetShots.push_back(moduleShots[i]);
1210  }
1211 }
bool SiStripMonitorDigi::AllDigis ( const edm::EventSetup es)
private

Referenced by fillME().

void SiStripMonitorDigi::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overridevirtual

Definition at line 554 of file SiStripMonitorDigi.cc.

References EventWithHistory::absoluteBX(), ecalMGPA::adc(), SiStripMonitorDigi::ModMEs::ADCsCoolestStrip, SiStripMonitorDigi::ModMEs::ADCsHottestStrip, AddApvShotsToSubDet(), apvPhaseProducerToken_, L1GtfeExtWord::beamMode(), createTrendMEs, edm::DetSet< T >::data, dcsStatus_, digi_detset_handles, SiStripMonitorDigi::ModMEs::DigiADCs, digiFailureMEs, DigiMEs, digiProducerList, digiProducerTokenList, digitkhistomapon, eventNb, edm::HandleBase::failedToGet(), TkHistoMap::fill(), MonitorElement::Fill(), HcalObjRepresent::Fill(), FillApvShotsMap(), fillME(), fillTrend(), folder_organizer, edm::EventSetup::get(), edm::Event::getByToken(), getDigiSourceIndex(), APVCyclePhaseCollection::getPhase(), APVShotFinder::getShots(), SiStripDCSStatus::getStatus(), SiStripFolderOrganizer::getSubDetFolderAndTag(), globalsummaryapvshotson, globalswitchapvshotsApvon, globalswitchapvshotsonprof, globalswitchchargemedianapvshotson, globalswitchnapvshotson, globalswitchnstripsapvshotson, gtEvmToken_, L1GlobalTriggerEvmReadoutRecord::gtfeWord(), historyProducerToken_, mps_fire::i, edm::EventBase::id(), APVCyclePhaseCollection::invalid, isStableBeams, edm::HandleBase::isValid(), SiStripMonitorDigi::LayerMEs::LayerADCsCoolestStrip, SiStripMonitorDigi::LayerMEs::LayerADCsCoolestStripTrend, SiStripMonitorDigi::LayerMEs::LayerADCsHottestStrip, SiStripMonitorDigi::LayerMEs::LayerADCsHottestStripTrend, LayerDetMap, SiStripMonitorDigi::LayerMEs::LayerDigiADCProfile, SiStripMonitorDigi::LayerMEs::LayerDigiADCs, SiStripMonitorDigi::LayerMEs::LayerDigiADCsTrend, LayerMEsMap, SiStripMonitorDigi::LayerMEs::LayerNumberOfDigis, SiStripMonitorDigi::LayerMEs::LayerNumberOfDigisProfile, SiStripMonitorDigi::LayerMEs::LayerNumberOfDigisTrend, SiStripMonitorDigi::LayerMEs::LayerStripOccupancy, SiStripMonitorDigi::LayerMEs::LayerStripOccupancyTrend, layerswitchadccooleston, layerswitchadchotteston, layerswitchdigiadcprofon, layerswitchdigiadcson, layerswitchnumdigison, layerswitchnumdigisprofon, layerswitchstripoccupancyon, create_public_lumi_plots::loc, genParticles_cff::map, MedianChargeApvShotsGlobal, Mod_On_, moduleswitchadccooleston, moduleswitchadchotteston, moduleswitchdigiadcson, moduleswitchnumdigison, moduleswitchnumdigispstripon, moduleswitchstripoccupancyon, APVCyclePhaseCollection::multiphase, NApvApvShotsGlobal, SiStripDetCabling::nApvPairs(), NApvShotsGlobal, NApvShotsGlobalProf, APVCyclePhaseCollection::nopartition, NORBITS_PER_SECOND, NULL, SiStripMonitorDigi::ModMEs::NumberOfDigis, SiStripMonitorDigi::ModMEs::NumberOfDigisPerStrip, edm::EventBase::orbitNumber(), edm::Handle< T >::product(), edm::ESHandle< T >::product(), edm::EventID::run(), runNb, shotschargehistomapon, shotshistomapon, shotsstripshistomapon, ShotsVsTimeApvShotsGlobal, SiStripDetCabling_, AlCaHLTBitMon_QueryRunRegistry::string, StripMultiplicityApvShotsGlobal, SiStripMonitorDigi::ModMEs::StripOccupancy, SiStripMonitorDigi::SubDetMEs::SubDetApvShots, SiStripMonitorDigi::SubDetMEs::SubDetChargeMedianApvShotsTH1, SiStripMonitorDigi::SubDetMEs::SubDetDigiApvProf, SiStripMonitorDigi::SubDetMEs::SubDetDigiApvTH2, SubDetMEsMap, SiStripMonitorDigi::SubDetMEs::SubDetNApvShotsNApvTH1, SiStripMonitorDigi::SubDetMEs::SubDetNApvShotsProf, SiStripMonitorDigi::SubDetMEs::SubDetNApvShotsTH1, SiStripMonitorDigi::SubDetMEs::SubDetNStripsApvShotsTH1, SubDetPhasePartMap, subdetswitchapvcycleprofon, subdetswitchapvcycleth2on, subdetswitchapvshotsApvon, subdetswitchapvshotsonprof, subdetswitchchargemedianapvshotson, subdetswitchnapvshotson, subdetswitchnstripsapvshotson, subdetswitchtotdigifailureon, subdetswitchtotdigiprofon, SiStripMonitorDigi::SubDetMEs::SubDetTotDigiProf, SiStripMonitorDigi::DigiFailureMEs::SubDetTotDigiProfLS, tkmapdigi, tkmapMedianChargeApvshots, tkmapNApvshots, tkmapNstripApvshot, TotalNShots, and SiStripMonitorDigi::SubDetMEs::totNDigis.

554  {
555 
556  // Filter out events if DCS Event if requested
557  if (dcsStatus_ && !dcsStatus_->getStatus(iEvent, iSetup)) return;
558 
559  //Retrieve tracker topology from geometry
560  edm::ESHandle<TrackerTopology> tTopoHandle;
561  iSetup.get<TrackerTopologyRcd>().get(tTopoHandle);
562  const TrackerTopology* const tTopo = tTopoHandle.product();
563 
564  TotalNShots=0;
565 
566  runNb = iEvent.id().run();
567  eventNb++;
568 
569  float iOrbitSec = iEvent.orbitNumber()/NORBITS_PER_SECOND;
570 
571  digi_detset_handles.clear();
572 
573  std::vector<edm::EDGetTokenT<edm::DetSetVector<SiStripDigi> > >::const_iterator iToken = digiProducerTokenList.begin();
574  for(std::vector<edm::InputTag>::const_iterator iter = digiProducerList.begin(), iEnd = digiProducerList.end();
575  iter != iEnd; ++iter, ++iToken) {
577  iEvent.getByToken( *iToken, digi_handle );
578  if (digi_handle.isValid()) digi_detset_handles.push_back(digi_handle.product());
579  }
580 
581  // initialise # of clusters to zero
582  for (std::map<std::string, SubDetMEs>::iterator iSubdet = SubDetMEsMap.begin();
583  iSubdet != SubDetMEsMap.end(); iSubdet++) {
584  iSubdet->second.totNDigis = 0;
585  iSubdet->second.SubDetApvShots.clear();
586  }
587 
588  for (std::map<std::string, std::vector< uint32_t > >::const_iterator iterLayer = LayerDetMap.begin();
589  iterLayer != LayerDetMap.end(); iterLayer++) {
590 
591  std::string layer_label = iterLayer->first;
592 
593  std::vector< uint32_t > layer_dets = iterLayer->second;
594  std::map<std::string, LayerMEs>::iterator iLayerME = LayerMEsMap.find(layer_label);
595 
596  //get Layer MEs
597  LayerMEs local_layermes;
598 
599  if(iLayerME == LayerMEsMap.end()) continue;
600  else local_layermes = iLayerME->second;
601 
602  int largest_adc_layer= 0;
603  int smallest_adc_layer= 99999;
604 
605  int ndigi_layer = 0;
606 
607  uint16_t iDet = 0;
608 
609  std::string subdet_label = "";
610 
611  // loop over all modules in the layer
612  for (std::vector< uint32_t >::const_iterator iterDets = layer_dets.begin() ;
613  iterDets != layer_dets.end() ; iterDets++) {
614  iDet++;
615 
616  // detid and type of ME
617  uint32_t detid = (*iterDets);
618 
619  // Get SubDet label once
620  if (subdet_label.size() == 0) subdet_label = folder_organizer.getSubDetFolderAndTag(detid, tTopo).second;
621 
622  // DetId and corresponding set of MEs
623 
624  std::map<uint32_t, ModMEs >::iterator pos = DigiMEs.find(detid);
625  ModMEs local_modmes = pos->second;
626 
627  // search digis of detid
628  int loc = getDigiSourceIndex(detid);
629 
630  int ndigi_det = 0;
631 
632  if (loc > -1) {
633  ndigi_det = (*(digi_detset_handles[loc]))[detid].size();
634  APVShotFinder theShotFinder = APVShotFinder((*(digi_detset_handles[loc]))[detid]);
635  const std::vector<APVShot>& shots = theShotFinder.getShots();
636  AddApvShotsToSubDet(shots,SubDetMEsMap[subdet_label].SubDetApvShots);
637  if (shotshistomapon) tkmapNApvshots->fill(detid,shots.size());
640  }
641 
642  if(Mod_On_ && moduleswitchnumdigison && (local_modmes.NumberOfDigis != NULL))
643  (local_modmes.NumberOfDigis)->Fill(ndigi_det);
644 
646  local_layermes.LayerNumberOfDigisProfile->Fill(iDet*1.0,ndigi_det);
647 
648  if (digitkhistomapon) tkmapdigi->fill(detid,ndigi_det);
649 
650  if (ndigi_det == 0) continue; // no digis for this detid => jump to next step of loop
651 
652  const edm::DetSet<SiStripDigi> & digi_detset = (*(digi_detset_handles[loc]))[detid];
653 
654  ndigi_layer += ndigi_det;
655 
656  // ADCs
657  int largest_adc=(digi_detset.data.begin())->adc();
658  int smallest_adc=(digi_detset.data.begin())->adc();
659 
660 
661  // Check if these parameters are really needed
662  float det_occupancy = 0.0;
663 
664  for(edm::DetSet<SiStripDigi>::const_iterator digiIter = digi_detset.data.begin();
665  digiIter!= digi_detset.data.end(); digiIter++ ){
666 
667  int this_adc = digiIter->adc();
668 
669  if (this_adc > 0.0) det_occupancy++;
670 
671  if(this_adc>largest_adc) largest_adc = this_adc;
672  if(this_adc<smallest_adc) smallest_adc = this_adc;
673 
674  if(Mod_On_ && moduleswitchnumdigispstripon && (local_modmes.NumberOfDigisPerStrip != NULL) && (this_adc > 0.0) )
675  (local_modmes.NumberOfDigisPerStrip)->Fill(digiIter->strip());
676 
677  if(Mod_On_ && moduleswitchdigiadcson && (local_modmes.DigiADCs != NULL) )
678  (local_modmes.DigiADCs)->Fill(static_cast<float>(this_adc));
679 
680  //Fill #ADCs for this digi at layer level
682  fillME(local_layermes.LayerDigiADCs , this_adc);
683  if (createTrendMEs) fillTrend(local_layermes.LayerDigiADCsTrend, this_adc, iOrbitSec);
684  }
685 
687  local_layermes.LayerDigiADCProfile->Fill(iDet*1.0,this_adc);
688 
689  }//end of loop over digis in this det
690 
691  // Occupancy
692  short nstrips = SiStripDetCabling_->nApvPairs(detid) * 2 * 128;
693  if (nstrips > 0 && det_occupancy > 0 ) {
694  det_occupancy = det_occupancy/nstrips;
695  if (Mod_On_ && moduleswitchstripoccupancyon && (local_modmes.StripOccupancy != NULL))
696  (local_modmes.StripOccupancy)->Fill(det_occupancy);
698  fillME(local_layermes.LayerStripOccupancy, det_occupancy);
699  if (createTrendMEs) fillTrend(local_layermes.LayerStripOccupancyTrend, det_occupancy, iOrbitSec);
700  }
701  }
702 
703  if (largest_adc > largest_adc_layer) largest_adc_layer = largest_adc;
704  if (smallest_adc < smallest_adc_layer) smallest_adc_layer = smallest_adc;
705 
706  // nr. of adcs for hottest strip
707  if( Mod_On_ && moduleswitchadchotteston && (local_modmes.ADCsHottestStrip != NULL))
708  (local_modmes.ADCsHottestStrip)->Fill(static_cast<float>(largest_adc));
709 
710  // nr. of adcs for coolest strip
711  if(Mod_On_ && moduleswitchadccooleston && (local_modmes.ADCsCoolestStrip != NULL))
712  (local_modmes.ADCsCoolestStrip)->Fill(static_cast<float>(smallest_adc));
713 
714  }//end of loop over DetIds
715 
717  fillME(local_layermes.LayerNumberOfDigis,ndigi_layer);
718  if (createTrendMEs) fillTrend(local_layermes.LayerNumberOfDigisTrend, ndigi_layer, iOrbitSec);
719  }
721  fillME(local_layermes.LayerADCsHottestStrip,largest_adc_layer);
722  if (createTrendMEs) fillTrend(local_layermes.LayerADCsHottestStripTrend, largest_adc_layer, iOrbitSec);
723  }
725  fillME(local_layermes.LayerADCsCoolestStrip ,smallest_adc_layer);
726  if (createTrendMEs) fillTrend(local_layermes.LayerADCsCoolestStripTrend, smallest_adc_layer, iOrbitSec);
727  }
728 
729  std::map<std::string, SubDetMEs>::iterator iSubdet = SubDetMEsMap.find(subdet_label);
730  if(iSubdet != SubDetMEsMap.end()) {
731  iSubdet->second.totNDigis += ndigi_layer;
732  //std::cout << " totDigis" << iSubdet->second.totNDigis << " in " << subdet_label << std::endl;
733  }
734  }
735 
737 
738  //check Stable beams bit
740  iEvent.getByToken( gtEvmToken_, gtEvm_handle );
741  L1GlobalTriggerEvmReadoutRecord const* gtevm = gtEvm_handle.product();
742 
743  L1GtfeExtWord gtfeEvmExtWord;
744  if (gtevm)
745  {
746  gtfeEvmExtWord = gtevm->gtfeWord();
747  }
748  else
749  edm::LogInfo("DQMProvInfo") << " gtfeEvmWord inaccessible" ;
750 
751  /* mia: is there not a smarter way !?!?!?!? */
752  if ( gtfeEvmExtWord.beamMode() == 11 )
753  isStableBeams = true;
754  }
755 
756  for (std::map<std::string, SubDetMEs>::iterator it = SubDetMEsMap.begin();
757  it != SubDetMEsMap.end(); it++) {
758 
760  if (strcmp(it->first.c_str(),"TEC__MINUS")==0){
761  digiFailureMEs.SubDetTotDigiProfLS->Fill(1, it->second.totNDigis);
762  }else if (strcmp(it->first.c_str(),"TEC__PLUS")==0){
763  digiFailureMEs.SubDetTotDigiProfLS->Fill(2, it->second.totNDigis);
764  }else if (strcmp(it->first.c_str(),"TIB")==0){
765  digiFailureMEs.SubDetTotDigiProfLS->Fill(3, it->second.totNDigis);
766  }else if (strcmp(it->first.c_str(),"TID__MINUS")==0){
767  digiFailureMEs.SubDetTotDigiProfLS->Fill(4, it->second.totNDigis);
768  }else if (strcmp(it->first.c_str(),"TID__PLUS")==0){
769  digiFailureMEs.SubDetTotDigiProfLS->Fill(5, it->second.totNDigis);
770  }else if (strcmp(it->first.c_str(),"TOB")==0){
771  digiFailureMEs.SubDetTotDigiProfLS->Fill(6, it->second.totNDigis);
772  }
773  }
774 
776  if (strcmp(it->first.c_str(),"TEC__MINUS")==0){
777  NApvShotsGlobalProf->Fill(1,it->second.SubDetApvShots.size());
778  }else if (strcmp(it->first.c_str(),"TEC__PLUS")==0){
779  NApvShotsGlobalProf->Fill(2,it->second.SubDetApvShots.size());
780  }else if (strcmp(it->first.c_str(),"TIB")==0){
781  NApvShotsGlobalProf->Fill(3,it->second.SubDetApvShots.size());
782  }else if (strcmp(it->first.c_str(),"TID__MINUS")==0){
783  NApvShotsGlobalProf->Fill(4,it->second.SubDetApvShots.size());
784  }else if (strcmp(it->first.c_str(),"TID__PLUS")==0){
785  NApvShotsGlobalProf->Fill(5,it->second.SubDetApvShots.size());
786  }else if (strcmp(it->first.c_str(),"TOB")==0){
787  NApvShotsGlobalProf->Fill(6,it->second.SubDetApvShots.size());
788  }
789  }
790 
791  SubDetMEs subdetmes= it->second;
792  std::string subdet = it->first;
793 
794  // Fill APV shots histograms for SubDet
795 
796  uint ShotsSize=subdetmes.SubDetApvShots.size();
797  TotalNShots+=ShotsSize; //Counter for total Shots in the SiStrip Tracker
798 
799  if (subdetswitchnapvshotson ) subdetmes.SubDetNApvShotsTH1->Fill(ShotsSize);// N shots
800  if (subdetswitchapvshotsonprof) subdetmes.SubDetNApvShotsProf ->Fill(iOrbitSec,ShotsSize); //N shots vs time
801 
802  for (uint i=0; i< ShotsSize; ++i){ // Strip multiplicity, charge median and APV number distributions for APV shots
803 
804  if (subdetswitchapvshotsApvon) subdetmes.SubDetNApvShotsNApvTH1->Fill((subdetmes.SubDetApvShots[i].apvNumber()+1));//APV are defined by 0 to 5 I want 1 to 6
805  if (globalswitchapvshotsApvon) NApvApvShotsGlobal->Fill((subdetmes.SubDetApvShots[i].apvNumber()+1));
806 
807  if (subdetswitchnstripsapvshotson) subdetmes.SubDetNStripsApvShotsTH1->Fill(subdetmes.SubDetApvShots[i].nStrips());
808  if (globalswitchnstripsapvshotson) StripMultiplicityApvShotsGlobal->Fill(subdetmes.SubDetApvShots[i].nStrips());
809 
810  if (subdetswitchchargemedianapvshotson) subdetmes.SubDetChargeMedianApvShotsTH1->Fill(subdetmes.SubDetApvShots[i].median());
811  if (globalswitchchargemedianapvshotson) MedianChargeApvShotsGlobal->Fill(subdetmes.SubDetApvShots[i].median());
812 
813  }
814 
815  if (subdetswitchtotdigiprofon)subdetmes.SubDetTotDigiProf->Fill(iOrbitSec,subdetmes.totNDigis);
816  }
817 
820 
821  // get EventHistory
822 
823  edm::Handle<EventWithHistory> event_history;
824  iEvent.getByToken(historyProducerToken_,event_history);
825 
826  // get Phase of APV
827  edm::Handle<APVCyclePhaseCollection> apv_phase_collection;
828  iEvent.getByToken(apvPhaseProducerToken_,apv_phase_collection);
829 
830  if (event_history.isValid()
831  && !event_history.failedToGet()
832  && apv_phase_collection.isValid()
833  && !apv_phase_collection.failedToGet()) {
834 
835 
836  long long tbx = event_history->absoluteBX();
837 
838 
839  for (std::map<std::string, SubDetMEs>::iterator it = SubDetMEsMap.begin();
840  it != SubDetMEsMap.end(); it++) {
841 
842  SubDetMEs subdetmes;
843  std::string subdet = it->first;
844  subdetmes = it->second;
845 
846  int the_phase = APVCyclePhaseCollection::invalid;
847  long long tbx_corr = tbx;
848 
849  if (SubDetPhasePartMap.find(subdet) != SubDetPhasePartMap.end()) the_phase = apv_phase_collection->getPhase(SubDetPhasePartMap[subdet]);
850  if(the_phase==APVCyclePhaseCollection::nopartition ||
852  the_phase==APVCyclePhaseCollection::invalid) the_phase=30;
853  tbx_corr -= the_phase;
854 
855  if (subdetswitchapvcycleprofon)subdetmes.SubDetDigiApvProf->Fill(tbx_corr%70,subdetmes.totNDigis);
856  if (subdetswitchapvcycleth2on) subdetmes.SubDetDigiApvTH2->Fill(tbx_corr%70,subdetmes.totNDigis);
857  }
858  }
859 }//end of method analyze
int adc(sample_type sample)
get the ADC sample (12 bits)
RunNumber_t run() const
Definition: EventID.h:39
std::map< std::string, LayerMEs > LayerMEsMap
std::pair< const std::string, const char * > getSubDetFolderAndTag(const uint32_t &detid, const TrackerTopology *tTopo)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:460
const L1GtfeExtWord gtfeWord() const
get / set GTFE word (record) in the GT readout record
long long absoluteBX(const unsigned int ev1) const
MonitorElement * NApvShotsGlobalProf
std::map< uint32_t, ModMEs > DigiMEs
#define NULL
Definition: scimark2.h:8
std::map< std::string, std::string > SubDetPhasePartMap
MonitorElement * MedianChargeApvShotsGlobal
MonitorElement * StripMultiplicityApvShotsGlobal
TkHistoMap * tkmapNstripApvshot
void Fill(long long x)
bool getStatus(edm::Event const &e, edm::EventSetup const &eSetup)
const std::vector< APVShot > & getShots() const
const int getPhase(const std::string partition) const
SiStripDCSStatus * dcsStatus_
const double NORBITS_PER_SECOND
edm::ESHandle< SiStripDetCabling > SiStripDetCabling_
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
DigiFailureMEs digiFailureMEs
void fill(uint32_t &detid, float value)
Definition: TkHistoMap.cc:180
edm::EDGetTokenT< EventWithHistory > historyProducerToken_
void fillME(MonitorElement *ME, float value1)
MonitorElement * NApvApvShotsGlobal
std::vector< const edm::DetSetVector< SiStripDigi > * > digi_detset_handles
int orbitNumber() const
Definition: EventBase.h:67
std::map< std::string, SubDetMEs > SubDetMEsMap
bool isValid() const
Definition: HandleBase.h:74
void fillTrend(MonitorElement *me, float value, float timeinorbit)
edm::EDGetTokenT< L1GlobalTriggerEvmReadoutRecord > gtEvmToken_
MonitorElement * NApvShotsGlobal
std::vector< edm::EDGetTokenT< edm::DetSetVector< SiStripDigi > > > digiProducerTokenList
bool failedToGet() const
Definition: HandleBase.h:78
int getDigiSourceIndex(uint32_t id)
std::map< std::string, std::vector< uint32_t > > LayerDetMap
T const * product() const
Definition: Handle.h:81
const T & get() const
Definition: EventSetup.h:56
std::vector< edm::InputTag > digiProducerList
const uint16_t nApvPairs(uint32_t det_id) const
TkHistoMap * tkmapMedianChargeApvshots
edm::EDGetTokenT< APVCyclePhaseCollection > apvPhaseProducerToken_
edm::EventID id() const
Definition: EventBase.h:60
collection_type data
Definition: DetSet.h:78
TkHistoMap * tkmapNApvshots
void AddApvShotsToSubDet(const std::vector< APVShot > &, std::vector< APVShot > &)
SiStripFolderOrganizer folder_organizer
MonitorElement * ShotsVsTimeApvShotsGlobal
collection_type::const_iterator const_iterator
Definition: DetSet.h:33
const cms_uint16_t beamMode() const
T const * product() const
Definition: ESHandle.h:86
void FillApvShotsMap(TkHistoMap *, const std::vector< APVShot > &, uint32_t id, int)
void SiStripMonitorDigi::beginLuminosityBlock ( const edm::LuminosityBlock lb,
const edm::EventSetup es 
)
overridevirtual

Definition at line 272 of file SiStripMonitorDigi.cc.

References digiFailureMEs, edm::LuminosityBlockBase::id(), integrateNLumisections_, isStableBeams, edm::LuminosityBlockID::luminosityBlock(), MonitorElement::Reset(), subdetswitchtotdigifailureon, and SiStripMonitorDigi::DigiFailureMEs::SubDetTotDigiProfLS.

272  {
274  isStableBeams = false;
275  //integrate stats over several LS to prevent eventual low trigger rates
277  }
278 }
LuminosityBlockID id() const
DigiFailureMEs digiFailureMEs
LuminosityBlockNumber_t luminosityBlock() const
void Reset(void)
reset ME (ie. contents, errors, etc)
void SiStripMonitorDigi::bookHistograms ( DQMStore::IBooker ,
edm::Run const &  ,
edm::EventSetup const &   
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 194 of file SiStripMonitorDigi.cc.

References createMEs(), DigiMEs, edm::EventSetup::get(), m_cacheID_, reset_each_run, ResetModuleMEs(), and show_mechanical_structure_view.

195 {
197  unsigned long long cacheID = es.get<SiStripDetCablingRcd>().cacheIdentifier();
198  if (m_cacheID_ != cacheID) {
199  m_cacheID_ = cacheID;
200  edm::LogInfo("SiStripMonitorDigi") <<"SiStripMonitorDigi::bookHistograms: "
201  << " Creating MEs for new Cabling ";
202  createMEs( ibooker, es );
203  }
204  } else if (reset_each_run) {
205  edm::LogInfo("SiStripMonitorDigi") <<"SiStripMonitorDigi::bookHistograms: "
206  << " Resetting MEs ";
207  for (std::map<uint32_t, ModMEs >::const_iterator idet = DigiMEs.begin() ; idet!=DigiMEs.end() ; idet++) {
208  ResetModuleMEs(idet->first);
209  }
210  }
211 
212 }
void ResetModuleMEs(uint32_t idet)
void createMEs(DQMStore::IBooker &ibooker, const edm::EventSetup &es)
std::map< uint32_t, ModMEs > DigiMEs
unsigned long long m_cacheID_
void SiStripMonitorDigi::bookLayer ( DQMStore::IBooker ibooker)
private
MonitorElement * SiStripMonitorDigi::bookME1D ( DQMStore::IBooker ibooker,
const char *  ParameterSetLabel,
const char *  HistoName 
)
private

Definition at line 895 of file SiStripMonitorDigi.cc.

References DQMStore::IBooker::book1D(), conf_, and edm::ParameterSet::getParameter().

Referenced by createLayerMEs(), and createModuleMEs().

896 {
898  return ibooker.book1D(HistoName,HistoName,
899  Parameters.getParameter<int32_t>("Nbinx"),
900  Parameters.getParameter<double>("xmin"),
901  Parameters.getParameter<double>("xmax")
902  );
903 }
T getParameter(std::string const &) const
vector< ParameterSet > Parameters
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
edm::ParameterSet conf_
std::string HistoName
MonitorElement * SiStripMonitorDigi::bookMETrend ( DQMStore::IBooker ibooker,
const char *  ParameterSetLabel,
const char *  HistoName 
)
private

Definition at line 874 of file SiStripMonitorDigi.cc.

References DQMStore::IBooker::bookProfile(), conf_, MonitorElement::DQM_KIND_TPROFILE, edm::ParameterSet::getParameter(), and MonitorElement::setAxisTitle().

Referenced by createLayerMEs().

875 {
876  edm::ParameterSet ParametersTrend = conf_.getParameter<edm::ParameterSet>("Trending");
878  ParametersTrend.getParameter<int32_t>("Nbins"),
879  // 0,
880  ParametersTrend.getParameter<double>("xmin"),
881  ParametersTrend.getParameter<double>("xmax"),
882  // ParametersTrend.getParameter<int32_t>("Nbins"),
883  100, //that parameter should not be there !?
884  ParametersTrend.getParameter<double>("ymin"),
885  ParametersTrend.getParameter<double>("ymax"),
886  "" );
887  if(!me) return me;
888 
889  me->setAxisTitle("Event Time in Seconds",1);
890  if (me->kind() == MonitorElement::DQM_KIND_TPROFILE) me->getTH1()->SetCanExtend(TH1::kAllAxes);
891  return me;
892 }
T getParameter(std::string const &) const
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:157
edm::ParameterSet conf_
std::string HistoName
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void SiStripMonitorDigi::bookTrendMEs ( DQMStore::IBooker ibooker,
const TString &  name,
int32_t  layer,
uint32_t  id,
std::string  flag 
)
private
void SiStripMonitorDigi::createLayerMEs ( DQMStore::IBooker ibooker,
std::string  label,
int  ndet 
)
private

Definition at line 977 of file SiStripMonitorDigi.cc.

References bookME1D(), bookMETrend(), DQMStore::IBooker::bookProfile(), SiStripHistoId::createHistoLayer(), createTrendMEs, diffTwoXMLs::label, SiStripMonitorDigi::LayerMEs::LayerADCsCoolestStrip, SiStripMonitorDigi::LayerMEs::LayerADCsCoolestStripTrend, SiStripMonitorDigi::LayerMEs::LayerADCsHottestStrip, SiStripMonitorDigi::LayerMEs::LayerADCsHottestStripTrend, SiStripMonitorDigi::LayerMEs::LayerDigiADCProfile, SiStripMonitorDigi::LayerMEs::LayerDigiADCs, SiStripMonitorDigi::LayerMEs::LayerDigiADCsTrend, LayerMEsMap, SiStripMonitorDigi::LayerMEs::LayerNumberOfDigis, SiStripMonitorDigi::LayerMEs::LayerNumberOfDigisProfile, SiStripMonitorDigi::LayerMEs::LayerNumberOfDigisTrend, SiStripMonitorDigi::LayerMEs::LayerStripOccupancy, SiStripMonitorDigi::LayerMEs::LayerStripOccupancyTrend, layerswitchadccooleston, layerswitchadchotteston, layerswitchdigiadcprofon, layerswitchdigiadcson, layerswitchnumdigison, layerswitchnumdigisprofon, layerswitchstripoccupancyon, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by createMEs(), and fillME().

977  {
978 
979  std::map<std::string, LayerMEs>::iterator iLayerME = LayerMEsMap.find(label);
980  if(iLayerME==LayerMEsMap.end()){
981  SiStripHistoId hidmanager;
982  LayerMEs layerMEs;
983  layerMEs.LayerNumberOfDigis = 0;
984  layerMEs.LayerNumberOfDigisTrend = 0;
985  layerMEs.LayerADCsHottestStrip = 0;
986  layerMEs.LayerADCsHottestStripTrend = 0;
987  layerMEs.LayerADCsCoolestStrip = 0;
988  layerMEs.LayerADCsCoolestStripTrend = 0;
989  layerMEs.LayerDigiADCs = 0;
990  layerMEs.LayerDigiADCsTrend = 0;
991  layerMEs.LayerStripOccupancy = 0;
992  layerMEs.LayerStripOccupancyTrend = 0;
993  layerMEs.LayerNumberOfDigisProfile = 0;
994  layerMEs.LayerDigiADCProfile = 0;
995 
996 
997  //#Digis
999  layerMEs.LayerNumberOfDigis=bookME1D( ibooker , "TH1NumberOfDigis", hidmanager.createHistoLayer("Summary_TotalNumberOfDigis","layer",label,"").c_str() );
1000  if (createTrendMEs) layerMEs.LayerNumberOfDigisTrend=bookMETrend( ibooker , "TH1NumberOfDigis", hidmanager.createHistoLayer("Trend_NumberOfDigis","layer",label,"").c_str() );
1001  }
1002 
1003  //#ADCs for hottest strip
1005  layerMEs.LayerADCsHottestStrip=bookME1D( ibooker , "TH1ADCsHottestStrip", hidmanager.createHistoLayer("Summary_ADCsHottestStrip","layer",label,"").c_str() );
1006  if (createTrendMEs) layerMEs.LayerADCsHottestStripTrend=bookMETrend( ibooker , "TH1ADCsHottestStrip", hidmanager.createHistoLayer("Trend_ADCsHottestStrip","layer",label,"").c_str() );
1007  }
1008 
1009  //#ADCs for coolest strip
1011  layerMEs.LayerADCsCoolestStrip=bookME1D(ibooker , "TH1ADCsCoolestStrip", hidmanager.createHistoLayer("Summary_ADCsCoolestStrip","layer",label,"").c_str() );
1012  if (createTrendMEs) layerMEs.LayerADCsCoolestStripTrend=bookMETrend( ibooker , "TH1ADCsCoolestStrip", hidmanager.createHistoLayer("Trend_ADCsCoolestStrip","layer",label,"").c_str() );
1013  }
1014 
1015  //#ADCs for each digi
1016  if(layerswitchdigiadcson) {
1017  layerMEs.LayerDigiADCs=bookME1D( ibooker , "TH1DigiADCs", hidmanager.createHistoLayer("Summary_DigiADCs","layer",label,"").c_str() );
1018  if (createTrendMEs) layerMEs.LayerDigiADCsTrend=bookMETrend( ibooker , "TH1DigiADCs", hidmanager.createHistoLayer("Trend_DigiADCs","layer",label,"").c_str() );
1019  }
1020 
1021  //Strip Occupancy
1023  layerMEs.LayerStripOccupancy=bookME1D( ibooker , "TH1StripOccupancy", hidmanager.createHistoLayer("Summary_StripOccupancy","layer",label,"").c_str() );
1024  if (createTrendMEs) layerMEs.LayerStripOccupancyTrend=bookMETrend( ibooker , "TH1StripOccupancy", hidmanager.createHistoLayer("Trend_StripOccupancy","layer",label,"").c_str() );
1025 
1026  }
1027  // # of Digis
1029  std::string hid = hidmanager.createHistoLayer("NumberOfDigiProfile","layer",label,"");
1030  layerMEs.LayerNumberOfDigisProfile = ibooker.bookProfile(hid, hid, ndets, 0.5, ndets+0.5,21, -0.5, 200.5);
1031  }
1032 
1033  // # of Digis
1035  std::string hid = hidmanager.createHistoLayer("DigiADCProfile","layer",label,"");
1036  layerMEs.LayerDigiADCProfile = ibooker.bookProfile(hid, hid, ndets, 0.5, ndets+0.5, 64, -0.5, 255.5);
1037  }
1038 
1039  LayerMEsMap[label]=layerMEs;
1040  }
1041 }
MonitorElement * bookME1D(DQMStore::IBooker &ibooker, const char *ParameterSetLabel, const char *HistoName)
std::map< std::string, LayerMEs > LayerMEsMap
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:157
MonitorElement * bookMETrend(DQMStore::IBooker &ibooker, const char *ParameterSetLabel, const char *HistoName)
std::string createHistoLayer(std::string description, std::string id_type, std::string path, std::string flag)
void SiStripMonitorDigi::createMEs ( DQMStore::IBooker ibooker,
const edm::EventSetup es 
)
private

Definition at line 320 of file SiStripMonitorDigi.cc.

References funct::abs(), SiStripMonitorDigi::ModMEs::ADCsCoolestStrip, SiStripMonitorDigi::ModMEs::ADCsHottestStrip, SiStripDetCabling::addActiveDetectorsRawIds(), DQMStore::IBooker::book1D(), DQMStore::IBooker::book2D(), DQMStore::IBooker::bookProfile(), conf_, createLayerMEs(), createModuleMEs(), createSubDetMEs(), SiStripMonitorDigi::ModMEs::DigiADCs, digiFailureMEs, DigiMEs, digitkhistomapon, MonitorElement::DQM_KIND_TPROFILE, folder_organizer, edm::EventSetup::get(), SiStripFolderOrganizer::getLayerFolderName(), edm::ParameterSet::getParameter(), SiStripFolderOrganizer::GetSubDetAndLayer(), SiStripFolderOrganizer::getSubDetFolderAndTag(), SiStripHistoId::getSubdetid(), SiStripSubStructure::getTECDetectors(), MonitorElement::getTH1(), SiStripSubStructure::getTIBDetectors(), SiStripSubStructure::getTIDDetectors(), SiStripSubStructure::getTOBDetectors(), globalsummaryapvshotson, globalswitchapvshotsApvon, globalswitchapvshotsonprof, globalswitchchargemedianapvshotson, globalswitchnapvshotson, globalswitchnstripsapvshotson, MonitorElement::kind(), diffTwoXMLs::label, LayerDetMap, LayerMEsMap, MedianChargeApvShotsGlobal, Mod_On_, NApvApvShotsGlobal, NApvShotsGlobal, NApvShotsGlobalProf, SiStripMonitorDigi::ModMEs::NumberOfDigis, SiStripMonitorDigi::ModMEs::NumberOfDigisPerStrip, edm::ESHandle< T >::product(), reset_each_run, ResetModuleMEs(), MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), DQMStore::IBooker::setCurrentFolder(), SiStripFolderOrganizer::setDetectorFolder(), SiStripFolderOrganizer::setLayerFolder(), shotschargehistomapon, shotshistomapon, shotsstripshistomapon, ShotsVsTimeApvShotsGlobal, show_mechanical_structure_view, SiStripDetCabling_, AlCaHLTBitMon_QueryRunRegistry::string, StripMultiplicityApvShotsGlobal, SiStripMonitorDigi::ModMEs::StripOccupancy, SiStripMonitorDigi::DigiFailureMEs::SubDetDigiFailures2D, SubDetMEsMap, subdetswitchtotdigifailureon, SiStripMonitorDigi::DigiFailureMEs::SubDetTotDigiProfLS, tkmapdigi, tkmapMedianChargeApvshots, tkmapNApvshots, tkmapNstripApvshot, and topFolderName_.

Referenced by bookHistograms().

320  {
321 
323 
324  //Retrieve tracker topology from geometry
325  edm::ESHandle<TrackerTopology> tTopoHandle;
326  es.get<TrackerTopologyRcd>().get(tTopoHandle);
327  const TrackerTopology* const tTopo = tTopoHandle.product();
328 
329  // take from eventSetup the SiStripDetCabling object - here will use SiStripDetControl later on
331 
332  // get list of active detectors from SiStripDetCabling
333  std::vector<uint32_t> activeDets;
334  activeDets.clear(); // just in case
336 
337  SiStripSubStructure substructure;
338 
339  // remove any eventual zero elements - there should be none, but just in case
340  for(std::vector<uint32_t>::iterator idets = activeDets.begin(); idets != activeDets.end(); idets++){
341  if(*idets == 0) activeDets.erase(idets);
342  }
343 
344  // create SiStripFolderOrganizer
346 
347  // Create TkHistoMap for Digi and APV shots properies
348 
349  if (digitkhistomapon) tkmapdigi = new TkHistoMap(ibooker , topFolderName_,"TkHMap_NumberOfDigi", 0.0,true);
350  if (shotshistomapon) tkmapNApvshots = new TkHistoMap(ibooker , topFolderName_,"TkHMap_NApvShots", 0.0,true);
351  if (shotsstripshistomapon) tkmapNstripApvshot = new TkHistoMap(ibooker , topFolderName_,"TkHMap_NStripApvShots", 0.0,true);
352  if (shotschargehistomapon) tkmapMedianChargeApvshots= new TkHistoMap(ibooker , topFolderName_,"TkHMap_MedianChargeApvShots",0.0,true);
353 
354  std::vector<uint32_t> tibDetIds;
355 
356  // loop over detectors and book MEs
357  edm::LogInfo("SiStripTkDQM|SiStripMonitorDigi")<<"nr. of activeDets: "<<activeDets.size();
358  for(std::vector<uint32_t>::const_iterator detid_iterator = activeDets.begin(); detid_iterator!=activeDets.end(); detid_iterator++){
359 
360  uint32_t detid = (*detid_iterator);
361 
362  ModMEs local_modmes;
363 
364  local_modmes.NumberOfDigis = 0;
365  local_modmes.NumberOfDigisPerStrip = 0;
366  local_modmes.ADCsHottestStrip = 0;
367  local_modmes.ADCsCoolestStrip = 0;
368  local_modmes.DigiADCs = 0;
369  local_modmes.StripOccupancy = 0;
370 
371  if (Mod_On_) {
372 
373  // set appropriate folder using SiStripFolderOrganizer
374  folder_organizer.setDetectorFolder(detid, tTopo); // pass the detid to this method
375  if (reset_each_run) ResetModuleMEs(detid);
376  createModuleMEs( ibooker , local_modmes, detid );
377 
378  // append to DigiMEs
379  DigiMEs.insert( std::make_pair(detid, local_modmes));
380  }
381 
382  // Create Layer Level MEs if they are not created already
383  std::pair<std::string,int32_t> det_layer_pair = folder_organizer.GetSubDetAndLayer(detid, tTopo);
384  SiStripHistoId hidmanager;
385  std::string label = hidmanager.getSubdetid(detid,tTopo,false);
386 
387  // get detids for the layer
388  std::map<std::string, LayerMEs>::iterator iLayerME = LayerMEsMap.find(label);
389 
390  if(iLayerME==LayerMEsMap.end()) {
391  int32_t lnumber = det_layer_pair.second;
392  std::vector<uint32_t> layerDetIds;
393  if (det_layer_pair.first == "TIB") {
394  substructure.getTIBDetectors(activeDets,layerDetIds,lnumber,0,0,0);
395  } else if (det_layer_pair.first == "TOB") {
396  substructure.getTOBDetectors(activeDets,layerDetIds,lnumber,0,0);
397  } else if (det_layer_pair.first == "TID" && lnumber > 0) {
398  substructure.getTIDDetectors(activeDets,layerDetIds,2,abs(lnumber),0,0);
399  } else if (det_layer_pair.first == "TID" && lnumber < 0) {
400  substructure.getTIDDetectors(activeDets,layerDetIds,1,abs(lnumber),0,0);
401  } else if (det_layer_pair.first == "TEC" && lnumber > 0) {
402  substructure.getTECDetectors(activeDets,layerDetIds,2,abs(lnumber),0,0,0,0);
403  } else if (det_layer_pair.first == "TEC" && lnumber < 0) {
404  substructure.getTECDetectors(activeDets,layerDetIds,1,abs(lnumber),0,0,0,0);
405  }
406 
407  LayerDetMap[label] = layerDetIds;
408 
409  // book Layer plots
410  folder_organizer.setLayerFolder(detid,tTopo,det_layer_pair.second);
411  createLayerMEs( ibooker , label, layerDetIds.size() );
412  }
413 
414  // book sub-detector plots
415  auto sdet_pair = folder_organizer.getSubDetFolderAndTag(detid, tTopo);
416  if (SubDetMEsMap.find(sdet_pair.second) == SubDetMEsMap.end()){
417  ibooker.setCurrentFolder(sdet_pair.first);
418  createSubDetMEs( ibooker , sdet_pair.second );
419  }
420 
421  }//end of loop over detectors
422 
423  //book some Summary histograms on APV shots in the MechanicalView
424 
425  ibooker.setCurrentFolder(topFolderName_+"/MechanicalView/");
426 
428  const char* HistoName = "Summary Mean Apv shots for SubDets";
429  NApvShotsGlobalProf= ibooker.bookProfile(HistoName, HistoName,
430  6,0.5,6.5,
431  100, 0., 0., "" );
438  NApvShotsGlobalProf->setAxisTitle(" mean APV shots # / evt",2);
439  }
440 
441  //cumulative number of APV shots Vs Time
444  const char* HistoName = "NApv_Shots_vs_Time";
445  ShotsVsTimeApvShotsGlobal=ibooker.bookProfile(HistoName,HistoName,
446  Parameters.getParameter<int32_t>("Nbins"),
447  Parameters.getParameter<double>("xmin"),
448  Parameters.getParameter<double>("xmax"),
449  200, //that parameter should not be there !?
450  Parameters.getParameter<double>("ymin"),
451  Parameters.getParameter<double>("ymax"),
452  "" );
454  ShotsVsTimeApvShotsGlobal->setAxisTitle("# Apv Shots",2);
456  }
457 
458  //cumulative number of Strips in APV shots
460  edm::ParameterSet Parameters = conf_.getParameter<edm::ParameterSet>("TH1NStripsApvShots");
461  const char* HistoName = "Number_of_Strips_in_Apv_Shots";
462  StripMultiplicityApvShotsGlobal=ibooker.book1D(HistoName,HistoName,
463  Parameters.getParameter<int32_t>("Nbins"),
464  Parameters.getParameter<double>("xmin"),
465  Parameters.getParameter<double>("xmax"));
466  StripMultiplicityApvShotsGlobal->setAxisTitle("# strips in Apv Shots",1);
467  }
468 
469  //cumulative number of APV shots
471  edm::ParameterSet Parameters = conf_.getParameter<edm::ParameterSet>("TH1NApvShots");
472  const char* HistoName = "Number_of_Apv_Shots";
473  NApvShotsGlobal=ibooker.book1D(HistoName,HistoName,
474  Parameters.getParameter<int32_t>("Nbins"),
475  Parameters.getParameter<double>("xmin"),
476  Parameters.getParameter<double>("xmax"));
477  NApvShotsGlobal->setAxisTitle("# Apv Shots",1);
478  }
479 
480  //cumulative Median Charge in APV shots
482  edm::ParameterSet Parameters = conf_.getParameter<edm::ParameterSet>("TH1ChargeMedianApvShots");
483  //dqmStore_->setCurrentFolder("SiStrip/MechanicalView/"+label);
484  const char* HistoName = "Apv_Shots_Charge_Median";
485  MedianChargeApvShotsGlobal=ibooker.book1D(HistoName,HistoName,
486  Parameters.getParameter<int32_t>("Nbins"),
487  Parameters.getParameter<double>("xmin"),
488  Parameters.getParameter<double>("xmax"));
489  MedianChargeApvShotsGlobal->setAxisTitle("Apv Shots Charge Median (ADC)",1);
490  }
491 
492  //cmulative APV number with shots
494  edm::ParameterSet Parameters = conf_.getParameter<edm::ParameterSet>("TH1ApvNumApvShots");
495  //dqmStore_->setCurrentFolder("SiStrip/MechanicalView/"+label);
496  const char* HistoName = "Apv_Shots_Apv_Number";
497  NApvApvShotsGlobal=ibooker.book1D(HistoName,HistoName,
498  Parameters.getParameter<int32_t>("Nbins"),
499  Parameters.getParameter<double>("xmin"),
500  Parameters.getParameter<double>("xmax"));
501  NApvApvShotsGlobal->setAxisTitle("Apv Number",1);
502  }
503 
504  //
505  // Book new histogram to monitor digi in last LS
506  //
507 
510 
511  std::stringstream ss;
512 
513  folder_organizer.getLayerFolderName(ss, 0, tTopo);
514  ibooker.setCurrentFolder(ss.str().c_str());
515 
517  const char* HistoName = "NumberOfDigisInLastLS";
518  digiFailureMEs.SubDetTotDigiProfLS= ibooker.bookProfile(HistoName, HistoName,
519  6,0.5,6.5,
520  0., 0., "" );
527  }
528 
530  std::string HistoName = "DataPresentInLS";
531  edm::ParameterSet Parameters = conf_.getParameter<edm::ParameterSet>("TotalNumberOfDigisFailure");
532 
533  digiFailureMEs.SubDetDigiFailures2D = ibooker.book2D(HistoName,HistoName,
534  Parameters.getParameter<int32_t>("Nbins"), //bins X
535  1, //xmin
536  Parameters.getParameter<int32_t>("Nbins") + 1, //xmax
537  6, //bins Y
538  0, //ymin
539  6); //ymax
540 
547  digiFailureMEs.SubDetDigiFailures2D->setAxisTitle("Luminosity Section");
548  }
549  }//end of if
550 
551 }//end of method
void ResetModuleMEs(uint32_t idet)
T getParameter(std::string const &) const
std::map< std::string, LayerMEs > LayerMEsMap
void addActiveDetectorsRawIds(std::vector< uint32_t > &) const
std::pair< const std::string, const char * > getSubDetFolderAndTag(const uint32_t &detid, const TrackerTopology *tTopo)
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:157
void getLayerFolderName(std::stringstream &ss, uint32_t rawdetid, const TrackerTopology *tTopo, bool ring_flag=0)
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
MonitorElement * NApvShotsGlobalProf
std::pair< std::string, int32_t > GetSubDetAndLayer(const uint32_t &detid, const TrackerTopology *tTopo, bool ring_flag=0)
std::map< uint32_t, ModMEs > DigiMEs
MonitorElement * MedianChargeApvShotsGlobal
MonitorElement * StripMultiplicityApvShotsGlobal
TkHistoMap * tkmapNstripApvshot
void setDetectorFolder(uint32_t rawdetid, const TrackerTopology *tTopo)
void createSubDetMEs(DQMStore::IBooker &ibooker, std::string label)
vector< ParameterSet > Parameters
edm::ESHandle< SiStripDetCabling > SiStripDetCabling_
void getTOBDetectors(const std::vector< uint32_t > &inputDetRawIds, std::vector< uint32_t > &tobDetRawIds, uint32_t layer=0, uint32_t bkw_frw=0, uint32_t rod=0) const
DigiFailureMEs digiFailureMEs
MonitorElement * NApvApvShotsGlobal
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
TH1 * getTH1(void) const
Kind kind(void) const
Get the type of the monitor element.
std::map< std::string, SubDetMEs > SubDetMEsMap
std::string getSubdetid(uint32_t id, const TrackerTopology *tTopo, bool flag_ring)
void createLayerMEs(DQMStore::IBooker &ibooker, std::string label, int ndet)
MonitorElement * NApvShotsGlobal
void setLayerFolder(uint32_t rawdetid, const TrackerTopology *tTopo, int32_t layer=0, bool ring_flag=0)
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:277
std::map< std::string, std::vector< uint32_t > > LayerDetMap
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
const T & get() const
Definition: EventSetup.h:56
std::string topFolderName_
edm::ParameterSet conf_
std::string HistoName
void getTECDetectors(const std::vector< uint32_t > &inputDetRawIds, std::vector< uint32_t > &tecDetRawIds, uint32_t side=0, uint32_t wheel=0, uint32_t petal_bkw_frw=0, uint32_t petal=0, uint32_t ring=0, uint32_t ster=0) const
TkHistoMap * tkmapMedianChargeApvshots
TkHistoMap * tkmapNApvshots
void getTIBDetectors(const std::vector< uint32_t > &inputDetRawIds, std::vector< uint32_t > &tibDetRawIds, uint32_t layer=0, uint32_t bkw_frw=0, uint32_t int_ext=0, uint32_t string=0) const
SiStripFolderOrganizer folder_organizer
void getTIDDetectors(const std::vector< uint32_t > &inputDetRawIds, std::vector< uint32_t > &tidDetRawIds, uint32_t side=0, uint32_t wheel=0, uint32_t ring=0, uint32_t ster=0) const
MonitorElement * ShotsVsTimeApvShotsGlobal
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
T const * product() const
Definition: ESHandle.h:86
void createModuleMEs(DQMStore::IBooker &ibooker, ModMEs &mod_single, uint32_t detid)
void SiStripMonitorDigi::createModuleMEs ( DQMStore::IBooker ibooker,
ModMEs mod_single,
uint32_t  detid 
)
private

Definition at line 915 of file SiStripMonitorDigi.cc.

References SiStripMonitorDigi::ModMEs::ADCsCoolestStrip, SiStripMonitorDigi::ModMEs::ADCsHottestStrip, DQMStore::IBooker::book1D(), bookME1D(), SiStripHistoId::createHistoId(), SiStripMonitorDigi::ModMEs::DigiADCs, MonitorElement::getTH1(), moduleswitchadccooleston, moduleswitchadchotteston, moduleswitchdigiadcson, moduleswitchnumdigison, moduleswitchnumdigispstripon, moduleswitchstripoccupancyon, SiStripDetCabling::nApvPairs(), SiStripMonitorDigi::ModMEs::NumberOfDigis, SiStripMonitorDigi::ModMEs::NumberOfDigisPerStrip, MonitorElement::setAxisTitle(), SiStripDetCabling_, AlCaHLTBitMon_QueryRunRegistry::string, SiStripMonitorDigi::ModMEs::StripOccupancy, and DQMStore::IBooker::tag().

Referenced by createMEs(), and fillME().

915  {
916 
917  // use SistripHistoId for producing histogram id (and title)
918  SiStripHistoId hidmanager;
919  std::string hid;
920 
921  //nr. of digis per module
923  hid = hidmanager.createHistoId("NumberOfDigis","det",detid);
924  mod_single.NumberOfDigis = ibooker.book1D(hid, hid, 21, -0.5, 20.5);
925  ibooker.tag(mod_single.NumberOfDigis, detid);
926  mod_single.NumberOfDigis->setAxisTitle("number of digis in one detector module");
927  mod_single.NumberOfDigis->getTH1()->StatOverflows(kTRUE); // over/underflows in Mean calculation
928  }
929 
930  //nr. of digis per strip in module
932  hid = hidmanager.createHistoId("NumberOfDigisPerStrip","det",detid);
933  short nstrips = SiStripDetCabling_->nApvPairs(detid) * 2 * 128;
934  mod_single.NumberOfDigisPerStrip = ibooker.book1D(hid, hid, nstrips, -0.5, nstrips+0.5);
935  ibooker.tag(mod_single.NumberOfDigisPerStrip, detid);
936  mod_single.NumberOfDigisPerStrip->setAxisTitle("number of (digis > 0) per strip");
937  mod_single.NumberOfDigisPerStrip->getTH1()->StatOverflows(kTRUE); // over/underflows in Mean calculation
938  }
939  //#ADCs for hottest strip
941  hid = hidmanager.createHistoId("ADCsHottestStrip","det",detid);
942  mod_single.ADCsHottestStrip = bookME1D(ibooker , "TH1ADCsHottestStrip", hid.c_str() );
943  ibooker.tag(mod_single.ADCsHottestStrip, detid); // 6 APVs -> 768 strips
944  mod_single.ADCsHottestStrip->setAxisTitle("number of ADCs for hottest strip");
945  }
946 
947  //#ADCs for coolest strip
949  hid = hidmanager.createHistoId("ADCsCoolestStrip","det",detid);
950  mod_single.ADCsCoolestStrip = bookME1D(ibooker , "TH1ADCsCoolestStrip", hid.c_str() );
951  ibooker.tag(mod_single.ADCsCoolestStrip, detid);
952  mod_single.ADCsCoolestStrip->setAxisTitle("number of ADCs for coolest strip");
953  }
954 
955  //#ADCs for each digi
957  hid = hidmanager.createHistoId("DigiADCs","det",detid);
958  mod_single.DigiADCs = bookME1D( ibooker , "TH1DigiADCs", hid.c_str() );
959  ibooker.tag(mod_single.DigiADCs, detid);
960  mod_single.DigiADCs->setAxisTitle("number of ADCs for each digi");
961  }
962 
963  //Strip occupancy
965  hid = hidmanager.createHistoId("StripOccupancy","det",detid);
966  mod_single.StripOccupancy = bookME1D( ibooker , "TH1StripOccupancy", hid.c_str() );
967  ibooker.tag(mod_single.StripOccupancy, detid);
968  mod_single.StripOccupancy->setAxisTitle("strip occupancy");
969  }
970 
971 }
MonitorElement * bookME1D(DQMStore::IBooker &ibooker, const char *ParameterSetLabel, const char *HistoName)
edm::ESHandle< SiStripDetCabling > SiStripDetCabling_
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
void tag(MonitorElement *, unsigned int)
Definition: DQMStore.cc:289
std::string createHistoId(std::string description, std::string id_type, uint32_t component_id)
const uint16_t nApvPairs(uint32_t det_id) const
void SiStripMonitorDigi::createSubDetMEs ( DQMStore::IBooker ibooker,
std::string  label 
)
private

Definition at line 1045 of file SiStripMonitorDigi.cc.

References DQMStore::IBooker::book1D(), DQMStore::IBooker::book2D(), DQMStore::IBooker::bookProfile(), conf_, MonitorElement::DQM_KIND_TPROFILE, edm::ParameterSet::getParameter(), MonitorElement::getTH1(), MonitorElement::kind(), diffTwoXMLs::label, MonitorElement::setAxisTitle(), AlCaHLTBitMon_QueryRunRegistry::string, SiStripMonitorDigi::SubDetMEs::SubDetApvShots, SiStripMonitorDigi::SubDetMEs::SubDetChargeMedianApvShotsTH1, SiStripMonitorDigi::SubDetMEs::SubDetDigiApvProf, SiStripMonitorDigi::SubDetMEs::SubDetDigiApvTH2, SubDetMEsMap, SiStripMonitorDigi::SubDetMEs::SubDetNApvShotsNApvTH1, SiStripMonitorDigi::SubDetMEs::SubDetNApvShotsProf, SiStripMonitorDigi::SubDetMEs::SubDetNApvShotsTH1, SiStripMonitorDigi::SubDetMEs::SubDetNStripsApvShotsTH1, subdetswitchapvcycleprofon, subdetswitchapvcycleth2on, subdetswitchapvshotsonprof, subdetswitchchargemedianapvshotson, subdetswitchnapvshotson, subdetswitchnstripsapvshotson, subdetswitchtotdigiprofon, SiStripMonitorDigi::SubDetMEs::SubDetTotDigiProf, and SiStripMonitorDigi::SubDetMEs::totNDigis.

Referenced by createMEs(), and fillME().

1045  {
1046 
1047  SubDetMEs subdetMEs;
1048  subdetMEs.totNDigis = 0;
1049  subdetMEs.SubDetTotDigiProf = 0;
1050  subdetMEs.SubDetDigiApvProf = 0;
1051  subdetMEs.SubDetDigiApvTH2 = 0;
1052 
1053  subdetMEs.SubDetApvShots.clear();
1054  subdetMEs.SubDetNApvShotsTH1 = 0;
1055  subdetMEs.SubDetChargeMedianApvShotsTH1 = 0;
1056  subdetMEs.SubDetNStripsApvShotsTH1 = 0;
1057  subdetMEs.SubDetNApvShotsProf = 0;
1058 
1060 
1061  // Total Number of Digi - Profile
1063  edm::ParameterSet Parameters = conf_.getParameter<edm::ParameterSet>("TProfTotalNumberOfDigis");
1064  HistoName = "TotalNumberOfDigiProfile__" + label;
1065  subdetMEs.SubDetTotDigiProf=ibooker.bookProfile(HistoName,HistoName,
1066  Parameters.getParameter<int32_t>("Nbins"),
1067  Parameters.getParameter<double>("xmin"),
1068  Parameters.getParameter<double>("xmax"),
1069  100, //that parameter should not be there !?
1070  Parameters.getParameter<double>("ymin"),
1071  Parameters.getParameter<double>("ymax"),
1072  "" );
1073  subdetMEs.SubDetTotDigiProf->setAxisTitle("Event Time in Seconds",1);
1074  if (subdetMEs.SubDetTotDigiProf->kind() == MonitorElement::DQM_KIND_TPROFILE) subdetMEs.SubDetTotDigiProf->getTH1()->SetCanExtend(TH1::kAllAxes);
1075  }
1076 
1077  // Number of Digi vs Bx - Profile
1079  edm::ParameterSet Parameters = conf_.getParameter<edm::ParameterSet>("TProfDigiApvCycle");
1080  HistoName = "Digi_vs_ApvCycle__" + label;
1081  subdetMEs.SubDetDigiApvProf=ibooker.bookProfile(HistoName,HistoName,
1082  Parameters.getParameter<int32_t>("Nbins"),
1083  Parameters.getParameter<double>("xmin"),
1084  Parameters.getParameter<double>("xmax"),
1085  200, //that parameter should not be there !?
1086  Parameters.getParameter<double>("ymin"),
1087  Parameters.getParameter<double>("ymax"),
1088  "" );
1089  subdetMEs.SubDetDigiApvProf->setAxisTitle("ApvCycle (Corrected Absolute Bx % 70)",1);
1090  }
1091 
1092  // Number of Digi vs Bx - TH2
1094  edm::ParameterSet Parameters = conf_.getParameter<edm::ParameterSet>("TH2DigiApvCycle");
1095  //dqmStore_->setCurrentFolder("SiStrip/MechanicalView/"+label);
1096  HistoName = "Digi_vs_ApvCycle_2D__" + label;
1097  // Adjusting the scale for 2D histogram
1098  double h2ymax = 9999.0;
1099  double yfact = Parameters.getParameter<double>("yfactor");
1100  if(label.find("TIB") != std::string::npos) h2ymax = (6984.*256.)*yfact;
1101  else if (label.find("TID") != std::string::npos) h2ymax = (2208.*256.)*yfact;
1102  else if (label.find("TOB") != std::string::npos) h2ymax = (12906.*256.)*yfact;
1103  else if (label.find("TEC") != std::string::npos) h2ymax = (7552.*2.*256.)*yfact;
1104  subdetMEs.SubDetDigiApvTH2=ibooker.book2D(HistoName,HistoName,
1105  Parameters.getParameter<int32_t>("Nbins"),
1106  Parameters.getParameter<double>("xmin"),
1107  Parameters.getParameter<double>("xmax"),
1108  Parameters.getParameter<int32_t>("Nbinsy"), //it was 100 that parameter should not be there !?
1109  Parameters.getParameter<double>("ymin"),
1110  h2ymax);
1111  subdetMEs.SubDetDigiApvTH2->setAxisTitle("absolute Bx mod(70)",1);
1112  }
1113 
1114  //Number of APV Shots
1116  edm::ParameterSet Parameters = conf_.getParameter<edm::ParameterSet>("TH1NApvShots");
1117  //dqmStore_->setCurrentFolder("SiStrip/MechanicalView/"+label);
1118  HistoName = "Number_of_Apv_Shots_" + label;
1119  subdetMEs.SubDetNApvShotsTH1=ibooker.book1D(HistoName,HistoName,
1120  Parameters.getParameter<int32_t>("Nbins"),
1121  Parameters.getParameter<double>("xmin"),
1122  Parameters.getParameter<double>("xmax"));
1123  subdetMEs.SubDetNApvShotsTH1->setAxisTitle("# Apv Shots",1);
1124  }
1125 
1126  //Strip multiplicity of APV Shots
1128  edm::ParameterSet Parameters = conf_.getParameter<edm::ParameterSet>("TH1NStripsApvShots");
1129  //dqmStore_->setCurrentFolder("SiStrip/MechanicalView/"+label);
1130  HistoName = "Number_of_Strips_in_Apv_Shots_" + label;
1131  subdetMEs.SubDetNStripsApvShotsTH1=ibooker.book1D(HistoName,HistoName,
1132  Parameters.getParameter<int32_t>("Nbins"),
1133  Parameters.getParameter<double>("xmin"),
1134  Parameters.getParameter<double>("xmax"));
1135  subdetMEs.SubDetNStripsApvShotsTH1->setAxisTitle("# strips in Apv Shots",1);
1136  }
1137 
1138  //Charge median of APV Shots
1140  edm::ParameterSet Parameters = conf_.getParameter<edm::ParameterSet>("TH1ChargeMedianApvShots");
1141  //dqmStore_->setCurrentFolder("SiStrip/MechanicalView/"+label);
1142  HistoName = "Apv_Shots_Charge_Median_" + label;
1143  subdetMEs.SubDetChargeMedianApvShotsTH1=ibooker.book1D(HistoName,HistoName,
1144  Parameters.getParameter<int32_t>("Nbins"),
1145  Parameters.getParameter<double>("xmin"),
1146  Parameters.getParameter<double>("xmax"));
1147  subdetMEs.SubDetChargeMedianApvShotsTH1->setAxisTitle("Apv Shots Charge Median (ADC)",1);
1148  }
1149 
1150 
1152  edm::ParameterSet Parameters = conf_.getParameter<edm::ParameterSet>("TH1ApvNumApvShots");
1153  //dqmStore_->setCurrentFolder("SiStrip/MechanicalView/"+label);
1154  HistoName = "Apv_Shots_Apv_Number_" + label;
1155  subdetMEs.SubDetNApvShotsNApvTH1=ibooker.book1D(HistoName,HistoName,
1156  Parameters.getParameter<int32_t>("Nbins"),
1157  Parameters.getParameter<double>("xmin"),
1158  Parameters.getParameter<double>("xmax"));
1159  subdetMEs.SubDetNApvShotsNApvTH1->setAxisTitle("Apv Number",1);
1160  }
1161 
1162 
1163 
1164 
1165 
1166  //APV Shots number Vs time
1168  edm::ParameterSet Parameters = conf_.getParameter<edm::ParameterSet>("TProfNShotsVsTime");
1169  HistoName = "NApv_Shots_vs_Time_" + label;
1170  subdetMEs.SubDetNApvShotsProf=ibooker.bookProfile(HistoName,HistoName,
1171  Parameters.getParameter<int32_t>("Nbins"),
1172  Parameters.getParameter<double>("xmin"),
1173  Parameters.getParameter<double>("xmax"),
1174  200, //that parameter should not be there !?
1175  Parameters.getParameter<double>("ymin"),
1176  Parameters.getParameter<double>("ymax"),
1177  "" );
1178  subdetMEs.SubDetNApvShotsProf->setAxisTitle("Time (s)",1);
1179  subdetMEs.SubDetNApvShotsProf->setAxisTitle("# Apv Shots",2);
1180  if (subdetMEs.SubDetNApvShotsProf->kind() == MonitorElement::DQM_KIND_TPROFILE) subdetMEs.SubDetNApvShotsProf->getTH1()->SetCanExtend(TH1::kAllAxes);
1181  }
1182 
1183 
1184 
1185 
1186 
1187 
1188 
1189  SubDetMEsMap[label]=subdetMEs;
1190 }
T getParameter(std::string const &) const
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:157
vector< ParameterSet > Parameters
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
std::map< std::string, SubDetMEs > SubDetMEsMap
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
edm::ParameterSet conf_
std::string HistoName
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void SiStripMonitorDigi::createSubDetTH2 ( DQMStore::IBooker ibooker,
std::string  label 
)
private

Referenced by fillME().

void SiStripMonitorDigi::dqmBeginRun ( const edm::Run r,
const edm::EventSetup c 
)
override

Definition at line 219 of file SiStripMonitorDigi.cc.

References edm::EventSetup::find(), edm::eventsetup::heterocontainer::HCTypeTag::findType(), edm::EventSetup::get(), edm::ESHandleBase::isValid(), m_cacheID_, RunInfo::m_fed_in, nFedTECm, nFedTECp, nFedTIB, nFedTIDm, nFedTIDp, nFedTOB, and subdetswitchtotdigifailureon.

219  {
220 
222  //get FED cabling to know if SiStrip is in DAQ or no
223  unsigned long long cacheID = es.get<SiStripDetCablingRcd>().cacheIdentifier();
224  if (m_cacheID_ != cacheID) {
225  m_cacheID_ = cacheID;
226  }
228  es.get<SiStripDetCablingRcd>().get(detCabling_);
229 
230  //nFEDConnected = 0;
231  nFedTIB = 0;
232  nFedTIDm = 0;
233  nFedTIDp = 0;
234  nFedTECm = 0;
235  nFedTECp = 0;
236  nFedTOB = 0;
237 
238  //const int siStripFedIdMin = FEDNumbering::MINSiStripFEDID;
239  //const int siStripFedIdMax = FEDNumbering::MAXSiStripFEDID;
240 
242  if( es.find( recordKey ) != 0) {
243 
244  edm::ESHandle<RunInfo> sumFED;
245  es.get<RunInfoRcd>().get(sumFED);
246 
247  if ( sumFED.isValid() ) {
248  std::vector<int> FedsInIds= sumFED->m_fed_in;
249  for(unsigned int it = 0; it < FedsInIds.size(); ++it) {
250  int fedID = FedsInIds[it];
251  // if(fedID>=siStripFedIdMin && fedID<=siStripFedIdMax) ++nFEDConnected;
252  /* mia: but is there not a smarter way !?!?!? */
253  if ( fedID >= 50 && fedID <= 133 ) ++nFedTIB;
254  if ( fedID >= 134 && fedID <= 148 ) ++nFedTIDm;
255  if ( fedID >= 149 && fedID <= 163 ) ++nFedTIDp;
256  if ( fedID >= 164 && fedID <= 259 ) ++nFedTECm;
257  if ( fedID >= 260 && fedID <= 355 ) ++nFedTECp;
258  if ( fedID >= 356 && fedID <= 489 ) ++nFedTOB;
259 
260  }
261  }
262  }
263  }
264 
265 }
static HCTypeTag findType(char const *iTypeName)
find a type based on the types name, if not found will return default HCTypeTag
unsigned long long m_cacheID_
std::vector< int > m_fed_in
Definition: RunInfo.h:26
bool isValid() const
Definition: ESHandle.h:47
void SiStripMonitorDigi::endLuminosityBlock ( const edm::LuminosityBlock lb,
const edm::EventSetup es 
)
overridevirtual

Definition at line 281 of file SiStripMonitorDigi.cc.

References digiFailureMEs, dqmStore_, HcalObjRepresent::Fill(), DQMStore::get(), MonitorElement::getBinContent(), edm::LuminosityBlockBase::id(), ignoreFirstNLumisections_, createfilelist::int, integrateNLumisections_, isStableBeams, edm::LuminosityBlockID::luminosityBlock(), nFedTECm, nFedTECp, nFedTIB, nFedTIDm, nFedTIDp, nFedTOB, SBDeclaredAt, SBTransitionDone, SiStripMonitorDigi::DigiFailureMEs::SubDetDigiFailures2D, subdetswitchtotdigifailureon, and topFolderName_.

281  {
282 
284  {
286  SBTransitionDone = true;
287  }
288 
290 
291  int nFeds [6] = { 96 , 96 , 84 , 15 , 15 , 134 }; // tec- , tec+ , tib , tid- , tid+ , tob
292  int nFedsConnected [6] = { nFedTECm , nFedTECp , nFedTIB , nFedTIDm , nFedTIDp , nFedTOB };
293 
294  MonitorElement * me = dqmStore_->get(topFolderName_+"/MechanicalView/NumberOfDigisInLastLS");
295  if (me) {
296 
297  for (int ibin = 1; ibin<7;ibin++){
298 
299  float value = me->getBinContent(ibin);
300 
301  float fillvalue = 2;
302  if ( isStableBeams
303  // && (int)lb.id().luminosityBlock() > ignoreFirstNLumisections_ //ignore first X lumisections for HV rampup
305  && (float)nFedsConnected[ibin-1] / nFeds[ibin-1] > 0.5
306  && value < 50. ){
307 
308  fillvalue = 1.01;
309  }
310 
311  //account for integrated LS: fill previous bins as well
312  for ( int fillbin = (int)lb.id().luminosityBlock() - integrateNLumisections_ + 1 ; fillbin <= (int)lb.id().luminosityBlock() ; fillbin++ )
313  digiFailureMEs.SubDetDigiFailures2D -> Fill( fillbin , ibin-1 , fillvalue );
314  }
315  }
316  }
317 
318 }
LuminosityBlockID id() const
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
DigiFailureMEs digiFailureMEs
Definition: value.py:1
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
Definition: DQMStore.cc:1789
LuminosityBlockNumber_t luminosityBlock() const
std::string topFolderName_
double getBinContent(int binx) const
get content of bin (1-D)
void SiStripMonitorDigi::endRun ( const edm::Run ,
const edm::EventSetup  
)
overridevirtual

Definition at line 268 of file SiStripMonitorDigi.cc.

268  {
269 }
void SiStripMonitorDigi::FillApvShotsMap ( TkHistoMap the_map,
const std::vector< APVShot > &  shots,
uint32_t  id,
int  mode 
)
private

Definition at line 1213 of file SiStripMonitorDigi.cc.

References DEFINE_FWK_MODULE, TkHistoMap::fill(), and mps_fire::i.

Referenced by analyze(), and fillME().

1213  {
1214 
1215  for (uint i=0; i<shots.size(); i++){
1216  if (mode==1) the_map->fill(id,shots[i].nStrips()); //mode == 1 fill with strip multiplicity
1217  if (mode==2) the_map->fill(id,shots[i].median()); // mode == 2 fill with charge median
1218  }
1219 }
void fill(uint32_t &detid, float value)
Definition: TkHistoMap.cc:180
void SiStripMonitorDigi::fillDigiADCsMEs ( int  value,
std::string  name 
)
private
void SiStripMonitorDigi::fillME ( MonitorElement ME,
float  value1 
)
inlineprivate

Definition at line 104 of file SiStripMonitorDigi.h.

References MonitorElement::Fill().

Referenced by analyze().

104 {if (ME!=0)ME->Fill(value1);}
void Fill(long long x)
void SiStripMonitorDigi::fillME ( MonitorElement ME,
float  value1,
float  value2 
)
inlineprivate
void SiStripMonitorDigi::fillME ( MonitorElement ME,
float  value1,
float  value2,
float  value3 
)
inlineprivate

Definition at line 106 of file SiStripMonitorDigi.h.

References MonitorElement::Fill().

void SiStripMonitorDigi::fillME ( MonitorElement ME,
float  value1,
float  value2,
float  value3,
float  value4 
)
inlineprivate
void SiStripMonitorDigi::fillTrend ( MonitorElement me,
float  value,
float  timeinorbit 
)
private

Definition at line 906 of file SiStripMonitorDigi.cc.

References MonitorElement::Fill().

Referenced by analyze().

907 {
908  if(!me) return;
909  me->Fill(timeinorbit,value);
910 }
void Fill(long long x)
Definition: value.py:1
int SiStripMonitorDigi::getDigiSourceIndex ( uint32_t  id)
private

Definition at line 1194 of file SiStripMonitorDigi.cc.

References digi_detset_handles, and end.

Referenced by analyze(), and fillME().

1194  {
1195  int location = -1;
1196  for (unsigned int ival = 0; ival < digi_detset_handles.size(); ++ival){
1198  if(isearch != digi_detset_handles[ival]->end()) {
1199  location = ival;
1200  break;
1201  }
1202  }
1203  return location;
1204 }
std::vector< const edm::DetSetVector< SiStripDigi > * > digi_detset_handles
#define end
Definition: vmac.h:37
collection_type::const_iterator const_iterator
Definition: DetSetVector.h:104
void SiStripMonitorDigi::ResetModuleMEs ( uint32_t  idet)
private

Definition at line 861 of file SiStripMonitorDigi.cc.

References SiStripMonitorDigi::ModMEs::ADCsCoolestStrip, SiStripMonitorDigi::ModMEs::ADCsHottestStrip, SiStripMonitorDigi::ModMEs::DigiADCs, DigiMEs, Mod_On_, moduleswitchadccooleston, moduleswitchadchotteston, moduleswitchdigiadcson, moduleswitchnumdigison, moduleswitchnumdigispstripon, moduleswitchstripoccupancyon, SiStripMonitorDigi::ModMEs::NumberOfDigis, SiStripMonitorDigi::ModMEs::NumberOfDigisPerStrip, MonitorElement::Reset(), and SiStripMonitorDigi::ModMEs::StripOccupancy.

Referenced by bookHistograms(), and createMEs().

861  {
862  std::map<uint32_t, ModMEs >::iterator pos = DigiMEs.find(idet);
863  ModMEs mod_me = pos->second;
864 
865  if(Mod_On_ && moduleswitchnumdigison) mod_me.NumberOfDigis->Reset();
866  if(Mod_On_ && moduleswitchnumdigispstripon) mod_me.NumberOfDigisPerStrip ->Reset();
867  if(Mod_On_ && moduleswitchadchotteston) mod_me.ADCsHottestStrip->Reset();
868  if(Mod_On_ && moduleswitchadccooleston) mod_me.ADCsCoolestStrip->Reset();
869  if(Mod_On_ && moduleswitchdigiadcson) mod_me.DigiADCs->Reset();
870  if(Mod_On_ && moduleswitchstripoccupancyon) mod_me.StripOccupancy->Reset();
871 
872 }
std::map< uint32_t, ModMEs > DigiMEs

Member Data Documentation

edm::InputTag SiStripMonitorDigi::apvPhaseProducer_
private

Definition at line 213 of file SiStripMonitorDigi.h.

Referenced by SiStripMonitorDigi().

edm::EDGetTokenT<APVCyclePhaseCollection> SiStripMonitorDigi::apvPhaseProducerToken_
private

Definition at line 216 of file SiStripMonitorDigi.h.

Referenced by analyze(), and SiStripMonitorDigi().

bool SiStripMonitorDigi::calculate_strip_occupancy
private

Definition at line 126 of file SiStripMonitorDigi.h.

edm::ParameterSet SiStripMonitorDigi::conf_
private
bool SiStripMonitorDigi::createTrendMEs
private

Definition at line 210 of file SiStripMonitorDigi.h.

Referenced by analyze(), createLayerMEs(), and SiStripMonitorDigi().

SiStripDCSStatus* SiStripMonitorDigi::dcsStatus_
private

Definition at line 219 of file SiStripMonitorDigi.h.

Referenced by analyze(), SiStripMonitorDigi(), and ~SiStripMonitorDigi().

std::map<std::pair<std::string,int32_t>,bool> SiStripMonitorDigi::DetectedLayers
private

Definition at line 136 of file SiStripMonitorDigi.h.

std::vector<const edm::DetSetVector<SiStripDigi> *> SiStripMonitorDigi::digi_detset_handles
private

Definition at line 137 of file SiStripMonitorDigi.h.

Referenced by analyze(), and getDigiSourceIndex().

DigiFailureMEs SiStripMonitorDigi::digiFailureMEs
private

Definition at line 132 of file SiStripMonitorDigi.h.

Referenced by analyze(), beginLuminosityBlock(), createMEs(), and endLuminosityBlock().

std::map<uint32_t, ModMEs> SiStripMonitorDigi::DigiMEs
private

Definition at line 125 of file SiStripMonitorDigi.h.

Referenced by analyze(), bookHistograms(), createMEs(), and ResetModuleMEs().

std::vector<edm::InputTag> SiStripMonitorDigi::digiProducerList
private

Definition at line 124 of file SiStripMonitorDigi.h.

Referenced by analyze(), and SiStripMonitorDigi().

std::vector<edm::EDGetTokenT<edm::DetSetVector<SiStripDigi> > > SiStripMonitorDigi::digiProducerTokenList
private

Definition at line 123 of file SiStripMonitorDigi.h.

Referenced by analyze(), and SiStripMonitorDigi().

bool SiStripMonitorDigi::digitkhistomapon
private

Definition at line 205 of file SiStripMonitorDigi.h.

Referenced by analyze(), createMEs(), and SiStripMonitorDigi().

DQMStore* SiStripMonitorDigi::dqmStore_
private

Definition at line 121 of file SiStripMonitorDigi.h.

Referenced by endLuminosityBlock().

int SiStripMonitorDigi::eventNb
private

Definition at line 148 of file SiStripMonitorDigi.h.

Referenced by analyze(), and SiStripMonitorDigi().

int SiStripMonitorDigi::firstEvent
private
SiStripFolderOrganizer SiStripMonitorDigi::folder_organizer
private

Definition at line 135 of file SiStripMonitorDigi.h.

Referenced by analyze(), and createMEs().

bool SiStripMonitorDigi::globalsummaryapvshotson
private

Definition at line 152 of file SiStripMonitorDigi.h.

Referenced by analyze(), createMEs(), and SiStripMonitorDigi().

bool SiStripMonitorDigi::globalswitchapvshotsApvon
private

Definition at line 186 of file SiStripMonitorDigi.h.

Referenced by analyze(), createMEs(), and SiStripMonitorDigi().

bool SiStripMonitorDigi::globalswitchapvshotsonprof
private

Definition at line 184 of file SiStripMonitorDigi.h.

Referenced by analyze(), createMEs(), and SiStripMonitorDigi().

bool SiStripMonitorDigi::globalswitchchargemedianapvshotson
private

Definition at line 185 of file SiStripMonitorDigi.h.

Referenced by analyze(), createMEs(), and SiStripMonitorDigi().

bool SiStripMonitorDigi::globalswitchnapvshotson
private

Definition at line 182 of file SiStripMonitorDigi.h.

Referenced by analyze(), createMEs(), and SiStripMonitorDigi().

bool SiStripMonitorDigi::globalswitchnstripsapvshotson
private

Definition at line 183 of file SiStripMonitorDigi.h.

Referenced by analyze(), createMEs(), and SiStripMonitorDigi().

edm::EDGetTokenT<L1GlobalTriggerEvmReadoutRecord> SiStripMonitorDigi::gtEvmToken_
private

Definition at line 217 of file SiStripMonitorDigi.h.

Referenced by analyze(), and SiStripMonitorDigi().

edm::InputTag SiStripMonitorDigi::historyProducer_
private

Definition at line 212 of file SiStripMonitorDigi.h.

Referenced by SiStripMonitorDigi().

edm::EDGetTokenT<EventWithHistory> SiStripMonitorDigi::historyProducerToken_
private

Definition at line 215 of file SiStripMonitorDigi.h.

Referenced by analyze(), and SiStripMonitorDigi().

int SiStripMonitorDigi::ignoreFirstNLumisections_
private

Definition at line 191 of file SiStripMonitorDigi.h.

Referenced by endLuminosityBlock(), and SiStripMonitorDigi().

int SiStripMonitorDigi::integrateNLumisections_
private
bool SiStripMonitorDigi::isStableBeams
private
std::map<std::string, std::vector< uint32_t > > SiStripMonitorDigi::LayerDetMap
private

Definition at line 128 of file SiStripMonitorDigi.h.

Referenced by analyze(), and createMEs().

std::map<std::string, LayerMEs> SiStripMonitorDigi::LayerMEsMap
private

Definition at line 129 of file SiStripMonitorDigi.h.

Referenced by analyze(), createLayerMEs(), and createMEs().

bool SiStripMonitorDigi::layerswitchadccooleston
private

Definition at line 157 of file SiStripMonitorDigi.h.

Referenced by analyze(), createLayerMEs(), and SiStripMonitorDigi().

bool SiStripMonitorDigi::layerswitchadchotteston
private

Definition at line 156 of file SiStripMonitorDigi.h.

Referenced by analyze(), createLayerMEs(), and SiStripMonitorDigi().

bool SiStripMonitorDigi::layerswitchdigiadcprofon
private

Definition at line 161 of file SiStripMonitorDigi.h.

Referenced by analyze(), createLayerMEs(), and SiStripMonitorDigi().

bool SiStripMonitorDigi::layerswitchdigiadcson
private

Definition at line 158 of file SiStripMonitorDigi.h.

Referenced by analyze(), createLayerMEs(), and SiStripMonitorDigi().

bool SiStripMonitorDigi::layerswitchnumdigisapvon
private

Definition at line 155 of file SiStripMonitorDigi.h.

bool SiStripMonitorDigi::layerswitchnumdigison
private

Definition at line 154 of file SiStripMonitorDigi.h.

Referenced by analyze(), createLayerMEs(), and SiStripMonitorDigi().

bool SiStripMonitorDigi::layerswitchnumdigisprofon
private

Definition at line 160 of file SiStripMonitorDigi.h.

Referenced by analyze(), createLayerMEs(), and SiStripMonitorDigi().

bool SiStripMonitorDigi::layerswitchstripoccupancyon
private

Definition at line 159 of file SiStripMonitorDigi.h.

Referenced by analyze(), createLayerMEs(), and SiStripMonitorDigi().

unsigned long long SiStripMonitorDigi::m_cacheID_
private

Definition at line 139 of file SiStripMonitorDigi.h.

Referenced by bookHistograms(), and dqmBeginRun().

MonitorElement * SiStripMonitorDigi::MedianChargeApvShotsGlobal
private

Definition at line 144 of file SiStripMonitorDigi.h.

Referenced by analyze(), and createMEs().

bool SiStripMonitorDigi::Mod_On_
private

Definition at line 203 of file SiStripMonitorDigi.h.

Referenced by analyze(), createMEs(), ResetModuleMEs(), and SiStripMonitorDigi().

std::vector<uint32_t> SiStripMonitorDigi::ModulesToBeExcluded_
private

Definition at line 141 of file SiStripMonitorDigi.h.

bool SiStripMonitorDigi::moduleswitchadccooleston
private

Definition at line 166 of file SiStripMonitorDigi.h.

Referenced by analyze(), createModuleMEs(), ResetModuleMEs(), and SiStripMonitorDigi().

bool SiStripMonitorDigi::moduleswitchadchotteston
private

Definition at line 165 of file SiStripMonitorDigi.h.

Referenced by analyze(), createModuleMEs(), ResetModuleMEs(), and SiStripMonitorDigi().

bool SiStripMonitorDigi::moduleswitchdigiadcson
private

Definition at line 167 of file SiStripMonitorDigi.h.

Referenced by analyze(), createModuleMEs(), ResetModuleMEs(), and SiStripMonitorDigi().

bool SiStripMonitorDigi::moduleswitchnumdigison
private

Definition at line 163 of file SiStripMonitorDigi.h.

Referenced by analyze(), createModuleMEs(), ResetModuleMEs(), and SiStripMonitorDigi().

bool SiStripMonitorDigi::moduleswitchnumdigispstripon
private

Definition at line 164 of file SiStripMonitorDigi.h.

Referenced by analyze(), createModuleMEs(), ResetModuleMEs(), and SiStripMonitorDigi().

bool SiStripMonitorDigi::moduleswitchstripoccupancyon
private

Definition at line 168 of file SiStripMonitorDigi.h.

Referenced by analyze(), createModuleMEs(), ResetModuleMEs(), and SiStripMonitorDigi().

TString SiStripMonitorDigi::name
private

Definition at line 134 of file SiStripMonitorDigi.h.

Referenced by ElectronMVAID.ElectronMVAID::__call__(), dirstructure.Directory::__create_pie_image(), DisplayManager.DisplayManager::__del__(), dqm_interfaces.DirID::__eq__(), dirstructure.Directory::__get_full_path(), dirstructure.Comparison::__get_img_name(), dataset.Dataset::__getDataType(), dataset.Dataset::__getFileInfoList(), dirstructure.Comparison::__make_image(), core.autovars.NTupleVariable::__repr__(), core.autovars.NTupleObjectType::__repr__(), core.autovars.NTupleObject::__repr__(), core.autovars.NTupleCollection::__repr__(), dirstructure.Directory::__repr__(), dqm_interfaces.DirID::__repr__(), dirstructure.Comparison::__repr__(), config.Service::__setattr__(), config.CFG::__str__(), counter.Counter::__str__(), average.Average::__str__(), core.autovars.NTupleObjectType::addSubObjects(), core.autovars.NTupleObjectType::addVariables(), core.autovars.NTupleObjectType::allVars(), dirstructure.Directory::calcStats(), validation.Sample::digest(), python.rootplot.utilities.Hist::divide(), python.rootplot.utilities.Hist::divide_wilson(), DisplayManager.DisplayManager::Draw(), TreeCrawler.Package::dump(), core.autovars.NTupleVariable::fillBranch(), core.autovars.NTupleObject::fillBranches(), core.autovars.NTupleCollection::fillBranchesScalar(), core.autovars.NTupleCollection::fillBranchesVector(), core.autovars.NTupleCollection::get_cpp_declaration(), core.autovars.NTupleCollection::get_cpp_wrapper_class(), core.autovars.NTupleCollection::get_py_wrapper_class(), utils.StatisticalTest::get_status(), production_tasks.Task::getname(), dataset.CMSDataset::getPrimaryDatasetEntries(), dataset.PrivateDataset::getPrimaryDatasetEntries(), VIDSelectorBase.VIDSelectorBase::initialize(), personalPlayback.Applet::log(), core.autovars.NTupleVariable::makeBranch(), core.autovars.NTupleObject::makeBranches(), core.autovars.NTupleCollection::makeBranchesScalar(), core.autovars.NTupleCollection::makeBranchesVector(), dirstructure.Directory::print_report(), dataset.BaseDataset::printInfo(), dataset.Dataset::printInfo(), production_tasks.MonitorJobs::run(), python.rootplot.utilities.Hist::TGraph(), python.rootplot.utilities.Hist::TH1F(), Vispa.Views.PropertyView.Property::valueChanged(), counter.Counter::write(), and average.Average::write().

MonitorElement * SiStripMonitorDigi::NApvApvShotsGlobal
private

Definition at line 144 of file SiStripMonitorDigi.h.

Referenced by analyze(), and createMEs().

MonitorElement* SiStripMonitorDigi::NApvShotsGlobal
private

Definition at line 144 of file SiStripMonitorDigi.h.

Referenced by analyze(), and createMEs().

MonitorElement * SiStripMonitorDigi::NApvShotsGlobalProf
private

Definition at line 144 of file SiStripMonitorDigi.h.

Referenced by analyze(), and createMEs().

int SiStripMonitorDigi::nFedTECm
private

Definition at line 199 of file SiStripMonitorDigi.h.

Referenced by dqmBeginRun(), and endLuminosityBlock().

int SiStripMonitorDigi::nFedTECp
private

Definition at line 198 of file SiStripMonitorDigi.h.

Referenced by dqmBeginRun(), and endLuminosityBlock().

int SiStripMonitorDigi::nFedTIB
private

Definition at line 195 of file SiStripMonitorDigi.h.

Referenced by dqmBeginRun(), and endLuminosityBlock().

int SiStripMonitorDigi::nFedTIDm
private

Definition at line 197 of file SiStripMonitorDigi.h.

Referenced by dqmBeginRun(), and endLuminosityBlock().

int SiStripMonitorDigi::nFedTIDp
private

Definition at line 196 of file SiStripMonitorDigi.h.

Referenced by dqmBeginRun(), and endLuminosityBlock().

int SiStripMonitorDigi::nFedTOB
private

Definition at line 200 of file SiStripMonitorDigi.h.

Referenced by dqmBeginRun(), and endLuminosityBlock().

bool SiStripMonitorDigi::reset_each_run
private

Definition at line 126 of file SiStripMonitorDigi.h.

Referenced by bookHistograms(), and createMEs().

int SiStripMonitorDigi::runNb
private

Definition at line 148 of file SiStripMonitorDigi.h.

Referenced by analyze().

int SiStripMonitorDigi::SBDeclaredAt
private

Definition at line 193 of file SiStripMonitorDigi.h.

Referenced by endLuminosityBlock(), and SiStripMonitorDigi().

bool SiStripMonitorDigi::SBTransitionDone
private

Definition at line 194 of file SiStripMonitorDigi.h.

Referenced by endLuminosityBlock(), and SiStripMonitorDigi().

bool SiStripMonitorDigi::select_all_detectors
private

Definition at line 126 of file SiStripMonitorDigi.h.

bool SiStripMonitorDigi::shotschargehistomapon
private

Definition at line 208 of file SiStripMonitorDigi.h.

Referenced by analyze(), createMEs(), and SiStripMonitorDigi().

bool SiStripMonitorDigi::shotshistomapon
private

Definition at line 206 of file SiStripMonitorDigi.h.

Referenced by analyze(), createMEs(), and SiStripMonitorDigi().

bool SiStripMonitorDigi::shotsstripshistomapon
private

Definition at line 207 of file SiStripMonitorDigi.h.

Referenced by analyze(), createMEs(), and SiStripMonitorDigi().

MonitorElement * SiStripMonitorDigi::ShotsVsTimeApvShotsGlobal
private

Definition at line 144 of file SiStripMonitorDigi.h.

Referenced by analyze(), and createMEs().

bool SiStripMonitorDigi::show_control_view
private

Definition at line 126 of file SiStripMonitorDigi.h.

bool SiStripMonitorDigi::show_mechanical_structure_view
private

Definition at line 126 of file SiStripMonitorDigi.h.

Referenced by bookHistograms(), and createMEs().

bool SiStripMonitorDigi::show_readout_view
private

Definition at line 126 of file SiStripMonitorDigi.h.

edm::ESHandle<SiStripDetCabling> SiStripMonitorDigi::SiStripDetCabling_
private

Definition at line 140 of file SiStripMonitorDigi.h.

Referenced by analyze(), createMEs(), and createModuleMEs().

MonitorElement * SiStripMonitorDigi::StripMultiplicityApvShotsGlobal
private

Definition at line 144 of file SiStripMonitorDigi.h.

Referenced by analyze(), and createMEs().

std::map<std::string, SubDetMEs> SiStripMonitorDigi::SubDetMEsMap
private

Definition at line 130 of file SiStripMonitorDigi.h.

Referenced by analyze(), createMEs(), and createSubDetMEs().

std::map<std::string, std::string> SiStripMonitorDigi::SubDetPhasePartMap
private

Definition at line 131 of file SiStripMonitorDigi.h.

Referenced by analyze(), and SiStripMonitorDigi().

bool SiStripMonitorDigi::subdetswitchapvcycleprofon
private

Definition at line 171 of file SiStripMonitorDigi.h.

Referenced by analyze(), createSubDetMEs(), and SiStripMonitorDigi().

bool SiStripMonitorDigi::subdetswitchapvcycleth2on
private

Definition at line 172 of file SiStripMonitorDigi.h.

Referenced by analyze(), createSubDetMEs(), and SiStripMonitorDigi().

bool SiStripMonitorDigi::subdetswitchapvshotsApvon
private

Definition at line 180 of file SiStripMonitorDigi.h.

Referenced by analyze(), and SiStripMonitorDigi().

bool SiStripMonitorDigi::subdetswitchapvshotsonprof
private

Definition at line 178 of file SiStripMonitorDigi.h.

Referenced by analyze(), createSubDetMEs(), and SiStripMonitorDigi().

bool SiStripMonitorDigi::subdetswitchchargemedianapvshotson
private

Definition at line 179 of file SiStripMonitorDigi.h.

Referenced by analyze(), createSubDetMEs(), and SiStripMonitorDigi().

bool SiStripMonitorDigi::subdetswitchnapvshotson
private

Definition at line 176 of file SiStripMonitorDigi.h.

Referenced by analyze(), createSubDetMEs(), and SiStripMonitorDigi().

bool SiStripMonitorDigi::subdetswitchnstripsapvshotson
private

Definition at line 177 of file SiStripMonitorDigi.h.

Referenced by analyze(), createSubDetMEs(), and SiStripMonitorDigi().

bool SiStripMonitorDigi::subdetswitchtotdigifailureon
private
bool SiStripMonitorDigi::subdetswitchtotdigiprofon
private

Definition at line 170 of file SiStripMonitorDigi.h.

Referenced by analyze(), createSubDetMEs(), and SiStripMonitorDigi().

TkHistoMap* SiStripMonitorDigi::tkmapdigi
private

Definition at line 146 of file SiStripMonitorDigi.h.

Referenced by analyze(), and createMEs().

TkHistoMap * SiStripMonitorDigi::tkmapMedianChargeApvshots
private

Definition at line 146 of file SiStripMonitorDigi.h.

Referenced by analyze(), and createMEs().

TkHistoMap * SiStripMonitorDigi::tkmapNApvshots
private

Definition at line 146 of file SiStripMonitorDigi.h.

Referenced by analyze(), and createMEs().

TkHistoMap * SiStripMonitorDigi::tkmapNstripApvshot
private

Definition at line 146 of file SiStripMonitorDigi.h.

Referenced by analyze(), and createMEs().

std::string SiStripMonitorDigi::topFolderName_

Definition at line 45 of file SiStripMonitorDigi.h.

Referenced by createMEs(), endLuminosityBlock(), and SiStripMonitorDigi().

int SiStripMonitorDigi::TotalNShots
private

Definition at line 150 of file SiStripMonitorDigi.h.

Referenced by analyze().