CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
SiStripMonitorDigi Class Reference

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

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

Classes

struct  DigiFailureMEs
 
struct  LayerMEs
 
struct  ModMEs
 
struct  SubDetMEs
 

Public Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
virtual void beginLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &)
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
void dqmBeginRun (const edm::Run &r, const edm::EventSetup &c)
 
virtual void endLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &)
 
virtual void endRun (const edm::Run &, const edm::EventSetup &)
 
 SiStripMonitorDigi (const edm::ParameterSet &)
 
 ~SiStripMonitorDigi ()
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Public Attributes

std::string topFolderName_
 

Private Member Functions

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

Private Attributes

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

Additional Inherited Members

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

Detailed Description

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

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

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

Definition at line 34 of file SiStripMonitorDigi.h.

Constructor & Destructor Documentation

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

Definition at line 46 of file SiStripMonitorDigi.cc.

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

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

Definition at line 188 of file SiStripMonitorDigi.cc.

References dcsStatus_.

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

Member Function Documentation

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

Definition at line 1205 of file SiStripMonitorDigi.cc.

References i.

Referenced by analyze().

1205  {
1206 
1207  for (uint i=0; i<moduleShots.size(); i++){
1208  subdetShots.push_back(moduleShots[i]);
1209  }
1210 }
int i
Definition: DBlmapReader.cc:9
bool SiStripMonitorDigi::AllDigis ( const edm::EventSetup es)
private
void SiStripMonitorDigi::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
virtual

Implements edm::stream::EDAnalyzerBase.

Definition at line 553 of file SiStripMonitorDigi.cc.

References ecalMGPA::adc(), SiStripMonitorDigi::ModMEs::ADCsCoolestStrip, SiStripMonitorDigi::ModMEs::ADCsHottestStrip, AddApvShotsToSubDet(), apvPhaseProducerToken_, L1GtfeExtWord::beamMode(), createTrendMEs, edm::DetSet< T >::data, dcsStatus_, cond::rpcobgas::detid, digi_detset_handles, SiStripMonitorDigi::ModMEs::DigiADCs, digiFailureMEs, DigiMEs, digiProducerList, digiProducerTokenList, digitkhistomapon, eventNb, edm::HandleBase::failedToGet(), TkHistoMap::fill(), MonitorElement::Fill(), HcalObjRepresent::Fill(), FillApvShotsMap(), fillME(), fillTrend(), folder_organizer, edm::EventSetup::get(), edm::Event::getByToken(), getDigiSourceIndex(), APVShotFinder::getShots(), SiStripDCSStatus::getStatus(), SiStripFolderOrganizer::getSubDetFolderAndTag(), globalsummaryapvshotson, globalswitchapvshotsApvon, globalswitchapvshotsonprof, globalswitchchargemedianapvshotson, globalswitchnapvshotson, globalswitchnstripsapvshotson, gtEvmToken_, L1GlobalTriggerEvmReadoutRecord::gtfeWord(), historyProducerToken_, i, edm::EventBase::id(), APVCyclePhaseCollection::invalid, isStableBeams, edm::HandleBase::isValid(), getDQMSummary::iter, 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, python.multivaluedict::map(), MedianChargeApvShotsGlobal, Mod_On_, moduleswitchadccooleston, moduleswitchadchotteston, moduleswitchdigiadcson, moduleswitchnumdigison, moduleswitchnumdigispstripon, moduleswitchstripoccupancyon, APVCyclePhaseCollection::multiphase, NApvApvShotsGlobal, NApvShotsGlobal, NApvShotsGlobalProf, APVCyclePhaseCollection::nopartition, NORBITS_PER_SECOND, NULL, SiStripMonitorDigi::ModMEs::NumberOfDigis, SiStripMonitorDigi::ModMEs::NumberOfDigisPerStrip, edm::EventBase::orbitNumber(), edm::Handle< T >::product(), edm::ESHandle< class >::product(), edm::EventID::run(), runNb, shotschargehistomapon, shotshistomapon, shotsstripshistomapon, ShotsVsTimeApvShotsGlobal, SiStripDetCabling_, AlCaHLTBitMon_QueryRunRegistry::string, StripMultiplicityApvShotsGlobal, SiStripMonitorDigi::ModMEs::StripOccupancy, SiStripMonitorDigi::SubDetMEs::SubDetApvShots, SiStripMonitorDigi::SubDetMEs::SubDetChargeMedianApvShotsTH1, SiStripMonitorDigi::SubDetMEs::SubDetDigiApvProf, SiStripMonitorDigi::SubDetMEs::SubDetDigiApvTH2, SubDetMEsMap, SiStripMonitorDigi::SubDetMEs::SubDetNApvShotsNApvTH1, SiStripMonitorDigi::SubDetMEs::SubDetNApvShotsProf, SiStripMonitorDigi::SubDetMEs::SubDetNApvShotsTH1, SiStripMonitorDigi::SubDetMEs::SubDetNStripsApvShotsTH1, SubDetPhasePartMap, subdetswitchapvcycleprofon, subdetswitchapvcycleth2on, subdetswitchapvshotsApvon, subdetswitchapvshotsonprof, subdetswitchchargemedianapvshotson, subdetswitchnapvshotson, subdetswitchnstripsapvshotson, subdetswitchtotdigifailureon, subdetswitchtotdigiprofon, SiStripMonitorDigi::SubDetMEs::SubDetTotDigiProf, SiStripMonitorDigi::DigiFailureMEs::SubDetTotDigiProfLS, tkmapdigi, tkmapMedianChargeApvshots, tkmapNApvshots, tkmapNstripApvshot, TotalNShots, and SiStripMonitorDigi::SubDetMEs::totNDigis.

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

Reimplemented from edm::stream::EDAnalyzerBase.

Definition at line 271 of file SiStripMonitorDigi.cc.

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

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

Implements DQMEDAnalyzer.

Definition at line 193 of file SiStripMonitorDigi.cc.

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

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

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

Referenced by createLayerMEs(), and createModuleMEs().

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

Definition at line 873 of file SiStripMonitorDigi.cc.

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

Referenced by createLayerMEs().

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

Definition at line 976 of file SiStripMonitorDigi.cc.

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

Referenced by createMEs().

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

Definition at line 319 of file SiStripMonitorDigi.cc.

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

Referenced by bookHistograms().

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

Referenced by createMEs().

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

Definition at line 1044 of file SiStripMonitorDigi.cc.

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

Referenced by createMEs().

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

Reimplemented from DQMEDAnalyzer.

Definition at line 218 of file SiStripMonitorDigi.cc.

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

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

Reimplemented from edm::stream::EDAnalyzerBase.

Definition at line 280 of file SiStripMonitorDigi.cc.

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

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

Reimplemented from edm::stream::EDAnalyzerBase.

Definition at line 267 of file SiStripMonitorDigi.cc.

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

Definition at line 1212 of file SiStripMonitorDigi.cc.

References TkHistoMap::fill(), and i.

Referenced by analyze().

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

Definition at line 104 of file SiStripMonitorDigi.h.

References MonitorElement::Fill().

Referenced by analyze().

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

Definition at line 105 of file SiStripMonitorDigi.h.

References MonitorElement::Fill().

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

Definition at line 106 of file SiStripMonitorDigi.h.

References MonitorElement::Fill().

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

Definition at line 107 of file SiStripMonitorDigi.h.

References MonitorElement::Fill().

107 {if (ME!=0)ME->Fill(value1,value2,value3,value4);}
void Fill(long long x)
void SiStripMonitorDigi::fillTrend ( MonitorElement me,
float  value,
float  timeinorbit 
)
private

Definition at line 905 of file SiStripMonitorDigi.cc.

References MonitorElement::Fill().

Referenced by analyze().

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

Definition at line 1193 of file SiStripMonitorDigi.cc.

References digi_detset_handles, and end.

Referenced by analyze().

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

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

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

Member Data Documentation

edm::InputTag SiStripMonitorDigi::apvPhaseProducer_
private

Definition at line 213 of file SiStripMonitorDigi.h.

Referenced by SiStripMonitorDigi().

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

Definition at line 216 of file SiStripMonitorDigi.h.

Referenced by analyze(), and SiStripMonitorDigi().

bool SiStripMonitorDigi::calculate_strip_occupancy
private

Definition at line 126 of file SiStripMonitorDigi.h.

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

Definition at line 210 of file SiStripMonitorDigi.h.

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

SiStripDCSStatus* SiStripMonitorDigi::dcsStatus_
private

Definition at line 219 of file SiStripMonitorDigi.h.

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

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

Definition at line 136 of file SiStripMonitorDigi.h.

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

Definition at line 137 of file SiStripMonitorDigi.h.

Referenced by analyze(), and getDigiSourceIndex().

DigiFailureMEs SiStripMonitorDigi::digiFailureMEs
private

Definition at line 132 of file SiStripMonitorDigi.h.

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

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

Definition at line 125 of file SiStripMonitorDigi.h.

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

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

Definition at line 124 of file SiStripMonitorDigi.h.

Referenced by analyze(), and SiStripMonitorDigi().

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

Definition at line 123 of file SiStripMonitorDigi.h.

Referenced by analyze(), and SiStripMonitorDigi().

bool SiStripMonitorDigi::digitkhistomapon
private

Definition at line 205 of file SiStripMonitorDigi.h.

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

DQMStore* SiStripMonitorDigi::dqmStore_
private

Definition at line 121 of file SiStripMonitorDigi.h.

Referenced by endLuminosityBlock().

int SiStripMonitorDigi::eventNb
private

Definition at line 148 of file SiStripMonitorDigi.h.

Referenced by analyze(), and SiStripMonitorDigi().

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

Definition at line 135 of file SiStripMonitorDigi.h.

Referenced by analyze(), and createMEs().

bool SiStripMonitorDigi::globalsummaryapvshotson
private

Definition at line 152 of file SiStripMonitorDigi.h.

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

bool SiStripMonitorDigi::globalswitchapvshotsApvon
private

Definition at line 186 of file SiStripMonitorDigi.h.

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

bool SiStripMonitorDigi::globalswitchapvshotsonprof
private

Definition at line 184 of file SiStripMonitorDigi.h.

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

bool SiStripMonitorDigi::globalswitchchargemedianapvshotson
private

Definition at line 185 of file SiStripMonitorDigi.h.

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

bool SiStripMonitorDigi::globalswitchnapvshotson
private

Definition at line 182 of file SiStripMonitorDigi.h.

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

bool SiStripMonitorDigi::globalswitchnstripsapvshotson
private

Definition at line 183 of file SiStripMonitorDigi.h.

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

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

Definition at line 217 of file SiStripMonitorDigi.h.

Referenced by analyze(), and SiStripMonitorDigi().

edm::InputTag SiStripMonitorDigi::historyProducer_
private

Definition at line 212 of file SiStripMonitorDigi.h.

Referenced by SiStripMonitorDigi().

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

Definition at line 215 of file SiStripMonitorDigi.h.

Referenced by analyze(), and SiStripMonitorDigi().

int SiStripMonitorDigi::ignoreFirstNLumisections_
private

Definition at line 191 of file SiStripMonitorDigi.h.

Referenced by endLuminosityBlock(), and SiStripMonitorDigi().

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

Definition at line 128 of file SiStripMonitorDigi.h.

Referenced by analyze(), and createMEs().

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

Definition at line 129 of file SiStripMonitorDigi.h.

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

bool SiStripMonitorDigi::layerswitchadccooleston
private

Definition at line 157 of file SiStripMonitorDigi.h.

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

bool SiStripMonitorDigi::layerswitchadchotteston
private

Definition at line 156 of file SiStripMonitorDigi.h.

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

bool SiStripMonitorDigi::layerswitchdigiadcprofon
private

Definition at line 161 of file SiStripMonitorDigi.h.

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

bool SiStripMonitorDigi::layerswitchdigiadcson
private

Definition at line 158 of file SiStripMonitorDigi.h.

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

bool SiStripMonitorDigi::layerswitchnumdigisapvon
private

Definition at line 155 of file SiStripMonitorDigi.h.

bool SiStripMonitorDigi::layerswitchnumdigison
private

Definition at line 154 of file SiStripMonitorDigi.h.

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

bool SiStripMonitorDigi::layerswitchnumdigisprofon
private

Definition at line 160 of file SiStripMonitorDigi.h.

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

bool SiStripMonitorDigi::layerswitchstripoccupancyon
private

Definition at line 159 of file SiStripMonitorDigi.h.

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

unsigned long long SiStripMonitorDigi::m_cacheID_
private

Definition at line 139 of file SiStripMonitorDigi.h.

Referenced by bookHistograms(), and dqmBeginRun().

MonitorElement * SiStripMonitorDigi::MedianChargeApvShotsGlobal
private

Definition at line 144 of file SiStripMonitorDigi.h.

Referenced by analyze(), and createMEs().

bool SiStripMonitorDigi::Mod_On_
private

Definition at line 203 of file SiStripMonitorDigi.h.

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

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

Definition at line 141 of file SiStripMonitorDigi.h.

bool SiStripMonitorDigi::moduleswitchadccooleston
private

Definition at line 166 of file SiStripMonitorDigi.h.

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

bool SiStripMonitorDigi::moduleswitchadchotteston
private

Definition at line 165 of file SiStripMonitorDigi.h.

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

bool SiStripMonitorDigi::moduleswitchdigiadcson
private

Definition at line 167 of file SiStripMonitorDigi.h.

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

bool SiStripMonitorDigi::moduleswitchnumdigison
private

Definition at line 163 of file SiStripMonitorDigi.h.

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

bool SiStripMonitorDigi::moduleswitchnumdigispstripon
private

Definition at line 164 of file SiStripMonitorDigi.h.

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

bool SiStripMonitorDigi::moduleswitchstripoccupancyon
private

Definition at line 168 of file SiStripMonitorDigi.h.

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

TString SiStripMonitorDigi::name
private

Definition at line 134 of file SiStripMonitorDigi.h.

Referenced by ElectronMVAID.ElectronMVAID::__call__(), dirstructure.Directory::__create_pie_image(), dqm_interfaces.DirID::__eq__(), dirstructure.Directory::__get_full_path(), dirstructure.Comparison::__get_img_name(), dataset.Dataset::__getDataType(), dataset.Dataset::__getFileInfoList(), cuy.divideElement::__init__(), cuy.plotElement::__init__(), cuy.additionElement::__init__(), cuy.superimposeElement::__init__(), cuy.graphElement::__init__(), 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.CFG::__str__(), counter.Counter::__str__(), average.Average::__str__(), core.autovars.NTupleObjectType::allVars(), dirstructure.Directory::calcStats(), python.rootplot.utilities.Hist::divide(), python.rootplot.utilities.Hist::divide_wilson(), 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(), 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(), python.rootplot.utilities.Hist::TGraph(), python.rootplot.utilities.Hist::TH1F(), Vispa.Views.PropertyView.Property::valueChanged(), counter.Counter::write(), and average.Average::write().

MonitorElement * SiStripMonitorDigi::NApvApvShotsGlobal
private

Definition at line 144 of file SiStripMonitorDigi.h.

Referenced by analyze(), and createMEs().

MonitorElement* SiStripMonitorDigi::NApvShotsGlobal
private

Definition at line 144 of file SiStripMonitorDigi.h.

Referenced by analyze(), and createMEs().

MonitorElement * SiStripMonitorDigi::NApvShotsGlobalProf
private

Definition at line 144 of file SiStripMonitorDigi.h.

Referenced by analyze(), and createMEs().

int SiStripMonitorDigi::nFedTECm
private

Definition at line 199 of file SiStripMonitorDigi.h.

Referenced by dqmBeginRun(), and endLuminosityBlock().

int SiStripMonitorDigi::nFedTECp
private

Definition at line 198 of file SiStripMonitorDigi.h.

Referenced by dqmBeginRun(), and endLuminosityBlock().

int SiStripMonitorDigi::nFedTIB
private

Definition at line 195 of file SiStripMonitorDigi.h.

Referenced by dqmBeginRun(), and endLuminosityBlock().

int SiStripMonitorDigi::nFedTIDm
private

Definition at line 197 of file SiStripMonitorDigi.h.

Referenced by dqmBeginRun(), and endLuminosityBlock().

int SiStripMonitorDigi::nFedTIDp
private

Definition at line 196 of file SiStripMonitorDigi.h.

Referenced by dqmBeginRun(), and endLuminosityBlock().

int SiStripMonitorDigi::nFedTOB
private

Definition at line 200 of file SiStripMonitorDigi.h.

Referenced by dqmBeginRun(), and endLuminosityBlock().

bool SiStripMonitorDigi::reset_each_run
private

Definition at line 126 of file SiStripMonitorDigi.h.

Referenced by bookHistograms(), and createMEs().

int SiStripMonitorDigi::runNb
private

Definition at line 148 of file SiStripMonitorDigi.h.

Referenced by analyze().

int SiStripMonitorDigi::SBDeclaredAt
private

Definition at line 193 of file SiStripMonitorDigi.h.

Referenced by endLuminosityBlock(), and SiStripMonitorDigi().

bool SiStripMonitorDigi::SBTransitionDone
private

Definition at line 194 of file SiStripMonitorDigi.h.

Referenced by endLuminosityBlock(), and SiStripMonitorDigi().

bool SiStripMonitorDigi::select_all_detectors
private

Definition at line 126 of file SiStripMonitorDigi.h.

bool SiStripMonitorDigi::shotschargehistomapon
private

Definition at line 208 of file SiStripMonitorDigi.h.

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

bool SiStripMonitorDigi::shotshistomapon
private

Definition at line 206 of file SiStripMonitorDigi.h.

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

bool SiStripMonitorDigi::shotsstripshistomapon
private

Definition at line 207 of file SiStripMonitorDigi.h.

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

MonitorElement * SiStripMonitorDigi::ShotsVsTimeApvShotsGlobal
private

Definition at line 144 of file SiStripMonitorDigi.h.

Referenced by analyze(), and createMEs().

bool SiStripMonitorDigi::show_control_view
private

Definition at line 126 of file SiStripMonitorDigi.h.

bool SiStripMonitorDigi::show_mechanical_structure_view
private

Definition at line 126 of file SiStripMonitorDigi.h.

Referenced by bookHistograms(), and createMEs().

bool SiStripMonitorDigi::show_readout_view
private

Definition at line 126 of file SiStripMonitorDigi.h.

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

Definition at line 140 of file SiStripMonitorDigi.h.

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

MonitorElement * SiStripMonitorDigi::StripMultiplicityApvShotsGlobal
private

Definition at line 144 of file SiStripMonitorDigi.h.

Referenced by analyze(), and createMEs().

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

Definition at line 130 of file SiStripMonitorDigi.h.

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

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

Definition at line 131 of file SiStripMonitorDigi.h.

Referenced by analyze(), and SiStripMonitorDigi().

bool SiStripMonitorDigi::subdetswitchapvcycleprofon
private

Definition at line 171 of file SiStripMonitorDigi.h.

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

bool SiStripMonitorDigi::subdetswitchapvcycleth2on
private

Definition at line 172 of file SiStripMonitorDigi.h.

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

bool SiStripMonitorDigi::subdetswitchapvshotsApvon
private

Definition at line 180 of file SiStripMonitorDigi.h.

Referenced by analyze(), and SiStripMonitorDigi().

bool SiStripMonitorDigi::subdetswitchapvshotsonprof
private

Definition at line 178 of file SiStripMonitorDigi.h.

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

bool SiStripMonitorDigi::subdetswitchchargemedianapvshotson
private

Definition at line 179 of file SiStripMonitorDigi.h.

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

bool SiStripMonitorDigi::subdetswitchnapvshotson
private

Definition at line 176 of file SiStripMonitorDigi.h.

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

bool SiStripMonitorDigi::subdetswitchnstripsapvshotson
private

Definition at line 177 of file SiStripMonitorDigi.h.

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

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

Definition at line 170 of file SiStripMonitorDigi.h.

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

TkHistoMap* SiStripMonitorDigi::tkmapdigi
private

Definition at line 146 of file SiStripMonitorDigi.h.

Referenced by analyze(), and createMEs().

TkHistoMap * SiStripMonitorDigi::tkmapMedianChargeApvshots
private

Definition at line 146 of file SiStripMonitorDigi.h.

Referenced by analyze(), and createMEs().

TkHistoMap * SiStripMonitorDigi::tkmapNApvshots
private

Definition at line 146 of file SiStripMonitorDigi.h.

Referenced by analyze(), and createMEs().

TkHistoMap * SiStripMonitorDigi::tkmapNstripApvshot
private

Definition at line 146 of file SiStripMonitorDigi.h.

Referenced by analyze(), and createMEs().

std::string SiStripMonitorDigi::topFolderName_

Definition at line 45 of file SiStripMonitorDigi.h.

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

int SiStripMonitorDigi::TotalNShots
private

Definition at line 150 of file SiStripMonitorDigi.h.

Referenced by analyze().