50 show_mechanical_structure_view(
true),
51 show_readout_view (
false),
52 show_control_view (
false),
53 select_all_detectors (
true),
54 reset_each_run (
false),
73 for (
auto const&
tag : digiProducerList) {
200 edm::LogInfo(
"SiStripMonitorDigi") <<
"SiStripMonitorDigi::bookHistograms: "
201 <<
" Creating MEs for new Cabling ";
205 edm::LogInfo(
"SiStripMonitorDigi") <<
"SiStripMonitorDigi::bookHistograms: "
206 <<
" Resetting MEs ";
207 for (std::map<uint32_t, ModMEs >::const_iterator idet =
DigiMEs.begin() ; idet!=
DigiMEs.end() ; idet++) {
242 if( es.
find( recordKey ) != 0) {
248 std::vector<int> FedsInIds= sumFED->m_fed_in;
249 for(
unsigned int it = 0; it < FedsInIds.size(); ++it) {
250 int fedID = FedsInIds[it];
253 if ( fedID >= 50 && fedID <= 133 ) ++
nFedTIB;
254 if ( fedID >= 134 && fedID <= 148 ) ++
nFedTIDm;
255 if ( fedID >= 149 && fedID <= 163 ) ++
nFedTIDp;
256 if ( fedID >= 164 && fedID <= 259 ) ++
nFedTECm;
257 if ( fedID >= 260 && fedID <= 355 ) ++
nFedTECp;
258 if ( fedID >= 356 && fedID <= 489 ) ++
nFedTOB;
291 int nFeds [6] = { 96 , 96 , 84 , 15 , 15 , 134 };
297 for (
int ibin = 1; ibin<7;ibin++){
305 && (
float)nFedsConnected[ibin-1] / nFeds[ibin-1] > 0.5
333 std::vector<uint32_t> activeDets;
340 for(std::vector<uint32_t>::iterator idets = activeDets.begin(); idets != activeDets.end(); idets++){
341 if(*idets == 0) activeDets.erase(idets);
354 std::vector<uint32_t> tibDetIds;
357 edm::LogInfo(
"SiStripTkDQM|SiStripMonitorDigi")<<
"nr. of activeDets: "<<activeDets.size();
358 for(std::vector<uint32_t>::const_iterator detid_iterator = activeDets.begin(); detid_iterator!=activeDets.end(); detid_iterator++){
360 uint32_t detid = (*detid_iterator);
379 DigiMEs.insert( std::make_pair(detid, local_modmes));
383 std::pair<std::string,int32_t> det_layer_pair = folder_organizer.
GetSubDetAndLayer(detid, tTopo);
388 std::map<std::string, LayerMEs>::iterator iLayerME =
LayerMEsMap.find(label);
391 int32_t lnumber = det_layer_pair.second;
392 std::vector<uint32_t> layerDetIds;
393 if (det_layer_pair.first ==
"TIB") {
395 }
else if (det_layer_pair.first ==
"TOB") {
397 }
else if (det_layer_pair.first ==
"TID" && lnumber > 0) {
399 }
else if (det_layer_pair.first ==
"TID" && lnumber < 0) {
401 }
else if (det_layer_pair.first ==
"TEC" && lnumber > 0) {
403 }
else if (det_layer_pair.first ==
"TEC" && lnumber < 0) {
410 folder_organizer.
setLayerFolder(detid,tTopo,det_layer_pair.second);
428 const char*
HistoName =
"Summary Mean Apv shots for SubDets";
444 const char*
HistoName =
"NApv_Shots_vs_Time";
461 const char*
HistoName =
"Number_of_Strips_in_Apv_Shots";
472 const char*
HistoName =
"Number_of_Apv_Shots";
484 const char*
HistoName =
"Apv_Shots_Charge_Median";
496 const char*
HistoName =
"Apv_Shots_Apv_Number";
511 std::stringstream
ss;
517 const char*
HistoName =
"NumberOfDigisInLastLS";
573 std::vector<edm::EDGetTokenT<edm::DetSetVector<SiStripDigi> > >::const_iterator iToken =
digiProducerTokenList.begin();
575 iter != iEnd; ++iter, ++iToken) {
582 for (std::map<std::string, SubDetMEs>::iterator iSubdet =
SubDetMEsMap.begin();
584 iSubdet->second.totNDigis = 0;
585 iSubdet->second.SubDetApvShots.clear();
593 std::vector< uint32_t > layer_dets = iterLayer->second;
594 std::map<std::string, LayerMEs>::iterator iLayerME =
LayerMEsMap.find(layer_label);
600 else local_layermes = iLayerME->second;
602 int largest_adc_layer= 0;
603 int smallest_adc_layer= 99999;
612 for (std::vector< uint32_t >::const_iterator iterDets = layer_dets.begin() ;
613 iterDets != layer_dets.end() ; iterDets++) {
617 uint32_t detid = (*iterDets);
624 std::map<uint32_t, ModMEs >::iterator pos =
DigiMEs.find(detid);
625 ModMEs local_modmes = pos->second;
635 const std::vector<APVShot>& shots = theShotFinder.
getShots();
650 if (ndigi_det == 0)
continue;
654 ndigi_layer += ndigi_det;
657 int largest_adc=(digi_detset.
data.begin())->
adc();
658 int smallest_adc=(digi_detset.
data.begin())->
adc();
662 float det_occupancy = 0.0;
665 digiIter!= digi_detset.
data.end(); digiIter++ ){
667 int this_adc = digiIter->adc();
669 if (this_adc > 0.0) det_occupancy++;
671 if(this_adc>largest_adc) largest_adc = this_adc;
672 if(this_adc<smallest_adc) smallest_adc = this_adc;
678 (local_modmes.
DigiADCs)->Fill(static_cast<float>(this_adc));
693 if (nstrips > 0 && det_occupancy > 0 ) {
694 det_occupancy = det_occupancy/nstrips;
703 if (largest_adc > largest_adc_layer) largest_adc_layer = largest_adc;
704 if (smallest_adc < smallest_adc_layer) smallest_adc_layer = smallest_adc;
729 std::map<std::string, SubDetMEs>::iterator iSubdet =
SubDetMEsMap.find(subdet_label);
731 iSubdet->second.totNDigis += ndigi_layer;
749 edm::LogInfo(
"DQMProvInfo") <<
" gtfeEvmWord inaccessible" ;
752 if ( gtfeEvmExtWord.
beamMode() == 11 )
756 for (std::map<std::string, SubDetMEs>::iterator it =
SubDetMEsMap.begin();
760 if (strcmp(it->first.c_str(),
"TEC__MINUS")==0){
762 }
else if (strcmp(it->first.c_str(),
"TEC__PLUS")==0){
764 }
else if (strcmp(it->first.c_str(),
"TIB")==0){
766 }
else if (strcmp(it->first.c_str(),
"TID__MINUS")==0){
768 }
else if (strcmp(it->first.c_str(),
"TID__PLUS")==0){
770 }
else if (strcmp(it->first.c_str(),
"TOB")==0){
776 if (strcmp(it->first.c_str(),
"TEC__MINUS")==0){
778 }
else if (strcmp(it->first.c_str(),
"TEC__PLUS")==0){
780 }
else if (strcmp(it->first.c_str(),
"TIB")==0){
782 }
else if (strcmp(it->first.c_str(),
"TID__MINUS")==0){
784 }
else if (strcmp(it->first.c_str(),
"TID__PLUS")==0){
786 }
else if (strcmp(it->first.c_str(),
"TOB")==0){
802 for (uint
i=0;
i< ShotsSize; ++
i){
832 && apv_phase_collection.
isValid()
836 long long tbx = event_history->absoluteBX();
839 for (std::map<std::string, SubDetMEs>::iterator it =
SubDetMEsMap.begin();
844 subdetmes = it->second;
847 long long tbx_corr = tbx;
853 tbx_corr -= the_phase;
862 std::map<uint32_t, ModMEs >::iterator pos =
DigiMEs.find(idet);
863 ModMEs mod_me = pos->second;
889 me->setAxisTitle(
"Event Time in Seconds",1);
898 return ibooker.
book1D(HistoName,HistoName,
909 me->
Fill(timeinorbit,value);
932 hid = hidmanager.
createHistoId(
"NumberOfDigisPerStrip",
"det",detid);
941 hid = hidmanager.
createHistoId(
"ADCsHottestStrip",
"det",detid);
949 hid = hidmanager.
createHistoId(
"ADCsCoolestStrip",
"det",detid);
965 hid = hidmanager.
createHistoId(
"StripOccupancy",
"det",detid);
979 std::map<std::string, LayerMEs>::iterator iLayerME =
LayerMEsMap.find(label);
1064 HistoName =
"TotalNumberOfDigiProfile__" +
label;
1080 HistoName =
"Digi_vs_ApvCycle__" +
label;
1096 HistoName =
"Digi_vs_ApvCycle_2D__" +
label;
1098 double h2ymax = 9999.0;
1099 double yfact = Parameters.
getParameter<
double>(
"yfactor");
1100 if(label.find(
"TIB") != std::string::npos) h2ymax = (6984.*256.)*yfact;
1101 else if (label.find(
"TID") != std::string::npos) h2ymax = (2208.*256.)*yfact;
1102 else if (label.find(
"TOB") != std::string::npos) h2ymax = (12906.*256.)*yfact;
1103 else if (label.find(
"TEC") != std::string::npos) h2ymax = (7552.*2.*256.)*yfact;
1118 HistoName =
"Number_of_Apv_Shots_" +
label;
1130 HistoName =
"Number_of_Strips_in_Apv_Shots_" +
label;
1142 HistoName =
"Apv_Shots_Charge_Median_" +
label;
1154 HistoName =
"Apv_Shots_Apv_Number_" +
label;
1169 HistoName =
"NApv_Shots_vs_Time_" +
label;
1208 for (uint
i=0;
i<moduleShots.size();
i++){
1209 subdetShots.push_back(moduleShots[
i]);
1215 for (uint
i=0;
i<shots.size();
i++){
1216 if (mode==1) the_map->
fill(
id,shots[
i].nStrips());
1217 if (mode==2) the_map->
fill(
id,shots[
i].median());
int adc(sample_type sample)
get the ADC sample (12 bits)
MonitorElement * bookME1D(DQMStore::IBooker &ibooker, const char *ParameterSetLabel, const char *HistoName)
LuminosityBlockID id() const
void ResetModuleMEs(uint32_t idet)
T getParameter(std::string const &) const
bool subdetswitchapvcycleth2on
std::map< std::string, LayerMEs > LayerMEsMap
bool moduleswitchnumdigison
int integrateNLumisections_
void createMEs(DQMStore::IBooker &ibooker, const edm::EventSetup &es)
MonitorElement * LayerNumberOfDigisTrend
std::pair< const std::string, const char * > getSubDetFolderAndTag(const uint32_t &detid, const TrackerTopology *tTopo)
MonitorElement * bookProfile(Args &&...args)
MonitorElement * SubDetTotDigiProf
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
MonitorElement * LayerStripOccupancy
bool globalswitchapvshotsonprof
bool layerswitchdigiadcson
MonitorElement * LayerADCsHottestStrip
bool layerswitchnumdigisprofon
bool subdetswitchapvshotsApvon
MonitorElement * SubDetDigiFailures2D
edm::InputTag historyProducer_
const L1GtfeExtWord gtfeWord() const
get / set GTFE word (record) in the GT readout record
void getLayerFolderName(std::stringstream &ss, uint32_t rawdetid, const TrackerTopology *tTopo, bool ring_flag=0)
MonitorElement * LayerADCsHottestStripTrend
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
MonitorElement * NApvShotsGlobalProf
std::pair< std::string, int32_t > GetSubDetAndLayer(const uint32_t &detid, const TrackerTopology *tTopo, bool ring_flag=0)
std::map< uint32_t, ModMEs > DigiMEs
std::map< std::string, std::string > SubDetPhasePartMap
MonitorElement * MedianChargeApvShotsGlobal
MonitorElement * StripMultiplicityApvShotsGlobal
TkHistoMap * tkmapNstripApvshot
bool globalsummaryapvshotson
bool layerswitchdigiadcprofon
MonitorElement * SubDetDigiApvTH2
MonitorElement * StripOccupancy
bool subdetswitchtotdigiprofon
MonitorElement * SubDetDigiApvProf
MonitorElement * LayerNumberOfDigisProfile
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
bool globalswitchnapvshotson
const eventsetup::EventSetupRecord * find(const eventsetup::EventSetupRecordKey &) const
void dqmBeginRun(const edm::Run &r, const edm::EventSetup &c) override
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
bool subdetswitchchargemedianapvshotson
std::vector< APVShot > SubDetApvShots
void setDetectorFolder(uint32_t rawdetid, const TrackerTopology *tTopo)
unsigned long long m_cacheID_
MonitorElement * SubDetNApvShotsNApvTH1
void createSubDetMEs(DQMStore::IBooker &ibooker, std::string label)
bool getStatus(edm::Event const &e, edm::EventSetup const &eSetup)
MonitorElement * NumberOfDigisPerStrip
const std::vector< APVShot > & getShots() const
bool subdetswitchapvcycleprofon
MonitorElement * ADCsCoolestStrip
vector< ParameterSet > Parameters
bool moduleswitchadchotteston
bool globalswitchapvshotsApvon
SiStripDCSStatus * dcsStatus_
const double NORBITS_PER_SECOND
edm::ESHandle< SiStripDetCabling > SiStripDetCabling_
void getTOBDetectors(const std::vector< uint32_t > &inputDetRawIds, std::vector< uint32_t > &tobDetRawIds, uint32_t layer=0, uint32_t bkw_frw=0, uint32_t rod=0) const
MonitorElement * LayerADCsCoolestStripTrend
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
MonitorElement * SubDetNStripsApvShotsTH1
bool shotsstripshistomapon
DigiFailureMEs digiFailureMEs
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
void fill(uint32_t &detid, float value)
edm::EDGetTokenT< EventWithHistory > historyProducerToken_
MonitorElement * SubDetTotDigiProfLS
void fillME(MonitorElement *ME, float value1)
MonitorElement * LayerDigiADCs
MonitorElement * LayerNumberOfDigis
MonitorElement * NApvApvShotsGlobal
MonitorElement * book1D(Args &&...args)
std::vector< const edm::DetSetVector< SiStripDigi > * > digi_detset_handles
void tag(MonitorElement *, unsigned int)
Abs< T >::type abs(const T &t)
virtual void endLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) override
bool layerswitchnumdigison
bool globalswitchnstripsapvshotson
Kind kind(void) const
Get the type of the monitor element.
std::map< std::string, SubDetMEs > SubDetMEsMap
std::string getSubdetid(uint32_t id, const TrackerTopology *tTopo, bool flag_ring)
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
MonitorElement * ADCsHottestStrip
bool shotschargehistomapon
void createLayerMEs(DQMStore::IBooker &ibooker, std::string label, int ndet)
void fillTrend(MonitorElement *me, float value, float timeinorbit)
MonitorElement * SubDetNApvShotsProf
edm::EDGetTokenT< L1GlobalTriggerEvmReadoutRecord > gtEvmToken_
MonitorElement * NApvShotsGlobal
std::vector< edm::EDGetTokenT< edm::DetSetVector< SiStripDigi > > > digiProducerTokenList
MonitorElement * LayerDigiADCProfile
bool moduleswitchstripoccupancyon
bool subdetswitchtotdigifailureon
int getDigiSourceIndex(uint32_t id)
virtual void analyze(const edm::Event &, const edm::EventSetup &) override
SiStripMonitorDigi(const edm::ParameterSet &)
edm::InputTag apvPhaseProducer_
void setLayerFolder(uint32_t rawdetid, const TrackerTopology *tTopo, int32_t layer=0, bool ring_flag=0)
void setCurrentFolder(const std::string &fullpath)
std::map< std::string, std::vector< uint32_t > > LayerDetMap
MonitorElement * NumberOfDigis
T const * product() const
MonitorElement * book2D(Args &&...args)
std::string createHistoId(std::string description, std::string id_type, uint32_t component_id)
MonitorElement * SubDetChargeMedianApvShotsTH1
bool moduleswitchadccooleston
T const * product() const
LuminosityBlockNumber_t luminosityBlock() const
virtual void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) override
bool globalswitchchargemedianapvshotson
std::string topFolderName_
bool subdetswitchnstripsapvshotson
void getTECDetectors(const std::vector< uint32_t > &inputDetRawIds, std::vector< uint32_t > &tecDetRawIds, uint32_t side=0, uint32_t wheel=0, uint32_t petal_bkw_frw=0, uint32_t petal=0, uint32_t ring=0, uint32_t ster=0) const
std::vector< edm::InputTag > digiProducerList
TkHistoMap * tkmapMedianChargeApvshots
edm::EDGetTokenT< APVCyclePhaseCollection > apvPhaseProducerToken_
double getBinContent(int binx) const
get content of bin (1-D)
bool layerswitchadchotteston
TkHistoMap * tkmapNApvshots
MonitorElement * LayerStripOccupancyTrend
bool moduleswitchnumdigispstripon
void getTIBDetectors(const std::vector< uint32_t > &inputDetRawIds, std::vector< uint32_t > &tibDetRawIds, uint32_t layer=0, uint32_t bkw_frw=0, uint32_t int_ext=0, uint32_t string=0) const
MonitorElement * LayerADCsCoolestStrip
int ignoreFirstNLumisections_
bool moduleswitchdigiadcson
bool layerswitchstripoccupancyon
MonitorElement * SubDetNApvShotsTH1
MonitorElement * bookMETrend(DQMStore::IBooker &ibooker, const char *ParameterSetLabel, const char *HistoName)
void AddApvShotsToSubDet(const std::vector< APVShot > &, std::vector< APVShot > &)
SiStripFolderOrganizer folder_organizer
void getTIDDetectors(const std::vector< uint32_t > &inputDetRawIds, std::vector< uint32_t > &tidDetRawIds, uint32_t side=0, uint32_t wheel=0, uint32_t ring=0, uint32_t ster=0) const
bool subdetswitchapvshotsonprof
MonitorElement * ShotsVsTimeApvShotsGlobal
MonitorElement * DigiADCs
volatile std::atomic< bool > shutdown_flag false
std::string createHistoLayer(std::string description, std::string id_type, std::string path, std::string flag)
collection_type::const_iterator const_iterator
collection_type::const_iterator const_iterator
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void Reset(void)
reset ME (ie. contents, errors, etc)
const cms_uint16_t beamMode() const
void FillApvShotsMap(TkHistoMap *, const std::vector< APVShot > &, uint32_t id, int)
MonitorElement * LayerDigiADCsTrend
bool show_mechanical_structure_view
bool layerswitchadccooleston
void createModuleMEs(DQMStore::IBooker &ibooker, ModMEs &mod_single, uint32_t detid)
static HCTypeTag findType(char const *iTypeName)
find a type based on the types name, if not found will return default HCTypeTag
bool subdetswitchnapvshotson
virtual void endRun(const edm::Run &, const edm::EventSetup &) override