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:
one::DQMEDAnalyzer< T > one::dqmimplementation::DQMBaseClass< T... >

Classes

struct  DigiFailureMEs
 
struct  LayerMEs
 
struct  ModMEs
 
struct  SubDetMEs
 

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
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
 
void endLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &) override
 
void endRun (const edm::Run &, const edm::EventSetup &) override
 
 SiStripMonitorDigi (const edm::ParameterSet &)
 
 ~SiStripMonitorDigi () override
 
- Public Member Functions inherited from one::DQMEDAnalyzer< T >
 DQMEDAnalyzer ()=default
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > const &)=delete
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > &&)=delete
 
 ~DQMEDAnalyzer () override=default
 

Public Attributes

MonitorElementNumberOfFEDDigis = 0
 
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
 
int eventNb
 
int firstEvent
 
SiStripFolderOrganizer folder_organizer
 
bool globalsummaryapvshotson
 
bool globalswitchapvshotsApvon
 
bool globalswitchapvshotsonprof
 
bool globalswitchchargemedianapvshotson
 
bool globalswitchnapvshotson
 
bool globalswitchNDigisFEDID
 
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_
 
bool m_trendVs10LS
 
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
 
std::unique_ptr< TkHistoMaptkmapdigi
 
std::unique_ptr< TkHistoMaptkmapMedianChargeApvshots
 
std::unique_ptr< TkHistoMaptkmapNApvshots
 
std::unique_ptr< TkHistoMaptkmapNstripApvshot
 
int TotalNShots
 

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 35 of file SiStripMonitorDigi.h.

Constructor & Destructor Documentation

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

Definition at line 48 of file SiStripMonitorDigi.cc.

References apvPhaseProducer_, apvPhaseProducerToken_, conf_, createTrendMEs, dcsStatus_, digiProducerList, digiProducerTokenList, digitkhistomapon, eventNb, firstEvent, edm::ParameterSet::getParameter(), globalsummaryapvshotson, globalswitchapvshotsApvon, globalswitchapvshotsonprof, globalswitchchargemedianapvshotson, globalswitchnapvshotson, globalswitchNDigisFEDID, globalswitchnstripsapvshotson, gtEvmToken_, historyProducer_, historyProducerToken_, ignoreFirstNLumisections_, integrateNLumisections_, isStableBeams, layerswitchadccooleston, layerswitchadchotteston, layerswitchdigiadcprofon, layerswitchdigiadcson, layerswitchnumdigison, layerswitchnumdigisprofon, layerswitchstripoccupancyon, m_trendVs10LS, 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_.

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

Definition at line 194 of file SiStripMonitorDigi.cc.

References dcsStatus_.

194  {
195  if (dcsStatus_) delete dcsStatus_;
196 }
SiStripDCSStatus * dcsStatus_

Member Function Documentation

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

Definition at line 1272 of file SiStripMonitorDigi.cc.

References mps_fire::i, and parallelization::uint().

Referenced by analyze(), and fillME().

1272  {
1273 
1274  for (uint i=0; i<moduleShots.size(); i++){
1275  subdetShots.push_back(moduleShots[i]);
1276  }
1277 }
def uint(string)
bool SiStripMonitorDigi::AllDigis ( const edm::EventSetup es)
private

Referenced by fillME().

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

Definition at line 575 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(), MonitorElement::Fill(), HcalObjRepresent::Fill(), FillApvShotsMap(), fillME(), fillTrend(), folder_organizer, edm::EventSetup::get(), edm::Event::getByToken(), SiStripDetCabling::getConnections(), getDigiSourceIndex(), APVCyclePhaseCollection::getPhase(), APVShotFinder::getShots(), SiStripDCSStatus::getStatus(), SiStripFolderOrganizer::getSubDetFolderAndTag(), globalsummaryapvshotson, globalswitchapvshotsApvon, globalswitchapvshotsonprof, globalswitchchargemedianapvshotson, globalswitchnapvshotson, globalswitchNDigisFEDID, 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, m_trendVs10LS, genParticles_cff::map, MedianChargeApvShotsGlobal, Mod_On_, moduleswitchadccooleston, moduleswitchadchotteston, moduleswitchdigiadcson, moduleswitchnumdigison, moduleswitchnumdigispstripon, moduleswitchstripoccupancyon, APVCyclePhaseCollection::multiphase, NApvApvShotsGlobal, SiStripDetCabling::nApvPairs(), NApvShotsGlobal, NApvShotsGlobalProf, APVCyclePhaseCollection::nopartition, NORBITS_PER_LS, SiStripMonitorDigi::ModMEs::NumberOfDigis, SiStripMonitorDigi::ModMEs::NumberOfDigisPerStrip, NumberOfFEDDigis, 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, SiStripMonitorDigi::SubDetMEs::totNDigis, parallelization::uint(), and x.

575  {
576 
577  // Filter out events if DCS Event if requested
578  if (dcsStatus_ && !dcsStatus_->getStatus(iEvent, iSetup)) return;
579 
580  //Retrieve tracker topology from geometry
581  edm::ESHandle<TrackerTopology> tTopoHandle;
582  iSetup.get<TrackerTopologyRcd>().get(tTopoHandle);
583  const TrackerTopology* const tTopo = tTopoHandle.product();
584 
585  TotalNShots=0;
586 
587  runNb = iEvent.id().run();
588  eventNb++;
589 
590  float iOrbitVar = m_trendVs10LS ? iEvent.orbitNumber()/(10*NORBITS_PER_LS) : iEvent.orbitNumber()/NORBITS_PER_LS;
591 
592  digi_detset_handles.clear();
593 
594  std::vector<edm::EDGetTokenT<edm::DetSetVector<SiStripDigi> > >::const_iterator iToken = digiProducerTokenList.begin();
595  for(std::vector<edm::InputTag>::const_iterator iter = digiProducerList.begin(), iEnd = digiProducerList.end();
596  iter != iEnd; ++iter, ++iToken) {
598  iEvent.getByToken( *iToken, digi_handle );
599  if (digi_handle.isValid()) digi_detset_handles.push_back(digi_handle.product());
600  }
601 
602  // initialise # of clusters to zero
603  for (std::map<std::string, SubDetMEs>::iterator iSubdet = SubDetMEsMap.begin();
604  iSubdet != SubDetMEsMap.end(); iSubdet++) {
605  iSubdet->second.totNDigis = 0;
606  iSubdet->second.SubDetApvShots.clear();
607  }
608 
609  std::map<int,int> FEDID_v_digisum;
610 
611  for (std::map<std::string, std::vector< uint32_t > >::const_iterator iterLayer = LayerDetMap.begin();
612  iterLayer != LayerDetMap.end(); iterLayer++) {
613 
614  std::string layer_label = iterLayer->first;
615 
616  std::vector< uint32_t > layer_dets = iterLayer->second;
617  std::map<std::string, LayerMEs>::iterator iLayerME = LayerMEsMap.find(layer_label);
618 
619  //get Layer MEs
620  LayerMEs local_layermes;
621 
622  if(iLayerME == LayerMEsMap.end()) continue;
623  else local_layermes = iLayerME->second;
624 
625  int largest_adc_layer= 0;
626  int smallest_adc_layer= 99999;
627 
628  int ndigi_layer = 0;
629 
630  uint16_t iDet = 0;
631 
632  std::string subdet_label = "";
633 
634  // loop over all modules in the layer
635  for (std::vector< uint32_t >::const_iterator iterDets = layer_dets.begin() ;
636  iterDets != layer_dets.end() ; iterDets++) {
637  iDet++;
638 
639  // detid and type of ME
640  uint32_t detid = (*iterDets);
641 
642  // Get SubDet label once
643  if (subdet_label.empty()) subdet_label = folder_organizer.getSubDetFolderAndTag(detid, tTopo).second;
644 
645  // DetId and corresponding set of MEs
646 
647  std::map<uint32_t, ModMEs >::iterator pos = DigiMEs.find(detid);
648  ModMEs local_modmes = pos->second;
649 
650  // search digis of detid
651  int loc = getDigiSourceIndex(detid);
652 
653  int ndigi_det = 0;
654 
655  if (loc > -1) {
656  ndigi_det = (*(digi_detset_handles[loc]))[detid].size();
657 
659 
660 //Get all FED connections associated with given detID.
661 // All connections for a detid have same FED Id therefore one FEDID is associated with a given detID.
662 std::vector<const FedChannelConnection*> fedConnections = SiStripDetCabling_->getConnections(detid);
663 
664 // Filling FED Id associated clusters map.
665 
666 int good_fcc_index = -999;
667 for(unsigned int x=0;x<fedConnections.size();x++){
668  if(fedConnections[x]!=nullptr){
669  good_fcc_index = x;
670  break;
671  }
672 }
673 if(fedConnections[good_fcc_index]!=nullptr){
674  int temp_fedid = fedConnections[good_fcc_index]->fedId();
675  if(FEDID_v_digisum.find(temp_fedid) != FEDID_v_digisum.end()){
676  if(ndigi_det <1000 && ndigi_det>0){
677  FEDID_v_digisum[temp_fedid] = FEDID_v_digisum.find(temp_fedid)->second + ndigi_det;
678  }
679  }
680  else{
681  if(ndigi_det < 1000 && ndigi_det >0){
682  FEDID_v_digisum[temp_fedid] = ndigi_det;
683  }
684  }
685 }
686 else{
687  edm::LogInfo("SiStripMonitorDigi") << "SiStripMonitorDigi::analyze WARNING! no good connections for detid = " << detid << std::endl;
688 }
690 
691  APVShotFinder theShotFinder = APVShotFinder((*(digi_detset_handles[loc]))[detid]);
692  const std::vector<APVShot>& shots = theShotFinder.getShots();
693  AddApvShotsToSubDet(shots,SubDetMEsMap[subdet_label].SubDetApvShots);
694  if (shotshistomapon) tkmapNApvshots->fill(detid,shots.size());
695  if (shotsstripshistomapon) FillApvShotsMap(tkmapNstripApvshot.get(),shots,detid,1);
697  }
698 
699  if(Mod_On_ && moduleswitchnumdigison && (local_modmes.NumberOfDigis != nullptr))
700  (local_modmes.NumberOfDigis)->Fill(ndigi_det);
701 
703  local_layermes.LayerNumberOfDigisProfile->Fill(iDet*1.0,ndigi_det);
704 
705  if (digitkhistomapon) tkmapdigi->fill(detid,ndigi_det);
706 
707  if (ndigi_det == 0) continue; // no digis for this detid => jump to next step of loop
708 
709  const edm::DetSet<SiStripDigi> & digi_detset = (*(digi_detset_handles[loc]))[detid];
710 
711  ndigi_layer += ndigi_det;
712 
713  // ADCs
714  int largest_adc=(digi_detset.data.begin())->adc();
715  int smallest_adc=(digi_detset.data.begin())->adc();
716 
717 
718  // Check if these parameters are really needed
719  float det_occupancy = 0.0;
720 
721  for(edm::DetSet<SiStripDigi>::const_iterator digiIter = digi_detset.data.begin();
722  digiIter!= digi_detset.data.end(); digiIter++ ){
723 
724  int this_adc = digiIter->adc();
725 
726  if (this_adc > 0.0) det_occupancy++;
727 
728  if(this_adc>largest_adc) largest_adc = this_adc;
729  if(this_adc<smallest_adc) smallest_adc = this_adc;
730 
731  if(Mod_On_ && moduleswitchnumdigispstripon && (local_modmes.NumberOfDigisPerStrip != nullptr) && (this_adc > 0.0) )
732  (local_modmes.NumberOfDigisPerStrip)->Fill(digiIter->strip());
733 
734  if(Mod_On_ && moduleswitchdigiadcson && (local_modmes.DigiADCs != nullptr) )
735  (local_modmes.DigiADCs)->Fill(static_cast<float>(this_adc));
736 
737  //Fill #ADCs for this digi at layer level
739  fillME(local_layermes.LayerDigiADCs , this_adc);
740  if (createTrendMEs) fillTrend(local_layermes.LayerDigiADCsTrend, this_adc, iOrbitVar);
741  }
742 
744  local_layermes.LayerDigiADCProfile->Fill(iDet*1.0,this_adc);
745 
746  }//end of loop over digis in this det
747 
748  // Occupancy
749  short nstrips = SiStripDetCabling_->nApvPairs(detid) * 2 * 128;
750  if (nstrips > 0 && det_occupancy > 0 ) {
751  det_occupancy = det_occupancy/nstrips;
752  if (Mod_On_ && moduleswitchstripoccupancyon && (local_modmes.StripOccupancy != nullptr))
753  (local_modmes.StripOccupancy)->Fill(det_occupancy);
755  fillME(local_layermes.LayerStripOccupancy, det_occupancy);
756  if (createTrendMEs) fillTrend(local_layermes.LayerStripOccupancyTrend, det_occupancy, iOrbitVar);
757  }
758  }
759 
760  if (largest_adc > largest_adc_layer) largest_adc_layer = largest_adc;
761  if (smallest_adc < smallest_adc_layer) smallest_adc_layer = smallest_adc;
762 
763  // nr. of adcs for hottest strip
764  if( Mod_On_ && moduleswitchadchotteston && (local_modmes.ADCsHottestStrip != nullptr))
765  (local_modmes.ADCsHottestStrip)->Fill(static_cast<float>(largest_adc));
766 
767  // nr. of adcs for coolest strip
768  if(Mod_On_ && moduleswitchadccooleston && (local_modmes.ADCsCoolestStrip != nullptr))
769  (local_modmes.ADCsCoolestStrip)->Fill(static_cast<float>(smallest_adc));
770 
771  }//end of loop over DetIds
772 
774  fillME(local_layermes.LayerNumberOfDigis,ndigi_layer);
775  if (createTrendMEs) fillTrend(local_layermes.LayerNumberOfDigisTrend, ndigi_layer, iOrbitVar);
776  }
778  fillME(local_layermes.LayerADCsHottestStrip,largest_adc_layer);
779  if (createTrendMEs) fillTrend(local_layermes.LayerADCsHottestStripTrend, largest_adc_layer, iOrbitVar);
780  }
782  fillME(local_layermes.LayerADCsCoolestStrip ,smallest_adc_layer);
783  if (createTrendMEs) fillTrend(local_layermes.LayerADCsCoolestStripTrend, smallest_adc_layer, iOrbitVar);
784  }
785 
786  std::map<std::string, SubDetMEs>::iterator iSubdet = SubDetMEsMap.find(subdet_label);
787  if(iSubdet != SubDetMEsMap.end()) {
788  iSubdet->second.totNDigis += ndigi_layer;
789  //std::cout << " totDigis" << iSubdet->second.totNDigis << " in " << subdet_label << std::endl;
790  }
791  }
792 
794 
795  //check Stable beams bit
797  iEvent.getByToken( gtEvmToken_, gtEvm_handle );
798  L1GlobalTriggerEvmReadoutRecord const* gtevm = gtEvm_handle.product();
799 
800  L1GtfeExtWord gtfeEvmExtWord;
801  if (gtevm)
802  {
803  gtfeEvmExtWord = gtevm->gtfeWord();
804  }
805  else
806  edm::LogInfo("DQMProvInfo") << " gtfeEvmWord inaccessible" ;
807 
808  /* mia: is there not a smarter way !?!?!?!? */
809  if ( gtfeEvmExtWord.beamMode() == 11 )
810  isStableBeams = true;
811  }
812 
813  for (std::map<std::string, SubDetMEs>::iterator it = SubDetMEsMap.begin();
814  it != SubDetMEsMap.end(); it++) {
815 
817  if (strcmp(it->first.c_str(),"TEC__MINUS")==0){
818  digiFailureMEs.SubDetTotDigiProfLS->Fill(1, it->second.totNDigis);
819  }else if (strcmp(it->first.c_str(),"TEC__PLUS")==0){
820  digiFailureMEs.SubDetTotDigiProfLS->Fill(2, it->second.totNDigis);
821  }else if (strcmp(it->first.c_str(),"TIB")==0){
822  digiFailureMEs.SubDetTotDigiProfLS->Fill(3, it->second.totNDigis);
823  }else if (strcmp(it->first.c_str(),"TID__MINUS")==0){
824  digiFailureMEs.SubDetTotDigiProfLS->Fill(4, it->second.totNDigis);
825  }else if (strcmp(it->first.c_str(),"TID__PLUS")==0){
826  digiFailureMEs.SubDetTotDigiProfLS->Fill(5, it->second.totNDigis);
827  }else if (strcmp(it->first.c_str(),"TOB")==0){
828  digiFailureMEs.SubDetTotDigiProfLS->Fill(6, it->second.totNDigis);
829  }
830  }
831 
833  if (strcmp(it->first.c_str(),"TEC__MINUS")==0){
834  NApvShotsGlobalProf->Fill(1,it->second.SubDetApvShots.size());
835  }else if (strcmp(it->first.c_str(),"TEC__PLUS")==0){
836  NApvShotsGlobalProf->Fill(2,it->second.SubDetApvShots.size());
837  }else if (strcmp(it->first.c_str(),"TIB")==0){
838  NApvShotsGlobalProf->Fill(3,it->second.SubDetApvShots.size());
839  }else if (strcmp(it->first.c_str(),"TID__MINUS")==0){
840  NApvShotsGlobalProf->Fill(4,it->second.SubDetApvShots.size());
841  }else if (strcmp(it->first.c_str(),"TID__PLUS")==0){
842  NApvShotsGlobalProf->Fill(5,it->second.SubDetApvShots.size());
843  }else if (strcmp(it->first.c_str(),"TOB")==0){
844  NApvShotsGlobalProf->Fill(6,it->second.SubDetApvShots.size());
845  }
846  }
847 
848  SubDetMEs subdetmes= it->second;
849  std::string subdet = it->first;
850 
851  // Fill APV shots histograms for SubDet
852 
853  uint ShotsSize=subdetmes.SubDetApvShots.size();
854  TotalNShots+=ShotsSize; //Counter for total Shots in the SiStrip Tracker
855 
856  if (subdetswitchnapvshotson ) subdetmes.SubDetNApvShotsTH1->Fill(ShotsSize);// N shots
857  if (subdetswitchapvshotsonprof) subdetmes.SubDetNApvShotsProf ->Fill(iOrbitVar,ShotsSize); //N shots vs time
858 
859  for (uint i=0; i< ShotsSize; ++i){ // Strip multiplicity, charge median and APV number distributions for APV shots
860 
861  if (subdetswitchapvshotsApvon) subdetmes.SubDetNApvShotsNApvTH1->Fill((subdetmes.SubDetApvShots[i].apvNumber()+1));//APV are defined by 0 to 5 I want 1 to 6
862  if (globalswitchapvshotsApvon) NApvApvShotsGlobal->Fill((subdetmes.SubDetApvShots[i].apvNumber()+1));
863 
864  if (subdetswitchnstripsapvshotson) subdetmes.SubDetNStripsApvShotsTH1->Fill(subdetmes.SubDetApvShots[i].nStrips());
865  if (globalswitchnstripsapvshotson) StripMultiplicityApvShotsGlobal->Fill(subdetmes.SubDetApvShots[i].nStrips());
866 
867  if (subdetswitchchargemedianapvshotson) subdetmes.SubDetChargeMedianApvShotsTH1->Fill(subdetmes.SubDetApvShots[i].median());
868  if (globalswitchchargemedianapvshotson) MedianChargeApvShotsGlobal->Fill(subdetmes.SubDetApvShots[i].median());
869 
870  }
871 
872  if (subdetswitchtotdigiprofon)subdetmes.SubDetTotDigiProf->Fill(iOrbitVar,subdetmes.totNDigis);
873  }
874 
877 
878 
880  std::map<int,int>::iterator it;
881  for(it=FEDID_v_digisum.begin(); it!=FEDID_v_digisum.end(); it++){
882  NumberOfFEDDigis->Fill(it->first,it->second);
883  }
884  }
885 
886  // get EventHistory
887 
888  edm::Handle<EventWithHistory> event_history;
889  iEvent.getByToken(historyProducerToken_,event_history);
890 
891  // get Phase of APV
892  edm::Handle<APVCyclePhaseCollection> apv_phase_collection;
893  iEvent.getByToken(apvPhaseProducerToken_,apv_phase_collection);
894 
895  if (event_history.isValid()
896  && !event_history.failedToGet()
897  && apv_phase_collection.isValid()
898  && !apv_phase_collection.failedToGet()) {
899 
900 
901  long long tbx = event_history->absoluteBX();
902 
903 
904  for (std::map<std::string, SubDetMEs>::iterator it = SubDetMEsMap.begin();
905  it != SubDetMEsMap.end(); it++) {
906 
907  SubDetMEs subdetmes;
908  std::string subdet = it->first;
909  subdetmes = it->second;
910 
911  int the_phase = APVCyclePhaseCollection::invalid;
912  long long tbx_corr = tbx;
913 
914  if (SubDetPhasePartMap.find(subdet) != SubDetPhasePartMap.end()) the_phase = apv_phase_collection->getPhase(SubDetPhasePartMap[subdet]);
915  if(the_phase==APVCyclePhaseCollection::nopartition ||
917  the_phase==APVCyclePhaseCollection::invalid) the_phase=30;
918  tbx_corr -= the_phase;
919 
920  if (subdetswitchapvcycleprofon)subdetmes.SubDetDigiApvProf->Fill(tbx_corr%70,subdetmes.totNDigis);
921  if (subdetswitchapvcycleth2on) subdetmes.SubDetDigiApvTH2->Fill(tbx_corr%70,subdetmes.totNDigis);
922  }
923  }
924 }//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:579
const double NORBITS_PER_LS
const L1GtfeExtWord gtfeWord() const
get / set GTFE word (record) in the GT readout record
std::unique_ptr< TkHistoMap > tkmapNstripApvshot
long long absoluteBX(const unsigned int ev1) const
MonitorElement * NApvShotsGlobalProf
std::map< uint32_t, ModMEs > DigiMEs
std::map< std::string, std::string > SubDetPhasePartMap
MonitorElement * MedianChargeApvShotsGlobal
MonitorElement * StripMultiplicityApvShotsGlobal
std::unique_ptr< TkHistoMap > tkmapMedianChargeApvshots
void Fill(long long x)
const std::vector< const FedChannelConnection * > & getConnections(uint32_t det_id) const
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_
edm::ESHandle< SiStripDetCabling > SiStripDetCabling_
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
DigiFailureMEs digiFailureMEs
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::unique_ptr< TkHistoMap > tkmapNApvshots
std::map< std::string, std::vector< uint32_t > > LayerDetMap
T const * product() const
Definition: Handle.h:81
def uint(string)
std::unique_ptr< TkHistoMap > tkmapdigi
std::vector< edm::InputTag > digiProducerList
const uint16_t nApvPairs(uint32_t det_id) const
edm::EDGetTokenT< APVCyclePhaseCollection > apvPhaseProducerToken_
edm::EventID id() const
Definition: EventBase.h:60
collection_type data
Definition: DetSet.h:78
T get() const
Definition: EventSetup.h:68
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:84
void FillApvShotsMap(TkHistoMap *, const std::vector< APVShot > &, uint32_t id, int)
MonitorElement * NumberOfFEDDigis
void SiStripMonitorDigi::beginLuminosityBlock ( const edm::LuminosityBlock lb,
const edm::EventSetup es 
)
override

Definition at line 276 of file SiStripMonitorDigi.cc.

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

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

Definition at line 199 of file SiStripMonitorDigi.cc.

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

200 {
202  unsigned long long cacheID = es.get<SiStripDetCablingRcd>().cacheIdentifier();
203  if (m_cacheID_ != cacheID) {
204  m_cacheID_ = cacheID;
205  edm::LogInfo("SiStripMonitorDigi") <<"SiStripMonitorDigi::bookHistograms: "
206  << " Creating MEs for new Cabling ";
207  createMEs( ibooker, es );
208  }
209  } else if (reset_each_run) {
210  edm::LogInfo("SiStripMonitorDigi") <<"SiStripMonitorDigi::bookHistograms: "
211  << " Resetting MEs ";
212  for (std::map<uint32_t, ModMEs >::const_iterator idet = DigiMEs.begin() ; idet!=DigiMEs.end() ; idet++) {
213  ResetModuleMEs(idet->first);
214  }
215  }
216 
217 }
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 960 of file SiStripMonitorDigi.cc.

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

Referenced by createLayerMEs(), and createModuleMEs().

961 {
963  return ibooker.book1D(HistoName,HistoName,
964  Parameters.getParameter<int32_t>("Nbinx"),
965  Parameters.getParameter<double>("xmin"),
966  Parameters.getParameter<double>("xmax")
967  );
968 }
T getParameter(std::string const &) const
vector< ParameterSet > Parameters
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
edm::ParameterSet conf_
std::string HistoName
MonitorElement * SiStripMonitorDigi::bookMETrend ( DQMStore::IBooker ibooker,
const char *  ParameterSetLabel,
const char *  HistoName 
)
private

Definition at line 939 of file SiStripMonitorDigi.cc.

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

Referenced by createLayerMEs().

940 {
941  edm::ParameterSet ParametersTrend = conf_.getParameter<edm::ParameterSet>("Trending");
943  ParametersTrend.getParameter<int32_t>("Nbins"),
944  // 0,
945  ParametersTrend.getParameter<double>("xmin"),
946  ParametersTrend.getParameter<double>("xmax"),
947  // ParametersTrend.getParameter<int32_t>("Nbins"),
948  100, //that parameter should not be there !?
949  ParametersTrend.getParameter<double>("ymin"),
950  ParametersTrend.getParameter<double>("ymax"),
951  "" );
952  if(!me) return me;
953 
954  me->setAxisTitle("Lumisection",1);
955  if (me->kind() == MonitorElement::DQM_KIND_TPROFILE) me->getTH1()->SetCanExtend(TH1::kAllAxes);
956  return me;
957 }
T getParameter(std::string const &) const
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:113
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 1042 of file SiStripMonitorDigi.cc.

References bookME1D(), bookMETrend(), DQMStore::IBooker::bookProfile(), SiStripHistoId::createHistoLayer(), createTrendMEs, 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().

1042  {
1043 
1044  std::map<std::string, LayerMEs>::iterator iLayerME = LayerMEsMap.find(label);
1045  if(iLayerME==LayerMEsMap.end()){
1046  SiStripHistoId hidmanager;
1047  LayerMEs layerMEs;
1048  layerMEs.LayerNumberOfDigis = nullptr;
1049  layerMEs.LayerNumberOfDigisTrend = nullptr;
1050  layerMEs.LayerADCsHottestStrip = nullptr;
1051  layerMEs.LayerADCsHottestStripTrend = nullptr;
1052  layerMEs.LayerADCsCoolestStrip = nullptr;
1053  layerMEs.LayerADCsCoolestStripTrend = nullptr;
1054  layerMEs.LayerDigiADCs = nullptr;
1055  layerMEs.LayerDigiADCsTrend = nullptr;
1056  layerMEs.LayerStripOccupancy = nullptr;
1057  layerMEs.LayerStripOccupancyTrend = nullptr;
1058  layerMEs.LayerNumberOfDigisProfile = nullptr;
1059  layerMEs.LayerDigiADCProfile = nullptr;
1060 
1061 
1062  //#Digis
1063  if(layerswitchnumdigison) {
1064  layerMEs.LayerNumberOfDigis=bookME1D( ibooker , "TH1NumberOfDigis", hidmanager.createHistoLayer("Summary_TotalNumberOfDigis","layer",label,"").c_str() );
1065  if (createTrendMEs) layerMEs.LayerNumberOfDigisTrend=bookMETrend( ibooker , "TH1NumberOfDigis", hidmanager.createHistoLayer("Trend_NumberOfDigis","layer",label,"").c_str() );
1066  }
1067 
1068  //#ADCs for hottest strip
1070  layerMEs.LayerADCsHottestStrip=bookME1D( ibooker , "TH1ADCsHottestStrip", hidmanager.createHistoLayer("Summary_ADCsHottestStrip","layer",label,"").c_str() );
1071  if (createTrendMEs) layerMEs.LayerADCsHottestStripTrend=bookMETrend( ibooker , "TH1ADCsHottestStrip", hidmanager.createHistoLayer("Trend_ADCsHottestStrip","layer",label,"").c_str() );
1072  }
1073 
1074  //#ADCs for coolest strip
1076  layerMEs.LayerADCsCoolestStrip=bookME1D(ibooker , "TH1ADCsCoolestStrip", hidmanager.createHistoLayer("Summary_ADCsCoolestStrip","layer",label,"").c_str() );
1077  if (createTrendMEs) layerMEs.LayerADCsCoolestStripTrend=bookMETrend( ibooker , "TH1ADCsCoolestStrip", hidmanager.createHistoLayer("Trend_ADCsCoolestStrip","layer",label,"").c_str() );
1078  }
1079 
1080  //#ADCs for each digi
1081  if(layerswitchdigiadcson) {
1082  layerMEs.LayerDigiADCs=bookME1D( ibooker , "TH1DigiADCs", hidmanager.createHistoLayer("Summary_DigiADCs","layer",label,"").c_str() );
1083  if (createTrendMEs) layerMEs.LayerDigiADCsTrend=bookMETrend( ibooker , "TH1DigiADCs", hidmanager.createHistoLayer("Trend_DigiADCs","layer",label,"").c_str() );
1084  }
1085 
1086  //Strip Occupancy
1088  layerMEs.LayerStripOccupancy=bookME1D( ibooker , "TH1StripOccupancy", hidmanager.createHistoLayer("Summary_StripOccupancy","layer",label,"").c_str() );
1089  if (createTrendMEs) layerMEs.LayerStripOccupancyTrend=bookMETrend( ibooker , "TH1StripOccupancy", hidmanager.createHistoLayer("Trend_StripOccupancy","layer",label,"").c_str() );
1090 
1091  }
1092  // # of Digis
1094  std::string hid = hidmanager.createHistoLayer("NumberOfDigiProfile","layer",label,"");
1095  layerMEs.LayerNumberOfDigisProfile = ibooker.bookProfile(hid, hid, ndets, 0.5, ndets+0.5,21, -0.5, 200.5);
1096  }
1097 
1098  // # of Digis
1100  std::string hid = hidmanager.createHistoLayer("DigiADCProfile","layer",label,"");
1101  layerMEs.LayerDigiADCProfile = ibooker.bookProfile(hid, hid, ndets, 0.5, ndets+0.5, 64, -0.5, 255.5);
1102  }
1103 
1104  LayerMEsMap[label]=layerMEs;
1105  }
1106 }
MonitorElement * bookME1D(DQMStore::IBooker &ibooker, const char *ParameterSetLabel, const char *HistoName)
std::map< std::string, LayerMEs > LayerMEsMap
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:113
char const * label
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 323 of file SiStripMonitorDigi.cc.

References funct::abs(), SiStripMonitorDigi::ModMEs::ADCsCoolestStrip, SiStripMonitorDigi::ModMEs::ADCsHottestStrip, SiStripDetCabling::addActiveDetectorsRawIds(), 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, globalswitchNDigisFEDID, globalswitchnstripsapvshotson, MonitorElement::kind(), label, LayerDetMap, LayerMEsMap, MedianChargeApvShotsGlobal, Mod_On_, NApvApvShotsGlobal, NApvShotsGlobal, NApvShotsGlobalProf, SiStripMonitorDigi::ModMEs::NumberOfDigis, SiStripMonitorDigi::ModMEs::NumberOfDigisPerStrip, NumberOfFEDDigis, edm::ESHandle< T >::product(), reset_each_run, ResetModuleMEs(), MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), 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().

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

980  {
981 
982  // use SistripHistoId for producing histogram id (and title)
983  SiStripHistoId hidmanager;
984  std::string hid;
985 
986  //nr. of digis per module
988  hid = hidmanager.createHistoId("NumberOfDigis","det",detid);
989  mod_single.NumberOfDigis = ibooker.book1D(hid, hid, 21, -0.5, 20.5);
990  ibooker.tag(mod_single.NumberOfDigis, detid);
991  mod_single.NumberOfDigis->setAxisTitle("number of digis in one detector module");
992  mod_single.NumberOfDigis->getTH1()->StatOverflows(kTRUE); // over/underflows in Mean calculation
993  }
994 
995  //nr. of digis per strip in module
997  hid = hidmanager.createHistoId("NumberOfDigisPerStrip","det",detid);
998  short nstrips = SiStripDetCabling_->nApvPairs(detid) * 2 * 128;
999  mod_single.NumberOfDigisPerStrip = ibooker.book1D(hid, hid, nstrips, -0.5, nstrips+0.5);
1000  ibooker.tag(mod_single.NumberOfDigisPerStrip, detid);
1001  mod_single.NumberOfDigisPerStrip->setAxisTitle("number of (digis > 0) per strip");
1002  mod_single.NumberOfDigisPerStrip->getTH1()->StatOverflows(kTRUE); // over/underflows in Mean calculation
1003  }
1004  //#ADCs for hottest strip
1006  hid = hidmanager.createHistoId("ADCsHottestStrip","det",detid);
1007  mod_single.ADCsHottestStrip = bookME1D(ibooker , "TH1ADCsHottestStrip", hid.c_str() );
1008  ibooker.tag(mod_single.ADCsHottestStrip, detid); // 6 APVs -> 768 strips
1009  mod_single.ADCsHottestStrip->setAxisTitle("number of ADCs for hottest strip");
1010  }
1011 
1012  //#ADCs for coolest strip
1014  hid = hidmanager.createHistoId("ADCsCoolestStrip","det",detid);
1015  mod_single.ADCsCoolestStrip = bookME1D(ibooker , "TH1ADCsCoolestStrip", hid.c_str() );
1016  ibooker.tag(mod_single.ADCsCoolestStrip, detid);
1017  mod_single.ADCsCoolestStrip->setAxisTitle("number of ADCs for coolest strip");
1018  }
1019 
1020  //#ADCs for each digi
1022  hid = hidmanager.createHistoId("DigiADCs","det",detid);
1023  mod_single.DigiADCs = bookME1D( ibooker , "TH1DigiADCs", hid.c_str() );
1024  ibooker.tag(mod_single.DigiADCs, detid);
1025  mod_single.DigiADCs->setAxisTitle("number of ADCs for each digi");
1026  }
1027 
1028  //Strip occupancy
1030  hid = hidmanager.createHistoId("StripOccupancy","det",detid);
1031  mod_single.StripOccupancy = bookME1D( ibooker , "TH1StripOccupancy", hid.c_str() );
1032  ibooker.tag(mod_single.StripOccupancy, detid);
1033  mod_single.StripOccupancy->setAxisTitle("strip occupancy");
1034  }
1035 
1036 }
MonitorElement * bookME1D(DQMStore::IBooker &ibooker, const char *ParameterSetLabel, const char *HistoName)
edm::ESHandle< SiStripDetCabling > SiStripDetCabling_
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
void tag(MonitorElement *, unsigned int)
Definition: DQMStore.cc:283
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 1110 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(), 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().

1110  {
1111 
1112  SubDetMEs subdetMEs;
1113  subdetMEs.totNDigis = 0;
1114  subdetMEs.SubDetTotDigiProf = nullptr;
1115  subdetMEs.SubDetDigiApvProf = nullptr;
1116  subdetMEs.SubDetDigiApvTH2 = nullptr;
1117 
1118  subdetMEs.SubDetApvShots.clear();
1119  subdetMEs.SubDetNApvShotsTH1 = nullptr;
1120  subdetMEs.SubDetChargeMedianApvShotsTH1 = nullptr;
1121  subdetMEs.SubDetNStripsApvShotsTH1 = nullptr;
1122  subdetMEs.SubDetNApvShotsProf = nullptr;
1123 
1125 
1126  // Total Number of Digi - Profile
1128  edm::ParameterSet Parameters = conf_.getParameter<edm::ParameterSet>("TProfTotalNumberOfDigis");
1129  HistoName = "TotalNumberOfDigiProfile__" + label;
1130  subdetMEs.SubDetTotDigiProf=ibooker.bookProfile(HistoName,HistoName,
1131  Parameters.getParameter<int32_t>("Nbins"),
1132  Parameters.getParameter<double>("xmin"),
1133  Parameters.getParameter<double>("xmax"),
1134  100, //that parameter should not be there !?
1135  Parameters.getParameter<double>("ymin"),
1136  Parameters.getParameter<double>("ymax"),
1137  "" );
1138  subdetMEs.SubDetTotDigiProf->setAxisTitle("Lumisection",1);
1139 
1140  if (subdetMEs.SubDetTotDigiProf->kind() == MonitorElement::DQM_KIND_TPROFILE) subdetMEs.SubDetTotDigiProf->getTH1()->SetCanExtend(TH1::kAllAxes);
1141  }
1142 
1143  // Number of Digi vs Bx - Profile
1145  edm::ParameterSet Parameters = conf_.getParameter<edm::ParameterSet>("TProfDigiApvCycle");
1146  HistoName = "Digi_vs_ApvCycle__" + label;
1147  subdetMEs.SubDetDigiApvProf=ibooker.bookProfile(HistoName,HistoName,
1148  Parameters.getParameter<int32_t>("Nbins"),
1149  Parameters.getParameter<double>("xmin"),
1150  Parameters.getParameter<double>("xmax"),
1151  200, //that parameter should not be there !?
1152  Parameters.getParameter<double>("ymin"),
1153  Parameters.getParameter<double>("ymax"),
1154  "" );
1155  subdetMEs.SubDetDigiApvProf->setAxisTitle("ApvCycle (Corrected Absolute Bx % 70)",1);
1156  }
1157 
1158  // Number of Digi vs Bx - TH2
1160  edm::ParameterSet Parameters = conf_.getParameter<edm::ParameterSet>("TH2DigiApvCycle");
1161  //dqmStore_->setCurrentFolder("SiStrip/MechanicalView/"+label);
1162  HistoName = "Digi_vs_ApvCycle_2D__" + label;
1163  // Adjusting the scale for 2D histogram
1164  double h2ymax = 9999.0;
1165  double yfact = Parameters.getParameter<double>("yfactor");
1166  if(label.find("TIB") != std::string::npos) h2ymax = (6984.*256.)*yfact;
1167  else if (label.find("TID") != std::string::npos) h2ymax = (2208.*256.)*yfact;
1168  else if (label.find("TOB") != std::string::npos) h2ymax = (12906.*256.)*yfact;
1169  else if (label.find("TEC") != std::string::npos) h2ymax = (7552.*2.*256.)*yfact;
1170  subdetMEs.SubDetDigiApvTH2=ibooker.book2D(HistoName,HistoName,
1171  Parameters.getParameter<int32_t>("Nbins"),
1172  Parameters.getParameter<double>("xmin"),
1173  Parameters.getParameter<double>("xmax"),
1174  Parameters.getParameter<int32_t>("Nbinsy"), //it was 100 that parameter should not be there !?
1175  Parameters.getParameter<double>("ymin"),
1176  h2ymax);
1177  subdetMEs.SubDetDigiApvTH2->setAxisTitle("absolute Bx mod(70)",1);
1178  }
1179 
1180  //Number of APV Shots
1182  edm::ParameterSet Parameters = conf_.getParameter<edm::ParameterSet>("TH1NApvShots");
1183  //dqmStore_->setCurrentFolder("SiStrip/MechanicalView/"+label);
1184  HistoName = "Number_of_Apv_Shots_" + label;
1185  subdetMEs.SubDetNApvShotsTH1=ibooker.book1D(HistoName,HistoName,
1186  Parameters.getParameter<int32_t>("Nbins"),
1187  Parameters.getParameter<double>("xmin"),
1188  Parameters.getParameter<double>("xmax"));
1189  subdetMEs.SubDetNApvShotsTH1->setAxisTitle("# Apv Shots",1);
1190  }
1191 
1192  //Strip multiplicity of APV Shots
1194  edm::ParameterSet Parameters = conf_.getParameter<edm::ParameterSet>("TH1NStripsApvShots");
1195  //dqmStore_->setCurrentFolder("SiStrip/MechanicalView/"+label);
1196  HistoName = "Number_of_Strips_in_Apv_Shots_" + label;
1197  subdetMEs.SubDetNStripsApvShotsTH1=ibooker.book1D(HistoName,HistoName,
1198  Parameters.getParameter<int32_t>("Nbins"),
1199  Parameters.getParameter<double>("xmin"),
1200  Parameters.getParameter<double>("xmax"));
1201  subdetMEs.SubDetNStripsApvShotsTH1->setAxisTitle("# strips in Apv Shots",1);
1202  }
1203 
1204  //Charge median of APV Shots
1206  edm::ParameterSet Parameters = conf_.getParameter<edm::ParameterSet>("TH1ChargeMedianApvShots");
1207  //dqmStore_->setCurrentFolder("SiStrip/MechanicalView/"+label);
1208  HistoName = "Apv_Shots_Charge_Median_" + label;
1209  subdetMEs.SubDetChargeMedianApvShotsTH1=ibooker.book1D(HistoName,HistoName,
1210  Parameters.getParameter<int32_t>("Nbins"),
1211  Parameters.getParameter<double>("xmin"),
1212  Parameters.getParameter<double>("xmax"));
1213  subdetMEs.SubDetChargeMedianApvShotsTH1->setAxisTitle("Apv Shots Charge Median (ADC)",1);
1214  }
1215 
1216 
1218  edm::ParameterSet Parameters = conf_.getParameter<edm::ParameterSet>("TH1ApvNumApvShots");
1219  //dqmStore_->setCurrentFolder("SiStrip/MechanicalView/"+label);
1220  HistoName = "Apv_Shots_Apv_Number_" + label;
1221  subdetMEs.SubDetNApvShotsNApvTH1=ibooker.book1D(HistoName,HistoName,
1222  Parameters.getParameter<int32_t>("Nbins"),
1223  Parameters.getParameter<double>("xmin"),
1224  Parameters.getParameter<double>("xmax"));
1225  subdetMEs.SubDetNApvShotsNApvTH1->setAxisTitle("Apv Number",1);
1226  }
1227 
1228 
1229 
1230 
1231 
1232  //APV Shots number Vs time
1234  edm::ParameterSet Parameters = conf_.getParameter<edm::ParameterSet>("TProfNShotsVsTime");
1235  HistoName = "NApv_Shots_vs_Time_" + label;
1236  subdetMEs.SubDetNApvShotsProf=ibooker.bookProfile(HistoName,HistoName,
1237  Parameters.getParameter<int32_t>("Nbins"),
1238  Parameters.getParameter<double>("xmin"),
1239  Parameters.getParameter<double>("xmax"),
1240  200, //that parameter should not be there !?
1241  Parameters.getParameter<double>("ymin"),
1242  Parameters.getParameter<double>("ymax"),
1243  "" );
1244  subdetMEs.SubDetNApvShotsProf->setAxisTitle("Time (s)",1);
1245  subdetMEs.SubDetNApvShotsProf->setAxisTitle("# Apv Shots",2);
1246  if (subdetMEs.SubDetNApvShotsProf->kind() == MonitorElement::DQM_KIND_TPROFILE) subdetMEs.SubDetNApvShotsProf->getTH1()->SetCanExtend(TH1::kAllAxes);
1247  }
1248 
1249 
1250 
1251 
1252 
1253 
1254 
1255  SubDetMEsMap[label]=subdetMEs;
1256 }
T getParameter(std::string const &) const
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:113
char const * label
vector< ParameterSet > Parameters
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
std::map< std::string, SubDetMEs > SubDetMEsMap
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:109
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 224 of file SiStripMonitorDigi.cc.

References edm::EventSetup::get(), edm::ESHandleBase::isValid(), m_cacheID_, RunInfo::m_fed_in, nFedTECm, nFedTECp, nFedTIB, nFedTIDm, nFedTIDp, nFedTOB, subdetswitchtotdigifailureon, and edm::EventSetup::tryToGet().

224  {
225 
227  //get FED cabling to know if SiStrip is in DAQ or no
228  unsigned long long cacheID = es.get<SiStripDetCablingRcd>().cacheIdentifier();
229  if (m_cacheID_ != cacheID) {
230  m_cacheID_ = cacheID;
231  }
233  es.get<SiStripDetCablingRcd>().get(detCabling_);
234 
235  //nFEDConnected = 0;
236  nFedTIB = 0;
237  nFedTIDm = 0;
238  nFedTIDp = 0;
239  nFedTECm = 0;
240  nFedTECp = 0;
241  nFedTOB = 0;
242 
243  //const int siStripFedIdMin = FEDNumbering::MINSiStripFEDID;
244  //const int siStripFedIdMax = FEDNumbering::MAXSiStripFEDID;
245 
246  if(auto runInfoRec = es.tryToGet<RunInfoRcd>()) {
247 
248  edm::ESHandle<RunInfo> sumFED;
249  runInfoRec->get(sumFED);
250 
251  if ( sumFED.isValid() ) {
252  std::vector<int> FedsInIds= sumFED->m_fed_in;
253  for(unsigned int it = 0; it < FedsInIds.size(); ++it) {
254  int fedID = FedsInIds[it];
255  // if(fedID>=siStripFedIdMin && fedID<=siStripFedIdMax) ++nFEDConnected;
256  /* mia: but is there not a smarter way !?!?!? */
257  if ( fedID >= 50 && fedID <= 133 ) ++nFedTIB;
258  if ( fedID >= 134 && fedID <= 148 ) ++nFedTIDm;
259  if ( fedID >= 149 && fedID <= 163 ) ++nFedTIDp;
260  if ( fedID >= 164 && fedID <= 259 ) ++nFedTECm;
261  if ( fedID >= 260 && fedID <= 355 ) ++nFedTECp;
262  if ( fedID >= 356 && fedID <= 489 ) ++nFedTOB;
263 
264  }
265  }
266  }
267  }
268 
269 }
unsigned long long m_cacheID_
std::vector< int > m_fed_in
Definition: RunInfo.h:26
bool isValid() const
Definition: ESHandle.h:45
void SiStripMonitorDigi::endLuminosityBlock ( const edm::LuminosityBlock lb,
const edm::EventSetup es 
)
override

Definition at line 285 of file SiStripMonitorDigi.cc.

References digiFailureMEs, MonitorElement::Fill(), 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 SiStripMonitorDigi::DigiFailureMEs::SubDetTotDigiProfLS.

285  {
286 
288  {
290  SBTransitionDone = true;
291  }
292 
294 
295  int nFeds [6] = { 96 , 96 , 84 , 15 , 15 , 134 }; // tec- , tec+ , tib , tid- , tid+ , tob
296  int nFedsConnected [6] = { nFedTECm , nFedTECp , nFedTIB , nFedTIDm , nFedTIDp , nFedTOB };
297 
299 
300  for (int ibin = 1; ibin<7;ibin++){
301 
303 
304  float fillvalue = 2;
305  if ( isStableBeams
306  // && (int)lb.id().luminosityBlock() > ignoreFirstNLumisections_ //ignore first X lumisections for HV rampup
308  && (float)nFedsConnected[ibin-1] / nFeds[ibin-1] > 0.5
309  && value < 50. ){
310 
311  fillvalue = 1.01;
312  }
313 
314  //account for integrated LS: fill previous bins as well
315  for ( int fillbin = (int)lb.id().luminosityBlock() - integrateNLumisections_ + 1 ; fillbin <= (int)lb.id().luminosityBlock() ; fillbin++ )
316  digiFailureMEs.SubDetDigiFailures2D->Fill( fillbin , ibin-1 , fillvalue );
317  }
318  }
319  }
320 
321 }
LuminosityBlockID id() const
void Fill(long long x)
DigiFailureMEs digiFailureMEs
Definition: value.py:1
LuminosityBlockNumber_t luminosityBlock() const
double getBinContent(int binx) const
get content of bin (1-D)
void SiStripMonitorDigi::endRun ( const edm::Run ,
const edm::EventSetup  
)
override

Definition at line 272 of file SiStripMonitorDigi.cc.

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

Definition at line 1279 of file SiStripMonitorDigi.cc.

References DEFINE_FWK_MODULE, TkHistoMap::fill(), mps_fire::i, pfDeepBoostedJetPreprocessParams_cfi::median, and parallelization::uint().

Referenced by analyze(), and fillME().

1279  {
1280 
1281  for (uint i=0; i<shots.size(); i++){
1282  if (mode==1) the_map->fill(id,shots[i].nStrips()); //mode == 1 fill with strip multiplicity
1283  if (mode==2) the_map->fill(id,shots[i].median()); // mode == 2 fill with charge median
1284  }
1285 }
void fill(DetId detid, float value)
Definition: TkHistoMap.cc:167
def uint(string)
void SiStripMonitorDigi::fillDigiADCsMEs ( int  value,
std::string  name 
)
private
void SiStripMonitorDigi::fillME ( MonitorElement ME,
float  value1 
)
inlineprivate

Definition at line 107 of file SiStripMonitorDigi.h.

References MonitorElement::Fill().

Referenced by analyze().

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

Definition at line 108 of file SiStripMonitorDigi.h.

References MonitorElement::Fill().

void SiStripMonitorDigi::fillME ( MonitorElement ME,
float  value1,
float  value2,
float  value3 
)
inlineprivate

Definition at line 109 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 971 of file SiStripMonitorDigi.cc.

References MonitorElement::Fill().

Referenced by analyze().

972 {
973  if(!me) return;
974  me->Fill(timeinorbit,value);
975 }
void Fill(long long x)
Definition: value.py:1
int SiStripMonitorDigi::getDigiSourceIndex ( uint32_t  id)
private

Definition at line 1260 of file SiStripMonitorDigi.cc.

References digi_detset_handles, and end.

Referenced by analyze(), and fillME().

1260  {
1261  int location = -1;
1262  for (unsigned int ival = 0; ival < digi_detset_handles.size(); ++ival){
1264  if(isearch != digi_detset_handles[ival]->end()) {
1265  location = ival;
1266  break;
1267  }
1268  }
1269  return location;
1270 }
std::vector< const edm::DetSetVector< SiStripDigi > * > digi_detset_handles
#define end
Definition: vmac.h:39
collection_type::const_iterator const_iterator
Definition: DetSetVector.h:104
void SiStripMonitorDigi::ResetModuleMEs ( uint32_t  idet)
private

Definition at line 926 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().

926  {
927  std::map<uint32_t, ModMEs >::iterator pos = DigiMEs.find(idet);
928  ModMEs mod_me = pos->second;
929 
930  if(Mod_On_ && moduleswitchnumdigison) mod_me.NumberOfDigis->Reset();
931  if(Mod_On_ && moduleswitchnumdigispstripon) mod_me.NumberOfDigisPerStrip ->Reset();
932  if(Mod_On_ && moduleswitchadchotteston) mod_me.ADCsHottestStrip->Reset();
933  if(Mod_On_ && moduleswitchadccooleston) mod_me.ADCsCoolestStrip->Reset();
934  if(Mod_On_ && moduleswitchdigiadcson) mod_me.DigiADCs->Reset();
935  if(Mod_On_ && moduleswitchstripoccupancyon) mod_me.StripOccupancy->Reset();
936 
937 }
std::map< uint32_t, ModMEs > DigiMEs

Member Data Documentation

edm::InputTag SiStripMonitorDigi::apvPhaseProducer_
private

Definition at line 216 of file SiStripMonitorDigi.h.

Referenced by SiStripMonitorDigi().

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

Definition at line 219 of file SiStripMonitorDigi.h.

Referenced by analyze(), and SiStripMonitorDigi().

bool SiStripMonitorDigi::calculate_strip_occupancy
private

Definition at line 127 of file SiStripMonitorDigi.h.

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

Definition at line 211 of file SiStripMonitorDigi.h.

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

SiStripDCSStatus* SiStripMonitorDigi::dcsStatus_
private

Definition at line 222 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 137 of file SiStripMonitorDigi.h.

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

Definition at line 138 of file SiStripMonitorDigi.h.

Referenced by analyze(), and getDigiSourceIndex().

DigiFailureMEs SiStripMonitorDigi::digiFailureMEs
private

Definition at line 133 of file SiStripMonitorDigi.h.

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

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

Definition at line 126 of file SiStripMonitorDigi.h.

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

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

Definition at line 125 of file SiStripMonitorDigi.h.

Referenced by analyze(), and SiStripMonitorDigi().

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

Definition at line 124 of file SiStripMonitorDigi.h.

Referenced by analyze(), and SiStripMonitorDigi().

bool SiStripMonitorDigi::digitkhistomapon
private

Definition at line 206 of file SiStripMonitorDigi.h.

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

int SiStripMonitorDigi::eventNb
private

Definition at line 149 of file SiStripMonitorDigi.h.

Referenced by analyze(), and SiStripMonitorDigi().

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

Definition at line 136 of file SiStripMonitorDigi.h.

Referenced by analyze(), and createMEs().

bool SiStripMonitorDigi::globalsummaryapvshotson
private

Definition at line 153 of file SiStripMonitorDigi.h.

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

bool SiStripMonitorDigi::globalswitchapvshotsApvon
private

Definition at line 187 of file SiStripMonitorDigi.h.

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

bool SiStripMonitorDigi::globalswitchapvshotsonprof
private

Definition at line 185 of file SiStripMonitorDigi.h.

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

bool SiStripMonitorDigi::globalswitchchargemedianapvshotson
private

Definition at line 186 of file SiStripMonitorDigi.h.

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

bool SiStripMonitorDigi::globalswitchnapvshotson
private

Definition at line 183 of file SiStripMonitorDigi.h.

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

bool SiStripMonitorDigi::globalswitchNDigisFEDID
private

Definition at line 188 of file SiStripMonitorDigi.h.

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

bool SiStripMonitorDigi::globalswitchnstripsapvshotson
private

Definition at line 184 of file SiStripMonitorDigi.h.

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

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

Definition at line 220 of file SiStripMonitorDigi.h.

Referenced by analyze(), and SiStripMonitorDigi().

edm::InputTag SiStripMonitorDigi::historyProducer_
private

Definition at line 215 of file SiStripMonitorDigi.h.

Referenced by SiStripMonitorDigi().

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

Definition at line 218 of file SiStripMonitorDigi.h.

Referenced by analyze(), and SiStripMonitorDigi().

int SiStripMonitorDigi::ignoreFirstNLumisections_
private

Definition at line 192 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 129 of file SiStripMonitorDigi.h.

Referenced by analyze(), and createMEs().

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

Definition at line 130 of file SiStripMonitorDigi.h.

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

bool SiStripMonitorDigi::layerswitchadccooleston
private

Definition at line 158 of file SiStripMonitorDigi.h.

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

bool SiStripMonitorDigi::layerswitchadchotteston
private

Definition at line 157 of file SiStripMonitorDigi.h.

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

bool SiStripMonitorDigi::layerswitchdigiadcprofon
private

Definition at line 162 of file SiStripMonitorDigi.h.

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

bool SiStripMonitorDigi::layerswitchdigiadcson
private

Definition at line 159 of file SiStripMonitorDigi.h.

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

bool SiStripMonitorDigi::layerswitchnumdigisapvon
private

Definition at line 156 of file SiStripMonitorDigi.h.

bool SiStripMonitorDigi::layerswitchnumdigison
private

Definition at line 155 of file SiStripMonitorDigi.h.

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

bool SiStripMonitorDigi::layerswitchnumdigisprofon
private

Definition at line 161 of file SiStripMonitorDigi.h.

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

bool SiStripMonitorDigi::layerswitchstripoccupancyon
private

Definition at line 160 of file SiStripMonitorDigi.h.

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

unsigned long long SiStripMonitorDigi::m_cacheID_
private

Definition at line 140 of file SiStripMonitorDigi.h.

Referenced by bookHistograms(), and dqmBeginRun().

bool SiStripMonitorDigi::m_trendVs10LS
private

Definition at line 213 of file SiStripMonitorDigi.h.

Referenced by analyze(), and SiStripMonitorDigi().

MonitorElement * SiStripMonitorDigi::MedianChargeApvShotsGlobal
private

Definition at line 145 of file SiStripMonitorDigi.h.

Referenced by analyze(), and createMEs().

bool SiStripMonitorDigi::Mod_On_
private

Definition at line 204 of file SiStripMonitorDigi.h.

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

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

Definition at line 142 of file SiStripMonitorDigi.h.

bool SiStripMonitorDigi::moduleswitchadccooleston
private

Definition at line 167 of file SiStripMonitorDigi.h.

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

bool SiStripMonitorDigi::moduleswitchadchotteston
private

Definition at line 166 of file SiStripMonitorDigi.h.

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

bool SiStripMonitorDigi::moduleswitchdigiadcson
private

Definition at line 168 of file SiStripMonitorDigi.h.

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

bool SiStripMonitorDigi::moduleswitchnumdigison
private

Definition at line 164 of file SiStripMonitorDigi.h.

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

bool SiStripMonitorDigi::moduleswitchnumdigispstripon
private

Definition at line 165 of file SiStripMonitorDigi.h.

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

bool SiStripMonitorDigi::moduleswitchstripoccupancyon
private

Definition at line 169 of file SiStripMonitorDigi.h.

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

TString SiStripMonitorDigi::name
private

Definition at line 135 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 145 of file SiStripMonitorDigi.h.

Referenced by analyze(), and createMEs().

MonitorElement* SiStripMonitorDigi::NApvShotsGlobal
private

Definition at line 145 of file SiStripMonitorDigi.h.

Referenced by analyze(), and createMEs().

MonitorElement * SiStripMonitorDigi::NApvShotsGlobalProf
private

Definition at line 145 of file SiStripMonitorDigi.h.

Referenced by analyze(), and createMEs().

int SiStripMonitorDigi::nFedTECm
private

Definition at line 200 of file SiStripMonitorDigi.h.

Referenced by dqmBeginRun(), and endLuminosityBlock().

int SiStripMonitorDigi::nFedTECp
private

Definition at line 199 of file SiStripMonitorDigi.h.

Referenced by dqmBeginRun(), and endLuminosityBlock().

int SiStripMonitorDigi::nFedTIB
private

Definition at line 196 of file SiStripMonitorDigi.h.

Referenced by dqmBeginRun(), and endLuminosityBlock().

int SiStripMonitorDigi::nFedTIDm
private

Definition at line 198 of file SiStripMonitorDigi.h.

Referenced by dqmBeginRun(), and endLuminosityBlock().

int SiStripMonitorDigi::nFedTIDp
private

Definition at line 197 of file SiStripMonitorDigi.h.

Referenced by dqmBeginRun(), and endLuminosityBlock().

int SiStripMonitorDigi::nFedTOB
private

Definition at line 201 of file SiStripMonitorDigi.h.

Referenced by dqmBeginRun(), and endLuminosityBlock().

MonitorElement* SiStripMonitorDigi::NumberOfFEDDigis = 0

Definition at line 96 of file SiStripMonitorDigi.h.

Referenced by analyze(), and createMEs().

bool SiStripMonitorDigi::reset_each_run
private

Definition at line 127 of file SiStripMonitorDigi.h.

Referenced by bookHistograms(), and createMEs().

int SiStripMonitorDigi::runNb
private

Definition at line 149 of file SiStripMonitorDigi.h.

Referenced by analyze().

int SiStripMonitorDigi::SBDeclaredAt
private

Definition at line 194 of file SiStripMonitorDigi.h.

Referenced by endLuminosityBlock(), and SiStripMonitorDigi().

bool SiStripMonitorDigi::SBTransitionDone
private

Definition at line 195 of file SiStripMonitorDigi.h.

Referenced by endLuminosityBlock(), and SiStripMonitorDigi().

bool SiStripMonitorDigi::select_all_detectors
private

Definition at line 127 of file SiStripMonitorDigi.h.

bool SiStripMonitorDigi::shotschargehistomapon
private

Definition at line 209 of file SiStripMonitorDigi.h.

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

bool SiStripMonitorDigi::shotshistomapon
private

Definition at line 207 of file SiStripMonitorDigi.h.

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

bool SiStripMonitorDigi::shotsstripshistomapon
private

Definition at line 208 of file SiStripMonitorDigi.h.

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

MonitorElement * SiStripMonitorDigi::ShotsVsTimeApvShotsGlobal
private

Definition at line 145 of file SiStripMonitorDigi.h.

Referenced by analyze(), and createMEs().

bool SiStripMonitorDigi::show_control_view
private

Definition at line 127 of file SiStripMonitorDigi.h.

bool SiStripMonitorDigi::show_mechanical_structure_view
private

Definition at line 127 of file SiStripMonitorDigi.h.

Referenced by bookHistograms(), and createMEs().

bool SiStripMonitorDigi::show_readout_view
private

Definition at line 127 of file SiStripMonitorDigi.h.

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

Definition at line 141 of file SiStripMonitorDigi.h.

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

MonitorElement * SiStripMonitorDigi::StripMultiplicityApvShotsGlobal
private

Definition at line 145 of file SiStripMonitorDigi.h.

Referenced by analyze(), and createMEs().

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

Definition at line 131 of file SiStripMonitorDigi.h.

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

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

Definition at line 132 of file SiStripMonitorDigi.h.

Referenced by analyze(), and SiStripMonitorDigi().

bool SiStripMonitorDigi::subdetswitchapvcycleprofon
private

Definition at line 172 of file SiStripMonitorDigi.h.

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

bool SiStripMonitorDigi::subdetswitchapvcycleth2on
private

Definition at line 173 of file SiStripMonitorDigi.h.

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

bool SiStripMonitorDigi::subdetswitchapvshotsApvon
private

Definition at line 181 of file SiStripMonitorDigi.h.

Referenced by analyze(), and SiStripMonitorDigi().

bool SiStripMonitorDigi::subdetswitchapvshotsonprof
private

Definition at line 179 of file SiStripMonitorDigi.h.

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

bool SiStripMonitorDigi::subdetswitchchargemedianapvshotson
private

Definition at line 180 of file SiStripMonitorDigi.h.

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

bool SiStripMonitorDigi::subdetswitchnapvshotson
private

Definition at line 177 of file SiStripMonitorDigi.h.

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

bool SiStripMonitorDigi::subdetswitchnstripsapvshotson
private

Definition at line 178 of file SiStripMonitorDigi.h.

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

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

Definition at line 171 of file SiStripMonitorDigi.h.

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

std::unique_ptr<TkHistoMap> SiStripMonitorDigi::tkmapdigi
private

Definition at line 147 of file SiStripMonitorDigi.h.

Referenced by analyze(), and createMEs().

std::unique_ptr<TkHistoMap> SiStripMonitorDigi::tkmapMedianChargeApvshots
private

Definition at line 147 of file SiStripMonitorDigi.h.

Referenced by analyze(), and createMEs().

std::unique_ptr<TkHistoMap> SiStripMonitorDigi::tkmapNApvshots
private

Definition at line 147 of file SiStripMonitorDigi.h.

Referenced by analyze(), and createMEs().

std::unique_ptr<TkHistoMap> SiStripMonitorDigi::tkmapNstripApvshot
private

Definition at line 147 of file SiStripMonitorDigi.h.

Referenced by analyze(), and createMEs().

std::string SiStripMonitorDigi::topFolderName_

Definition at line 46 of file SiStripMonitorDigi.h.

Referenced by createMEs(), and SiStripMonitorDigi().

int SiStripMonitorDigi::TotalNShots
private

Definition at line 151 of file SiStripMonitorDigi.h.

Referenced by analyze().