CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions | Private Attributes
SiPixelSCurveCalibrationAnalysis Class Reference

#include <SiPixelSCurveCalibrationAnalysis.h>

Inheritance diagram for SiPixelSCurveCalibrationAnalysis:
SiPixelOfflineCalibAnalysisBase edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

void buildACurveHistogram (const uint32_t &detid, const uint32_t &row, const uint32_t &col, sCurveErrorFlag errorFlag, const std::vector< float > &efficiencies, const std::vector< float > &errors)
 
bool doFits (uint32_t detid, std::vector< SiPixelCalibDigi >::const_iterator ipix) override
 
void doSetup (const edm::ParameterSet &)
 
sCurveErrorFlag estimateSCurveParameters (const std::vector< float > &eff, float &threshold, float &sigma)
 
sCurveErrorFlag fittedSCurveSanityCheck (float threshold, float sigma, float amplitude)
 
 SiPixelSCurveCalibrationAnalysis (const edm::ParameterSet &iConfig)
 
 ~SiPixelSCurveCalibrationAnalysis () override
 
- Public Member Functions inherited from SiPixelOfflineCalibAnalysisBase
void addTF1ToDQMMonitoringElement (MonitorElement *ele, TF1 *func)
 
MonitorElementbookDQMHistogram1D (uint32_t detid, std::string name, std::string title, int nchX, double lowX, double highX)
 
MonitorElementbookDQMHistogram1D (uint32_t detid, std::string name, std::string title, int nchX, float *xbinsize)
 
MonitorElementbookDQMHistogram2D (uint32_t detid, std::string name, std::string title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
 
MonitorElementbookDQMHistoPlaquetteSummary2D (uint32_t detid, std::string name, std::string title)
 
std::vector< uint32_t > & getRunNumbers ()
 
bool setDQMDirectory (std::string dirName)
 
bool setDQMDirectory (uint32_t detID)
 
 SiPixelOfflineCalibAnalysisBase ()
 
 SiPixelOfflineCalibAnalysisBase (const edm::ParameterSet &)
 
std::string translateDetIdToString (uint32_t detid)
 
 ~SiPixelOfflineCalibAnalysisBase () override
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
 ~EDAnalyzer () 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 &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
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::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Public Attributes

std::vector< float > vCalPointsAsFloats_
 

Static Public Attributes

static std::vector< float > effErrors_
 
static std::vector< float > efficiencies_
 
- Static Public Attributes inherited from SiPixelOfflineCalibAnalysisBase
static TF1 * fitFunction_ = nullptr
 

Private Member Functions

void calibrationEnd () override
 
void calibrationSetup (const edm::EventSetup &iSetup) override
 
bool checkCorrectCalibrationType () override
 
void makeThresholdSummary (void)
 
void newDetID (uint32_t detid) override
 

Private Attributes

unsigned int curvesSavedCounter_
 
std::map< uint32_t, bool > detIDsToSave_
 
detIDHistogramMap histograms_
 
unsigned int maxCurvesToSave_
 
double maximumEffAsymptote_
 
double maximumSigma_
 
double maximumSigmaBin_
 
double maximumThreshold_
 
double maximumThresholdBin_
 
double minimumChi2prob_
 
double minimumEffAsymptote_
 
double minimumSigma_
 
double minimumThreshold_
 
std::vector< std::string > plaquettesToSave_
 
bool printoutthresholds_
 
bool saveCurvesThatFlaggedBad_
 
std::string thresholdfilename_
 
bool useDetectorHierarchyFolders_
 
bool write2dFitResult_
 
bool write2dHistograms_
 
bool writeZeroes_
 

Additional Inherited Members

- Public Types inherited from SiPixelOfflineCalibAnalysisBase
typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 
- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from SiPixelOfflineCalibAnalysisBase
static const std::vector< short > * getVcalValues ()
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsInputProcessBlocks ()
 
static bool wantsProcessBlocks ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- Protected Member Functions inherited from SiPixelOfflineCalibAnalysisBase
uint32_t & EventNumber ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
- Protected Attributes inherited from SiPixelOfflineCalibAnalysisBase
edm::ESHandle< SiPixelCalibConfigurationcalib_
 
std::string calibrationMode_
 
edm::ESHandle< TrackerGeometrygeom_
 
short nTriggers_
 
edm::ESHandle< SiPixelFedCablingMaptheCablingMap_
 
- Static Protected Attributes inherited from SiPixelOfflineCalibAnalysisBase
static std::vector< short > vCalValues_
 

Detailed Description

CalibTracker/SiPixelSCurveCalibration/src/SiPixelSCurveCalibrationAnalysis.cc

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

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

Definition at line 62 of file SiPixelSCurveCalibrationAnalysis.h.

Constructor & Destructor Documentation

◆ SiPixelSCurveCalibrationAnalysis()

SiPixelSCurveCalibrationAnalysis::SiPixelSCurveCalibrationAnalysis ( const edm::ParameterSet iConfig)
inlineexplicit

Definition at line 64 of file SiPixelSCurveCalibrationAnalysis.h.

66  doSetup(iConfig);
67  };

References doSetup().

◆ ~SiPixelSCurveCalibrationAnalysis()

SiPixelSCurveCalibrationAnalysis::~SiPixelSCurveCalibrationAnalysis ( )
override

Definition at line 137 of file SiPixelSCurveCalibrationAnalysis.cc.

137  {
138  // do nothing
139 }

Member Function Documentation

◆ buildACurveHistogram()

void SiPixelSCurveCalibrationAnalysis::buildACurveHistogram ( const uint32_t &  detid,
const uint32_t &  row,
const uint32_t &  col,
sCurveErrorFlag  errorFlag,
const std::vector< float > &  efficiencies,
const std::vector< float > &  errors 
)

Definition at line 141 of file SiPixelSCurveCalibrationAnalysis.cc.

146  {
148  edm::LogWarning("SiPixelSCurveCalibrationAnalysis")
149  << "WARNING: Request to save curve for [detid](col/row): [" << detid << "](" << col << "/" << row
150  << ") denied. Maximum number of saved curves (defined in .cfi) "
151  "exceeded.";
152  return;
153  }
154  std::ostringstream rootName;
155  rootName << "SCurve_row_" << row << "_col_" << col;
156  std::ostringstream humanName;
157  humanName << translateDetIdToString(detid) << "_" << rootName.str() << "_ErrorFlag_" << (int)errorFlag;
158 
159  unsigned int numberOfVCalPoints = vCalPointsAsFloats_.size() - 1; // minus one is necessary since the lower
160  // edge of the last bin must be added
161  if (efficiencies.size() != numberOfVCalPoints || errors.size() != numberOfVCalPoints) {
162  edm::LogError("SiPixelSCurveCalibrationAnalysis")
163  << "Error saving single curve histogram! Number of Vcal values (" << numberOfVCalPoints
164  << ") does not match number of efficiency points or error points!";
165  return;
166  }
167  setDQMDirectory(detid);
168  float *vcalValuesToPassToCrappyRoot = &vCalPointsAsFloats_[0];
169  MonitorElement *aBadHisto =
170  bookDQMHistogram1D(detid,
171  rootName.str(),
172  humanName.str(),
173  numberOfVCalPoints,
174  vcalValuesToPassToCrappyRoot); // ROOT only takes an input as array. :(
175  // HOORAY FOR CINT!
177  for (unsigned int iBin = 0; iBin < numberOfVCalPoints; ++iBin) {
178  int rootBin = iBin + 1; // root bins start at 1
179  aBadHisto->setBinContent(rootBin, efficiencies[iBin]);
180  aBadHisto->setBinError(rootBin, errors[iBin]);
181  }
182 }

References SiPixelOfflineCalibAnalysisBase::bookDQMHistogram1D(), cuy::col, curvesSavedCounter_, electronProducer_cfi::efficiencies, createfilelist::int, maxCurvesToSave_, dqm::impl::MonitorElement::setBinContent(), dqm::impl::MonitorElement::setBinError(), SiPixelOfflineCalibAnalysisBase::setDQMDirectory(), SiPixelOfflineCalibAnalysisBase::translateDetIdToString(), and vCalPointsAsFloats_.

Referenced by doFits().

◆ calibrationEnd()

void SiPixelSCurveCalibrationAnalysis::calibrationEnd ( )
overrideprivatevirtual

Reimplemented from SiPixelOfflineCalibAnalysisBase.

Definition at line 19 of file SiPixelSCurveCalibrationAnalysis.cc.

19  {
22 }

References makeThresholdSummary(), and printoutthresholds_.

◆ calibrationSetup()

void SiPixelSCurveCalibrationAnalysis::calibrationSetup ( const edm::EventSetup iSetup)
overrideprivatevirtual

Reimplemented from SiPixelOfflineCalibAnalysisBase.

Definition at line 184 of file SiPixelSCurveCalibrationAnalysis.cc.

184  {
185  edm::LogInfo("SiPixelSCurveCalibrationAnalysis")
186  << "Calibration Settings: VCalLow: " << vCalValues_[0] << " VCalHigh: " << vCalValues_[vCalValues_.size() - 1]
187  << " nVCal: " << vCalValues_.size() << " nTriggers: " << nTriggers_;
190  // build the vCal values as a vector of floats if we want to save single
191  // curves
192  const std::vector<short> *theVCalValues = this->getVcalValues();
193  unsigned int numberOfVCalPoints = theVCalValues->size();
194  edm::LogWarning("SiPixelSCurveCalibrationAnalysis")
195  << "WARNING: Option set to save indiviual S-Curves - max number: " << maxCurvesToSave_
196  << " This can lead to large memory consumption! (Got " << numberOfVCalPoints << " VCal Points";
197  for (unsigned int i = 0; i < numberOfVCalPoints; i++) {
198  vCalPointsAsFloats_.push_back(static_cast<float>((*theVCalValues)[i]));
199  edm::LogInfo("SiPixelSCurveCalibrationAnalysis") << "Adding calibration Vcal: " << (*theVCalValues)[i];
200  }
201  // must add lower edge of last bin to the vector
202  vCalPointsAsFloats_.push_back(vCalPointsAsFloats_[numberOfVCalPoints - 1] + 1);
203  }
204 
205  fitFunction_ = new TF1("sCurve",
206  "0.5*[2]*(1+TMath::Erf( (x-[0]) / ([1]*sqrt(2)) ) )",
207  vCalValues_[0],
208  vCalValues_[vCalValues_.size() - 1]);
209 }

References curvesSavedCounter_, SiPixelOfflineCalibAnalysisBase::fitFunction_, SiPixelOfflineCalibAnalysisBase::getVcalValues(), mps_fire::i, maxCurvesToSave_, SiPixelOfflineCalibAnalysisBase::nTriggers_, saveCurvesThatFlaggedBad_, tools::TF1, vCalPointsAsFloats_, and SiPixelOfflineCalibAnalysisBase::vCalValues_.

◆ checkCorrectCalibrationType()

bool SiPixelSCurveCalibrationAnalysis::checkCorrectCalibrationType ( )
overrideprivatevirtual

Reimplemented from SiPixelOfflineCalibAnalysisBase.

Definition at line 211 of file SiPixelSCurveCalibrationAnalysis.cc.

211  {
212  if (calibrationMode_ == "SCurve")
213  return true;
214  else if (calibrationMode_ == "unknown") {
215  edm::LogInfo("SiPixelSCurveCalibrationAnalysis")
216  << "calibration mode is: " << calibrationMode_ << ", continuing anyway...";
217  return true;
218  } else {
219  // edm::LogDebug("SiPixelSCurveCalibrationAnalysis") << "unknown
220  // calibration mode for SCurves, should be \"SCurve\" and is \"" <<
221  // calibrationMode_ << "\"";
222  }
223  return false;
224 }

References SiPixelOfflineCalibAnalysisBase::calibrationMode_.

◆ doFits()

bool SiPixelSCurveCalibrationAnalysis::doFits ( uint32_t  detid,
std::vector< SiPixelCalibDigi >::const_iterator  ipix 
)
overridevirtual

Reimplemented from SiPixelOfflineCalibAnalysisBase.

Definition at line 323 of file SiPixelSCurveCalibrationAnalysis.cc.

323  {
324  sCurveErrorFlag errorFlag = errOK;
325  uint32_t nVCalPts = calibDigi->getnpoints();
326  // reset and fill static datamembers with vector of points and errors
327  efficiencies_.resize(0);
328  effErrors_.resize(0);
329  for (uint32_t iVcalPt = 0; iVcalPt < nVCalPts; iVcalPt++) {
330  float eff;
331  float error;
332  calculateEffAndError(calibDigi->getnentries(iVcalPt), nTriggers_, eff, error);
333  edm::LogInfo("SiPixelSCurveCalibrationAnalysis")
334  << "Eff: " << eff << " Error: " << error << " nEntries: " << calibDigi->getnentries(iVcalPt)
335  << " nTriggers: " << nTriggers_ << " VCalPt " << vCalValues_[iVcalPt];
336  efficiencies_.push_back(eff);
337  effErrors_.push_back(error);
338  }
339 
340  // estimate the S-Curve parameters
341  float thresholdGuess = -1.0;
342  float sigmaGuess = -1.0;
343  errorFlag = estimateSCurveParameters(efficiencies_, thresholdGuess, sigmaGuess);
344 
345  // these -1.0 default values will only be filled if the curve is all zeroes,
346  // or doesn't turn on, WHICH INDICATES A SERIOUS PROBLEM
347  Double_t sigma = -1.0;
348  Double_t sigmaError = -1.0;
349  Double_t threshold = -1.0;
350  Double_t thresholdError = -1.0;
351  Double_t amplitude = -1.0;
352  Double_t amplitudeError = -1.0;
353  Double_t chi2 = -1.0;
354  // calculate NDF
355  Int_t nDOF = vCalValues_.size() - 3;
356  Double_t chi2probability = 0;
357 
358  if (errorFlag == errOK) // only do fit if curve is fittable
359  {
360  // set up minuit fit
361  TMinuit *gMinuit = new TMinuit(3);
362  gMinuit->SetPrintLevel(-1); // save ourselves from gigabytes of stdout
363  gMinuit->SetFCN(chi2toMinimize);
364 
365  // define threshold parameters - choose step size 1, max 300, min -50
366  gMinuit->DefineParameter(0, "Threshold", (Double_t)thresholdGuess, 1, -50, 300);
367  // sigma
368  gMinuit->DefineParameter(1, "Sigma", (Double_t)sigmaGuess, 0.1, 0, 255);
369  // amplitude
370  gMinuit->DefineParameter(2, "Amplitude", 1, 0.1, -0.001, 200);
371 
372  // Do Chi2 minimazation
373  gMinuit->Migrad();
374  gMinuit->GetParameter(0, threshold, thresholdError);
375  gMinuit->GetParameter(1, sigma, sigmaError);
376  gMinuit->GetParameter(2, amplitude, amplitudeError);
377 
378  // get Chi2
379  Double_t params[3] = {threshold, sigma, amplitude};
380  gMinuit->Eval(3, nullptr, chi2, params, 0);
381  // calculate Chi2 proability
382  if (nDOF <= 0)
383  chi2probability = 0;
384  else
385  chi2probability = TMath::Prob(chi2, nDOF);
386 
387  // check to make sure output makes sense (i.e. threshold > 0)
388  if (chi2probability > minimumChi2prob_)
389  errorFlag = fittedSCurveSanityCheck(threshold, sigma, amplitude);
390  else
391  errorFlag = errBadChi2Prob;
392 
393  edm::LogInfo("SiPixelSCurveCalibrationAnalysis")
394  << "Fit finished with errorFlag: " << errorFlag << " - threshold: " << threshold << " sigma: " << sigma
395  << " chi2: " << chi2 << " nDOF: " << nDOF << " chi2Prob: " << chi2probability
396  << " chi2MinUser: " << minimumChi2prob_;
397 
398  delete gMinuit;
399  }
400  // get row and column for this pixel
401  uint32_t row = calibDigi->row();
402  uint32_t col = calibDigi->col();
403 
404  // get iterator to histogram holder for this detid
405  detIDHistogramMap::iterator thisDetIdHistoGrams;
406  thisDetIdHistoGrams = histograms_.find(detid);
407  if (thisDetIdHistoGrams != histograms_.end()) {
408  edm::LogInfo("SiPixelSCurveCalibrationAnalysisHistogramReport")
409  << "Filling histograms for [detid](col/row): [" << detid << "](" << col << "/" << row
410  << ") ErrorFlag: " << errorFlag;
411  // always fill fit result
412  (*thisDetIdHistoGrams).second[kFitResultSummary]->Fill(errorFlag);
413  if (write2dFitResult_)
414  (*thisDetIdHistoGrams)
415  .second[kFitResults]
416  ->setBinContent(col + 1,
417  row + 1,
418  errorFlag); // +1 because root bins start at 1
419 
420  // fill sigma/threshold result
421  (*thisDetIdHistoGrams).second[kSigmaSummary]->Fill(sigma);
422  (*thisDetIdHistoGrams).second[kThresholdSummary]->Fill(threshold);
423  if (write2dHistograms_) {
424  (*thisDetIdHistoGrams)
425  .second[kSigmas]
426  ->setBinContent(col + 1,
427  row + 1,
428  sigma); // +1 because root bins start at 1
429  (*thisDetIdHistoGrams)
430  .second[kThresholds]
431  ->setBinContent(col + 1,
432  row + 1,
433  threshold); // +1 because root bins start at 1
434  }
435  // fill chi2
436  (*thisDetIdHistoGrams).second[kChi2Summary]->Fill(chi2probability);
437  if (write2dHistograms_)
438  (*thisDetIdHistoGrams).second[kChi2s]->Fill(col, row, chi2probability);
439  }
440  // save individual curves, if requested
442  bool thisDetIDinList = false;
443  if (detIDsToSave_.find(detid) != detIDsToSave_.end()) // see if we want to save this histogram
444  thisDetIDinList = true;
445 
446  if (errorFlag != errOK || thisDetIDinList) {
447  edm::LogError("SiPixelSCurveCalibrationAnalysis") << "Saving error histogram for [detid](col/row): [" << detid
448  << "](" << col << "/" << row << ") ErrorFlag: " << errorFlag;
449  buildACurveHistogram(detid, row, col, errorFlag, efficiencies_, effErrors_);
450  }
451  }
452 
453  return true;
454 }

References CustomPhysics_cfi::amplitude, buildACurveHistogram(), calculateEffAndError(), hltPixelTracks_cff::chi2, chi2toMinimize(), cuy::col, detIDsToSave_, effErrors_, efficiencies_, errBadChi2Prob, errOK, relativeConstraints::error, estimateSCurveParameters(), fittedSCurveSanityCheck(), fitWZ::gMinuit, histograms_, kChi2s, kChi2Summary, kFitResults, kFitResultSummary, kSigmas, kSigmaSummary, kThresholds, kThresholdSummary, minimumChi2prob_, SiPixelOfflineCalibAnalysisBase::nTriggers_, CalibrationSummaryClient_cfi::params, saveCurvesThatFlaggedBad_, remoteMonitoring_LED_IterMethod_cfg::threshold, SiPixelOfflineCalibAnalysisBase::vCalValues_, write2dFitResult_, and write2dHistograms_.

◆ doSetup()

void SiPixelSCurveCalibrationAnalysis::doSetup ( const edm::ParameterSet iConfig)

Definition at line 107 of file SiPixelSCurveCalibrationAnalysis.cc.

107  {
108  edm::LogInfo("SiPixelSCurveCalibrationAnalysis") << "Setting up calibration paramters.";
109  std::vector<uint32_t> anEmptyDefaultVectorOfUInts;
110  std::vector<uint32_t> detIDsToSaveVector_;
111  useDetectorHierarchyFolders_ = iConfig.getUntrackedParameter<bool>("useDetectorHierarchyFolders", true);
112  saveCurvesThatFlaggedBad_ = iConfig.getUntrackedParameter<bool>("saveCurvesThatFlaggedBad", false);
113  detIDsToSaveVector_ =
114  iConfig.getUntrackedParameter<std::vector<uint32_t>>("detIDsToSave", anEmptyDefaultVectorOfUInts);
115  maxCurvesToSave_ = iConfig.getUntrackedParameter<uint32_t>("maxCurvesToSave", 1000);
116  write2dHistograms_ = iConfig.getUntrackedParameter<bool>("write2dHistograms", true);
117  write2dFitResult_ = iConfig.getUntrackedParameter<bool>("write2dFitResult", true);
118  printoutthresholds_ = iConfig.getUntrackedParameter<bool>("writeOutThresholdSummary", true);
119  thresholdfilename_ = iConfig.getUntrackedParameter<std::string>("thresholdOutputFileName", "thresholds.txt");
120  minimumChi2prob_ = iConfig.getUntrackedParameter<double>("minimumChi2prob", 0);
121  minimumThreshold_ = iConfig.getUntrackedParameter<double>("minimumThreshold", -10);
122  maximumThreshold_ = iConfig.getUntrackedParameter<double>("maximumThreshold", 300);
123  minimumSigma_ = iConfig.getUntrackedParameter<double>("minimumSigma", 0);
124  maximumSigma_ = iConfig.getUntrackedParameter<double>("maximumSigma", 100);
125  minimumEffAsymptote_ = iConfig.getUntrackedParameter<double>("minimumEffAsymptote", 0);
126  maximumEffAsymptote_ = iConfig.getUntrackedParameter<double>("maximumEffAsymptote", 1000);
127  maximumSigmaBin_ = iConfig.getUntrackedParameter<double>("maximumSigmaBin", 10);
128  maximumThresholdBin_ = iConfig.getUntrackedParameter<double>("maximumThresholdBin", 255);
129 
130  writeZeroes_ = iConfig.getUntrackedParameter<bool>("alsoWriteZeroThresholds", false);
131 
132  // convert the vector into a map for quicker lookups.
133  for (unsigned int i = 0; i < detIDsToSaveVector_.size(); i++)
134  detIDsToSave_.insert(std::make_pair(detIDsToSaveVector_[i], true));
135 }

References detIDsToSave_, edm::ParameterSet::getUntrackedParameter(), mps_fire::i, maxCurvesToSave_, maximumEffAsymptote_, maximumSigma_, maximumSigmaBin_, maximumThreshold_, maximumThresholdBin_, minimumChi2prob_, minimumEffAsymptote_, minimumSigma_, minimumThreshold_, printoutthresholds_, saveCurvesThatFlaggedBad_, AlCaHLTBitMon_QueryRunRegistry::string, thresholdfilename_, useDetectorHierarchyFolders_, write2dFitResult_, write2dHistograms_, and writeZeroes_.

Referenced by SiPixelSCurveCalibrationAnalysis().

◆ estimateSCurveParameters()

sCurveErrorFlag SiPixelSCurveCalibrationAnalysis::estimateSCurveParameters ( const std::vector< float > &  eff,
float &  threshold,
float &  sigma 
)

Definition at line 226 of file SiPixelSCurveCalibrationAnalysis.cc.

228  {
230  bool allZeroSoFar = true;
231  int turnOnBin = -1;
232  int saturationBin = -1;
233  for (uint32_t iVcalPt = 0; iVcalPt < eff.size(); iVcalPt++) {
234  if (allZeroSoFar && eff[iVcalPt] != 0) {
235  turnOnBin = iVcalPt;
236  allZeroSoFar = false;
238  } else if (eff[iVcalPt] > 0.90) {
239  saturationBin = iVcalPt;
240  short turnOnVcal = vCalValues_[turnOnBin];
241  short saturationVcal = vCalValues_[saturationBin];
242  short delta = saturationVcal - turnOnVcal;
243  sigma = delta * 0.682;
244  if (sigma < 1) // check to make sure sigma guess is larger than our X resolution.
245  // Hopefully prevents Minuit from getting stuck at boundary
246  sigma = 1;
247  threshold = turnOnVcal + (0.5 * delta);
248  return errOK;
249  }
250  }
251  return output;
252 }

References dumpMFGeometry_cfg::delta, errAllZeros, errNoTurnOn, errOK, convertSQLitetoXML_cfg::output, remoteMonitoring_LED_IterMethod_cfg::threshold, and SiPixelOfflineCalibAnalysisBase::vCalValues_.

Referenced by doFits().

◆ fittedSCurveSanityCheck()

sCurveErrorFlag SiPixelSCurveCalibrationAnalysis::fittedSCurveSanityCheck ( float  threshold,
float  sigma,
float  amplitude 
)

Definition at line 254 of file SiPixelSCurveCalibrationAnalysis.cc.

256  {
257  // check if nonsensical
258  if (threshold > vCalValues_[vCalValues_.size() - 1] || threshold < vCalValues_[0] ||
259  sigma > vCalValues_[vCalValues_.size() - 1] - vCalValues_[0])
260  return errFitNonPhysical;
261 
262  if (threshold < minimumThreshold_ || threshold > maximumThreshold_ || sigma < minimumSigma_ ||
263  sigma > maximumSigma_ || amplitude < minimumEffAsymptote_ || amplitude > maximumEffAsymptote_)
264  return errFlaggedBadByUser;
265 
266  return errOK;
267 }

References errFitNonPhysical, errFlaggedBadByUser, errOK, maximumEffAsymptote_, maximumSigma_, maximumThreshold_, minimumSigma_, remoteMonitoring_LED_IterMethod_cfg::threshold, and SiPixelOfflineCalibAnalysisBase::vCalValues_.

Referenced by doFits().

◆ makeThresholdSummary()

void SiPixelSCurveCalibrationAnalysis::makeThresholdSummary ( void  )
private

Definition at line 24 of file SiPixelSCurveCalibrationAnalysis.cc.

24  {
25  std::ofstream myfile;
26  myfile.open(thresholdfilename_.c_str());
27  for (detIDHistogramMap::iterator thisDetIdHistoGrams = histograms_.begin(); thisDetIdHistoGrams != histograms_.end();
28  ++thisDetIdHistoGrams) {
29  // loop over det id (det id = number (unsigned int) of pixel module
30  const MonitorElement *sigmahist = (*thisDetIdHistoGrams).second[kSigmas];
31  const MonitorElement *thresholdhist = (*thisDetIdHistoGrams).second[kThresholds];
32  uint32_t detid = (*thisDetIdHistoGrams).first;
33  std::string name = sigmahist->getTitle();
34  std::string rocname = name.substr(0, name.size() - 7);
35  rocname += "_ROC";
36  int total_rows = sigmahist->getNbinsY();
37  int total_columns = sigmahist->getNbinsX();
38  // loop over all rows on columns on all ROCs
39  for (int irow = 0; irow < total_rows; ++irow) {
40  for (int icol = 0; icol < total_columns; ++icol) {
41  float threshold_error = sigmahist->getBinContent(icol + 1, irow + 1); // +1 because root bins start at 1
42  if (writeZeroes_ || (!writeZeroes_ && threshold_error > 0)) {
43  // changing from offline to online numbers
44  int realfedID = -1;
45  for (int fedid = 0; fedid <= 40; ++fedid) {
47  if (converter.hasDetUnit(detid)) {
48  realfedID = fedid;
49  break;
50  }
51  }
52  if (realfedID == -1) {
53  std::cout << "error: could not obtain real fed ID" << std::endl;
54  }
55  sipixelobjects::DetectorIndex detector = {detid, irow, icol};
57  SiPixelFrameConverter formatter(theCablingMap_.product(), realfedID);
58  formatter.toCabling(cabling, detector);
59  // cabling should now contain cabling.roc and cabling.dcol and
60  // cabling.pxid however, the coordinates now need to be converted from
61  // dcl,pxid to the row,col coordinates used in the calibration info
63  loc.dcol = cabling.dcol;
64  loc.pxid = cabling.pxid;
65  // FIX to adhere to new cabling map. To be replaced with
66  // CalibTracker/SiPixelTools detid - > hardware id classes ASAP.
67  // const sipixelobjects::PixelFEDCabling *theFed=
68  // theCablingMap.product()->fed(realfedID); const
69  // sipixelobjects::PixelFEDLink * link =
70  // theFed->link(cabling.link); const sipixelobjects::PixelROC
71  // *theRoc = link->roc(cabling.roc);
72  sipixelobjects::LocalPixel locpixel(loc);
73  sipixelobjects::CablingPathToDetUnit path = {static_cast<unsigned int>(realfedID),
74  static_cast<unsigned int>(cabling.link),
75  static_cast<unsigned int>(cabling.roc)};
77  // END of FIX
78  int newrow = locpixel.rocRow();
79  int newcol = locpixel.rocCol();
80  myfile << rocname << theRoc->idInDetUnit() << " " << newcol << " " << newrow << " "
81  << thresholdhist->getBinContent(icol + 1, irow + 1) << " "
82  << threshold_error; // +1 because root bins start at 1
83  myfile << "\n";
84  }
85  }
86  }
87  }
88  myfile.close();
89 }

References gather_cfg::cout, sipixelobjects::ElectronicIndex::dcol, sipixelobjects::LocalPixel::DcolPxid::dcol, hgcalTestNeighbor_cfi::detector, PixelSLinkDataInputSource_cfi::fedid, SiPixelFedCablingMap::findItem(), dqm::impl::MonitorElement::getBinContent(), dqm::impl::MonitorElement::getNbinsX(), dqm::impl::MonitorElement::getNbinsY(), dqm::impl::MonitorElement::getTitle(), histograms_, sipixelobjects::PixelROC::idInDetUnit(), kSigmas, kThresholds, sipixelobjects::ElectronicIndex::link, Skims_PA_cff::name, castor_dqm_sourceclient_file_cfg::path, edm::ESHandle< T >::product(), sipixelobjects::ElectronicIndex::pxid, sipixelobjects::LocalPixel::DcolPxid::pxid, sipixelobjects::ElectronicIndex::roc, sipixelobjects::LocalPixel::rocCol(), sipixelobjects::LocalPixel::rocRow(), AlCaHLTBitMon_QueryRunRegistry::string, SiPixelOfflineCalibAnalysisBase::theCablingMap_, thresholdfilename_, SiPixelFrameConverter::toCabling(), and writeZeroes_.

Referenced by calibrationEnd().

◆ newDetID()

void SiPixelSCurveCalibrationAnalysis::newDetID ( uint32_t  detid)
overrideprivatevirtual

Reimplemented from SiPixelOfflineCalibAnalysisBase.

Definition at line 278 of file SiPixelSCurveCalibrationAnalysis.cc.

278  {
279  edm::LogInfo("SiPixelSCurveCalibrationAnalysis")
280  << "Found a new DetID (" << detid << ")! Checking to make sure it has not been added.";
281  // ensure that this DetID has not been added yet
282  sCurveHistogramHolder tempMap;
283  std::pair<detIDHistogramMap::iterator, bool> insertResult;
284  insertResult = histograms_.insert(std::make_pair(detid, tempMap));
285  if (insertResult.second) // indicates successful insertion
286  {
287  edm::LogInfo("SiPixelSCurveCalibrationAnalysisHistogramReport")
288  << "Histogram Map.insert() returned true! Booking new histogrames for "
289  "detID: "
290  << detid;
291  // use detector hierarchy folders if desired
293  setDQMDirectory(detid);
294 
295  std::string detIdName = translateDetIdToString(detid);
296  if (write2dHistograms_) {
297  MonitorElement *D2sigma = bookDQMHistoPlaquetteSummary2D(detid, "ScurveSigmas", detIdName + " Sigmas");
298  MonitorElement *D2thresh = bookDQMHistoPlaquetteSummary2D(detid, "ScurveThresholds", detIdName + " Thresholds");
299  MonitorElement *D2chi2 = bookDQMHistoPlaquetteSummary2D(detid, "ScurveChi2Prob", detIdName + " Chi2Prob");
300  insertResult.first->second.insert(std::make_pair(kSigmas, D2sigma));
301  insertResult.first->second.insert(std::make_pair(kThresholds, D2thresh));
302  insertResult.first->second.insert(std::make_pair(kChi2s, D2chi2));
303  }
304  if (write2dFitResult_) {
305  MonitorElement *D2FitResult = bookDQMHistoPlaquetteSummary2D(detid, "ScurveFitResult", detIdName + " Fit Result");
306  insertResult.first->second.insert(std::make_pair(kFitResults, D2FitResult));
307  }
308  MonitorElement *D1sigma =
309  bookDQMHistogram1D(detid, "ScurveSigmasSummary", detIdName + " Sigmas Summary", 100, 0, maximumSigmaBin_);
311  detid, "ScurveThresholdSummary", detIdName + " Thresholds Summary", 255, 0, maximumThresholdBin_);
312  MonitorElement *D1chi2 =
313  bookDQMHistogram1D(detid, "ScurveChi2ProbSummary", detIdName + " Chi2Prob Summary", 101, 0, 1.01);
314  MonitorElement *D1FitResult =
315  bookDQMHistogram1D(detid, "ScurveFitResultSummary", detIdName + " Fit Result Summary", 10, -0.5, 9.5);
316  insertResult.first->second.insert(std::make_pair(kSigmaSummary, D1sigma));
317  insertResult.first->second.insert(std::make_pair(kThresholdSummary, D1thresh));
318  insertResult.first->second.insert(std::make_pair(kChi2Summary, D1chi2));
319  insertResult.first->second.insert(std::make_pair(kFitResultSummary, D1FitResult));
320  }
321 }

References SiPixelOfflineCalibAnalysisBase::bookDQMHistogram1D(), SiPixelOfflineCalibAnalysisBase::bookDQMHistoPlaquetteSummary2D(), histograms_, kChi2s, kChi2Summary, kFitResults, kFitResultSummary, kSigmas, kSigmaSummary, kThresholds, kThresholdSummary, maximumSigmaBin_, maximumThresholdBin_, SiPixelOfflineCalibAnalysisBase::setDQMDirectory(), AlCaHLTBitMon_QueryRunRegistry::string, SiPixelOfflineCalibAnalysisBase::translateDetIdToString(), useDetectorHierarchyFolders_, write2dFitResult_, and write2dHistograms_.

Member Data Documentation

◆ curvesSavedCounter_

unsigned int SiPixelSCurveCalibrationAnalysis::curvesSavedCounter_
private

Definition at line 93 of file SiPixelSCurveCalibrationAnalysis.h.

Referenced by buildACurveHistogram(), and calibrationSetup().

◆ detIDsToSave_

std::map<uint32_t, bool> SiPixelSCurveCalibrationAnalysis::detIDsToSave_
private

Definition at line 100 of file SiPixelSCurveCalibrationAnalysis.h.

Referenced by doFits(), and doSetup().

◆ effErrors_

std::vector< float > SiPixelSCurveCalibrationAnalysis::effErrors_
static

Definition at line 74 of file SiPixelSCurveCalibrationAnalysis.h.

Referenced by chi2toMinimize(), and doFits().

◆ efficiencies_

std::vector< float > SiPixelSCurveCalibrationAnalysis::efficiencies_
static

Definition at line 73 of file SiPixelSCurveCalibrationAnalysis.h.

Referenced by chi2toMinimize(), and doFits().

◆ histograms_

detIDHistogramMap SiPixelSCurveCalibrationAnalysis::histograms_
private

Definition at line 116 of file SiPixelSCurveCalibrationAnalysis.h.

Referenced by doFits(), makeThresholdSummary(), and newDetID().

◆ maxCurvesToSave_

unsigned int SiPixelSCurveCalibrationAnalysis::maxCurvesToSave_
private

◆ maximumEffAsymptote_

double SiPixelSCurveCalibrationAnalysis::maximumEffAsymptote_
private

Definition at line 109 of file SiPixelSCurveCalibrationAnalysis.h.

Referenced by doSetup(), and fittedSCurveSanityCheck().

◆ maximumSigma_

double SiPixelSCurveCalibrationAnalysis::maximumSigma_
private

Definition at line 107 of file SiPixelSCurveCalibrationAnalysis.h.

Referenced by doSetup(), and fittedSCurveSanityCheck().

◆ maximumSigmaBin_

double SiPixelSCurveCalibrationAnalysis::maximumSigmaBin_
private

Definition at line 113 of file SiPixelSCurveCalibrationAnalysis.h.

Referenced by doSetup(), and newDetID().

◆ maximumThreshold_

double SiPixelSCurveCalibrationAnalysis::maximumThreshold_
private

Definition at line 105 of file SiPixelSCurveCalibrationAnalysis.h.

Referenced by doSetup(), and fittedSCurveSanityCheck().

◆ maximumThresholdBin_

double SiPixelSCurveCalibrationAnalysis::maximumThresholdBin_
private

Definition at line 112 of file SiPixelSCurveCalibrationAnalysis.h.

Referenced by doSetup(), and newDetID().

◆ minimumChi2prob_

double SiPixelSCurveCalibrationAnalysis::minimumChi2prob_
private

Definition at line 103 of file SiPixelSCurveCalibrationAnalysis.h.

Referenced by doFits(), and doSetup().

◆ minimumEffAsymptote_

double SiPixelSCurveCalibrationAnalysis::minimumEffAsymptote_
private

Definition at line 108 of file SiPixelSCurveCalibrationAnalysis.h.

Referenced by doSetup().

◆ minimumSigma_

double SiPixelSCurveCalibrationAnalysis::minimumSigma_
private

Definition at line 106 of file SiPixelSCurveCalibrationAnalysis.h.

Referenced by doSetup(), and fittedSCurveSanityCheck().

◆ minimumThreshold_

double SiPixelSCurveCalibrationAnalysis::minimumThreshold_
private

Definition at line 104 of file SiPixelSCurveCalibrationAnalysis.h.

Referenced by doSetup().

◆ plaquettesToSave_

std::vector<std::string> SiPixelSCurveCalibrationAnalysis::plaquettesToSave_
private

Definition at line 96 of file SiPixelSCurveCalibrationAnalysis.h.

◆ printoutthresholds_

bool SiPixelSCurveCalibrationAnalysis::printoutthresholds_
private

Definition at line 97 of file SiPixelSCurveCalibrationAnalysis.h.

Referenced by calibrationEnd(), and doSetup().

◆ saveCurvesThatFlaggedBad_

bool SiPixelSCurveCalibrationAnalysis::saveCurvesThatFlaggedBad_
private

Definition at line 90 of file SiPixelSCurveCalibrationAnalysis.h.

Referenced by calibrationSetup(), doFits(), and doSetup().

◆ thresholdfilename_

std::string SiPixelSCurveCalibrationAnalysis::thresholdfilename_
private

Definition at line 99 of file SiPixelSCurveCalibrationAnalysis.h.

Referenced by doSetup(), and makeThresholdSummary().

◆ useDetectorHierarchyFolders_

bool SiPixelSCurveCalibrationAnalysis::useDetectorHierarchyFolders_
private

Definition at line 89 of file SiPixelSCurveCalibrationAnalysis.h.

Referenced by doSetup(), and newDetID().

◆ vCalPointsAsFloats_

std::vector<float> SiPixelSCurveCalibrationAnalysis::vCalPointsAsFloats_

Definition at line 75 of file SiPixelSCurveCalibrationAnalysis.h.

Referenced by buildACurveHistogram(), and calibrationSetup().

◆ write2dFitResult_

bool SiPixelSCurveCalibrationAnalysis::write2dFitResult_
private

Definition at line 95 of file SiPixelSCurveCalibrationAnalysis.h.

Referenced by doFits(), doSetup(), and newDetID().

◆ write2dHistograms_

bool SiPixelSCurveCalibrationAnalysis::write2dHistograms_
private

Definition at line 94 of file SiPixelSCurveCalibrationAnalysis.h.

Referenced by doFits(), doSetup(), and newDetID().

◆ writeZeroes_

bool SiPixelSCurveCalibrationAnalysis::writeZeroes_
private

Definition at line 98 of file SiPixelSCurveCalibrationAnalysis.h.

Referenced by doSetup(), and makeThresholdSummary().

edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
SiPixelSCurveCalibrationAnalysis::useDetectorHierarchyFolders_
bool useDetectorHierarchyFolders_
Definition: SiPixelSCurveCalibrationAnalysis.h:89
SiPixelOfflineCalibAnalysisBase::nTriggers_
short nTriggers_
Definition: SiPixelOfflineCalibAnalysisBase.h:118
SiPixelOfflineCalibAnalysisBase::translateDetIdToString
std::string translateDetIdToString(uint32_t detid)
Definition: SiPixelOfflineCalibAnalysisBase.cc:146
kChi2s
Definition: SiPixelSCurveCalibrationAnalysis.h:35
mps_fire.i
i
Definition: mps_fire.py:428
SiPixelSCurveCalibrationAnalysis::writeZeroes_
bool writeZeroes_
Definition: SiPixelSCurveCalibrationAnalysis.h:98
CustomPhysics_cfi.amplitude
amplitude
Definition: CustomPhysics_cfi.py:12
SiPixelOfflineCalibAnalysisBase::calibrationMode_
std::string calibrationMode_
Definition: SiPixelOfflineCalibAnalysisBase.h:117
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:72
converter
Definition: CandidateProducer.h:25
CalibrationSummaryClient_cfi.params
params
Definition: CalibrationSummaryClient_cfi.py:14
sCurveErrorFlag
sCurveErrorFlag
Definition: SiPixelSCurveCalibrationAnalysis.h:40
SiPixelSCurveCalibrationAnalysis::minimumChi2prob_
double minimumChi2prob_
Definition: SiPixelSCurveCalibrationAnalysis.h:103
kFitResults
Definition: SiPixelSCurveCalibrationAnalysis.h:36
cuy.col
col
Definition: cuy.py:1010
gather_cfg.cout
cout
Definition: gather_cfg.py:144
SiPixelOfflineCalibAnalysisBase::fitFunction_
static TF1 * fitFunction_
Definition: SiPixelOfflineCalibAnalysisBase.h:107
SiPixelSCurveCalibrationAnalysis::thresholdfilename_
std::string thresholdfilename_
Definition: SiPixelSCurveCalibrationAnalysis.h:99
SiPixelOfflineCalibAnalysisBase::SiPixelOfflineCalibAnalysisBase
SiPixelOfflineCalibAnalysisBase()
Definition: SiPixelOfflineCalibAnalysisBase.cc:46
SiPixelSCurveCalibrationAnalysis::detIDsToSave_
std::map< uint32_t, bool > detIDsToSave_
Definition: SiPixelSCurveCalibrationAnalysis.h:100
errFitNonPhysical
Definition: SiPixelSCurveCalibrationAnalysis.h:47
kChi2Summary
Definition: SiPixelSCurveCalibrationAnalysis.h:34
SiPixelSCurveCalibrationAnalysis::estimateSCurveParameters
sCurveErrorFlag estimateSCurveParameters(const std::vector< float > &eff, float &threshold, float &sigma)
Definition: SiPixelSCurveCalibrationAnalysis.cc:226
dqm::legacy::MonitorElement
Definition: MonitorElement.h:461
SiPixelOfflineCalibAnalysisBase::bookDQMHistogram1D
MonitorElement * bookDQMHistogram1D(uint32_t detid, std::string name, std::string title, int nchX, double lowX, double highX)
Definition: SiPixelOfflineCalibAnalysisBase.cc:172
sipixelobjects::ElectronicIndex::dcol
int dcol
Definition: ElectronicIndex.h:8
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
hltPixelTracks_cff.chi2
chi2
Definition: hltPixelTracks_cff.py:25
chi2toMinimize
void chi2toMinimize(int &npar, double *grad, double &fcnval, double *xval, int iflag)
Definition: SiPixelSCurveCalibrationAnalysis.cc:92
kSigmas
Definition: SiPixelSCurveCalibrationAnalysis.h:31
tools.TF1
TF1
Definition: tools.py:23
relativeConstraints.error
error
Definition: relativeConstraints.py:53
SiPixelSCurveCalibrationAnalysis::maximumEffAsymptote_
double maximumEffAsymptote_
Definition: SiPixelSCurveCalibrationAnalysis.h:109
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
fitWZ.gMinuit
gMinuit
Definition: fitWZ.py:36
SiPixelOfflineCalibAnalysisBase::vCalValues_
static std::vector< short > vCalValues_
Definition: SiPixelOfflineCalibAnalysisBase.h:119
sipixelobjects::LocalPixel
identify pixel inside single ROC
Definition: LocalPixel.h:7
SiPixelSCurveCalibrationAnalysis::minimumSigma_
double minimumSigma_
Definition: SiPixelSCurveCalibrationAnalysis.h:106
SiPixelSCurveCalibrationAnalysis::maximumSigma_
double maximumSigma_
Definition: SiPixelSCurveCalibrationAnalysis.h:107
SiPixelSCurveCalibrationAnalysis::efficiencies_
static std::vector< float > efficiencies_
Definition: SiPixelSCurveCalibrationAnalysis.h:73
SiPixelSCurveCalibrationAnalysis::histograms_
detIDHistogramMap histograms_
Definition: SiPixelSCurveCalibrationAnalysis.h:116
errors
Definition: errors.py:1
SiPixelSCurveCalibrationAnalysis::vCalPointsAsFloats_
std::vector< float > vCalPointsAsFloats_
Definition: SiPixelSCurveCalibrationAnalysis.h:75
sipixelobjects::CablingPathToDetUnit
Definition: CablingPathToDetUnit.h:5
SiPixelSCurveCalibrationAnalysis::minimumEffAsymptote_
double minimumEffAsymptote_
Definition: SiPixelSCurveCalibrationAnalysis.h:108
sipixelobjects::ElectronicIndex::pxid
int pxid
Definition: ElectronicIndex.h:9
SiPixelSCurveCalibrationAnalysis::curvesSavedCounter_
unsigned int curvesSavedCounter_
Definition: SiPixelSCurveCalibrationAnalysis.h:93
errAllZeros
Definition: SiPixelSCurveCalibrationAnalysis.h:50
SiPixelFrameConverter::toCabling
int toCabling(sipixelobjects::ElectronicIndex &cabling, const sipixelobjects::DetectorIndex &detector) const
Definition: SiPixelFrameConverter.cc:37
SiPixelOfflineCalibAnalysisBase::bookDQMHistoPlaquetteSummary2D
MonitorElement * bookDQMHistoPlaquetteSummary2D(uint32_t detid, std::string name, std::string title)
Definition: SiPixelOfflineCalibAnalysisBase.cc:197
SiPixelSCurveCalibrationAnalysis::effErrors_
static std::vector< float > effErrors_
Definition: SiPixelSCurveCalibrationAnalysis.h:74
sipixelobjects::ElectronicIndex
Definition: ElectronicIndex.h:5
sipixelobjects::ElectronicIndex::link
int link
Definition: ElectronicIndex.h:6
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
dqm::impl::MonitorElement::getNbinsY
virtual int getNbinsY() const
get # of bins in Y-axis
Definition: MonitorElement.cc:580
sipixelobjects::LocalPixel::DcolPxid::pxid
int pxid
Definition: LocalPixel.h:20
sipixelobjects::LocalPixel::DcolPxid
double collumn and pixel ID in double collumn representation
Definition: LocalPixel.h:19
calculateEffAndError
void calculateEffAndError(int nADCResponse, int nTriggers, float &eff, float &error)
Definition: SiPixelSCurveCalibrationAnalysis.cc:269
dumpMFGeometry_cfg.delta
delta
Definition: dumpMFGeometry_cfg.py:25
electronProducer_cfi.efficiencies
efficiencies
Definition: electronProducer_cfi.py:76
kFitResultSummary
Definition: SiPixelSCurveCalibrationAnalysis.h:37
createfilelist.int
int
Definition: createfilelist.py:10
kThresholdSummary
Definition: SiPixelSCurveCalibrationAnalysis.h:32
SiPixelSCurveCalibrationAnalysis::write2dHistograms_
bool write2dHistograms_
Definition: SiPixelSCurveCalibrationAnalysis.h:94
SiPixelOfflineCalibAnalysisBase::setDQMDirectory
bool setDQMDirectory(std::string dirName)
Definition: SiPixelOfflineCalibAnalysisBase.cc:209
kSigmaSummary
Definition: SiPixelSCurveCalibrationAnalysis.h:30
SiPixelFrameConverter
Definition: SiPixelFrameConverter.h:15
dqm::impl::MonitorElement::getTitle
virtual std::string getTitle() const
get MonitorElement title
Definition: MonitorElement.cc:683
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
SiPixelSCurveCalibrationAnalysis::maximumSigmaBin_
double maximumSigmaBin_
Definition: SiPixelSCurveCalibrationAnalysis.h:113
SiPixelSCurveCalibrationAnalysis::maxCurvesToSave_
unsigned int maxCurvesToSave_
Definition: SiPixelSCurveCalibrationAnalysis.h:91
PixelSLinkDataInputSource_cfi.fedid
fedid
Definition: PixelSLinkDataInputSource_cfi.py:6
errBadChi2Prob
Definition: SiPixelSCurveCalibrationAnalysis.h:46
kThresholds
Definition: SiPixelSCurveCalibrationAnalysis.h:33
SiPixelSCurveCalibrationAnalysis::maximumThresholdBin_
double maximumThresholdBin_
Definition: SiPixelSCurveCalibrationAnalysis.h:112
dqm::impl::MonitorElement::setBinContent
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
Definition: MonitorElement.cc:691
sipixelobjects::PixelROC
Definition: PixelROC.h:23
SiPixelSCurveCalibrationAnalysis::printoutthresholds_
bool printoutthresholds_
Definition: SiPixelSCurveCalibrationAnalysis.h:97
errFlaggedBadByUser
Definition: SiPixelSCurveCalibrationAnalysis.h:44
errNoTurnOn
Definition: SiPixelSCurveCalibrationAnalysis.h:49
SiPixelSCurveCalibrationAnalysis::buildACurveHistogram
void buildACurveHistogram(const uint32_t &detid, const uint32_t &row, const uint32_t &col, sCurveErrorFlag errorFlag, const std::vector< float > &efficiencies, const std::vector< float > &errors)
Definition: SiPixelSCurveCalibrationAnalysis.cc:141
dqm::impl::MonitorElement::getNbinsX
virtual int getNbinsX() const
get # of bins in X-axis
Definition: MonitorElement.cc:574
dqm::impl::MonitorElement::setBinError
virtual void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
Definition: MonitorElement.cc:709
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
SiPixelSCurveCalibrationAnalysis::makeThresholdSummary
void makeThresholdSummary(void)
Definition: SiPixelSCurveCalibrationAnalysis.cc:24
hgcalTestNeighbor_cfi.detector
detector
Definition: hgcalTestNeighbor_cfi.py:6
SiPixelSCurveCalibrationAnalysis::minimumThreshold_
double minimumThreshold_
Definition: SiPixelSCurveCalibrationAnalysis.h:104
SiPixelSCurveCalibrationAnalysis::fittedSCurveSanityCheck
sCurveErrorFlag fittedSCurveSanityCheck(float threshold, float sigma, float amplitude)
Definition: SiPixelSCurveCalibrationAnalysis.cc:254
SiPixelOfflineCalibAnalysisBase::theCablingMap_
edm::ESHandle< SiPixelFedCablingMap > theCablingMap_
Definition: SiPixelOfflineCalibAnalysisBase.h:115
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37
errOK
Definition: SiPixelSCurveCalibrationAnalysis.h:43
SiPixelOfflineCalibAnalysisBase::getVcalValues
static const std::vector< short > * getVcalValues()
Definition: SiPixelOfflineCalibAnalysisBase.cc:144
SiPixelSCurveCalibrationAnalysis::maximumThreshold_
double maximumThreshold_
Definition: SiPixelSCurveCalibrationAnalysis.h:105
remoteMonitoring_LED_IterMethod_cfg.threshold
threshold
Definition: remoteMonitoring_LED_IterMethod_cfg.py:426
SiPixelSCurveCalibrationAnalysis::saveCurvesThatFlaggedBad_
bool saveCurvesThatFlaggedBad_
Definition: SiPixelSCurveCalibrationAnalysis.h:90
SiPixelSCurveCalibrationAnalysis::write2dFitResult_
bool write2dFitResult_
Definition: SiPixelSCurveCalibrationAnalysis.h:95
sCurveHistogramHolder
std::map< sCurveHistogramType, MonitorElement * > sCurveHistogramHolder
Definition: SiPixelSCurveCalibrationAnalysis.h:56
dqm::impl::MonitorElement::getBinContent
virtual double getBinContent(int binx) const
get content of bin (1-D)
Definition: MonitorElement.cc:592
SiPixelFedCablingMap::findItem
const sipixelobjects::PixelROC * findItem(const sipixelobjects::CablingPathToDetUnit &path) const final
Definition: SiPixelFedCablingMap.cc:124
SiPixelSCurveCalibrationAnalysis::doSetup
void doSetup(const edm::ParameterSet &)
Definition: SiPixelSCurveCalibrationAnalysis.cc:107
sipixelobjects::PixelROC::idInDetUnit
unsigned int idInDetUnit() const
id of this ROC in DetUnit etermined by token path
Definition: PixelROC.h:37
sipixelobjects::LocalPixel::DcolPxid::dcol
int dcol
Definition: LocalPixel.h:20
sipixelobjects::DetectorIndex
Definition: DetectorIndex.h:6
sipixelobjects::ElectronicIndex::roc
int roc
Definition: ElectronicIndex.h:7