CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
SiStripHitEffFromCalibTree Class Reference
Inheritance diagram for SiStripHitEffFromCalibTree:
ConditionDBWriter< SiStripBadStrip > edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 SiStripHitEffFromCalibTree (const edm::ParameterSet &)
 
 ~SiStripHitEffFromCalibTree () override=default
 
- Public Member Functions inherited from ConditionDBWriter< SiStripBadStrip >
 ConditionDBWriter (const edm::ParameterSet &iConfig)
 
 ~ConditionDBWriter () override
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources >
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const *> const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

void algoAnalyze (const edm::Event &e, const edm::EventSetup &c) override
 
void computeEff (vector< TH1F *> &vhfound, vector< TH1F *> &vhtotal, string name)
 
TString getLayerSideName (Long_t k)
 
std::unique_ptr< SiStripBadStripgetNewObject () override
 
void makeHotColdMaps ()
 
void makeSQLite ()
 
void makeSummary ()
 
void makeSummaryVsBx ()
 
void makeSummaryVsCM ()
 
void makeSummaryVsLumi ()
 
void makeTKMap (bool autoTagging)
 
void setBadComponents (int i, int component, SiStripQuality::BadComponent &BC, std::stringstream ssV[4][19], int NBadComponent[4][19][4])
 
void totalStatistics ()
 

Private Attributes

int alllayerfound [35]
 
int alllayertotal [35]
 
bool autoIneffModTagging_
 
map< unsigned int, double > BadModules
 
string badModulesFile_
 
unsigned int bunchX_
 
TH1F * bxHisto
 
TTree * calibTree_
 
vector< string > calibTreeFileNames_
 
unsigned int clusterMatchingMethod_
 
float clusterTrajDist_
 
SiStripDetInfo detInfo_
 
float effPlotMin_
 
map< pair< unsigned int, unsigned int >, array< double, 3 > > eventInfos
 
edm::FileInPath fileInPath_
 
edm::Service< TFileServicefs
 
int goodlayerfound [35]
 
int goodlayertotal [35]
 
vector< hithits [23]
 
vector< TH2F * > HotColdMaps
 
TH1F * instLumiHisto
 
long layerfound [23]
 
map< unsigned int, vector< int > > layerfound_perBx
 
vector< TH1F * > layerfound_vsBX
 
vector< TH1F * > layerfound_vsCM
 
vector< TH1F * > layerfound_vsLumi
 
vector< TH1F * > layerfound_vsPU
 
long layertotal [23]
 
map< unsigned int, vector< int > > layertotal_perBx
 
vector< TH1F * > layertotal_vsBX
 
vector< TH1F * > layertotal_vsCM
 
vector< TH1F * > layertotal_vsLumi
 
vector< TH1F * > layertotal_vsPU
 
map< unsigned int, pair< unsigned int, unsigned int > > modCounter [23]
 
unsigned int nModsMin_
 
unsigned int nTEClayers
 
TH1F * PUHisto
 
SiStripQualityquality_
 
float resXSig_
 
bool showEndcapSides_
 
bool showOnlyGoodModules_
 
bool showRings_
 
bool showTOB6TEC9_
 
unsigned int spaceBetweenTrains_
 
float stripsApvEdge_
 
float threshold_
 
TString title_
 
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecordtkGeomToken_
 
TrackerMaptkmap
 
TrackerMaptkmapbad
 
TrackerMaptkmapden
 
TrackerMaptkmapeff
 
float tkMapMin_
 
TrackerMaptkmapnum
 
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcdtTopoToken_
 
bool useCM_
 
bool useOnlyHighPurityTracks_
 

Static Private Attributes

static constexpr double nBxInAnOrbit_ = 3565
 
static constexpr int siStripLayers_ = 22
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from ConditionDBWriter< SiStripBadStrip >
static void fillPSetDescription (edm::ParameterSetDescription &desc)
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from ConditionDBWriter< SiStripBadStrip >
void setDoStore (const bool doStore)
 When set to false the payload will not be written to the db. More...
 
void storeOnDbNow ()
 
cond::Time_t timeOfLastIOV ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
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)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

Definition at line 95 of file SiStripHitEffFromCalibTree.cc.

Constructor & Destructor Documentation

◆ SiStripHitEffFromCalibTree()

SiStripHitEffFromCalibTree::SiStripHitEffFromCalibTree ( const edm::ParameterSet conf)
explicit

Definition at line 192 of file SiStripHitEffFromCalibTree.cc.

References autoIneffModTagging_, badModulesFile_, bunchX_, calibTreeFileNames_, clusterMatchingMethod_, clusterTrajDist_, detInfo_, effPlotMin_, fileInPath_, edm::FileInPath::fullPath(), edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), TFileService::kSharedResource, nModsMin_, nTEClayers, quality_, SiStripDetInfoFileReader::read(), resXSig_, showEndcapSides_, showOnlyGoodModules_, showRings_, showTOB6TEC9_, AlCaHarvesting_cff::SiStripQuality, spaceBetweenTrains_, AlCaHLTBitMon_QueryRunRegistry::string, stripsApvEdge_, threshold_, title_, tkMapMin_, useCM_, and useOnlyHighPurityTracks_.

197  usesResource(TFileService::kSharedResource);
198  calibTreeFileNames_ = conf.getUntrackedParameter<vector<std::string> >("CalibTreeFilenames");
199  threshold_ = conf.getParameter<double>("Threshold");
200  nModsMin_ = conf.getParameter<int>("nModsMin");
201  badModulesFile_ = conf.getUntrackedParameter<std::string>("BadModulesFile", "");
202  autoIneffModTagging_ = conf.getUntrackedParameter<bool>("AutoIneffModTagging", false);
203  clusterMatchingMethod_ = conf.getUntrackedParameter<int>("ClusterMatchingMethod", 0);
204  resXSig_ = conf.getUntrackedParameter<double>("ResXSig", -1);
205  clusterTrajDist_ = conf.getUntrackedParameter<double>("ClusterTrajDist", 64.0);
206  stripsApvEdge_ = conf.getUntrackedParameter<double>("StripsApvEdge", 10.0);
207  useOnlyHighPurityTracks_ = conf.getUntrackedParameter<bool>("UseOnlyHighPurityTracks", true);
208  bunchX_ = conf.getUntrackedParameter<int>("BunchCrossing", 0);
209  spaceBetweenTrains_ = conf.getUntrackedParameter<int>("SpaceBetweenTrains", 25);
210  useCM_ = conf.getUntrackedParameter<bool>("UseCommonMode", false);
211  showEndcapSides_ = conf.getUntrackedParameter<bool>("ShowEndcapSides", true);
212  showRings_ = conf.getUntrackedParameter<bool>("ShowRings", false);
213  showTOB6TEC9_ = conf.getUntrackedParameter<bool>("ShowTOB6TEC9", false);
214  showOnlyGoodModules_ = conf.getUntrackedParameter<bool>("ShowOnlyGoodModules", false);
215  tkMapMin_ = conf.getUntrackedParameter<double>("TkMapMin", 0.9);
216  effPlotMin_ = conf.getUntrackedParameter<double>("EffPlotMin", 0.9);
217  title_ = conf.getParameter<std::string>("Title");
219 
220  nTEClayers = 9; // number of wheels
221  if (showRings_)
222  nTEClayers = 7; // number of rings
223 
225 }
static const std::string kSharedResource
Definition: TFileService.h:76
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
std::string fullPath() const
Definition: FileInPath.cc:161
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
T getUntrackedParameter(std::string const &, T const &) const
SiStripDetInfo read(std::string filePath)
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
static constexpr char const *const kDefaultFile

◆ ~SiStripHitEffFromCalibTree()

SiStripHitEffFromCalibTree::~SiStripHitEffFromCalibTree ( )
overridedefault

Member Function Documentation

◆ algoAnalyze()

void SiStripHitEffFromCalibTree::algoAnalyze ( const edm::Event e,
const edm::EventSetup c 
)
overrideprivatevirtual

Reimplemented from ConditionDBWriter< SiStripBadStrip >.

Definition at line 227 of file SiStripHitEffFromCalibTree.cc.

References a, funct::abs(), accept(), alllayerfound, alllayertotal, autoIneffModTagging_, badModulesFile_, electrons_cff::bool, Surface::bounds(), bunchX_, simKBmtfDigis_cfi::bx, bxHisto, HltBtagPostValidation_cff::c, calibTree_, calibTreeFileNames_, clusterMatchingMethod_, clusterTrajDist_, SiStripBadStrip::decode(), detInfo_, MillePedeFileConverter_cfg::e, mps_fire::end, eventInfos, cppFunctionSkipper::exception, fs, SiStripQuality::getBadComponentList(), SiStripBadStrip::getDataVectorBegin(), SiStripDetInfo::getNumberOfApvsAndStripLength(), SiStripBadStrip::getRegistryVectorBegin(), SiStripBadStrip::getRegistryVectorEnd(), goodlayerfound, goodlayertotal, muons_cff::highPurity, hits, mps_fire::i, l1ctLayer2EG_cff::id, hit::id, muonGEMDigis_cfi::instLumi, instLumiHisto, createfilelist::int, dqmiolumiharvest::j, dqmdumpme::k, MainPageGenerator::l, pixelTopology::layer, layerfound, layerfound_perBx, layerfound_vsBX, layerfound_vsCM, layerfound_vsLumi, layerfound_vsPU, layertotal, layertotal_perBx, layertotal_vsBX, layertotal_vsCM, layertotal_vsLumi, layertotal_vsPU, mps_splice::line, LOGPRINT, TFileService::make(), makeHotColdMaps(), makeSQLite(), makeSummary(), makeSummaryVsBx(), makeSummaryVsCM(), makeSummaryVsLumi(), makeTKMap(), modCounter, mps_splice::mods, nBxInAnOrbit_, createIOVlist::nevents, nevt, nModsMin_, StripTopology::nstrips(), nTEClayers, MLClient_cfi::PU, PUHisto, quality, quality_, SiStripBadStrip::data::range, FastTimerService_cff::range, resXSig_, writedatasetfile::run, setBadComponents(), showRings_, showTOB6TEC9_, siStripLayers_, StripGeomDetUnit::specificTopology(), contentValuesCheck::ss, str, AlCaHLTBitMon_QueryRunRegistry::string, TrackingMonitor_cfi::stripCluster, stripsApvEdge_, GeomDet::surface(), SiStripDetId::TEC, threshold_, SiStripDetId::TIB, SiStripDetId::TID, tkGeomToken_, SiStripDetId::TOB, totalStatistics(), tTopoToken_, useCM_, useOnlyHighPurityTracks_, Bounds::width(), x, hit::x, testProducerWithPsetDescEmpty_cfi::x1, y, hit::y, z, and hit::z.

227  {
228  const auto& tkgeom = c.getData(tkGeomToken_);
229  const auto& tTopo = c.getData(tTopoToken_);
230 
231  // read bad modules to mask
232  ifstream badModules_file;
233  set<uint32_t> badModules_list;
234  if (!badModulesFile_.empty()) {
235  badModules_file.open(badModulesFile_.c_str());
236  uint32_t badmodule_detid;
237  int mods, fiber1, fiber2, fiber3;
238  if (badModules_file.is_open()) {
239  string line;
240  while (getline(badModules_file, line)) {
241  if (badModules_file.eof())
242  continue;
243  stringstream ss(line);
244  ss >> badmodule_detid >> mods >> fiber1 >> fiber2 >> fiber3;
245  if (badmodule_detid != 0 && mods == 1 && (fiber1 == 1 || fiber2 == 1 || fiber3 == 1))
246  badModules_list.insert(badmodule_detid);
247  }
248  badModules_file.close();
249  }
250  }
251  if (!badModules_list.empty())
252  LOGPRINT << "Remove additionnal bad modules from the analysis: ";
253  set<uint32_t>::iterator itBadMod;
254  for (const auto& badMod : badModules_list) {
255  LOGPRINT << " " << badMod;
256  }
257 
258  // initialze counters and histos
259 
260  bxHisto = fs->make<TH1F>("bx", "bx", 3600, 0, 3600);
261  instLumiHisto = fs->make<TH1F>("instLumi", "inst. lumi.", 250, 0, 25000);
262  PUHisto = fs->make<TH1F>("PU", "PU", 200, 0, 200);
263 
264  for (int l = 0; l < 35; l++) {
265  goodlayertotal[l] = 0;
266  goodlayerfound[l] = 0;
267  alllayertotal[l] = 0;
268  alllayerfound[l] = 0;
269  }
270 
271  TH1F* resolutionPlots[23];
272  for (Long_t ilayer = 0; ilayer < 23; ilayer++) {
273  std::string lyrName = ::layerName(ilayer, showRings_, nTEClayers);
274 
275  resolutionPlots[ilayer] = fs->make<TH1F>(Form("resol_layer_%i", (int)(ilayer)), lyrName.c_str(), 125, -125, 125);
276  resolutionPlots[ilayer]->GetXaxis()->SetTitle("trajX-clusX [strip unit]");
277 
278  layerfound_vsLumi.push_back(
279  fs->make<TH1F>(Form("layerfound_vsLumi_layer_%i", (int)(ilayer)), lyrName.c_str(), 100, 0, 25000));
280  layertotal_vsLumi.push_back(
281  fs->make<TH1F>(Form("layertotal_vsLumi_layer_%i", (int)(ilayer)), lyrName.c_str(), 100, 0, 25000));
282  layerfound_vsPU.push_back(
283  fs->make<TH1F>(Form("layerfound_vsPU_layer_%i", (int)(ilayer)), lyrName.c_str(), 45, 0, 90));
284  layertotal_vsPU.push_back(
285  fs->make<TH1F>(Form("layertotal_vsPU_layer_%i", (int)(ilayer)), lyrName.c_str(), 45, 0, 90));
286 
287  layerfound_vsBX.push_back(fs->make<TH1F>(
288  Form("foundVsBx_layer%i", (int)ilayer), Form("layer %i", (int)ilayer), nBxInAnOrbit_, 0, nBxInAnOrbit_));
289  layertotal_vsBX.push_back(fs->make<TH1F>(
290  Form("totalVsBx_layer%i", (int)ilayer), Form("layer %i", (int)ilayer), nBxInAnOrbit_, 0, nBxInAnOrbit_));
291 
292  if (useCM_) {
293  layerfound_vsCM.push_back(
294  fs->make<TH1F>(Form("layerfound_vsCM_layer_%i", (int)(ilayer)), lyrName.c_str(), 20, 0, 400));
295  layertotal_vsCM.push_back(
296  fs->make<TH1F>(Form("layertotal_vsCM_layer_%i", (int)(ilayer)), lyrName.c_str(), 20, 0, 400));
297  }
298  layertotal[ilayer] = 0;
299  layerfound[ilayer] = 0;
300  }
301 
303  LOGPRINT << "A module is bad if efficiency < " << threshold_ << " and has at least " << nModsMin_ << " nModsMin.";
304  else
305  LOGPRINT << "A module is bad if the upper limit on the efficiency is < to the avg in the layer - " << threshold_
306  << " and has at least " << nModsMin_ << " nModsMin.";
307 
308  unsigned int run, evt, bx{0};
309  double instLumi, PU;
310 
311  //Open the ROOT Calib Tree
312  for (const auto& calibTreeFileName : calibTreeFileNames_) {
313  LOGPRINT << "Loading file: " << calibTreeFileName;
314  TFile* CalibTreeFile = TFile::Open(calibTreeFileName.c_str(), "READ");
315 
316  // Get event infos
317  bool foundEventInfos = false;
318  try {
319  CalibTreeFile->cd("eventInfo");
320  } catch (exception& e) {
321  LOGPRINT << "No event infos tree";
322  }
323  TTree* EventTree = (TTree*)(gDirectory->Get("tree"));
324 
325  TLeaf* runLf;
326  TLeaf* evtLf;
327  TLeaf* BunchLf;
328  TLeaf* InstLumiLf;
329  TLeaf* PULf;
330  if (EventTree) {
331  LOGPRINT << "Found event infos tree";
332 
333  runLf = EventTree->GetLeaf("run");
334  evtLf = EventTree->GetLeaf("event");
335 
336  BunchLf = EventTree->GetLeaf("bx");
337  InstLumiLf = EventTree->GetLeaf("instLumi");
338  PULf = EventTree->GetLeaf("PU");
339 
340  int nevt = EventTree->GetEntries();
341  if (nevt)
342  foundEventInfos = true;
343 
344  for (int j = 0; j < nevt; j++) {
345  EventTree->GetEntry(j);
346  run = runLf->GetValue();
347  evt = evtLf->GetValue();
348  bx = BunchLf->GetValue();
349  instLumi = InstLumiLf->GetValue();
350  PU = PULf->GetValue();
351 
352  bxHisto->Fill(bx);
353  instLumiHisto->Fill(instLumi);
354  PUHisto->Fill(PU);
355 
356  eventInfos[make_pair(run, evt)] = array<double, 3>{{(double)bx, instLumi, PU}};
357  }
358  }
359 
360  // Get hit infos
361  CalibTreeFile->cd("anEff");
362  calibTree_ = (TTree*)(gDirectory->Get("traj"));
363 
364  runLf = calibTree_->GetLeaf("run");
365  evtLf = calibTree_->GetLeaf("event");
366  TLeaf* BadLf = calibTree_->GetLeaf("ModIsBad");
367  TLeaf* sistripLf = calibTree_->GetLeaf("SiStripQualBad");
368  TLeaf* idLf = calibTree_->GetLeaf("Id");
369  TLeaf* acceptLf = calibTree_->GetLeaf("withinAcceptance");
370  TLeaf* layerLf = calibTree_->GetLeaf("layer");
371  //TLeaf* nHitsLf = calibTree_->GetLeaf("nHits");
372  TLeaf* highPurityLf = calibTree_->GetLeaf("highPurity");
373  TLeaf* xLf = calibTree_->GetLeaf("TrajGlbX");
374  TLeaf* yLf = calibTree_->GetLeaf("TrajGlbY");
375  TLeaf* zLf = calibTree_->GetLeaf("TrajGlbZ");
376  TLeaf* ResXSigLf = calibTree_->GetLeaf("ResXSig");
377  TLeaf* TrajLocXLf = calibTree_->GetLeaf("TrajLocX");
378  TLeaf* TrajLocYLf = calibTree_->GetLeaf("TrajLocY");
379  TLeaf* ClusterLocXLf = calibTree_->GetLeaf("ClusterLocX");
380  BunchLf = calibTree_->GetLeaf("bunchx");
381  InstLumiLf = calibTree_->GetLeaf("instLumi");
382  PULf = calibTree_->GetLeaf("PU");
383  TLeaf* CMLf = nullptr;
384  if (useCM_)
385  CMLf = calibTree_->GetLeaf("commonMode");
386 
387  int nevents = calibTree_->GetEntries();
388  LOGPRINT << "Successfully loaded analyze function with " << nevents << " events!\n";
389 
390  map<pair<unsigned int, unsigned int>, array<double, 3> >::iterator itEventInfos;
391 
392  //Loop through all of the events
393  for (int j = 0; j < nevents; j++) {
394  calibTree_->GetEntry(j);
395  run = (unsigned int)runLf->GetValue();
396  evt = (unsigned int)evtLf->GetValue();
397  unsigned int isBad = (unsigned int)BadLf->GetValue();
398  unsigned int quality = (unsigned int)sistripLf->GetValue();
399  unsigned int id = (unsigned int)idLf->GetValue();
400  unsigned int accept = (unsigned int)acceptLf->GetValue();
401  unsigned int layer_wheel = (unsigned int)layerLf->GetValue();
402  unsigned int layer = layer_wheel;
403  if (showRings_ && layer > 10) { // use rings instead of wheels
404  if (layer < 14)
405  layer = 10 + ((id >> 9) & 0x3); //TID 3 disks and also 3 rings -> use the same container
406  else
407  layer = 13 + ((id >> 5) & 0x7); //TEC
408  }
409  //unsigned int nHits = (unsigned int)nHitsLf->GetValue();
410  bool highPurity = (bool)highPurityLf->GetValue();
411  double x = xLf->GetValue();
412  double y = yLf->GetValue();
413  double z = zLf->GetValue();
414  double resxsig = ResXSigLf->GetValue();
415  double TrajLocX = TrajLocXLf->GetValue();
416  double TrajLocY = TrajLocYLf->GetValue();
417  double ClusterLocX = ClusterLocXLf->GetValue();
418  double TrajLocXMid;
419  double stripTrajMid;
420  double stripCluster;
421  bool badquality = false;
422 
423  instLumi = 0;
424  PU = 0;
425 
426  // if no special tree with event infos, they may be stored in the hit eff tree
427  if (!foundEventInfos) {
428  bx = (unsigned int)BunchLf->GetValue();
429  if (InstLumiLf != nullptr)
430  instLumi = InstLumiLf->GetValue(); // branch not filled by default
431  if (PULf != nullptr)
432  PU = PULf->GetValue(); // branch not filled by default
433  }
434  int CM = -100;
435  if (useCM_)
436  CM = CMLf->GetValue();
437 
438  // Get infos from eventInfos if they exist
439  if (foundEventInfos) {
440  itEventInfos = eventInfos.find(make_pair(run, evt));
441  if (itEventInfos != eventInfos.end()) {
442  bx = itEventInfos->second[0];
443  instLumi = itEventInfos->second[1];
444  PU = itEventInfos->second[2];
445  }
446  }
447 
448  //We have two things we want to do, both an XY color plot, and the efficiency measurement
449  //First, ignore anything that isn't in acceptance and isn't good quality
450 
451  if (bunchX_ > 0 && bunchX_ != bx)
452  continue;
453 
454  //if(quality == 1 || accept != 1 || nHits < 8) continue;
455  if (accept != 1)
456  continue;
458  continue;
459  if (quality == 1)
460  badquality = true;
461 
462  // don't compute efficiencies in modules from TOB6 and TEC9
463  if (!showTOB6TEC9_ && (layer_wheel == 10 || layer_wheel == siStripLayers_))
464  continue;
465 
466  // don't use bad modules given in the bad module list
467  itBadMod = badModules_list.find(id);
468  if (itBadMod != badModules_list.end())
469  continue;
470 
471  //Now that we have a good event, we need to look at if we expected it or not, and the location
472  //if we didn't
473  //Fill the missing hit information first
474  bool badflag = false;
475 
476  // By default uses the old matching method
477  if (resXSig_ < 0) {
478  if (isBad == 1)
479  badflag = true; // isBad set to false in the tree when resxsig<999.0
480  } else {
481  if (isBad == 1 || resxsig > resXSig_)
482  badflag = true;
483  }
484 
485  // Conversion of positions in strip unit
486  int nstrips = -9;
487  float Pitch = -9.0;
488 
489  if (resxsig == 1000.0) { // special treatment, no GeomDetUnit associated in some cases when no cluster found
490  Pitch = 0.0205; // maximum
491  nstrips = 768; // maximum
492  stripTrajMid = TrajLocX / Pitch + nstrips / 2.0;
493  stripCluster = ClusterLocX / Pitch + nstrips / 2.0;
494  } else {
495  DetId ClusterDetId(id);
496  const StripGeomDetUnit* stripdet = (const StripGeomDetUnit*)tkgeom.idToDetUnit(ClusterDetId);
497  const StripTopology& Topo = stripdet->specificTopology();
498  nstrips = Topo.nstrips();
499  Pitch = stripdet->surface().bounds().width() / Topo.nstrips();
500  stripTrajMid = TrajLocX / Pitch + nstrips / 2.0; //layer01->10
501  stripCluster = ClusterLocX / Pitch + nstrips / 2.0;
502 
503  // For trapezoidal modules: extrapolation of x trajectory position to the y middle of the module
504  // for correct comparison with cluster position
505  float hbedge = 0;
506  float htedge = 0;
507  float hapoth = 0;
508  if (layer >= 11) {
509  const BoundPlane& plane = stripdet->surface();
510  const TrapezoidalPlaneBounds* trapezoidalBounds(
511  dynamic_cast<const TrapezoidalPlaneBounds*>(&(plane.bounds())));
512  std::array<const float, 4> const& parameters = (*trapezoidalBounds).parameters();
513  hbedge = parameters[0];
514  htedge = parameters[1];
515  hapoth = parameters[3];
516  TrajLocXMid = TrajLocX / (1 + (htedge - hbedge) * TrajLocY / (htedge + hbedge) /
517  hapoth); // radialy extrapolated x loc position at middle
518  stripTrajMid = TrajLocXMid / Pitch + nstrips / 2.0;
519  }
520  }
521 
522  if (!badquality && layer < 23) {
523  if (resxsig != 1000.0)
524  resolutionPlots[layer]->Fill(stripTrajMid - stripCluster);
525  else
526  resolutionPlots[layer]->Fill(1000);
527  }
528 
529  // New matching methods
530  int tapv = -9;
531  int capv = -9;
532  float stripInAPV = 64.;
533 
534  if (clusterMatchingMethod_ >= 1) {
535  badflag = false; // reset
536  if (resxsig == 1000.0) { // default value when no cluster found in the module
537  badflag = true; // consider the module inefficient in this case
538  } else {
539  if (clusterMatchingMethod_ == 2 ||
540  clusterMatchingMethod_ == 4) { // check the distance between cluster and trajectory position
541  if (abs(stripCluster - stripTrajMid) > clusterTrajDist_)
542  badflag = true;
543  }
544  if (clusterMatchingMethod_ == 3 ||
546  4) { // cluster and traj have to be in the same APV (don't take edges into accounts)
547  tapv = (int)stripTrajMid / 128;
548  capv = (int)stripCluster / 128;
549  stripInAPV = stripTrajMid - tapv * 128;
550 
551  if (stripInAPV < stripsApvEdge_ || stripInAPV > 128 - stripsApvEdge_)
552  continue;
553  if (tapv != capv)
554  badflag = true;
555  }
556  }
557  }
558 
559  if (badflag && !badquality) {
560  hit temphit;
561  temphit.x = x;
562  temphit.y = y;
563  temphit.z = z;
564  temphit.id = id;
565  hits[layer].push_back(temphit);
566  }
567  pair<unsigned int, unsigned int> newgoodpair(1, 1);
568  pair<unsigned int, unsigned int> newbadpair(1, 0);
569  //First, figure out if the module already exists in the map of maps
570  map<unsigned int, pair<unsigned int, unsigned int> >::iterator it = modCounter[layer].find(id);
571  if (!badquality) {
572  if (it == modCounter[layer].end()) {
573  if (badflag)
574  modCounter[layer][id] = newbadpair;
575  else
576  modCounter[layer][id] = newgoodpair;
577  } else {
578  ((*it).second.first)++;
579  if (!badflag)
580  ((*it).second.second)++;
581  }
582 
583  if (layerfound_perBx.find(bx) == layerfound_perBx.end()) {
584  layerfound_perBx[bx] = vector<int>(23, 0);
585  layertotal_perBx[bx] = vector<int>(23, 0);
586  }
587  if (!badflag)
590 
591  if (!badflag)
594  if (!badflag)
595  layerfound_vsPU[layer]->Fill(PU);
596  layertotal_vsPU[layer]->Fill(PU);
597 
598  if (useCM_) {
599  if (!badflag)
600  layerfound_vsCM[layer]->Fill(CM);
601  layertotal_vsCM[layer]->Fill(CM);
602  }
603 
604  //Have to do the decoding for which side to go on (ugh)
605  if (layer <= 10) {
606  if (!badflag)
609  } else if (layer > 10 && layer < 14) {
610  if (((id >> 13) & 0x3) == 1) {
611  if (!badflag)
614  } else if (((id >> 13) & 0x3) == 2) {
615  if (!badflag)
616  goodlayerfound[layer + 3]++;
617  goodlayertotal[layer + 3]++;
618  }
619  } else if (layer > 13 && layer <= siStripLayers_) {
620  if (((id >> 18) & 0x3) == 1) {
621  if (!badflag)
622  goodlayerfound[layer + 3]++;
623  goodlayertotal[layer + 3]++;
624  } else if (((id >> 18) & 0x3) == 2) {
625  if (!badflag)
628  }
629  }
630  }
631  //Do the one where we don't exclude bad modules!
632  if (layer <= 10) {
633  if (!badflag)
634  alllayerfound[layer]++;
635  alllayertotal[layer]++;
636  } else if (layer > 10 && layer < 14) {
637  if (((id >> 13) & 0x3) == 1) {
638  if (!badflag)
639  alllayerfound[layer]++;
640  alllayertotal[layer]++;
641  } else if (((id >> 13) & 0x3) == 2) {
642  if (!badflag)
643  alllayerfound[layer + 3]++;
644  alllayertotal[layer + 3]++;
645  }
646  } else if (layer > 13 && layer <= siStripLayers_) {
647  if (((id >> 18) & 0x3) == 1) {
648  if (!badflag)
649  alllayerfound[layer + 3]++;
650  alllayertotal[layer + 3]++;
651  } else if (((id >> 18) & 0x3) == 2) {
652  if (!badflag)
653  alllayerfound[layer + 3 + nTEClayers]++;
654  alllayertotal[layer + 3 + nTEClayers]++;
655  }
656  }
657  //At this point, both of our maps are loaded with the correct information
658  }
659  } // go to next CalibTreeFile
660 
661  makeHotColdMaps();
663  makeSQLite();
664  totalStatistics();
665  makeSummary();
666  makeSummaryVsBx();
668  if (useCM_)
669  makeSummaryVsCM();
670 
672  //try to write out what's in the quality record
674  int NTkBadComponent[4]; //k: 0=BadModule, 1=BadFiber, 2=BadApv, 3=BadStrips
675  int NBadComponent[4][19][4];
676  //legend: NBadComponent[i][j][k]= SubSystem i, layer/disk/wheel j, BadModule/Fiber/Apv k
677  // i: 0=TIB, 1=TID, 2=TOB, 3=TEC
678  // k: 0=BadModule, 1=BadFiber, 2=BadApv, 3=BadStrips
679  std::stringstream ssV[4][19];
680 
681  for (int i = 0; i < 4; ++i) {
682  NTkBadComponent[i] = 0;
683  for (int j = 0; j < 19; ++j) {
684  ssV[i][j].str("");
685  for (int k = 0; k < 4; ++k)
686  NBadComponent[i][j][k] = 0;
687  }
688  }
689 
690  std::vector<SiStripQuality::BadComponent> BC = quality_->getBadComponentList();
691 
692  for (size_t i = 0; i < BC.size(); ++i) {
693  //&&&&&&&&&&&&&
694  //Full Tk
695  //&&&&&&&&&&&&&
696 
697  if (BC[i].BadModule)
698  NTkBadComponent[0]++;
699  if (BC[i].BadFibers)
700  NTkBadComponent[1] += ((BC[i].BadFibers >> 2) & 0x1) + ((BC[i].BadFibers >> 1) & 0x1) + ((BC[i].BadFibers) & 0x1);
701  if (BC[i].BadApvs)
702  NTkBadComponent[2] += ((BC[i].BadApvs >> 5) & 0x1) + ((BC[i].BadApvs >> 4) & 0x1) + ((BC[i].BadApvs >> 3) & 0x1) +
703  ((BC[i].BadApvs >> 2) & 0x1) + ((BC[i].BadApvs >> 1) & 0x1) + ((BC[i].BadApvs) & 0x1);
704 
705  //&&&&&&&&&&&&&&&&&
706  //Single SubSystem
707  //&&&&&&&&&&&&&&&&&
708 
709  int component;
710  SiStripDetId a(BC[i].detid);
711  if (a.subdetId() == SiStripDetId::TIB) {
712  //&&&&&&&&&&&&&&&&&
713  //TIB
714  //&&&&&&&&&&&&&&&&&
715 
716  component = tTopo.tibLayer(BC[i].detid);
717  setBadComponents(0, component, BC[i], ssV, NBadComponent);
718 
719  } else if (a.subdetId() == SiStripDetId::TID) {
720  //&&&&&&&&&&&&&&&&&
721  //TID
722  //&&&&&&&&&&&&&&&&&
723 
724  component = tTopo.tidSide(BC[i].detid) == 2 ? tTopo.tidWheel(BC[i].detid) : tTopo.tidWheel(BC[i].detid) + 3;
725  setBadComponents(1, component, BC[i], ssV, NBadComponent);
726 
727  } else if (a.subdetId() == SiStripDetId::TOB) {
728  //&&&&&&&&&&&&&&&&&
729  //TOB
730  //&&&&&&&&&&&&&&&&&
731 
732  component = tTopo.tobLayer(BC[i].detid);
733  setBadComponents(2, component, BC[i], ssV, NBadComponent);
734 
735  } else if (a.subdetId() == SiStripDetId::TEC) {
736  //&&&&&&&&&&&&&&&&&
737  //TEC
738  //&&&&&&&&&&&&&&&&&
739 
740  component = tTopo.tecSide(BC[i].detid) == 2 ? tTopo.tecWheel(BC[i].detid) : tTopo.tecWheel(BC[i].detid) + 9;
741  setBadComponents(3, component, BC[i], ssV, NBadComponent);
742  }
743  }
744 
745  //&&&&&&&&&&&&&&&&&&
746  // Single Strip Info
747  //&&&&&&&&&&&&&&&&&&
748  float percentage = 0;
749 
752 
753  for (SiStripBadStrip::RegistryIterator rp = rbegin; rp != rend; ++rp) {
754  unsigned int detid = rp->detid;
755 
756  int subdet = -999;
757  int component = -999;
758  SiStripDetId a(detid);
759  if (a.subdetId() == 3) {
760  subdet = 0;
761  component = tTopo.tibLayer(detid);
762  } else if (a.subdetId() == 4) {
763  subdet = 1;
764  component = tTopo.tidSide(detid) == 2 ? tTopo.tidWheel(detid) : tTopo.tidWheel(detid) + 3;
765  } else if (a.subdetId() == 5) {
766  subdet = 2;
767  component = tTopo.tobLayer(detid);
768  } else if (a.subdetId() == 6) {
769  subdet = 3;
770  component = tTopo.tecSide(detid) == 2 ? tTopo.tecWheel(detid) : tTopo.tecWheel(detid) + 9;
771  }
772 
773  SiStripQuality::Range sqrange =
775 
776  percentage = 0;
777  for (int it = 0; it < sqrange.second - sqrange.first; it++) {
778  unsigned int range = quality_->decode(*(sqrange.first + it)).range;
779  NTkBadComponent[3] += range;
780  NBadComponent[subdet][0][3] += range;
781  NBadComponent[subdet][component][3] += range;
782  percentage += range;
783  }
784  if (percentage != 0)
785  percentage /= 128. * detInfo_.getNumberOfApvsAndStripLength(detid).first;
786  if (percentage > 1)
787  edm::LogError("SiStripQualityStatistics") << "PROBLEM detid " << detid << " value " << percentage << std::endl;
788  }
789  //&&&&&&&&&&&&&&&&&&
790  // printout
791  //&&&&&&&&&&&&&&&&&&
792  std::ostringstream ss;
793 
794  ss << "\n-----------------\nNew IOV starting from run " << e.id().run() << " event " << e.id().event()
795  << " lumiBlock " << e.luminosityBlock() << " time " << e.time().value() << "\n-----------------\n";
796  ss << "\n-----------------\nGlobal Info\n-----------------";
797  ss << "\nBadComponent \t Modules \tFibers "
798  "\tApvs\tStrips\n----------------------------------------------------------------";
799  ss << "\nTracker:\t\t" << NTkBadComponent[0] << "\t" << NTkBadComponent[1] << "\t" << NTkBadComponent[2] << "\t"
800  << NTkBadComponent[3];
801  ss << "\nTIB:\t\t\t" << NBadComponent[0][0][0] << "\t" << NBadComponent[0][0][1] << "\t" << NBadComponent[0][0][2]
802  << "\t" << NBadComponent[0][0][3];
803  ss << "\nTID:\t\t\t" << NBadComponent[1][0][0] << "\t" << NBadComponent[1][0][1] << "\t" << NBadComponent[1][0][2]
804  << "\t" << NBadComponent[1][0][3];
805  ss << "\nTOB:\t\t\t" << NBadComponent[2][0][0] << "\t" << NBadComponent[2][0][1] << "\t" << NBadComponent[2][0][2]
806  << "\t" << NBadComponent[2][0][3];
807  ss << "\nTEC:\t\t\t" << NBadComponent[3][0][0] << "\t" << NBadComponent[3][0][1] << "\t" << NBadComponent[3][0][2]
808  << "\t" << NBadComponent[3][0][3];
809  ss << "\n";
810 
811  for (int i = 1; i < 5; ++i)
812  ss << "\nTIB Layer " << i << " :\t\t" << NBadComponent[0][i][0] << "\t" << NBadComponent[0][i][1] << "\t"
813  << NBadComponent[0][i][2] << "\t" << NBadComponent[0][i][3];
814  ss << "\n";
815  for (int i = 1; i < 4; ++i)
816  ss << "\nTID+ Disk " << i << " :\t\t" << NBadComponent[1][i][0] << "\t" << NBadComponent[1][i][1] << "\t"
817  << NBadComponent[1][i][2] << "\t" << NBadComponent[1][i][3];
818  for (int i = 4; i < 7; ++i)
819  ss << "\nTID- Disk " << i - 3 << " :\t\t" << NBadComponent[1][i][0] << "\t" << NBadComponent[1][i][1] << "\t"
820  << NBadComponent[1][i][2] << "\t" << NBadComponent[1][i][3];
821  ss << "\n";
822  for (int i = 1; i < 7; ++i)
823  ss << "\nTOB Layer " << i << " :\t\t" << NBadComponent[2][i][0] << "\t" << NBadComponent[2][i][1] << "\t"
824  << NBadComponent[2][i][2] << "\t" << NBadComponent[2][i][3];
825  ss << "\n";
826  for (int i = 1; i < 10; ++i)
827  ss << "\nTEC+ Disk " << i << " :\t\t" << NBadComponent[3][i][0] << "\t" << NBadComponent[3][i][1] << "\t"
828  << NBadComponent[3][i][2] << "\t" << NBadComponent[3][i][3];
829  for (int i = 10; i < 19; ++i)
830  ss << "\nTEC- Disk " << i - 9 << " :\t\t" << NBadComponent[3][i][0] << "\t" << NBadComponent[3][i][1] << "\t"
831  << NBadComponent[3][i][2] << "\t" << NBadComponent[3][i][3];
832  ss << "\n";
833 
834  ss << "\n----------------------------------------------------------------\n\t\t Detid \tModules Fibers "
835  "Apvs\n----------------------------------------------------------------";
836  for (int i = 1; i < 5; ++i)
837  ss << "\nTIB Layer " << i << " :" << ssV[0][i].str();
838  ss << "\n";
839  for (int i = 1; i < 4; ++i)
840  ss << "\nTID+ Disk " << i << " :" << ssV[1][i].str();
841  for (int i = 4; i < 7; ++i)
842  ss << "\nTID- Disk " << i - 3 << " :" << ssV[1][i].str();
843  ss << "\n";
844  for (int i = 1; i < 7; ++i)
845  ss << "\nTOB Layer " << i << " :" << ssV[2][i].str();
846  ss << "\n";
847  for (int i = 1; i < 10; ++i)
848  ss << "\nTEC+ Disk " << i << " :" << ssV[3][i].str();
849  for (int i = 10; i < 19; ++i)
850  ss << "\nTEC- Disk " << i - 9 << " :" << ssV[3][i].str();
851 
852  LOGPRINT << ss.str();
853 
854  // store also bad modules in log file
855  ofstream badModules;
856  badModules.open("BadModules.log");
857  badModules << "\n----------------------------------------------------------------\n\t\t Detid \tModules Fibers "
858  "Apvs\n----------------------------------------------------------------";
859  for (int i = 1; i < 5; ++i)
860  badModules << "\nTIB Layer " << i << " :" << ssV[0][i].str();
861  badModules << "\n";
862  for (int i = 1; i < 4; ++i)
863  badModules << "\nTID+ Disk " << i << " :" << ssV[1][i].str();
864  for (int i = 4; i < 7; ++i)
865  badModules << "\nTID- Disk " << i - 3 << " :" << ssV[1][i].str();
866  badModules << "\n";
867  for (int i = 1; i < 7; ++i)
868  badModules << "\nTOB Layer " << i << " :" << ssV[2][i].str();
869  badModules << "\n";
870  for (int i = 1; i < 10; ++i)
871  badModules << "\nTEC+ Disk " << i << " :" << ssV[3][i].str();
872  for (int i = 10; i < 19; ++i)
873  badModules << "\nTEC- Disk " << i - 9 << " :" << ssV[3][i].str();
874  badModules.close();
875 }
unsigned short range
map< unsigned int, vector< int > > layertotal_perBx
virtual int nstrips() const =0
void setBadComponents(int i, int component, SiStripQuality::BadComponent &BC, std::stringstream ssV[4][19], int NBadComponent[4][19][4])
ContainerIterator getDataVectorBegin() const
#define LOGPRINT
map< unsigned int, vector< int > > layerfound_perBx
static constexpr auto TID
Definition: SiStripDetId.h:38
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
Registry::const_iterator RegistryIterator
map< pair< unsigned int, unsigned int >, array< double, 3 > > eventInfos
Log< level::Error, false > LogError
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:31
const std::vector< BadComponent > & getBadComponentList() const
constexpr std::array< uint8_t, layerIndexSize< TrackerTraits > > layer
string quality
edm::Service< TFileService > fs
virtual const StripTopology & specificTopology() const
Returns a reference to the strip proxy topology.
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
RegistryIterator getRegistryVectorEnd() const
static constexpr auto TOB
Definition: SiStripDetId.h:39
unsigned int id
Detector identifier class for the strip tracker.
Definition: SiStripDetId.h:18
Definition: DetId.h:17
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
const std::pair< unsigned short, double > getNumberOfApvsAndStripLength(uint32_t detId) const
static constexpr auto TIB
Definition: SiStripDetId.h:37
double a
Definition: hdecay.h:119
std::pair< ContainerIterator, ContainerIterator > Range
data decode(const unsigned int &value) const
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
#define str(s)
virtual float width() const =0
RegistryIterator getRegistryVectorBegin() const
static constexpr auto TEC
Definition: SiStripDetId.h:40
map< unsigned int, pair< unsigned int, unsigned int > > modCounter[23]
const Bounds & bounds() const
Definition: Surface.h:87

◆ computeEff()

void SiStripHitEffFromCalibTree::computeEff ( vector< TH1F *> &  vhfound,
vector< TH1F *> &  vhtotal,
string  name 
)
private

Definition at line 1455 of file SiStripHitEffFromCalibTree.cc.

References MillePedeFileConverter_cfg::e, dqm-mbProfile::format, fs, mps_fire::i, TFileService::make(), Skims_PA_cff::name, MuonTCMETValueMapProducer_cff::nLayers, nTEClayers, showRings_, and siStripLayers_.

Referenced by makeSummaryVsCM(), and makeSummaryVsLumi().

1455  {
1456  unsigned int nLayers = siStripLayers_;
1457  if (showRings_)
1458  nLayers = 20;
1459 
1460  TH1F* hfound;
1461  TH1F* htotal;
1462 
1463  for (unsigned int ilayer = 1; ilayer < nLayers; ilayer++) {
1464  hfound = vhfound[ilayer];
1465  htotal = vhtotal[ilayer];
1466 
1467  hfound->Sumw2();
1468  htotal->Sumw2();
1469 
1470  // new ROOT version: TGraph::Divide don't handle null or negative values
1471  for (Long_t i = 0; i < hfound->GetNbinsX() + 1; ++i) {
1472  if (hfound->GetBinContent(i) == 0)
1473  hfound->SetBinContent(i, 1e-6);
1474  if (htotal->GetBinContent(i) == 0)
1475  htotal->SetBinContent(i, 1);
1476  }
1477 
1478  TGraphAsymmErrors* geff = fs->make<TGraphAsymmErrors>(hfound->GetNbinsX());
1479  geff->SetName(Form("%s_layer%i", name.c_str(), ilayer));
1480  geff->BayesDivide(hfound, htotal);
1481  if (name == "effVsLumi")
1482  geff->SetTitle(
1483  fmt::format("Hit Efficiency vs inst. lumi. - {}", ::layerName(ilayer, showRings_, nTEClayers)).c_str());
1484  if (name == "effVsPU")
1485  geff->SetTitle(fmt::format("Hit Efficiency vs pileup - {}", ::layerName(ilayer, showRings_, nTEClayers)).c_str());
1486  if (name == "effVsCM")
1487  geff->SetTitle(
1488  fmt::format("Hit Efficiency vs common Mode - {}", ::layerName(ilayer, showRings_, nTEClayers)).c_str());
1489  geff->SetMarkerStyle(20);
1490  }
1491 }
edm::Service< TFileService > fs
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64

◆ getLayerSideName()

TString SiStripHitEffFromCalibTree::getLayerSideName ( Long_t  k)
private

Definition at line 1536 of file SiStripHitEffFromCalibTree.cc.

References dqmdumpme::k, nTEClayers, and showRings_.

Referenced by makeSummary().

1536  {
1537  TString layername = "";
1538  TString ringlabel = "D";
1539  if (showRings_)
1540  ringlabel = "R";
1541  if (k > 0 && k < 5) {
1542  layername = TString("TIB L") + k;
1543  } else if (k > 4 && k < 11) {
1544  layername = TString("TOB L") + (k - 4);
1545  } else if (k > 10 && k < 14) {
1546  layername = TString("TID- ") + ringlabel + (k - 10);
1547  } else if (k > 13 && k < 17) {
1548  layername = TString("TID+ ") + ringlabel + (k - 13);
1549  } else if (k > 16 && k < 17 + nTEClayers) {
1550  layername = TString("TEC- ") + ringlabel + (k - 16);
1551  } else if (k > 16 + nTEClayers) {
1552  layername = TString("TEC+ ") + ringlabel + (k - 16 - nTEClayers);
1553  }
1554 
1555  return layername;
1556 }

◆ getNewObject()

std::unique_ptr< SiStripBadStrip > SiStripHitEffFromCalibTree::getNewObject ( )
overrideprivatevirtual

Implements ConditionDBWriter< SiStripBadStrip >.

Definition at line 1558 of file SiStripHitEffFromCalibTree.cc.

References SiStripBadStrip::getDataVectorBegin(), SiStripBadStrip::getRegistryVectorBegin(), SiStripBadStrip::getRegistryVectorEnd(), getGTfromDQMFile::obj, quality_, and FastTimerService_cff::range.

1558  {
1559  //Need this for a Condition DB Writer
1560  //Initialize a return variable
1561  auto obj = std::make_unique<SiStripBadStrip>();
1562 
1565 
1566  for (; rIter != rIterEnd; ++rIter) {
1568  quality_->getDataVectorBegin() + rIter->iend);
1569  if (!obj->put(rIter->detid, range))
1570  edm::LogError("SiStripHitEffFromCalibTree")
1571  << "[SiStripHitEffFromCalibTree::getNewObject] detid already exists" << std::endl;
1572  }
1573 
1574  return obj;
1575 }
ContainerIterator getDataVectorBegin() const
Registry::const_iterator RegistryIterator
RegistryIterator getRegistryVectorEnd() const
std::pair< ContainerIterator, ContainerIterator > Range
RegistryIterator getRegistryVectorBegin() const

◆ makeHotColdMaps()

void SiStripHitEffFromCalibTree::makeHotColdMaps ( )
private

Definition at line 877 of file SiStripHitEffFromCalibTree.cc.

References fs, hits, HotColdMaps, LOGPRINT, TFileService::make(), phi, and siStripLayers_.

Referenced by algoAnalyze().

877  {
878  LOGPRINT << "Entering hot cold map generation!\n";
879  TStyle* gStyle = new TStyle("gStyle", "myStyle");
880  gStyle->cd();
881  gStyle->SetPalette(1);
882  gStyle->SetCanvasColor(kWhite);
883  gStyle->SetOptStat(0);
884  //Here we make the hot/cold color maps that we love so very much
885  //Already have access to the data as a private variable
886  //Create all of the histograms in the TFileService
887  TH2F* temph2;
888  for (Long_t maplayer = 1; maplayer <= siStripLayers_; maplayer++) {
889  //Initialize all of the histograms
890  if (maplayer > 0 && maplayer <= 4) {
891  //We are in the TIB
892  temph2 = fs->make<TH2F>(Form("%s%i", "TIB", (int)(maplayer)), "TIB", 100, -1, 361, 100, -100, 100);
893  temph2->GetXaxis()->SetTitle("Phi");
894  temph2->GetXaxis()->SetBinLabel(1, TString("360"));
895  temph2->GetXaxis()->SetBinLabel(50, TString("180"));
896  temph2->GetXaxis()->SetBinLabel(100, TString("0"));
897  temph2->GetYaxis()->SetTitle("Global Z");
898  temph2->SetOption("colz");
899  HotColdMaps.push_back(temph2);
900  } else if (maplayer > 4 && maplayer <= 10) {
901  //We are in the TOB
902  temph2 = fs->make<TH2F>(Form("%s%i", "TOB", (int)(maplayer - 4)), "TOB", 100, -1, 361, 100, -120, 120);
903  temph2->GetXaxis()->SetTitle("Phi");
904  temph2->GetXaxis()->SetBinLabel(1, TString("360"));
905  temph2->GetXaxis()->SetBinLabel(50, TString("180"));
906  temph2->GetXaxis()->SetBinLabel(100, TString("0"));
907  temph2->GetYaxis()->SetTitle("Global Z");
908  temph2->SetOption("colz");
909  HotColdMaps.push_back(temph2);
910  } else if (maplayer > 10 && maplayer <= 13) {
911  //We are in the TID
912  //Split by +/-
913  temph2 = fs->make<TH2F>(Form("%s%i", "TID-", (int)(maplayer - 10)), "TID-", 100, -100, 100, 100, -100, 100);
914  temph2->GetXaxis()->SetTitle("Global Y");
915  temph2->GetXaxis()->SetBinLabel(1, TString("+Y"));
916  temph2->GetXaxis()->SetBinLabel(50, TString("0"));
917  temph2->GetXaxis()->SetBinLabel(100, TString("-Y"));
918  temph2->GetYaxis()->SetTitle("Global X");
919  temph2->GetYaxis()->SetBinLabel(1, TString("-X"));
920  temph2->GetYaxis()->SetBinLabel(50, TString("0"));
921  temph2->GetYaxis()->SetBinLabel(100, TString("+X"));
922  temph2->SetOption("colz");
923  HotColdMaps.push_back(temph2);
924  temph2 = fs->make<TH2F>(Form("%s%i", "TID+", (int)(maplayer - 10)), "TID+", 100, -100, 100, 100, -100, 100);
925  temph2->GetXaxis()->SetTitle("Global Y");
926  temph2->GetXaxis()->SetBinLabel(1, TString("+Y"));
927  temph2->GetXaxis()->SetBinLabel(50, TString("0"));
928  temph2->GetXaxis()->SetBinLabel(100, TString("-Y"));
929  temph2->GetYaxis()->SetTitle("Global X");
930  temph2->GetYaxis()->SetBinLabel(1, TString("-X"));
931  temph2->GetYaxis()->SetBinLabel(50, TString("0"));
932  temph2->GetYaxis()->SetBinLabel(100, TString("+X"));
933  temph2->SetOption("colz");
934  HotColdMaps.push_back(temph2);
935  } else if (maplayer > 13) {
936  //We are in the TEC
937  //Split by +/-
938  temph2 = fs->make<TH2F>(Form("%s%i", "TEC-", (int)(maplayer - 13)), "TEC-", 100, -120, 120, 100, -120, 120);
939  temph2->GetXaxis()->SetTitle("Global Y");
940  temph2->GetXaxis()->SetBinLabel(1, TString("+Y"));
941  temph2->GetXaxis()->SetBinLabel(50, TString("0"));
942  temph2->GetXaxis()->SetBinLabel(100, TString("-Y"));
943  temph2->GetYaxis()->SetTitle("Global X");
944  temph2->GetYaxis()->SetBinLabel(1, TString("-X"));
945  temph2->GetYaxis()->SetBinLabel(50, TString("0"));
946  temph2->GetYaxis()->SetBinLabel(100, TString("+X"));
947  temph2->SetOption("colz");
948  HotColdMaps.push_back(temph2);
949  temph2 = fs->make<TH2F>(Form("%s%i", "TEC+", (int)(maplayer - 13)), "TEC+", 100, -120, 120, 100, -120, 120);
950  temph2->GetXaxis()->SetTitle("Global Y");
951  temph2->GetXaxis()->SetBinLabel(1, TString("+Y"));
952  temph2->GetXaxis()->SetBinLabel(50, TString("0"));
953  temph2->GetXaxis()->SetBinLabel(100, TString("-Y"));
954  temph2->GetYaxis()->SetTitle("Global X");
955  temph2->GetYaxis()->SetBinLabel(1, TString("-X"));
956  temph2->GetYaxis()->SetBinLabel(50, TString("0"));
957  temph2->GetYaxis()->SetBinLabel(100, TString("+X"));
958  temph2->SetOption("colz");
959  HotColdMaps.push_back(temph2);
960  }
961  }
962  for (Long_t mylayer = 1; mylayer <= siStripLayers_; mylayer++) {
963  //Determine what kind of plot we want to write out
964  //Loop through the entirety of each layer
965  //Create an array of the histograms
966  vector<hit>::const_iterator iter;
967  for (iter = hits[mylayer].begin(); iter != hits[mylayer].end(); iter++) {
968  //Looping over the particular layer
969  //Fill by 360-x to get the proper location to compare with TKMaps of phi
970  //Also global xy is messed up
971  if (mylayer > 0 && mylayer <= 4) {
972  //We are in the TIB
973  float phi = ::calcPhi(iter->x, iter->y);
974  HotColdMaps[mylayer - 1]->Fill(360. - phi, iter->z, 1.);
975  } else if (mylayer > 4 && mylayer <= 10) {
976  //We are in the TOB
977  float phi = ::calcPhi(iter->x, iter->y);
978  HotColdMaps[mylayer - 1]->Fill(360. - phi, iter->z, 1.);
979  } else if (mylayer > 10 && mylayer <= 13) {
980  //We are in the TID
981  //There are 2 different maps here
982  int side = (((iter->id) >> 13) & 0x3);
983  if (side == 1)
984  HotColdMaps[(mylayer - 1) + (mylayer - 11)]->Fill(-iter->y, iter->x, 1.);
985  else if (side == 2)
986  HotColdMaps[(mylayer - 1) + (mylayer - 10)]->Fill(-iter->y, iter->x, 1.);
987  //if(side == 1) HotColdMaps[(mylayer - 1) + (mylayer - 11)]->Fill(iter->x,iter->y,1.);
988  //else if(side == 2) HotColdMaps[(mylayer - 1) + (mylayer - 10)]->Fill(iter->x,iter->y,1.);
989  } else if (mylayer > 13) {
990  //We are in the TEC
991  //There are 2 different maps here
992  int side = (((iter->id) >> 18) & 0x3);
993  if (side == 1)
994  HotColdMaps[(mylayer + 2) + (mylayer - 14)]->Fill(-iter->y, iter->x, 1.);
995  else if (side == 2)
996  HotColdMaps[(mylayer + 2) + (mylayer - 13)]->Fill(-iter->y, iter->x, 1.);
997  //if(side == 1) HotColdMaps[(mylayer + 2) + (mylayer - 14)]->Fill(iter->x,iter->y,1.);
998  //else if(side == 2) HotColdMaps[(mylayer + 2) + (mylayer - 13)]->Fill(iter->x,iter->y,1.);
999  }
1000  }
1001  }
1002  LOGPRINT << "Finished HotCold Map Generation\n";
1003 }
#define LOGPRINT
edm::Service< TFileService > fs
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64

◆ makeSQLite()

void SiStripHitEffFromCalibTree::makeSQLite ( )
private

Definition at line 1114 of file SiStripHitEffFromCalibTree.cc.

References BadModules, SiStripQuality::compact(), detInfo_, SiStripQuality::fillBadComponents(), SiStripDetInfo::getNumberOfApvsAndStripLength(), globals_cff::id1, createfilelist::int, LOGPRINT, SiStripBadStrip::put(), quality_, and FastTimerService_cff::range.

Referenced by algoAnalyze().

1114  {
1115  //Generate the SQLite file for use in the Database of the bad modules!
1116  LOGPRINT << "Entering SQLite file generation!\n";
1117  std::vector<unsigned int> BadStripList;
1118  unsigned short NStrips;
1119  unsigned int id1;
1120  std::unique_ptr<SiStripQuality> pQuality = std::make_unique<SiStripQuality>(detInfo_);
1121  //This is the list of the bad strips, use to mask out entire APVs
1122  //Now simply go through the bad hit list and mask out things that
1123  //are bad!
1124  for (const auto& it : BadModules) {
1125  //We need to figure out how many strips are in this particular module
1126  //To Mask correctly!
1127  NStrips = detInfo_.getNumberOfApvsAndStripLength(it.first).first * 128;
1128  LOGPRINT << "Number of strips module " << it.first << " is " << NStrips;
1129  BadStripList.push_back(pQuality->encode(0, NStrips, 0));
1130  //Now compact into a single bad module
1131  id1 = (unsigned int)it.first;
1132  LOGPRINT << "ID1 shoudl match list of modules above " << id1;
1133  quality_->compact(id1, BadStripList);
1134  SiStripQuality::Range range(BadStripList.begin(), BadStripList.end());
1135  quality_->put(id1, range);
1136  BadStripList.clear();
1137  }
1138  //Fill all the bad components now
1140 }
map< unsigned int, double > BadModules
#define LOGPRINT
void compact(uint32_t detid, std::vector< unsigned int > &)
void fillBadComponents()
const std::pair< unsigned short, double > getNumberOfApvsAndStripLength(uint32_t detId) const
std::pair< ContainerIterator, ContainerIterator > Range
bool put(const uint32_t &detID, const InputVector &vect)

◆ makeSummary()

void SiStripHitEffFromCalibTree::makeSummary ( )
private

Definition at line 1190 of file SiStripHitEffFromCalibTree.cc.

References python.cmstools::all(), alllayerfound, alllayertotal, MillePedeFileConverter_cfg::e, effPlotMin_, newFWLiteAna::found, fs, getLayerSideName(), goodlayerfound, goodlayertotal, mps_fire::i, dqmiolumiharvest::j, dqmdumpme::k, label, LOGPRINT, TFileService::make(), MuonTCMETValueMapProducer_cff::nLayers, nTEClayers, compare::overlay(), showEndcapSides_, showOnlyGoodModules_, showRings_, showTOB6TEC9_, siStripLayers_, and title_.

Referenced by algoAnalyze().

1190  {
1191  //setTDRStyle();
1192 
1193  int nLayers = 34;
1194  if (showRings_)
1195  nLayers = 30;
1196  if (!showEndcapSides_) {
1197  if (!showRings_)
1199  else
1200  nLayers = 20;
1201  }
1202 
1203  TH1F* found = fs->make<TH1F>("found", "found", nLayers + 1, 0, nLayers + 1);
1204  TH1F* all = fs->make<TH1F>("all", "all", nLayers + 1, 0, nLayers + 1);
1205  TH1F* found2 = fs->make<TH1F>("found2", "found2", nLayers + 1, 0, nLayers + 1);
1206  TH1F* all2 = fs->make<TH1F>("all2", "all2", nLayers + 1, 0, nLayers + 1);
1207  // first bin only to keep real data off the y axis so set to -1
1208  found->SetBinContent(0, -1);
1209  all->SetBinContent(0, 1);
1210 
1211  // new ROOT version: TGraph::Divide don't handle null or negative values
1212  for (Long_t i = 1; i < nLayers + 2; ++i) {
1213  found->SetBinContent(i, 1e-6);
1214  all->SetBinContent(i, 1);
1215  found2->SetBinContent(i, 1e-6);
1216  all2->SetBinContent(i, 1);
1217  }
1218 
1219  TCanvas* c7 = new TCanvas("c7", " test ", 10, 10, 800, 600);
1220  c7->SetFillColor(0);
1221  c7->SetGrid();
1222 
1223  int nLayers_max = nLayers + 1; // barrel+endcap
1224  if (!showEndcapSides_)
1225  nLayers_max = 11; // barrel
1226  for (Long_t i = 1; i < nLayers_max; ++i) {
1227  LOGPRINT << "Fill only good modules layer " << i << ": S = " << goodlayerfound[i]
1228  << " B = " << goodlayertotal[i];
1229  if (goodlayertotal[i] > 5) {
1230  found->SetBinContent(i, goodlayerfound[i]);
1231  all->SetBinContent(i, goodlayertotal[i]);
1232  }
1233 
1234  LOGPRINT << "Filling all modules layer " << i << ": S = " << alllayerfound[i] << " B = " << alllayertotal[i];
1235  if (alllayertotal[i] > 5) {
1236  found2->SetBinContent(i, alllayerfound[i]);
1237  all2->SetBinContent(i, alllayertotal[i]);
1238  }
1239  }
1240 
1241  // endcap - merging sides
1242  if (!showEndcapSides_) {
1243  for (Long_t i = 11; i < 14; ++i) { // TID disks
1244  LOGPRINT << "Fill only good modules layer " << i << ": S = " << goodlayerfound[i] + goodlayerfound[i + 3]
1245  << " B = " << goodlayertotal[i] + goodlayertotal[i + 3];
1246  if (goodlayertotal[i] + goodlayertotal[i + 3] > 5) {
1247  found->SetBinContent(i, goodlayerfound[i] + goodlayerfound[i + 3]);
1248  all->SetBinContent(i, goodlayertotal[i] + goodlayertotal[i + 3]);
1249  }
1250  LOGPRINT << "Filling all modules layer " << i << ": S = " << alllayerfound[i] + alllayerfound[i + 3]
1251  << " B = " << alllayertotal[i] + alllayertotal[i + 3];
1252  if (alllayertotal[i] + alllayertotal[i + 3] > 5) {
1253  found2->SetBinContent(i, alllayerfound[i] + alllayerfound[i + 3]);
1254  all2->SetBinContent(i, alllayertotal[i] + alllayertotal[i + 3]);
1255  }
1256  }
1257  for (Long_t i = 17; i < 17 + nTEClayers; ++i) { // TEC disks
1258  LOGPRINT << "Fill only good modules layer " << i - 3
1259  << ": S = " << goodlayerfound[i] + goodlayerfound[i + nTEClayers]
1260  << " B = " << goodlayertotal[i] + goodlayertotal[i + nTEClayers];
1261  if (goodlayertotal[i] + goodlayertotal[i + nTEClayers] > 5) {
1262  found->SetBinContent(i - 3, goodlayerfound[i] + goodlayerfound[i + nTEClayers]);
1263  all->SetBinContent(i - 3, goodlayertotal[i] + goodlayertotal[i + nTEClayers]);
1264  }
1265  LOGPRINT << "Filling all modules layer " << i - 3 << ": S = " << alllayerfound[i] + alllayerfound[i + nTEClayers]
1266  << " B = " << alllayertotal[i] + alllayertotal[i + nTEClayers];
1267  if (alllayertotal[i] + alllayertotal[i + nTEClayers] > 5) {
1268  found2->SetBinContent(i - 3, alllayerfound[i] + alllayerfound[i + nTEClayers]);
1269  all2->SetBinContent(i - 3, alllayertotal[i] + alllayertotal[i + nTEClayers]);
1270  }
1271  }
1272  }
1273 
1274  found->Sumw2();
1275  all->Sumw2();
1276 
1277  found2->Sumw2();
1278  all2->Sumw2();
1279 
1280  TGraphAsymmErrors* gr = fs->make<TGraphAsymmErrors>(nLayers + 1);
1281  gr->SetName("eff_good");
1282  gr->BayesDivide(found, all);
1283 
1284  TGraphAsymmErrors* gr2 = fs->make<TGraphAsymmErrors>(nLayers + 1);
1285  gr2->SetName("eff_all");
1286  gr2->BayesDivide(found2, all2);
1287 
1288  for (int j = 0; j < nLayers + 1; j++) {
1289  gr->SetPointError(j, 0., 0., gr->GetErrorYlow(j), gr->GetErrorYhigh(j));
1290  gr2->SetPointError(j, 0., 0., gr2->GetErrorYlow(j), gr2->GetErrorYhigh(j));
1291  }
1292 
1293  gr->GetXaxis()->SetLimits(0, nLayers);
1294  gr->SetMarkerColor(2);
1295  gr->SetMarkerSize(1.2);
1296  gr->SetLineColor(2);
1297  gr->SetLineWidth(4);
1298  gr->SetMarkerStyle(20);
1299  gr->SetMinimum(effPlotMin_);
1300  gr->SetMaximum(1.001);
1301  gr->GetYaxis()->SetTitle("Efficiency");
1302  gStyle->SetTitleFillColor(0);
1303  gStyle->SetTitleBorderSize(0);
1304  gr->SetTitle(title_);
1305 
1306  gr2->GetXaxis()->SetLimits(0, nLayers);
1307  gr2->SetMarkerColor(1);
1308  gr2->SetMarkerSize(1.2);
1309  gr2->SetLineColor(1);
1310  gr2->SetLineWidth(4);
1311  gr2->SetMarkerStyle(21);
1312  gr2->SetMinimum(effPlotMin_);
1313  gr2->SetMaximum(1.001);
1314  gr2->GetYaxis()->SetTitle("Efficiency");
1315  gr2->SetTitle(title_);
1316 
1317  for (Long_t k = 1; k < nLayers + 1; k++) {
1318  TString label;
1319  if (showEndcapSides_)
1321  else
1322  label = ::layerName(k, showRings_, nTEClayers);
1323  if (!showTOB6TEC9_) {
1324  if (k == 10)
1325  label = "";
1326  if (!showRings_ && k == nLayers)
1327  label = "";
1328  if (!showRings_ && showEndcapSides_ && k == 25)
1329  label = "";
1330  }
1331  if (!showRings_) {
1332  if (showEndcapSides_) {
1333  gr->GetXaxis()->SetBinLabel(((k + 1) * 100 + 2) / (nLayers)-4, label);
1334  gr2->GetXaxis()->SetBinLabel(((k + 1) * 100 + 2) / (nLayers)-4, label);
1335  } else {
1336  gr->GetXaxis()->SetBinLabel((k + 1) * 100 / (nLayers)-6, label);
1337  gr2->GetXaxis()->SetBinLabel((k + 1) * 100 / (nLayers)-6, label);
1338  }
1339  } else {
1340  if (showEndcapSides_) {
1341  gr->GetXaxis()->SetBinLabel((k + 1) * 100 / (nLayers)-4, label);
1342  gr2->GetXaxis()->SetBinLabel((k + 1) * 100 / (nLayers)-4, label);
1343  } else {
1344  gr->GetXaxis()->SetBinLabel((k + 1) * 100 / (nLayers)-7, label);
1345  gr2->GetXaxis()->SetBinLabel((k + 1) * 100 / (nLayers)-7, label);
1346  }
1347  }
1348  }
1349 
1350  gr->Draw("AP");
1351  gr->GetXaxis()->SetNdivisions(36);
1352 
1353  c7->cd();
1354  TPad* overlay = new TPad("overlay", "", 0, 0, 1, 1);
1355  overlay->SetFillStyle(4000);
1356  overlay->SetFillColor(0);
1357  overlay->SetFrameFillStyle(4000);
1358  overlay->Draw("same");
1359  overlay->cd();
1360  if (!showOnlyGoodModules_)
1361  gr2->Draw("AP");
1362 
1363  TLegend* leg = new TLegend(0.70, 0.27, 0.88, 0.40);
1364  leg->AddEntry(gr, "Good Modules", "p");
1365  if (!showOnlyGoodModules_)
1366  leg->AddEntry(gr2, "All Modules", "p");
1367  leg->SetTextSize(0.020);
1368  leg->SetFillColor(0);
1369  leg->Draw("same");
1370 
1371  c7->SaveAs("Summary.png");
1372 }
#define LOGPRINT
def all(container)
workaround iterator generators for ROOT classes
Definition: cmstools.py:25
char const * label
def overlay(hists, ytitle, header, addon)
Definition: compare.py:122
edm::Service< TFileService > fs
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64

◆ makeSummaryVsBx()

void SiStripHitEffFromCalibTree::makeSummaryVsBx ( )
private

Definition at line 1374 of file SiStripHitEffFromCalibTree.cc.

References MillePedeFileConverter_cfg::e, dqmMemoryStats::float, dqm-mbProfile::format, newFWLiteAna::found, fs, layerfound_perBx, layerfound_vsBX, layertotal_perBx, layertotal_vsBX, LOGPRINT, LaserClient_cfi::low, TFileService::make(), nBxInAnOrbit_, MuonTCMETValueMapProducer_cff::nLayers, nTEClayers, showRings_, siStripLayers_, spaceBetweenTrains_, dqmMemoryStats::total, and up.

Referenced by algoAnalyze().

1374  {
1375  LOGPRINT << "Computing efficiency vs bx";
1376 
1377  unsigned int nLayers = siStripLayers_;
1378  if (showRings_)
1379  nLayers = 20;
1380 
1381  for (unsigned int ilayer = 1; ilayer < nLayers; ilayer++) {
1382  for (unsigned int ibx = 0; ibx <= nBxInAnOrbit_; ibx++) {
1383  layerfound_vsBX[ilayer]->SetBinContent(ibx, 1e-6);
1384  layertotal_vsBX[ilayer]->SetBinContent(ibx, 1);
1385  }
1386 
1387  for (const auto& iterMapvsBx : layerfound_perBx) {
1388  layerfound_vsBX[ilayer]->SetBinContent(iterMapvsBx.first, iterMapvsBx.second[ilayer]);
1389  }
1390  for (const auto& iterMapvsBx : layertotal_perBx) {
1391  if (iterMapvsBx.second[ilayer] > 0) {
1392  layertotal_vsBX[ilayer]->SetBinContent(iterMapvsBx.first, iterMapvsBx.second[ilayer]);
1393  }
1394  }
1395 
1396  layerfound_vsBX[ilayer]->Sumw2();
1397  layertotal_vsBX[ilayer]->Sumw2();
1398 
1399  TGraphAsymmErrors* geff = fs->make<TGraphAsymmErrors>(nBxInAnOrbit_ - 1);
1400  geff->SetName(Form("effVsBx_layer%i", ilayer));
1401 
1402  geff->SetTitle(fmt::format("Hit Efficiency vs bx - {}", ::layerName(ilayer, showRings_, nTEClayers)).c_str());
1403  geff->BayesDivide(layerfound_vsBX[ilayer], layertotal_vsBX[ilayer]);
1404 
1405  //Average over trains
1406  TGraphAsymmErrors* geff_avg = fs->make<TGraphAsymmErrors>();
1407  geff_avg->SetName(Form("effVsBxAvg_layer%i", ilayer));
1408  geff_avg->SetTitle(fmt::format("Hit Efficiency vs bx - {}", ::layerName(ilayer, showRings_, nTEClayers)).c_str());
1409  geff_avg->SetMarkerStyle(20);
1410  int ibx = 0;
1411  int previous_bx = -80;
1412  int delta_bx = 0;
1413  int nbx = 0;
1414  int found = 0;
1415  int total = 0;
1416  double sum_bx = 0;
1417  int ipt = 0;
1418  float low, up, eff;
1419  int firstbx = 0;
1420  for (const auto& iterMapvsBx : layertotal_perBx) {
1421  ibx = iterMapvsBx.first;
1422  delta_bx = ibx - previous_bx;
1423  // consider a new train
1424  if (delta_bx > (int)spaceBetweenTrains_ && nbx > 0 && total > 0) {
1425  eff = found / (float)total;
1426  //LOGPRINT<<"new train "<<ipt<<" "<<sum_bx/nbx<<" "<<eff<<endl;
1427  geff_avg->SetPoint(ipt, sum_bx / nbx, eff);
1428  low = TEfficiency::Bayesian(total, found, .683, 1, 1, false);
1429  up = TEfficiency::Bayesian(total, found, .683, 1, 1, true);
1430  geff_avg->SetPointError(ipt, sum_bx / nbx - firstbx, previous_bx - sum_bx / nbx, eff - low, up - eff);
1431  ipt++;
1432  sum_bx = 0;
1433  found = 0;
1434  total = 0;
1435  nbx = 0;
1436  firstbx = ibx;
1437  }
1438  sum_bx += ibx;
1439  found += layerfound_vsBX[ilayer]->GetBinContent(ibx);
1440  total += layertotal_vsBX[ilayer]->GetBinContent(ibx);
1441  nbx++;
1442 
1443  previous_bx = ibx;
1444  }
1445  //last train
1446  eff = found / (float)total;
1447  //LOGPRINT<<"new train "<<ipt<<" "<<sum_bx/nbx<<" "<<eff<<endl;
1448  geff_avg->SetPoint(ipt, sum_bx / nbx, eff);
1449  low = TEfficiency::Bayesian(total, found, .683, 1, 1, false);
1450  up = TEfficiency::Bayesian(total, found, .683, 1, 1, true);
1451  geff_avg->SetPointError(ipt, sum_bx / nbx - firstbx, previous_bx - sum_bx / nbx, eff - low, up - eff);
1452  }
1453 }
Definition: BitonicSort.h:7
map< unsigned int, vector< int > > layertotal_perBx
#define LOGPRINT
map< unsigned int, vector< int > > layerfound_perBx
edm::Service< TFileService > fs
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64

◆ makeSummaryVsCM()

void SiStripHitEffFromCalibTree::makeSummaryVsCM ( )
private

Definition at line 1531 of file SiStripHitEffFromCalibTree.cc.

References computeEff(), layerfound_vsCM, layertotal_vsCM, and LOGPRINT.

Referenced by algoAnalyze().

1531  {
1532  LOGPRINT << "Computing efficiency vs CM";
1534 }
#define LOGPRINT
void computeEff(vector< TH1F *> &vhfound, vector< TH1F *> &vhtotal, string name)

◆ makeSummaryVsLumi()

void SiStripHitEffFromCalibTree::makeSummaryVsLumi ( )
private

Definition at line 1493 of file SiStripHitEffFromCalibTree.cc.

References computeEff(), instLumiHisto, layerfound_vsLumi, layerfound_vsPU, layertotal_vsLumi, layertotal_vsPU, LOGPRINT, MuonTCMETValueMapProducer_cff::nLayers, PUHisto, showRings_, and siStripLayers_.

Referenced by algoAnalyze().

1493  {
1494  LOGPRINT << "Computing efficiency vs lumi";
1495 
1496  if (instLumiHisto->GetEntries()) // from infos per event
1497  LOGPRINT << "Avg conditions (avg+/-rms): lumi :" << instLumiHisto->GetMean() << "+/-" << instLumiHisto->GetRMS()
1498  << " pu: " << PUHisto->GetMean() << "+/-" << PUHisto->GetRMS();
1499 
1500  else { // from infos per hit
1501 
1502  unsigned int nLayers = siStripLayers_;
1503  if (showRings_)
1504  nLayers = 20;
1505  unsigned int nLayersForAvg = 0;
1506  float layerLumi = 0;
1507  float layerPU = 0;
1508  float avgLumi = 0;
1509  float avgPU = 0;
1510 
1511  LOGPRINT << "Lumi summary: (avg over trajectory measurements)";
1512  for (unsigned int ilayer = 1; ilayer < nLayers; ilayer++) {
1513  layerLumi = layertotal_vsLumi[ilayer]->GetMean();
1514  layerPU = layertotal_vsPU[ilayer]->GetMean();
1515  //LOGPRINT<<" layer "<<ilayer<<" lumi: "<<layerLumi<<" pu: "<<layerPU<<endl;
1516  if (layerLumi != 0 && layerPU != 0) {
1517  avgLumi += layerLumi;
1518  avgPU += layerPU;
1519  nLayersForAvg++;
1520  }
1521  }
1522  avgLumi /= nLayersForAvg;
1523  avgPU /= nLayersForAvg;
1524  LOGPRINT << "Avg conditions: lumi :" << avgLumi << " pu: " << avgPU;
1525  }
1526 
1529 }
#define LOGPRINT
void computeEff(vector< TH1F *> &vhfound, vector< TH1F *> &vhtotal, string name)

◆ makeTKMap()

void SiStripHitEffFromCalibTree::makeTKMap ( bool  autoTagging = false)
private

Definition at line 1005 of file SiStripHitEffFromCalibTree.cc.

References BadModules, TrackerMap::fill(), TrackerMap::fillc(), fs, mps_fire::i, layerfound, layertotal, LOGPRINT, TFileService::make(), modCounter, nModsMin_, nTEClayers, TrackerMap::save(), showRings_, siStripLayers_, threshold_, title_, tkmap, tkmapbad, tkmapden, tkmapeff, tkMapMin_, and tkmapnum.

Referenced by algoAnalyze().

1005  {
1006  LOGPRINT << "Entering TKMap generation!\n";
1007  tkmap = new TrackerMap(" Detector Inefficiency ");
1008  tkmapbad = new TrackerMap(" Inefficient Modules ");
1009  tkmapeff = new TrackerMap(title_.Data());
1010  tkmapnum = new TrackerMap(" Detector numerator ");
1011  tkmapden = new TrackerMap(" Detector denominator ");
1012 
1013  double myeff, mynum, myden, myeff_up;
1014  double layer_min_eff = 0;
1015 
1016  for (Long_t i = 1; i <= siStripLayers_; i++) {
1017  //Loop over every layer, extracting the information from
1018  //the map of the efficiencies
1019  layertotal[i] = 0;
1020  layerfound[i] = 0;
1021  TH1F* hEffInLayer =
1022  fs->make<TH1F>(Form("eff_layer%i", int(i)), Form("Module efficiency in layer %i", int(i)), 201, 0, 1.005);
1023 
1024  for (const auto& ih : modCounter[i]) {
1025  //We should be in the layer in question, and looping over all of the modules in said layer
1026  //Generate the list for the TKmap, and the bad module list
1027  mynum = (double)((ih.second).second);
1028  myden = (double)((ih.second).first);
1029  if (myden > 0)
1030  myeff = mynum / myden;
1031  else
1032  myeff = 0;
1033  hEffInLayer->Fill(myeff);
1034 
1035  if (!autoTagging) {
1036  if ((myden >= nModsMin_) && (myeff < threshold_)) {
1037  //We have a bad module, put it in the list!
1038  BadModules[ih.first] = myeff;
1039  tkmapbad->fillc(ih.first, 255, 0, 0);
1040  LOGPRINT << "Layer " << i << " (" << ::layerName(i, showRings_, nTEClayers) << ") module " << ih.first
1041  << " efficiency: " << myeff << " , " << mynum << "/" << myden;
1042  } else {
1043  //Fill the bad list with empty results for every module
1044  tkmapbad->fillc(ih.first, 255, 255, 255);
1045  }
1046  if (myeff < threshold_)
1047  LOGPRINT << "Layer " << i << " (" << ::layerName(i, showRings_, nTEClayers) << ") module " << ih.first
1048  << " efficiency: " << myeff << " , " << mynum << "/" << myden;
1049  if (myden < nModsMin_) {
1050  LOGPRINT << "Layer " << i << " (" << ::layerName(i, showRings_, nTEClayers) << ") module " << ih.first
1051  << " is under occupancy at " << myden;
1052  }
1053  }
1054 
1055  //Put any module into the TKMap
1056  tkmap->fill(ih.first, 1. - myeff);
1057  tkmapeff->fill(ih.first, myeff);
1058  tkmapnum->fill(ih.first, mynum);
1059  tkmapden->fill(ih.first, myden);
1060 
1061  //Add the number of hits in the layer
1062  layertotal[i] += long(myden);
1063  layerfound[i] += long(mynum);
1064  }
1065 
1066  if (autoTagging) {
1067  //Compute threshold to use for each layer
1068  hEffInLayer->GetXaxis()->SetRange(3, hEffInLayer->GetNbinsX() + 1); // Remove from the avg modules below 1%
1069  layer_min_eff =
1070  hEffInLayer->GetMean() - 2.5 * hEffInLayer->GetRMS(); // uses RMS in case the distribution is wide
1071  if (threshold_ > 2.5 * hEffInLayer->GetRMS())
1072  layer_min_eff = hEffInLayer->GetMean() - threshold_; // otherwise uses the parameter 'threshold'
1073  LOGPRINT << "Layer " << i << " threshold for bad modules: <" << layer_min_eff
1074  << " (layer mean: " << hEffInLayer->GetMean() << " rms: " << hEffInLayer->GetRMS() << ")";
1075 
1076  hEffInLayer->GetXaxis()->SetRange(1, hEffInLayer->GetNbinsX() + 1);
1077 
1078  for (const auto& ih : modCounter[i]) {
1079  // Second loop over modules to tag inefficient ones
1080  mynum = (double)((ih.second).second);
1081  myden = (double)((ih.second).first);
1082  if (myden > 0)
1083  myeff = mynum / myden;
1084  else
1085  myeff = 0;
1086  // upper limit on the efficiency
1087  myeff_up = TEfficiency::Bayesian(myden, mynum, .99, 1, 1, true);
1088  if ((myden >= nModsMin_) && (myeff_up < layer_min_eff)) {
1089  //We have a bad module, put it in the list!
1090  BadModules[ih.first] = myeff;
1091  tkmapbad->fillc(ih.first, 255, 0, 0);
1092  } else {
1093  //Fill the bad list with empty results for every module
1094  tkmapbad->fillc(ih.first, 255, 255, 255);
1095  }
1096  if (myeff_up < layer_min_eff + 0.08) // printing message also for modules slighly above (8%) the limit
1097  LOGPRINT << "Layer " << i << " (" << ::layerName(i, showRings_, nTEClayers) << ") module " << ih.first
1098  << " efficiency: " << myeff << " , " << mynum << "/" << myden << " , upper limit: " << myeff_up;
1099  if (myden < nModsMin_) {
1100  LOGPRINT << "Layer " << i << " (" << ::layerName(i, showRings_, nTEClayers) << ") module " << ih.first
1101  << " layer " << i << " is under occupancy at " << myden;
1102  }
1103  }
1104  }
1105  }
1106  tkmap->save(true, 0, 0, "SiStripHitEffTKMap.png");
1107  tkmapbad->save(true, 0, 0, "SiStripHitEffTKMapBad.png");
1108  tkmapeff->save(true, tkMapMin_, 1., "SiStripHitEffTKMapEff.png");
1109  tkmapnum->save(true, 0, 0, "SiStripHitEffTKMapNum.png");
1110  tkmapden->save(true, 0, 0, "SiStripHitEffTKMapDen.png");
1111  LOGPRINT << "Finished TKMap Generation\n";
1112 }
map< unsigned int, double > BadModules
#define LOGPRINT
edm::Service< TFileService > fs
void save(bool print_total=true, float minval=0., float maxval=0., std::string s="svgmap.svg", int width=1500, int height=800)
Definition: TrackerMap.cc:811
void fillc(int idmod, int RGBcode)
Definition: TrackerMap.h:135
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
void fill(int layer, int ring, int nmod, float x)
Definition: TrackerMap.cc:3289
map< unsigned int, pair< unsigned int, unsigned int > > modCounter[23]

◆ setBadComponents()

void SiStripHitEffFromCalibTree::setBadComponents ( int  i,
int  component,
SiStripQuality::BadComponent BC,
std::stringstream  ssV[4][19],
int  NBadComponent[4][19][4] 
)
private

Definition at line 1577 of file SiStripHitEffFromCalibTree.cc.

References SiStripQuality::BadComponent::BadApvs, SiStripQuality::BadComponent::BadFibers, SiStripQuality::BadComponent::BadModule, SiStripQuality::BadComponent::detid, detInfo_, SiStripDetInfo::getNumberOfApvsAndStripLength(), mps_fire::i, and testProducerWithPsetDescEmpty_cfi::x1.

Referenced by algoAnalyze().

1578  {
1579  int napv = detInfo_.getNumberOfApvsAndStripLength(BC.detid).first;
1580 
1581  ssV[i][component] << "\n\t\t " << BC.detid << " \t " << BC.BadModule << " \t " << ((BC.BadFibers) & 0x1) << " ";
1582  if (napv == 4)
1583  ssV[i][component] << "x " << ((BC.BadFibers >> 1) & 0x1);
1584 
1585  if (napv == 6)
1586  ssV[i][component] << ((BC.BadFibers >> 1) & 0x1) << " " << ((BC.BadFibers >> 2) & 0x1);
1587  ssV[i][component] << " \t " << ((BC.BadApvs) & 0x1) << " " << ((BC.BadApvs >> 1) & 0x1) << " ";
1588  if (napv == 4)
1589  ssV[i][component] << "x x " << ((BC.BadApvs >> 2) & 0x1) << " " << ((BC.BadApvs >> 3) & 0x1);
1590  if (napv == 6)
1591  ssV[i][component] << ((BC.BadApvs >> 2) & 0x1) << " " << ((BC.BadApvs >> 3) & 0x1) << " "
1592  << ((BC.BadApvs >> 4) & 0x1) << " " << ((BC.BadApvs >> 5) & 0x1) << " ";
1593 
1594  if (BC.BadApvs) {
1595  NBadComponent[i][0][2] += ((BC.BadApvs >> 5) & 0x1) + ((BC.BadApvs >> 4) & 0x1) + ((BC.BadApvs >> 3) & 0x1) +
1596  ((BC.BadApvs >> 2) & 0x1) + ((BC.BadApvs >> 1) & 0x1) + ((BC.BadApvs) & 0x1);
1597  NBadComponent[i][component][2] += ((BC.BadApvs >> 5) & 0x1) + ((BC.BadApvs >> 4) & 0x1) +
1598  ((BC.BadApvs >> 3) & 0x1) + ((BC.BadApvs >> 2) & 0x1) +
1599  ((BC.BadApvs >> 1) & 0x1) + ((BC.BadApvs) & 0x1);
1600  }
1601  if (BC.BadFibers) {
1602  NBadComponent[i][0][1] += ((BC.BadFibers >> 2) & 0x1) + ((BC.BadFibers >> 1) & 0x1) + ((BC.BadFibers) & 0x1);
1603  NBadComponent[i][component][1] +=
1604  ((BC.BadFibers >> 2) & 0x1) + ((BC.BadFibers >> 1) & 0x1) + ((BC.BadFibers) & 0x1);
1605  }
1606  if (BC.BadModule) {
1607  NBadComponent[i][0][0]++;
1608  NBadComponent[i][component][0]++;
1609  }
1610 }
const std::pair< unsigned short, double > getNumberOfApvsAndStripLength(uint32_t detId) const

◆ totalStatistics()

void SiStripHitEffFromCalibTree::totalStatistics ( )
private

Definition at line 1142 of file SiStripHitEffFromCalibTree.cc.

References mps_fire::i, layerfound, layertotal, LOGPRINT, nTEClayers, showRings_, and siStripLayers_.

Referenced by algoAnalyze().

1142  {
1143  //Calculate the statistics by layer
1144  int totalfound = 0;
1145  int totaltotal = 0;
1146  double layereff;
1147  int subdetfound[5];
1148  int subdettotal[5];
1149 
1150  for (Long_t i = 1; i < 5; i++) {
1151  subdetfound[i] = 0;
1152  subdettotal[i] = 0;
1153  }
1154 
1155  for (Long_t i = 1; i <= siStripLayers_; i++) {
1156  layereff = double(layerfound[i]) / double(layertotal[i]);
1157  LOGPRINT << "Layer " << i << " (" << ::layerName(i, showRings_, nTEClayers) << ") has total efficiency " << layereff
1158  << " " << layerfound[i] << "/" << layertotal[i];
1159  totalfound += layerfound[i];
1160  totaltotal += layertotal[i];
1161  if (i < 5) {
1162  subdetfound[1] += layerfound[i];
1163  subdettotal[1] += layertotal[i];
1164  }
1165  if (i >= 5 && i < 11) {
1166  subdetfound[2] += layerfound[i];
1167  subdettotal[2] += layertotal[i];
1168  }
1169  if (i >= 11 && i < 14) {
1170  subdetfound[3] += layerfound[i];
1171  subdettotal[3] += layertotal[i];
1172  }
1173  if (i >= 14) {
1174  subdetfound[4] += layerfound[i];
1175  subdettotal[4] += layertotal[i];
1176  }
1177  }
1178 
1179  LOGPRINT << "The total efficiency is " << double(totalfound) / double(totaltotal);
1180  LOGPRINT << " TIB: " << double(subdetfound[1]) / subdettotal[1] << " " << subdetfound[1] << "/"
1181  << subdettotal[1];
1182  LOGPRINT << " TOB: " << double(subdetfound[2]) / subdettotal[2] << " " << subdetfound[2] << "/"
1183  << subdettotal[2];
1184  LOGPRINT << " TID: " << double(subdetfound[3]) / subdettotal[3] << " " << subdetfound[3] << "/"
1185  << subdettotal[3];
1186  LOGPRINT << " TEC: " << double(subdetfound[4]) / subdettotal[4] << " " << subdetfound[4] << "/"
1187  << subdettotal[4];
1188 }
#define LOGPRINT

Member Data Documentation

◆ alllayerfound

int SiStripHitEffFromCalibTree::alllayerfound[35]
private

Definition at line 188 of file SiStripHitEffFromCalibTree.cc.

Referenced by algoAnalyze(), and makeSummary().

◆ alllayertotal

int SiStripHitEffFromCalibTree::alllayertotal[35]
private

Definition at line 187 of file SiStripHitEffFromCalibTree.cc.

Referenced by algoAnalyze(), and makeSummary().

◆ autoIneffModTagging_

bool SiStripHitEffFromCalibTree::autoIneffModTagging_
private

Definition at line 139 of file SiStripHitEffFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripHitEffFromCalibTree().

◆ BadModules

map<unsigned int, double> SiStripHitEffFromCalibTree::BadModules
private

Definition at line 189 of file SiStripHitEffFromCalibTree.cc.

Referenced by makeSQLite(), and makeTKMap().

◆ badModulesFile_

string SiStripHitEffFromCalibTree::badModulesFile_
private

Definition at line 138 of file SiStripHitEffFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripHitEffFromCalibTree().

◆ bunchX_

unsigned int SiStripHitEffFromCalibTree::bunchX_
private

Definition at line 145 of file SiStripHitEffFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripHitEffFromCalibTree().

◆ bxHisto

TH1F* SiStripHitEffFromCalibTree::bxHisto
private

Definition at line 158 of file SiStripHitEffFromCalibTree.cc.

Referenced by algoAnalyze().

◆ calibTree_

TTree* SiStripHitEffFromCalibTree::calibTree_
private

Definition at line 134 of file SiStripHitEffFromCalibTree.cc.

Referenced by algoAnalyze().

◆ calibTreeFileNames_

vector<string> SiStripHitEffFromCalibTree::calibTreeFileNames_
private

Definition at line 135 of file SiStripHitEffFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripHitEffFromCalibTree().

◆ clusterMatchingMethod_

unsigned int SiStripHitEffFromCalibTree::clusterMatchingMethod_
private

Definition at line 140 of file SiStripHitEffFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripHitEffFromCalibTree().

◆ clusterTrajDist_

float SiStripHitEffFromCalibTree::clusterTrajDist_
private

Definition at line 142 of file SiStripHitEffFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripHitEffFromCalibTree().

◆ detInfo_

SiStripDetInfo SiStripHitEffFromCalibTree::detInfo_
private

◆ effPlotMin_

float SiStripHitEffFromCalibTree::effPlotMin_
private

Definition at line 153 of file SiStripHitEffFromCalibTree.cc.

Referenced by makeSummary(), and SiStripHitEffFromCalibTree().

◆ eventInfos

map<pair<unsigned int, unsigned int>, array<double, 3> > SiStripHitEffFromCalibTree::eventInfos
private

Definition at line 163 of file SiStripHitEffFromCalibTree.cc.

Referenced by algoAnalyze().

◆ fileInPath_

edm::FileInPath SiStripHitEffFromCalibTree::fileInPath_
private

Definition at line 128 of file SiStripHitEffFromCalibTree.cc.

Referenced by SiStripHitEffFromCalibTree().

◆ fs

edm::Service<TFileService> SiStripHitEffFromCalibTree::fs
private

◆ goodlayerfound

int SiStripHitEffFromCalibTree::goodlayerfound[35]
private

Definition at line 186 of file SiStripHitEffFromCalibTree.cc.

Referenced by algoAnalyze(), and makeSummary().

◆ goodlayertotal

int SiStripHitEffFromCalibTree::goodlayertotal[35]
private

Definition at line 185 of file SiStripHitEffFromCalibTree.cc.

Referenced by algoAnalyze(), and makeSummary().

◆ hits

vector<hit> SiStripHitEffFromCalibTree::hits[23]
private

Definition at line 165 of file SiStripHitEffFromCalibTree.cc.

Referenced by algoAnalyze(), and makeHotColdMaps().

◆ HotColdMaps

vector<TH2F*> SiStripHitEffFromCalibTree::HotColdMaps
private

Definition at line 166 of file SiStripHitEffFromCalibTree.cc.

Referenced by makeHotColdMaps().

◆ instLumiHisto

TH1F* SiStripHitEffFromCalibTree::instLumiHisto
private

Definition at line 159 of file SiStripHitEffFromCalibTree.cc.

Referenced by algoAnalyze(), and makeSummaryVsLumi().

◆ layerfound

long SiStripHitEffFromCalibTree::layerfound[23]
private

Definition at line 173 of file SiStripHitEffFromCalibTree.cc.

Referenced by algoAnalyze(), makeTKMap(), and totalStatistics().

◆ layerfound_perBx

map<unsigned int, vector<int> > SiStripHitEffFromCalibTree::layerfound_perBx
private

Definition at line 175 of file SiStripHitEffFromCalibTree.cc.

Referenced by algoAnalyze(), and makeSummaryVsBx().

◆ layerfound_vsBX

vector<TH1F*> SiStripHitEffFromCalibTree::layerfound_vsBX
private

Definition at line 183 of file SiStripHitEffFromCalibTree.cc.

Referenced by algoAnalyze(), and makeSummaryVsBx().

◆ layerfound_vsCM

vector<TH1F*> SiStripHitEffFromCalibTree::layerfound_vsCM
private

Definition at line 181 of file SiStripHitEffFromCalibTree.cc.

Referenced by algoAnalyze(), and makeSummaryVsCM().

◆ layerfound_vsLumi

vector<TH1F*> SiStripHitEffFromCalibTree::layerfound_vsLumi
private

Definition at line 177 of file SiStripHitEffFromCalibTree.cc.

Referenced by algoAnalyze(), and makeSummaryVsLumi().

◆ layerfound_vsPU

vector<TH1F*> SiStripHitEffFromCalibTree::layerfound_vsPU
private

Definition at line 179 of file SiStripHitEffFromCalibTree.cc.

Referenced by algoAnalyze(), and makeSummaryVsLumi().

◆ layertotal

long SiStripHitEffFromCalibTree::layertotal[23]
private

Definition at line 174 of file SiStripHitEffFromCalibTree.cc.

Referenced by algoAnalyze(), makeTKMap(), and totalStatistics().

◆ layertotal_perBx

map<unsigned int, vector<int> > SiStripHitEffFromCalibTree::layertotal_perBx
private

Definition at line 176 of file SiStripHitEffFromCalibTree.cc.

Referenced by algoAnalyze(), and makeSummaryVsBx().

◆ layertotal_vsBX

vector<TH1F*> SiStripHitEffFromCalibTree::layertotal_vsBX
private

Definition at line 184 of file SiStripHitEffFromCalibTree.cc.

Referenced by algoAnalyze(), and makeSummaryVsBx().

◆ layertotal_vsCM

vector<TH1F*> SiStripHitEffFromCalibTree::layertotal_vsCM
private

Definition at line 182 of file SiStripHitEffFromCalibTree.cc.

Referenced by algoAnalyze(), and makeSummaryVsCM().

◆ layertotal_vsLumi

vector<TH1F*> SiStripHitEffFromCalibTree::layertotal_vsLumi
private

Definition at line 178 of file SiStripHitEffFromCalibTree.cc.

Referenced by algoAnalyze(), and makeSummaryVsLumi().

◆ layertotal_vsPU

vector<TH1F*> SiStripHitEffFromCalibTree::layertotal_vsPU
private

Definition at line 180 of file SiStripHitEffFromCalibTree.cc.

Referenced by algoAnalyze(), and makeSummaryVsLumi().

◆ modCounter

map<unsigned int, pair<unsigned int, unsigned int> > SiStripHitEffFromCalibTree::modCounter[23]
private

Definition at line 167 of file SiStripHitEffFromCalibTree.cc.

Referenced by algoAnalyze(), and makeTKMap().

◆ nBxInAnOrbit_

constexpr double SiStripHitEffFromCalibTree::nBxInAnOrbit_ = 3565
staticprivate

Definition at line 124 of file SiStripHitEffFromCalibTree.cc.

Referenced by algoAnalyze(), and makeSummaryVsBx().

◆ nModsMin_

unsigned int SiStripHitEffFromCalibTree::nModsMin_
private

◆ nTEClayers

unsigned int SiStripHitEffFromCalibTree::nTEClayers
private

◆ PUHisto

TH1F* SiStripHitEffFromCalibTree::PUHisto
private

Definition at line 160 of file SiStripHitEffFromCalibTree.cc.

Referenced by algoAnalyze(), and makeSummaryVsLumi().

◆ quality_

SiStripQuality* SiStripHitEffFromCalibTree::quality_
private

◆ resXSig_

float SiStripHitEffFromCalibTree::resXSig_
private

Definition at line 141 of file SiStripHitEffFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripHitEffFromCalibTree().

◆ showEndcapSides_

bool SiStripHitEffFromCalibTree::showEndcapSides_
private

Definition at line 148 of file SiStripHitEffFromCalibTree.cc.

Referenced by makeSummary(), and SiStripHitEffFromCalibTree().

◆ showOnlyGoodModules_

bool SiStripHitEffFromCalibTree::showOnlyGoodModules_
private

Definition at line 151 of file SiStripHitEffFromCalibTree.cc.

Referenced by makeSummary(), and SiStripHitEffFromCalibTree().

◆ showRings_

bool SiStripHitEffFromCalibTree::showRings_
private

◆ showTOB6TEC9_

bool SiStripHitEffFromCalibTree::showTOB6TEC9_
private

◆ siStripLayers_

constexpr int SiStripHitEffFromCalibTree::siStripLayers_ = 22
staticprivate

◆ spaceBetweenTrains_

unsigned int SiStripHitEffFromCalibTree::spaceBetweenTrains_
private

Definition at line 146 of file SiStripHitEffFromCalibTree.cc.

Referenced by makeSummaryVsBx(), and SiStripHitEffFromCalibTree().

◆ stripsApvEdge_

float SiStripHitEffFromCalibTree::stripsApvEdge_
private

Definition at line 143 of file SiStripHitEffFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripHitEffFromCalibTree().

◆ threshold_

float SiStripHitEffFromCalibTree::threshold_
private

◆ title_

TString SiStripHitEffFromCalibTree::title_
private

◆ tkGeomToken_

const edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> SiStripHitEffFromCalibTree::tkGeomToken_
private

Definition at line 131 of file SiStripHitEffFromCalibTree.cc.

Referenced by algoAnalyze().

◆ tkmap

TrackerMap* SiStripHitEffFromCalibTree::tkmap
private

Definition at line 168 of file SiStripHitEffFromCalibTree.cc.

Referenced by makeTKMap().

◆ tkmapbad

TrackerMap* SiStripHitEffFromCalibTree::tkmapbad
private

Definition at line 169 of file SiStripHitEffFromCalibTree.cc.

Referenced by makeTKMap().

◆ tkmapden

TrackerMap* SiStripHitEffFromCalibTree::tkmapden
private

Definition at line 172 of file SiStripHitEffFromCalibTree.cc.

Referenced by makeTKMap().

◆ tkmapeff

TrackerMap* SiStripHitEffFromCalibTree::tkmapeff
private

Definition at line 170 of file SiStripHitEffFromCalibTree.cc.

Referenced by makeTKMap().

◆ tkMapMin_

float SiStripHitEffFromCalibTree::tkMapMin_
private

Definition at line 152 of file SiStripHitEffFromCalibTree.cc.

Referenced by makeTKMap(), and SiStripHitEffFromCalibTree().

◆ tkmapnum

TrackerMap* SiStripHitEffFromCalibTree::tkmapnum
private

Definition at line 171 of file SiStripHitEffFromCalibTree.cc.

Referenced by makeTKMap().

◆ tTopoToken_

const edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> SiStripHitEffFromCalibTree::tTopoToken_
private

Definition at line 132 of file SiStripHitEffFromCalibTree.cc.

Referenced by algoAnalyze().

◆ useCM_

bool SiStripHitEffFromCalibTree::useCM_
private

Definition at line 147 of file SiStripHitEffFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripHitEffFromCalibTree().

◆ useOnlyHighPurityTracks_

bool SiStripHitEffFromCalibTree::useOnlyHighPurityTracks_
private

Definition at line 144 of file SiStripHitEffFromCalibTree.cc.

Referenced by algoAnalyze(), and SiStripHitEffFromCalibTree().