CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Attributes
cms::SiPixelCondObjOfflineBuilder Class Reference
Inheritance diagram for cms::SiPixelCondObjOfflineBuilder:
edm::one::EDAnalyzer<> edm::one::EDAnalyzerBase edm::EDConsumerBase

Classes

class  CalParameters
 

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginJob () override
 
bool loadFromFile ()
 
 SiPixelCondObjOfflineBuilder (const edm::ParameterSet &iConfig)
 
- Public Member Functions inherited from edm::one::EDAnalyzer<>
 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 Attributes

const bool appendMode_
 
std::map< int, CalParameters, std::less< int > > calmap_
 
const double deadFraction_
 
const std::string fileName_
 
const bool fromFile_
 
const bool generateColumns_
 
const double meanGain_
 
const double meanGainFPix_
 
const double meanPed_
 
const double meanPedFPix_
 
const double noisyFraction_
 
const int numberOfModules_
 
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecordpddToken_
 
PixelIndicespIndexConverter_
 
const std::string recordName_
 
const double rmsGain_
 
const double rmsGainFPix_
 
const double rmsPed_
 
const double rmsPedFPix_
 
const double secondRocRowGainOffset_
 
const double secondRocRowPedOffset_
 
std::unique_ptr< SiPixelGainCalibrationOfflineSiPixelGainCalibration_
 
SiPixelGainCalibrationOfflineService SiPixelGainCalibrationService_
 

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 edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- 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 48 of file SiPixelCondObjOfflineBuilder.cc.

Constructor & Destructor Documentation

◆ SiPixelCondObjOfflineBuilder()

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

Definition at line 93 of file SiPixelCondObjOfflineBuilder.cc.

94  : appendMode_(iConfig.getUntrackedParameter<bool>("appendMode", true)),
96  SiPixelGainCalibration_(nullptr),
98  recordName_(iConfig.getParameter<std::string>("record")),
99  meanPed_(iConfig.getParameter<double>("meanPed")),
100  rmsPed_(iConfig.getParameter<double>("rmsPed")),
101  meanGain_(iConfig.getParameter<double>("meanGain")),
102  rmsGain_(iConfig.getParameter<double>("rmsGain")),
103  meanPedFPix_(iConfig.getUntrackedParameter<double>("meanPedFPix", meanPed_)),
104  rmsPedFPix_(iConfig.getUntrackedParameter<double>("rmsPedFPix", rmsPed_)),
105  meanGainFPix_(iConfig.getUntrackedParameter<double>("meanGainFPix", meanGain_)),
106  rmsGainFPix_(iConfig.getUntrackedParameter<double>("rmsGainFPix", rmsGain_)),
107  deadFraction_(iConfig.getParameter<double>("deadFraction")),
108  noisyFraction_(iConfig.getParameter<double>("noisyFraction")),
109  secondRocRowGainOffset_(iConfig.getParameter<double>("secondRocRowGainOffset")),
110  secondRocRowPedOffset_(iConfig.getParameter<double>("secondRocRowPedOffset")),
111  numberOfModules_(iConfig.getParameter<int>("numberOfModules")),
112  fromFile_(iConfig.getParameter<bool>("fromFile")),
113  fileName_(iConfig.getParameter<std::string>("fileName")),
114  generateColumns_(iConfig.getUntrackedParameter<bool>("generateColumns", true)) {
115  ::putenv((char*)"CORAL_AUTH_USER=me");
116  ::putenv((char*)"CORAL_AUTH_PASSWORD=test");
117  }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
std::unique_ptr< SiPixelGainCalibrationOffline > SiPixelGainCalibration_
SiPixelGainCalibrationOfflineService SiPixelGainCalibrationService_
T getUntrackedParameter(std::string const &, T const &) const
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > pddToken_

Member Function Documentation

◆ analyze()

void SiPixelCondObjOfflineBuilder::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overridevirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 119 of file SiPixelCondObjOfflineBuilder.cc.

References cond::service::PoolDBOutputService::appendOneIOV(), cond::service::PoolDBOutputService::beginOfTime(), calmap_, cond::service::PoolDBOutputService::createOneIOV(), cond::service::PoolDBOutputService::currentTime(), deadFraction_, cppFunctionSkipper::exception, fromFile_, PedestalClient_cfi::gain, generateColumns_, edm::EventSetup::getData(), mps_fire::i, iEvent, edm::Service< T >::isAvailable(), cond::service::PoolDBOutputService::isNewTagRequest(), dqmiolumiharvest::j, meanGain_, meanGainFPix_, meanPed_, meanPedFPix_, hgcalPlots::ncols, PixelTopology::ncolumns(), noisyFraction_, PixelTopology::nrows(), numberOfModules_, cms::SiPixelCondObjOfflineBuilder::CalParameters::p0, cms::SiPixelCondObjOfflineBuilder::CalParameters::p1, pddToken_, PixelIndices::pixelToChannelROC(), FastTimerService_cff::range, recordName_, rmsGain_, rmsGainFPix_, rmsPed_, rmsPedFPix_, writedatasetfile::run, secondRocRowGainOffset_, secondRocRowPedOffset_, SiPixelGainCalibration_, PixelGeomDetUnit::specificTopology(), DetId::subdetId(), PixelIndices::transformToROC(), heppy_batch::val, and cms::Exception::what().

119  {
120  using namespace edm;
121  unsigned int run = iEvent.id().run();
122  int nmodules = 0;
123  uint32_t nchannels = 0;
124  // int mycol = 415;
125  // int myrow = 159;
126 
127  edm::LogInfo("SiPixelCondObjOfflineBuilder")
128  << "... creating dummy SiPixelGainCalibration Data for Run " << run << "\n " << std::endl;
129  //
130  // Instantiate Gain calibration offset and define pedestal/gain range
131  //
132  // note: the hard-coded range values are also used in random generation. That is why they're defined here
133 
134  float minped = 0.;
135  float maxped = 100.;
136  float mingain = 0.;
137  float maxgain = 10.;
138  SiPixelGainCalibration_ = std::make_unique<SiPixelGainCalibrationOffline>(minped, maxped, mingain, maxgain);
139 
140  const TrackerGeometry* pDD = &iSetup.getData(pddToken_);
141  edm::LogInfo("SiPixelCondObjOfflineBuilder") << " There are " << pDD->dets().size() << " detectors" << std::endl;
142 
143  for (TrackerGeometry::DetContainer::const_iterator it = pDD->dets().begin(); it != pDD->dets().end(); it++) {
144  if (dynamic_cast<PixelGeomDetUnit const*>((*it)) != nullptr) {
145  uint32_t detid = ((*it)->geographicalId()).rawId();
146 
147  // Stop if module limit reached
148  nmodules++;
149  if (nmodules > numberOfModules_)
150  break;
151 
152  const PixelGeomDetUnit* pixDet = dynamic_cast<const PixelGeomDetUnit*>((*it));
153  const PixelTopology& topol = pixDet->specificTopology();
154  // Get the module sizes.
155  int nrows = topol.nrows(); // rows in x
156  int ncols = topol.ncolumns(); // cols in y
157  //edm::LogPrint("SiPixelCondObjOfflineBuilder") << " ---> PIXEL DETID " << detid << " Cols " << ncols << " Rows " << nrows << std::endl;
158 
159  double meanPedWork = meanPed_;
160  double rmsPedWork = rmsPed_;
161  double meanGainWork = meanGain_;
162  double rmsGainWork = rmsGain_;
163  DetId detId(detid);
164  if (detId.subdetId() == 2) { // FPIX
165  meanPedWork = meanPedFPix_;
166  rmsPedWork = rmsPedFPix_;
167  meanGainWork = meanGainFPix_;
168  rmsGainWork = rmsGainFPix_;
169  }
170 
171  PixelIndices pIndexConverter(ncols, nrows);
172 
173  std::vector<char> theSiPixelGainCalibration;
174 
175  // Loop over columns and rows of this DetID
176  for (int i = 0; i < ncols; i++) {
177  float totalGain = 0.0;
178  for (int j = 0; j < nrows; j++) {
179  nchannels++;
180  bool isDead = false;
181  bool isNoisy = false;
182  float ped = 0.0, gain = 0.0;
183 
184  if (fromFile_) {
185  // Use calibration from a file
186  int chipIndex = 0, colROC = 0, rowROC = 0;
187 
188  pIndexConverter.transformToROC(i, j, chipIndex, colROC, rowROC);
189  int chanROC = PixelIndices::pixelToChannelROC(rowROC, colROC); // use ROC coordinates
190  // float pp0=0, pp1=0;
191  std::map<int, CalParameters, std::less<int> >::const_iterator it = calmap_.find(chanROC);
192  CalParameters theCalParameters = (*it).second;
193  ped = theCalParameters.p0;
194  gain = theCalParameters.p1;
195 
196  } else {
197  if (deadFraction_ > 0) {
198  double val = CLHEP::RandFlat::shoot();
199  if (val < deadFraction_) {
200  isDead = true;
201  // edm::LogPrint("SiPixelCondObjOfflineBuilder") << "dead pixel " << detid << " " << i << "," << j << " " << val << std::endl;
202  }
203  }
204  if (deadFraction_ > 0 && !isDead) {
205  double val = CLHEP::RandFlat::shoot();
206  if (val < noisyFraction_) {
207  isNoisy = true;
208  // edm::LogPrint("SiPixelCondObjOfflineBuilder") << "noisy pixel " << detid << " " << i << "," << j << " " << val << std::endl;
209  }
210  }
211 
212  if (rmsPedWork > 0) {
213  ped = CLHEP::RandGauss::shoot(meanPedWork, rmsPedWork);
214  while (ped < minped || ped > maxped)
215  ped = CLHEP::RandGauss::shoot(meanPedWork, rmsPedWork);
216  } else
217  ped = meanPedWork;
218  if (rmsGainWork > 0) {
219  gain = CLHEP::RandGauss::shoot(meanGainWork, rmsGainWork);
220  while (gain < mingain || gain > maxgain)
221  gain = CLHEP::RandGauss::shoot(meanGainWork, rmsGainWork);
222 
223  } else
224  gain = meanGainWork;
225  }
226 
227  // if(i==mycol && j==myrow) {
228  // edm::LogPrint("SiPixelCondObjOfflineBuilder") << " Col "<<i<<" Row "<<j<<" Ped "<<ped<<" Gain "<<gain<<std::endl;
229  // }
230 
231  // gain = 2.8;
232  // ped = 28.2;
233 
234  //if in the second row of rocs (i.e. a 2xN plaquette) add an offset (if desired) for testing
235  if (j >= 80) {
236  ped += secondRocRowPedOffset_;
238 
239  if (gain > maxgain)
240  gain = maxgain;
241  else if (gain < mingain)
242  gain = mingain;
243 
244  if (ped > maxped)
245  ped = maxped;
246  else if (ped < minped)
247  ped = minped;
248  }
249 
250  totalGain += gain;
251 
252  if (!isDead && !isNoisy) {
253  SiPixelGainCalibration_->setDataPedestal(ped, theSiPixelGainCalibration);
254  } else if (isDead) // dead pixel
255  // edm::LogPrint("SiPixelCondObjOfflineBuilder") << "filling pixel as dead for detid " << detid <<", col " << i << ", row" << j << std::endl;
256  SiPixelGainCalibration_->setDeadPixel(theSiPixelGainCalibration);
257  else if (isNoisy) // dead pixel
258  // edm::LogPrint("SiPixelCondObjOfflineBuilder") << "filling pixel as dead for detid " << detid <<", col " << i << ", row" << j << std::endl;
259  SiPixelGainCalibration_->setNoisyPixel(theSiPixelGainCalibration);
260  if ((j + 1) % 80 == 0) // fill the column average after ever ROC!
261  {
262  float averageGain = totalGain / static_cast<float>(80);
263 
264  if (generateColumns_) {
265  averageGain = gain;
266  }
267 
268  //edm::LogPrint("SiPixelCondObjOfflineBuilder") << "Filling gain " << averageGain << " for col: " << i << " row: " << j << std::endl;
269  SiPixelGainCalibration_->setDataGain(averageGain, 80, theSiPixelGainCalibration);
270  totalGain = 0;
271  }
272  }
273  }
274 
275  SiPixelGainCalibrationOffline::Range range(theSiPixelGainCalibration.begin(), theSiPixelGainCalibration.end());
276  if (!SiPixelGainCalibration_->put(detid, range, ncols))
277  edm::LogError("SiPixelCondObjOfflineBuilder")
278  << "[SiPixelCondObjOfflineBuilder::analyze] detid already exists" << std::endl;
279  }
280  }
281  edm::LogPrint("SiPixelCondObjOfflineBuilder") << " ---> PIXEL Modules " << nmodules << std::endl;
282  edm::LogPrint("SiPixelCondObjOfflineBuilder") << " ---> PIXEL Channels " << nchannels << std::endl;
283 
284  // // Try to read object
285  // int mynmodules =0;
286  // for(TrackerGeometry::DetContainer::const_iterator it = pDD->dets().begin(); it != pDD->dets().end(); it++){
287  // if( dynamic_cast<PixelGeomDetUnit const*>((*it))!=0){
288  // uint32_t mydetid=((*it)->geographicalId()).rawId();
289  // mynmodules++;
290  // if( mynmodules > numberOfModules_) break;
291  // SiPixelGainCalibration::Range myrange = SiPixelGainCalibration_->getRange(mydetid);
292  // float mypedestal = SiPixelGainCalibration_->getPed (mycol,myrow,myrange,416);
293  // float mygain = SiPixelGainCalibration_->getGain(mycol,myrow,myrange,416);
294  // //edm::LogPrint("SiPixelCondObjOfflineBuilder")<<" PEDESTAL "<< mypedestal<<" GAIN "<<mygain<<std::endl;
295  // }
296  // }
297  // Write into DB
298  edm::LogInfo("SiPixelCondOfflineBuilder") << "writing to DB, record = \"" << recordName_ << "\"";
300  if (!mydbservice.isAvailable()) {
301  edm::LogError("SiPixelCondOfflineBuilder") << " db service unavailable";
302  return;
303  } else {
304  edm::LogInfo("SiPixelCondOfflineBuilder") << " DB service OK";
305  }
306 
307  try {
308  if (mydbservice->isNewTagRequest(recordName_)) {
311  } else {
314  }
315  edm::LogInfo(" --- all OK");
316  } catch (const cond::Exception& er) {
317  edm::LogError("SiPixelCondObjOfflineBuilder") << er.what() << std::endl;
318  } catch (const std::exception& er) {
319  edm::LogError("SiPixelCondObjOfflineBuilder") << "caught std::exception " << er.what() << std::endl;
320  } catch (...) {
321  edm::LogError("SiPixelCondObjOfflineBuilder") << "Funny error" << std::endl;
322  }
323  }
Base exception class for the object to relational access.
Definition: Exception.h:11
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
virtual int ncolumns() const =0
virtual int nrows() const =0
Log< level::Error, false > LogError
std::pair< ContainerIterator, ContainerIterator > Range
std::unique_ptr< SiPixelGainCalibrationOffline > SiPixelGainCalibration_
void createOneIOV(const T &payload, cond::Time_t firstSinceTime, const std::string &recordName)
void appendOneIOV(const T &payload, cond::Time_t sinceTime, const std::string &recordName)
int iEvent
Definition: GenABIO.cc:224
bool isNewTagRequest(const std::string &recordName)
std::map< int, CalParameters, std::less< int > > calmap_
static int pixelToChannelROC(const int rowROC, const int colROC)
Definition: PixelIndices.h:233
Log< level::Warning, true > LogPrint
Log< level::Info, false > LogInfo
Definition: DetId.h:17
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > pddToken_
HLT enums.
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
bool isAvailable() const
Definition: Service.h:40
char const * what() const noexcept override
Definition: Exception.cc:103

◆ beginJob()

void SiPixelCondObjOfflineBuilder::beginJob ( )
overridevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 326 of file SiPixelCondObjOfflineBuilder.cc.

References calmap_, fromFile_, and loadFromFile().

326  {
327  if (fromFile_) {
328  if (loadFromFile()) {
329  edm::LogInfo("SiPixelCondObjOfflineBuilder") << " Calibration loaded: Map size " << calmap_.size() << " max "
330  << calmap_.max_size() << " " << calmap_.empty() << std::endl;
331  }
332  }
333  }
std::map< int, CalParameters, std::less< int > > calmap_
Log< level::Info, false > LogInfo

◆ loadFromFile()

bool SiPixelCondObjOfflineBuilder::loadFromFile ( )

Definition at line 335 of file SiPixelCondObjOfflineBuilder.cc.

References calmap_, officialStyle::chan, fileName_, RemoveAddSevLevel::flag, mps_fire::i, recoMuon::in, runGCPTkAlMap::in_file, mps_splice::line, Skims_PA_cff::name, cms::SiPixelCondObjOfflineBuilder::CalParameters::p0, cms::SiPixelCondObjOfflineBuilder::CalParameters::p1, pfMETCorrectionType0_cfi::par0, pfMETCorrectionType0_cfi::par1, PixelIndices::pixelToChannelROC(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by beginJob(), and VarParsing.VarParsing::parseArguments().

335  {
336  float par0, par1; //,par2,par3;
337  int colid, rowid; //rocid
339 
340  std::ifstream in_file; // data file pointer
341  in_file.open(fileName_.c_str(), std::ios::in); // in C++
342  if (in_file.bad()) {
343  edm::LogError("SiPixelCondObjOfflineBuilder") << "Input file not found" << std::endl;
344  }
345  if (in_file.eof() != 0) {
346  edm::LogError("SiPixelCondObjOfflineBuilder") << in_file.eof() << " " << in_file.gcount() << " " << in_file.fail()
347  << " " << in_file.good() << " end of file " << std::endl;
348  return false;
349  }
350  //Load file header
351  char line[500];
352  for (int i = 0; i < 3; i++) {
353  in_file.getline(line, 500, '\n');
354  edm::LogInfo("SiPixelCondObjOfflineBuilder") << line << std::endl;
355  }
356  //Loading calibration constants from file, loop on pixels
357  for (int i = 0; i < (52 * 80); i++) {
358  in_file >> par0 >> par1 >> name >> colid >> rowid;
359 
360  edm::LogPrint("SiPixelCondObjOfflineBuilder")
361  << " Col " << colid << " Row " << rowid << " P0 " << par0 << " P1 " << par1 << std::endl;
362 
363  CalParameters onePix;
364  onePix.p0 = par0;
365  onePix.p1 = par1;
366 
367  // Convert ROC pixel index to channel
368  int chan = PixelIndices::pixelToChannelROC(rowid, colid);
369  calmap_.insert(std::pair<int, CalParameters>(chan, onePix));
370  }
371 
372  bool flag;
373  if (calmap_.size() == 4160) {
374  flag = true;
375  } else {
376  flag = false;
377  }
378  return flag;
379  }
Log< level::Error, false > LogError
std::map< int, CalParameters, std::less< int > > calmap_
static int pixelToChannelROC(const int rowROC, const int colROC)
Definition: PixelIndices.h:233
Log< level::Warning, true > LogPrint
Log< level::Info, false > LogInfo
chan
lumi = TPaveText(lowX+0.38, lowY+0.061, lowX+0.45, lowY+0.161, "NDC") lumi.SetBorderSize( 0 ) lumi...

Member Data Documentation

◆ appendMode_

const bool cms::SiPixelCondObjOfflineBuilder::appendMode_
private

Definition at line 57 of file SiPixelCondObjOfflineBuilder.cc.

◆ calmap_

std::map<int, CalParameters, std::less<int> > cms::SiPixelCondObjOfflineBuilder::calmap_
private

Definition at line 87 of file SiPixelCondObjOfflineBuilder.cc.

Referenced by analyze(), beginJob(), and loadFromFile().

◆ deadFraction_

const double cms::SiPixelCondObjOfflineBuilder::deadFraction_
private

Definition at line 71 of file SiPixelCondObjOfflineBuilder.cc.

Referenced by analyze().

◆ fileName_

const std::string cms::SiPixelCondObjOfflineBuilder::fileName_
private

Definition at line 77 of file SiPixelCondObjOfflineBuilder.cc.

Referenced by loadFromFile().

◆ fromFile_

const bool cms::SiPixelCondObjOfflineBuilder::fromFile_
private

Definition at line 76 of file SiPixelCondObjOfflineBuilder.cc.

Referenced by analyze(), and beginJob().

◆ generateColumns_

const bool cms::SiPixelCondObjOfflineBuilder::generateColumns_
private

Definition at line 78 of file SiPixelCondObjOfflineBuilder.cc.

Referenced by analyze().

◆ meanGain_

const double cms::SiPixelCondObjOfflineBuilder::meanGain_
private

Definition at line 65 of file SiPixelCondObjOfflineBuilder.cc.

Referenced by analyze().

◆ meanGainFPix_

const double cms::SiPixelCondObjOfflineBuilder::meanGainFPix_
private

Definition at line 69 of file SiPixelCondObjOfflineBuilder.cc.

Referenced by analyze().

◆ meanPed_

const double cms::SiPixelCondObjOfflineBuilder::meanPed_
private

Definition at line 63 of file SiPixelCondObjOfflineBuilder.cc.

Referenced by analyze().

◆ meanPedFPix_

const double cms::SiPixelCondObjOfflineBuilder::meanPedFPix_
private

Definition at line 67 of file SiPixelCondObjOfflineBuilder.cc.

Referenced by analyze().

◆ noisyFraction_

const double cms::SiPixelCondObjOfflineBuilder::noisyFraction_
private

Definition at line 72 of file SiPixelCondObjOfflineBuilder.cc.

Referenced by analyze().

◆ numberOfModules_

const int cms::SiPixelCondObjOfflineBuilder::numberOfModules_
private

Definition at line 75 of file SiPixelCondObjOfflineBuilder.cc.

Referenced by analyze().

◆ pddToken_

const edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> cms::SiPixelCondObjOfflineBuilder::pddToken_
private

Definition at line 58 of file SiPixelCondObjOfflineBuilder.cc.

Referenced by analyze().

◆ pIndexConverter_

PixelIndices* cms::SiPixelCondObjOfflineBuilder::pIndexConverter_
private

Definition at line 88 of file SiPixelCondObjOfflineBuilder.cc.

◆ recordName_

const std::string cms::SiPixelCondObjOfflineBuilder::recordName_
private

Definition at line 61 of file SiPixelCondObjOfflineBuilder.cc.

Referenced by analyze().

◆ rmsGain_

const double cms::SiPixelCondObjOfflineBuilder::rmsGain_
private

Definition at line 66 of file SiPixelCondObjOfflineBuilder.cc.

Referenced by analyze().

◆ rmsGainFPix_

const double cms::SiPixelCondObjOfflineBuilder::rmsGainFPix_
private

Definition at line 70 of file SiPixelCondObjOfflineBuilder.cc.

Referenced by analyze().

◆ rmsPed_

const double cms::SiPixelCondObjOfflineBuilder::rmsPed_
private

Definition at line 64 of file SiPixelCondObjOfflineBuilder.cc.

Referenced by analyze().

◆ rmsPedFPix_

const double cms::SiPixelCondObjOfflineBuilder::rmsPedFPix_
private

Definition at line 68 of file SiPixelCondObjOfflineBuilder.cc.

Referenced by analyze().

◆ secondRocRowGainOffset_

const double cms::SiPixelCondObjOfflineBuilder::secondRocRowGainOffset_
private

Definition at line 73 of file SiPixelCondObjOfflineBuilder.cc.

Referenced by analyze().

◆ secondRocRowPedOffset_

const double cms::SiPixelCondObjOfflineBuilder::secondRocRowPedOffset_
private

Definition at line 74 of file SiPixelCondObjOfflineBuilder.cc.

Referenced by analyze().

◆ SiPixelGainCalibration_

std::unique_ptr<SiPixelGainCalibrationOffline> cms::SiPixelCondObjOfflineBuilder::SiPixelGainCalibration_
private

Definition at line 59 of file SiPixelCondObjOfflineBuilder.cc.

Referenced by analyze().

◆ SiPixelGainCalibrationService_

SiPixelGainCalibrationOfflineService cms::SiPixelCondObjOfflineBuilder::SiPixelGainCalibrationService_
private

Definition at line 60 of file SiPixelCondObjOfflineBuilder.cc.