CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | Private Attributes
SiPixelOfflineCalibAnalysisBase Class Reference

#include <CalibTracker/SiPixelTools/src/SiPixelOfflineCalibAnalysisBase.cc>

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

Public Types

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
 

Public Member Functions

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)
 
virtual bool doFits (uint32_t detid, std::vector< SiPixelCalibDigi >::const_iterator ipix)
 
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::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
 
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)
 

Static Public Member Functions

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 ()
 

Static Public Attributes

static TF1 * fitFunction_ = nullptr
 

Protected Member Functions

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

edm::ESGetToken< SiPixelFedCablingMap, SiPixelFedCablingMapRcdcablingMapToken_
 
edm::ESHandle< SiPixelCalibConfigurationcalib_
 
std::string calibrationMode_
 
edm::ESGetToken< SiPixelCalibConfiguration, SiPixelCalibConfigurationRcdcalibToken_
 
edm::ESGetToken< SiPixelCalibConfiguration, SiPixelCalibConfigurationRcdcalibTokenBeginRun_
 
edm::ESHandle< TrackerGeometrygeom_
 
short nTriggers_
 
edm::ESHandle< SiPixelFedCablingMaptheCablingMap_
 
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecordtrackerGeomToken_
 

Static Protected Attributes

static std::vector< short > vCalValues_
 

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginJob () override
 
void beginRun (const edm::EventSetup &iSetup)
 
void beginRun (const edm::Run &, const edm::EventSetup &) override
 
virtual void calibrationEnd ()
 
virtual void calibrationSetup (const edm::EventSetup &iSetup)
 
virtual bool checkCorrectCalibrationType ()
 
bool checkPixel (uint32_t detid, short row, short column)
 
void endJob () override
 
virtual void newDetID (uint32_t detid)
 

Private Attributes

bool createOutputFile_
 
DQMStoredaqBE_
 
std::map< uint32_t, std::string > detIdNames_
 
std::map< uint32_t, int > detIdsEntered_
 
uint32_t eventCounter_
 
SiPixelFolderOrganizerfolderMaker_
 
std::string outputFileName_
 
std::vector< uint32_t > runnumbers_
 
edm::InputTag siPixelCalibDigiProducer_
 
SiPixelHistogramIdtheHistogramIdWorker_
 
edm::EDGetTokenT< edm::DetSetVector< SiPixelCalibDigi > > tPixelCalibDigi
 

Detailed Description

Description: Base class for Pixel calibrations

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

Definition at line 60 of file SiPixelOfflineCalibAnalysisBase.h.

Member Typedef Documentation

◆ DQMStore

Definition at line 63 of file SiPixelOfflineCalibAnalysisBase.h.

◆ MonitorElement

Definition at line 62 of file SiPixelOfflineCalibAnalysisBase.h.

Constructor & Destructor Documentation

◆ SiPixelOfflineCalibAnalysisBase() [1/2]

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

Definition at line 37 of file SiPixelOfflineCalibAnalysisBase.cc.

38  : runnumbers_(0), eventCounter_(0) {
39  siPixelCalibDigiProducer_ = iConfig.getParameter<edm::InputTag>("DetSetVectorSiPixelCalibDigiTag");
40  createOutputFile_ = iConfig.getUntrackedParameter<bool>("saveFile", false);
41  outputFileName_ = iConfig.getParameter<std::string>("outputFileName");
44  tPixelCalibDigi = consumes<edm::DetSetVector<SiPixelCalibDigi> >(siPixelCalibDigiProducer_);
45 
47  esConsumes<SiPixelCalibConfiguration, SiPixelCalibConfigurationRcd, edm::Transition::BeginRun>();
48  calibToken_ = esConsumes<SiPixelCalibConfiguration, SiPixelCalibConfigurationRcd>();
49  trackerGeomToken_ = esConsumes<TrackerGeometry, TrackerDigiGeometryRecord>();
50  cablingMapToken_ = esConsumes<SiPixelFedCablingMap, SiPixelFedCablingMapRcd>();
51 }

References cablingMapToken_, calibToken_, calibTokenBeginRun_, createOutputFile_, daqBE_, folderMaker_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), outputFileName_, siPixelCalibDigiProducer_, AlCaHLTBitMon_QueryRunRegistry::string, tPixelCalibDigi, and trackerGeomToken_.

◆ ~SiPixelOfflineCalibAnalysisBase()

SiPixelOfflineCalibAnalysisBase::~SiPixelOfflineCalibAnalysisBase ( )
override

Definition at line 60 of file SiPixelOfflineCalibAnalysisBase.cc.

60 {}

◆ SiPixelOfflineCalibAnalysisBase() [2/2]

SiPixelOfflineCalibAnalysisBase::SiPixelOfflineCalibAnalysisBase ( )

Definition at line 53 of file SiPixelOfflineCalibAnalysisBase.cc.

53  {
54  throw cms::Exception("") << "ERROR: Classes derived from SiPixelOfflineCalibAnalysisBase must call "
55  "SiPixelOfflineCalibAnalysisBase::SiPixelOfflineCalibAnalysisBase(const "
56  "edm::ParameterSet& iConfig) from their constructor."
57  << std::endl;
58 }

References Exception.

Member Function Documentation

◆ addTF1ToDQMMonitoringElement()

void SiPixelOfflineCalibAnalysisBase::addTF1ToDQMMonitoringElement ( MonitorElement ele,
TF1 *  func 
)

Definition at line 302 of file SiPixelOfflineCalibAnalysisBase.cc.

302  {
303  if (func) {
304  ele->getTH1()->GetListOfFunctions()->Add(func);
305  }
306  return;
307 }

References TrackCollections2monitor_cff::func, and dqm::legacy::MonitorElement::getTH1().

◆ analyze()

void SiPixelOfflineCalibAnalysisBase::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Implements edm::EDAnalyzer.

Definition at line 67 of file SiPixelOfflineCalibAnalysisBase.cc.

67  {
68  using namespace edm;
69 
70  calib_ = iSetup.getHandle(calibToken_);
73  if (eventCounter_ == 0)
74  this->calibrationSetup(iSetup);
75  eventCounter_++;
76 
77  // check first if you're analyzing the right type of calibration
79  return;
80 
81  uint32_t runnumber = iEvent.id().run();
82  if (runnumbers_.empty())
83  runnumbers_.push_back(runnumber);
84  else {
85  bool foundnumber = false;
86  for (size_t iter = 0; iter < runnumbers_.size() && !foundnumber; ++iter) {
87  if (runnumbers_[iter] == runnumber) {
88  foundnumber = true;
89  continue;
90  }
91  }
92  if (!foundnumber)
93  runnumbers_.push_back(runnumber);
94  }
95 
97  iEvent.getByToken(tPixelCalibDigi, thePlaquettes);
98 
100 
101  //loop over the plaquettes pulsed in this pattern
102  for (digiIter = thePlaquettes->begin(); digiIter != thePlaquettes->end(); ++digiIter) {
103  uint32_t detId = digiIter->id;
104  //check to see if this detID has not been encountered. If not, run the newDetID (pure virtual) function
105  if (detIdsEntered_.find(detId) == detIdsEntered_.end()) {
106  detIdsEntered_.insert(std::make_pair(detId, 0));
107  detIdNames_.insert(std::make_pair(detId, translateDetIdToString(detId)));
108  newDetID(detId);
109  }
111  //loop over pixels pulsed in the current plaquette
112  for (ipix = digiIter->data.begin(); ipix != digiIter->end(); ++ipix) {
113  //called derived function to fit this curve
114  this->doFits(detId, ipix);
115  }
116  }
117 }

References edm::DetSetVector< T >::begin(), cablingMapToken_, calib_, calibrationSetup(), calibToken_, checkCorrectCalibrationType(), detIdNames_, detIdsEntered_, doFits(), edm::DetSetVector< T >::end(), eventCounter_, geom_, edm::EventSetup::getHandle(), iEvent, newDetID(), cond::runnumber, runnumbers_, theCablingMap_, tPixelCalibDigi, trackerGeomToken_, and translateDetIdToString().

◆ beginJob()

void SiPixelOfflineCalibAnalysisBase::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 134 of file SiPixelOfflineCalibAnalysisBase.cc.

134 {}

◆ beginRun() [1/2]

void SiPixelOfflineCalibAnalysisBase::beginRun ( const edm::EventSetup iSetup)
private

◆ beginRun() [2/2]

void SiPixelOfflineCalibAnalysisBase::beginRun ( const edm::Run ,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 119 of file SiPixelOfflineCalibAnalysisBase.cc.

119  {
120  //load the calibration information from the database
122 
123  calibrationMode_ = calib->getCalibrationMode();
124  nTriggers_ = calib->getNTriggers();
125  vCalValues_ = calib->getVCalValues();
126  std::cout << "!!!! in beginRun" << std::endl;
127  edm::LogInfo("SiPixelOfflineCalibAnalysisBase")
128  << "Calibration file loaded. Mode: " << calibrationMode_ << " nTriggers: " << nTriggers_
129  << " Vcal steps: " << vCalValues_.size() << std::endl;
130  //call calibrationSetup virtual function
131  this->calibrationSetup(iSetup);
133 }

References calibrationMode_, calibrationSetup(), calibTokenBeginRun_, gather_cfg::cout, edm::EventSetup::getHandle(), edm::InputTag::label(), nTriggers_, siPixelCalibDigiProducer_, theHistogramIdWorker_, and vCalValues_.

◆ bookDQMHistogram1D() [1/2]

SiPixelOfflineCalibAnalysisBase::MonitorElement * SiPixelOfflineCalibAnalysisBase::bookDQMHistogram1D ( uint32_t  detid,
std::string  name,
std::string  title,
int  nchX,
double  lowX,
double  highX 
)

◆ bookDQMHistogram1D() [2/2]

SiPixelOfflineCalibAnalysisBase::MonitorElement * SiPixelOfflineCalibAnalysisBase::bookDQMHistogram1D ( uint32_t  detid,
std::string  name,
std::string  title,
int  nchX,
float *  xbinsize 
)

◆ bookDQMHistogram2D()

SiPixelOfflineCalibAnalysisBase::MonitorElement * SiPixelOfflineCalibAnalysisBase::bookDQMHistogram2D ( uint32_t  detid,
std::string  name,
std::string  title,
int  nchX,
double  lowX,
double  highX,
int  nchY,
double  lowY,
double  highY 
)

◆ bookDQMHistoPlaquetteSummary2D()

SiPixelOfflineCalibAnalysisBase::MonitorElement * SiPixelOfflineCalibAnalysisBase::bookDQMHistoPlaquetteSummary2D ( uint32_t  detid,
std::string  name,
std::string  title 
)

Definition at line 202 of file SiPixelOfflineCalibAnalysisBase.cc.

203  {
204  DetId detId(detid);
205  const TrackerGeometry& theTracker(*geom_);
206  const PixelGeomDetUnit* theGeomDet = dynamic_cast<const PixelGeomDetUnit*>(theTracker.idToDet(detId));
207  int maxcol = theGeomDet->specificTopology().ncolumns();
208  int maxrow = theGeomDet->specificTopology().nrows();
209 
211  return daqBE_->book2D(hid, title, maxcol, 0, maxcol, maxrow, 0, maxrow);
212 }

References dqm::implementation::IBooker::book2D(), daqBE_, geom_, TrackerGeometry::idToDet(), Skims_PA_cff::name, PixelTopology::ncolumns(), PixelTopology::nrows(), SiPixelHistogramId::setHistoId(), PixelGeomDetUnit::specificTopology(), AlCaHLTBitMon_QueryRunRegistry::string, theHistogramIdWorker_, and runGCPTkAlMap::title.

Referenced by SiPixelIsAliveCalibration::newDetID(), SiPixelGainCalibrationAnalysis::newDetID(), and SiPixelSCurveCalibrationAnalysis::newDetID().

◆ calibrationEnd()

void SiPixelOfflineCalibAnalysisBase::calibrationEnd ( )
privatevirtual

Reimplemented in SiPixelSCurveCalibrationAnalysis, SiPixelGainCalibrationAnalysis, and SiPixelIsAliveCalibration.

Definition at line 248 of file SiPixelOfflineCalibAnalysisBase.cc.

248  {
249  // do nothing
250 }

Referenced by endJob().

◆ calibrationSetup()

void SiPixelOfflineCalibAnalysisBase::calibrationSetup ( const edm::EventSetup iSetup)
privatevirtual

Reimplemented in SiPixelSCurveCalibrationAnalysis, SiPixelGainCalibrationAnalysis, and SiPixelIsAliveCalibration.

Definition at line 244 of file SiPixelOfflineCalibAnalysisBase.cc.

244  {
245  //do nothing
246 }

Referenced by analyze(), and beginRun().

◆ checkCorrectCalibrationType()

bool SiPixelOfflineCalibAnalysisBase::checkCorrectCalibrationType ( )
privatevirtual

Reimplemented in SiPixelSCurveCalibrationAnalysis, SiPixelGainCalibrationAnalysis, and SiPixelIsAliveCalibration.

Definition at line 224 of file SiPixelOfflineCalibAnalysisBase.cc.

224 { return true; }

Referenced by analyze().

◆ checkPixel()

bool SiPixelOfflineCalibAnalysisBase::checkPixel ( uint32_t  detid,
short  row,
short  column 
)
private

Definition at line 257 of file SiPixelOfflineCalibAnalysisBase.cc.

257  {
258  // finds the fed ID:
259  int thefedid = -1;
260  for (int fedid = 0; fedid <= 40 && thefedid == -1; ++fedid) {
262  if (converter.hasDetUnit(detid)) {
263  thefedid = fedid;
264  }
265  }
266  if (thefedid == -1)
267  return false; // fed ID not associated with det ID. No pattern check possible
268 
269  SiPixelFrameConverter formatter(theCablingMap_.product(), thefedid);
272 
273  formatter.toCabling(cabling, detector);
274  // cabling should now contain cabling.roc and cabling.dcol and cabling.pxid
275 
276  // however, the coordinates now need to be converted from dcl, pxid to the row,col coordinates used in the calibration info
278  loc.dcol = cabling.dcol;
279  loc.pxid = cabling.pxid;
280  sipixelobjects::LocalPixel locpixel(loc);
281  short localrow = locpixel.rocRow();
282  short localcol = locpixel.rocCol();
283 
284  // now get the patterns from the calib object:
285  std::vector<short> calibcols = calib_->getColumnPattern();
286  std::vector<short> calibrows = calib_->getRowPattern();
287  // first check rows:
288  for (size_t irow = 0; irow < calibrows.size(); ++irow) {
289  if (calibrows[irow] == localrow) {
290  // check the columns
291  for (size_t icol = 0; icol < calibcols.size(); ++icol) {
292  if (calibcols[icol] == localcol)
293  return true;
294  }
295  }
296  }
297 
298  return false;
299 }

References calib_, cuy::col, sipixelobjects::ElectronicIndex::dcol, sipixelobjects::LocalPixel::DcolPxid::dcol, hgcalTestNeighbor_cfi::detector, PixelSLinkDataInputSource_cfi::fedid, SiPixelCalibConfiguration::getColumnPattern(), SiPixelCalibConfiguration::getRowPattern(), edm::ESHandle< T >::product(), sipixelobjects::ElectronicIndex::pxid, sipixelobjects::LocalPixel::DcolPxid::pxid, sipixelobjects::LocalPixel::rocCol(), sipixelobjects::LocalPixel::rocRow(), and theCablingMap_.

◆ doFits()

bool SiPixelOfflineCalibAnalysisBase::doFits ( uint32_t  detid,
std::vector< SiPixelCalibDigi >::const_iterator  ipix 
)
virtual

Reimplemented in SiPixelSCurveCalibrationAnalysis, SiPixelGainCalibrationAnalysis, and SiPixelIsAliveCalibration.

Definition at line 226 of file SiPixelOfflineCalibAnalysisBase.cc.

226  {
227  short row = ipix->row();
228  short col = ipix->col();
229  std::vector<uint8_t> nentries = ipix->getnentries();
230  std::vector<uint32_t> sum = ipix->getsum();
231  std::vector<uint32_t> sumquares = ipix->getsumsquares();
232  //do nothing
233  //return false;
234  //
235  //DEBUG
236  std::cout << "Row: " << row << " Col: " << col << std::endl;
237  for (unsigned int i = 0; i < sum.size(); i++) {
238  std::cout << sum[i] << " ";
239  }
240  std::cout << std::endl;
241  return false;
242 }

References cuy::col, gather_cfg::cout, and mps_fire::i.

Referenced by analyze().

◆ endJob()

void SiPixelOfflineCalibAnalysisBase::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 138 of file SiPixelOfflineCalibAnalysisBase.cc.

138  {
139  this->calibrationEnd();
140  edm::LogInfo("SiPixelOfflineCalibAnalysisBase") << "Running end job... output file name is: " << outputFileName_;
141  if (!outputFileName_.empty() && createOutputFile_) {
142  edm::LogInfo("SiPixelOfflineCalibAnalysisBase") << "Writing ROOT file to: " << outputFileName_ << std::endl;
144  }
145 }

References calibrationEnd(), createOutputFile_, daqBE_, outputFileName_, and dqm::implementation::DQMStore::save().

Referenced by o2olib.O2ORunMgr::executeJob().

◆ EventNumber()

uint32_t& SiPixelOfflineCalibAnalysisBase::EventNumber ( )
inlineprotected

Definition at line 120 of file SiPixelOfflineCalibAnalysisBase.h.

120 { return eventCounter_; }

References eventCounter_.

◆ getRunNumbers()

std::vector<uint32_t>& SiPixelOfflineCalibAnalysisBase::getRunNumbers ( )
inline

Definition at line 104 of file SiPixelOfflineCalibAnalysisBase.h.

104 { return runnumbers_; }

References runnumbers_.

◆ getVcalValues()

const std::vector< short > * SiPixelOfflineCalibAnalysisBase::getVcalValues ( )
static

Definition at line 149 of file SiPixelOfflineCalibAnalysisBase.cc.

149 { return &vCalValues_; }

References vCalValues_.

Referenced by SiPixelSCurveCalibrationAnalysis::calibrationSetup(), and chi2toMinimize().

◆ newDetID()

void SiPixelOfflineCalibAnalysisBase::newDetID ( uint32_t  detid)
privatevirtual

Reimplemented in SiPixelSCurveCalibrationAnalysis, SiPixelGainCalibrationAnalysis, and SiPixelIsAliveCalibration.

Definition at line 251 of file SiPixelOfflineCalibAnalysisBase.cc.

251  {
252  //do nothing
253  edm::LogInfo("SiPixelOfflineCalibAnalysisBase")
254  << "SiPixelOfflineCalibAnalysisBase - Found new DetID: " << detid << " Name: " << detIdNames_[detid];
255 }

References detIdNames_.

Referenced by analyze().

◆ setDQMDirectory() [1/2]

bool SiPixelOfflineCalibAnalysisBase::setDQMDirectory ( std::string  dirName)

◆ setDQMDirectory() [2/2]

bool SiPixelOfflineCalibAnalysisBase::setDQMDirectory ( uint32_t  detID)

Definition at line 219 of file SiPixelOfflineCalibAnalysisBase.cc.

219  {
220  return folderMaker_->setModuleFolder(detID, 0);
221 }

References folderMaker_, and SiPixelFolderOrganizer::setModuleFolder().

◆ translateDetIdToString()

std::string SiPixelOfflineCalibAnalysisBase::translateDetIdToString ( uint32_t  detid)

Definition at line 151 of file SiPixelOfflineCalibAnalysisBase.cc.

151  {
152  std::map<uint32_t, std::string>::iterator detNameIter = detIdNames_.find(detid);
153  if (detNameIter != detIdNames_.end()) {
154  return detNameIter->second;
155  }
156  std::string output = "DetID translation error";
157  DetId detId(detid);
158  uint32_t detSubId = detId.subdetId();
159  if (detSubId > 2 || detSubId < 1) {
160  edm::LogError("SiPixelOfflineCalibAnalysisBase")
161  << "ERROR: Expected a pixel detector ID (1 - barrel, 2 - forward) but got " << detSubId << std::endl;
162  return output;
163  }
164  if (detSubId == 2) //FPIX
165  {
166  PixelEndcapName nameworker(detid);
167  output = nameworker.name();
168  } else //BPIX
169  {
170  PixelBarrelName nameworker(detid);
171  output = nameworker.name();
172  }
173  detIdNames_.insert(std::make_pair(detid, output));
174  return output;
175 }

References detIdNames_, PixelBarrelName::name(), PixelEndcapName::name(), convertSQLitetoXML_cfg::output, AlCaHLTBitMon_QueryRunRegistry::string, and DetId::subdetId().

Referenced by analyze(), SiPixelSCurveCalibrationAnalysis::buildACurveHistogram(), SiPixelIsAliveCalibration::calibrationEnd(), SiPixelGainCalibrationAnalysis::doFits(), SiPixelIsAliveCalibration::newDetID(), SiPixelGainCalibrationAnalysis::newDetID(), SiPixelSCurveCalibrationAnalysis::newDetID(), and SiPixelGainCalibrationAnalysis::printSummary().

Member Data Documentation

◆ cablingMapToken_

edm::ESGetToken<SiPixelFedCablingMap, SiPixelFedCablingMapRcd> SiPixelOfflineCalibAnalysisBase::cablingMapToken_
protected

Definition at line 115 of file SiPixelOfflineCalibAnalysisBase.h.

Referenced by analyze(), and SiPixelOfflineCalibAnalysisBase().

◆ calib_

edm::ESHandle<SiPixelCalibConfiguration> SiPixelOfflineCalibAnalysisBase::calib_
protected

◆ calibrationMode_

std::string SiPixelOfflineCalibAnalysisBase::calibrationMode_
protected

◆ calibToken_

edm::ESGetToken<SiPixelCalibConfiguration, SiPixelCalibConfigurationRcd> SiPixelOfflineCalibAnalysisBase::calibToken_
protected

Definition at line 113 of file SiPixelOfflineCalibAnalysisBase.h.

Referenced by analyze(), and SiPixelOfflineCalibAnalysisBase().

◆ calibTokenBeginRun_

edm::ESGetToken<SiPixelCalibConfiguration, SiPixelCalibConfigurationRcd> SiPixelOfflineCalibAnalysisBase::calibTokenBeginRun_
protected

Definition at line 112 of file SiPixelOfflineCalibAnalysisBase.h.

Referenced by beginRun(), and SiPixelOfflineCalibAnalysisBase().

◆ createOutputFile_

bool SiPixelOfflineCalibAnalysisBase::createOutputFile_
private

Definition at line 127 of file SiPixelOfflineCalibAnalysisBase.h.

Referenced by endJob(), and SiPixelOfflineCalibAnalysisBase().

◆ daqBE_

DQMStore* SiPixelOfflineCalibAnalysisBase::daqBE_
private

◆ detIdNames_

std::map<uint32_t, std::string> SiPixelOfflineCalibAnalysisBase::detIdNames_
private

Definition at line 135 of file SiPixelOfflineCalibAnalysisBase.h.

Referenced by analyze(), newDetID(), and translateDetIdToString().

◆ detIdsEntered_

std::map<uint32_t, int> SiPixelOfflineCalibAnalysisBase::detIdsEntered_
private

Definition at line 134 of file SiPixelOfflineCalibAnalysisBase.h.

Referenced by analyze().

◆ eventCounter_

uint32_t SiPixelOfflineCalibAnalysisBase::eventCounter_
private

Definition at line 130 of file SiPixelOfflineCalibAnalysisBase.h.

Referenced by analyze(), and EventNumber().

◆ fitFunction_

TF1 * SiPixelOfflineCalibAnalysisBase::fitFunction_ = nullptr
static

◆ folderMaker_

SiPixelFolderOrganizer* SiPixelOfflineCalibAnalysisBase::folderMaker_
private

◆ geom_

edm::ESHandle<TrackerGeometry> SiPixelOfflineCalibAnalysisBase::geom_
protected

Definition at line 109 of file SiPixelOfflineCalibAnalysisBase.h.

Referenced by analyze(), and bookDQMHistoPlaquetteSummary2D().

◆ nTriggers_

short SiPixelOfflineCalibAnalysisBase::nTriggers_
protected

◆ outputFileName_

std::string SiPixelOfflineCalibAnalysisBase::outputFileName_
private

Definition at line 126 of file SiPixelOfflineCalibAnalysisBase.h.

Referenced by endJob(), and SiPixelOfflineCalibAnalysisBase().

◆ runnumbers_

std::vector<uint32_t> SiPixelOfflineCalibAnalysisBase::runnumbers_
private

Definition at line 129 of file SiPixelOfflineCalibAnalysisBase.h.

Referenced by analyze(), and getRunNumbers().

◆ siPixelCalibDigiProducer_

edm::InputTag SiPixelOfflineCalibAnalysisBase::siPixelCalibDigiProducer_
private

Definition at line 137 of file SiPixelOfflineCalibAnalysisBase.h.

Referenced by beginRun(), and SiPixelOfflineCalibAnalysisBase().

◆ theCablingMap_

edm::ESHandle<SiPixelFedCablingMap> SiPixelOfflineCalibAnalysisBase::theCablingMap_
protected

◆ theHistogramIdWorker_

SiPixelHistogramId* SiPixelOfflineCalibAnalysisBase::theHistogramIdWorker_
private

◆ tPixelCalibDigi

edm::EDGetTokenT<edm::DetSetVector<SiPixelCalibDigi> > SiPixelOfflineCalibAnalysisBase::tPixelCalibDigi
private

Definition at line 139 of file SiPixelOfflineCalibAnalysisBase.h.

Referenced by analyze(), and SiPixelOfflineCalibAnalysisBase().

◆ trackerGeomToken_

edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> SiPixelOfflineCalibAnalysisBase::trackerGeomToken_
protected

Definition at line 114 of file SiPixelOfflineCalibAnalysisBase.h.

Referenced by analyze(), and SiPixelOfflineCalibAnalysisBase().

◆ vCalValues_

std::vector< short > SiPixelOfflineCalibAnalysisBase::vCalValues_
staticprotected
SiPixelOfflineCalibAnalysisBase::tPixelCalibDigi
edm::EDGetTokenT< edm::DetSetVector< SiPixelCalibDigi > > tPixelCalibDigi
Definition: SiPixelOfflineCalibAnalysisBase.h:139
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
SiPixelOfflineCalibAnalysisBase::outputFileName_
std::string outputFileName_
Definition: SiPixelOfflineCalibAnalysisBase.h:126
SiPixelOfflineCalibAnalysisBase::nTriggers_
short nTriggers_
Definition: SiPixelOfflineCalibAnalysisBase.h:118
SiPixelOfflineCalibAnalysisBase::translateDetIdToString
std::string translateDetIdToString(uint32_t detid)
Definition: SiPixelOfflineCalibAnalysisBase.cc:151
SiPixelOfflineCalibAnalysisBase::doFits
virtual bool doFits(uint32_t detid, std::vector< SiPixelCalibDigi >::const_iterator ipix)
Definition: SiPixelOfflineCalibAnalysisBase.cc:226
runGCPTkAlMap.title
string title
Definition: runGCPTkAlMap.py:94
mps_fire.i
i
Definition: mps_fire.py:428
SiPixelOfflineCalibAnalysisBase::calib_
edm::ESHandle< SiPixelCalibConfiguration > calib_
Definition: SiPixelOfflineCalibAnalysisBase.h:108
SiPixelOfflineCalibAnalysisBase::calibrationMode_
std::string calibrationMode_
Definition: SiPixelOfflineCalibAnalysisBase.h:117
edm::DetSetVector::end
iterator end()
Return the off-the-end iterator.
Definition: DetSetVector.h:325
SiPixelFolderOrganizer::setModuleFolder
bool setModuleFolder(const uint32_t &rawdetid=0, int type=0, bool isUpgrade=false)
Set folder name for a module or plaquette.
Definition: SiPixelFolderOrganizer.cc:27
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:72
converter
Definition: CandidateProducer.h:25
edm
HLT enums.
Definition: AlignableModifier.h:19
cuy.col
col
Definition: cuy.py:1010
gather_cfg.cout
cout
Definition: gather_cfg.py:144
SiPixelOfflineCalibAnalysisBase::detIdNames_
std::map< uint32_t, std::string > detIdNames_
Definition: SiPixelOfflineCalibAnalysisBase.h:135
PixelBarrelName
Definition: PixelBarrelName.h:16
edm::DetSetVector::begin
iterator begin()
Return an iterator to the first DetSet.
Definition: DetSetVector.h:314
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
SiPixelOfflineCalibAnalysisBase::calibrationSetup
virtual void calibrationSetup(const edm::EventSetup &iSetup)
Definition: SiPixelOfflineCalibAnalysisBase.cc:244
edm::Handle
Definition: AssociativeIterator.h:50
SiPixelOfflineCalibAnalysisBase::folderMaker_
SiPixelFolderOrganizer * folderMaker_
Definition: SiPixelOfflineCalibAnalysisBase.h:123
SiPixelOfflineCalibAnalysisBase::vCalValues_
static std::vector< short > vCalValues_
Definition: SiPixelOfflineCalibAnalysisBase.h:119
sipixelobjects::LocalPixel
identify pixel inside single ROC
Definition: LocalPixel.h:7
edm::InputTag::label
std::string const & label() const
Definition: InputTag.h:36
DetId
Definition: DetId.h:17
SiPixelOfflineCalibAnalysisBase::daqBE_
DQMStore * daqBE_
Definition: SiPixelOfflineCalibAnalysisBase.h:124
PixelEndcapName
Definition: PixelEndcapName.h:16
PixelGeomDetUnit
Definition: PixelGeomDetUnit.h:15
SiPixelHistogramId::setHistoId
std::string setHistoId(std::string variable, uint32_t &rawId)
Set Histogram Id.
Definition: SiPixelHistogramId.cc:29
edm::ESHandle< SiPixelCalibConfiguration >
PixelTopology::ncolumns
virtual int ncolumns() const =0
SiPixelOfflineCalibAnalysisBase::geom_
edm::ESHandle< TrackerGeometry > geom_
Definition: SiPixelOfflineCalibAnalysisBase.h:109
sipixelobjects::ElectronicIndex::pxid
int pxid
Definition: ElectronicIndex.h:9
dqm::implementation::DQMStore::setCurrentFolder
void setCurrentFolder(std::string const &fullpath) override
Definition: DQMStore.h:569
dqm::implementation::DQMStore::save
DQM_DEPRECATED void save(std::string const &filename, std::string const &path="")
Definition: DQMStore.cc:761
dqm::legacy::MonitorElement::getTH1
virtual TH1 * getTH1() const
Definition: MonitorElement.h:475
sipixelobjects::ElectronicIndex
Definition: ElectronicIndex.h:5
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
calib
Definition: CalibElectron.h:12
SiPixelOfflineCalibAnalysisBase::trackerGeomToken_
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > trackerGeomToken_
Definition: SiPixelOfflineCalibAnalysisBase.h:114
SiPixelOfflineCalibAnalysisBase::eventCounter_
uint32_t eventCounter_
Definition: SiPixelOfflineCalibAnalysisBase.h:130
SiPixelHistogramId
Definition: SiPixelHistogramId.h:25
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
SiPixelOfflineCalibAnalysisBase::calibrationEnd
virtual void calibrationEnd()
Definition: SiPixelOfflineCalibAnalysisBase.cc:248
edm::DetSetVector::const_iterator
collection_type::const_iterator const_iterator
Definition: DetSetVector.h:102
PixelGeomDetUnit::specificTopology
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
Definition: PixelGeomDetUnit.cc:17
cond::runnumber
Definition: Time.h:19
SiPixelOfflineCalibAnalysisBase::calibToken_
edm::ESGetToken< SiPixelCalibConfiguration, SiPixelCalibConfigurationRcd > calibToken_
Definition: SiPixelOfflineCalibAnalysisBase.h:113
edm::Service
Definition: Service.h:30
iEvent
int iEvent
Definition: GenABIO.cc:224
edm::EventSetup::getHandle
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:155
SiPixelFrameConverter
Definition: SiPixelFrameConverter.h:15
SiPixelOfflineCalibAnalysisBase::cablingMapToken_
edm::ESGetToken< SiPixelFedCablingMap, SiPixelFedCablingMapRcd > cablingMapToken_
Definition: SiPixelOfflineCalibAnalysisBase.h:115
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
TrackCollections2monitor_cff.func
func
Definition: TrackCollections2monitor_cff.py:359
PixelSLinkDataInputSource_cfi.fedid
fedid
Definition: PixelSLinkDataInputSource_cfi.py:6
SiPixelOfflineCalibAnalysisBase::createOutputFile_
bool createOutputFile_
Definition: SiPixelOfflineCalibAnalysisBase.h:127
SiPixelOfflineCalibAnalysisBase::runnumbers_
std::vector< uint32_t > runnumbers_
Definition: SiPixelOfflineCalibAnalysisBase.h:129
SiPixelOfflineCalibAnalysisBase::siPixelCalibDigiProducer_
edm::InputTag siPixelCalibDigiProducer_
Definition: SiPixelOfflineCalibAnalysisBase.h:137
SiPixelOfflineCalibAnalysisBase::newDetID
virtual void newDetID(uint32_t detid)
Definition: SiPixelOfflineCalibAnalysisBase.cc:251
dqm::implementation::IBooker::book2D
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:177
Exception
Definition: hltDiff.cc:245
SiPixelFolderOrganizer
Definition: SiPixelFolderOrganizer.h:26
SiPixelCalibConfiguration::getColumnPattern
std::vector< short > getColumnPattern() const
Definition: SiPixelCalibConfiguration.h:34
TrackerOfflineValidation_Dqm_cff.dirName
dirName
Definition: TrackerOfflineValidation_Dqm_cff.py:55
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
SiPixelOfflineCalibAnalysisBase::checkCorrectCalibrationType
virtual bool checkCorrectCalibrationType()
Definition: SiPixelOfflineCalibAnalysisBase.cc:224
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
hgcalTestNeighbor_cfi.detector
detector
Definition: hgcalTestNeighbor_cfi.py:6
SiPixelOfflineCalibAnalysisBase::theCablingMap_
edm::ESHandle< SiPixelFedCablingMap > theCablingMap_
Definition: SiPixelOfflineCalibAnalysisBase.h:110
SiPixelCalibConfiguration::getRowPattern
std::vector< short > getRowPattern() const
Definition: SiPixelCalibConfiguration.h:31
SiPixelOfflineCalibAnalysisBase::detIdsEntered_
std::map< uint32_t, int > detIdsEntered_
Definition: SiPixelOfflineCalibAnalysisBase.h:134
PixelTopology::nrows
virtual int nrows() const =0
edm::InputTag
Definition: InputTag.h:15
dqm::implementation::IGetter::dirExists
virtual bool dirExists(std::string const &path) const
Definition: DQMStore.cc:708
SiPixelOfflineCalibAnalysisBase::calibTokenBeginRun_
edm::ESGetToken< SiPixelCalibConfiguration, SiPixelCalibConfigurationRcd > calibTokenBeginRun_
Definition: SiPixelOfflineCalibAnalysisBase.h:112
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
sipixelobjects::LocalPixel::DcolPxid::dcol
int dcol
Definition: LocalPixel.h:20
SiPixelOfflineCalibAnalysisBase::theHistogramIdWorker_
SiPixelHistogramId * theHistogramIdWorker_
Definition: SiPixelOfflineCalibAnalysisBase.h:125
sipixelobjects::DetectorIndex
Definition: DetectorIndex.h:6
TrackerGeometry
Definition: TrackerGeometry.h:14
edm::DetSet::const_iterator
collection_type::const_iterator const_iterator
Definition: DetSet.h:31