CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Attributes
cms::SiPixelCondObjForHLTBuilder Class Reference
Inheritance diagram for cms::SiPixelCondObjForHLTBuilder:
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 ()
 
 SiPixelCondObjForHLTBuilder (const edm::ParameterSet &iConfig)
 
 ~SiPixelCondObjForHLTBuilder () override=default
 
- 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
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > 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
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Attributes

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_
 
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< SiPixelGainCalibrationForHLTSiPixelGainCalibration_
 
SiPixelGainCalibrationForHLTService SiPixelGainCalibrationService_
 
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecordtkGeometryToken_
 

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 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 SiPixelCondObjForHLTBuilder.cc.

Constructor & Destructor Documentation

◆ SiPixelCondObjForHLTBuilder()

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

Definition at line 94 of file SiPixelCondObjForHLTBuilder.cc.

96  appendMode_(iConfig.getUntrackedParameter<bool>("appendMode", true)),
97  SiPixelGainCalibration_(nullptr),
99  recordName_(iConfig.getParameter<std::string>("record")),
100  meanPed_(iConfig.getParameter<double>("meanPed")),
101  rmsPed_(iConfig.getParameter<double>("rmsPed")),
102  meanGain_(iConfig.getParameter<double>("meanGain")),
103  rmsGain_(iConfig.getParameter<double>("rmsGain")),
104  meanPedFPix_(iConfig.getUntrackedParameter<double>("meanPedFPix", meanPed_)),
105  rmsPedFPix_(iConfig.getUntrackedParameter<double>("rmsPedFPix", rmsPed_)),
106  meanGainFPix_(iConfig.getUntrackedParameter<double>("meanGainFPix", meanGain_)),
107  rmsGainFPix_(iConfig.getUntrackedParameter<double>("rmsGainFPix", rmsGain_)),
108  deadFraction_(iConfig.getParameter<double>("deadFraction")),
109  noisyFraction_(iConfig.getParameter<double>("noisyFraction")),
110  secondRocRowGainOffset_(iConfig.getParameter<double>("secondRocRowGainOffset")),
111  secondRocRowPedOffset_(iConfig.getParameter<double>("secondRocRowPedOffset")),
112  numberOfModules_(iConfig.getParameter<int>("numberOfModules")),
113  fromFile_(iConfig.getParameter<bool>("fromFile")),
114  fileName_(iConfig.getParameter<std::string>("fileName")),
115  generateColumns_(iConfig.getUntrackedParameter<bool>("generateColumns", true))
116 
117  {
118  ::putenv((char*)"CORAL_AUTH_USER=me");
119  ::putenv((char*)"CORAL_AUTH_PASSWORD=test");
120  }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
std::unique_ptr< SiPixelGainCalibrationForHLT > SiPixelGainCalibration_
SiPixelGainCalibrationForHLTService 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 > tkGeometryToken_

◆ ~SiPixelCondObjForHLTBuilder()

cms::SiPixelCondObjForHLTBuilder::~SiPixelCondObjForHLTBuilder ( )
overridedefault

Member Function Documentation

◆ analyze()

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

Implements edm::one::EDAnalyzerBase.

Definition at line 122 of file SiPixelCondObjForHLTBuilder.cc.

References cond::service::PoolDBOutputService::appendOneIOV(), cond::service::PoolDBOutputService::beginOfTime(), calmap_, cond::service::PoolDBOutputService::createOneIOV(), cond::service::PoolDBOutputService::currentTime(), deadFraction_, hcalRecHitTable_cff::detId, 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::SiPixelCondObjForHLTBuilder::CalParameters::p0, cms::SiPixelCondObjForHLTBuilder::CalParameters::p1, PixelIndices::pixelToChannelROC(), FastTimerService_cff::range, nano_mu_digi_cff::rawId, recordName_, rmsGain_, rmsGainFPix_, rmsPed_, rmsPedFPix_, writedatasetfile::run, secondRocRowGainOffset_, secondRocRowPedOffset_, SiPixelGainCalibration_, PixelGeomDetUnit::specificTopology(), tkGeometryToken_, PixelIndices::transformToROC(), heppy_batch::val, and cms::Exception::what().

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

◆ beginJob()

void SiPixelCondObjForHLTBuilder::beginJob ( )
overridevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 342 of file SiPixelCondObjForHLTBuilder.cc.

References calmap_, fromFile_, and loadFromFile().

342  {
343  if (fromFile_) {
344  if (loadFromFile()) {
345  edm::LogInfo("SiPixelCondObjForHLTBuilder") << " Calibration loaded: Map size " << calmap_.size() << " max "
346  << calmap_.max_size() << " " << calmap_.empty() << std::endl;
347  }
348  }
349  }
std::map< int, CalParameters, std::less< int > > calmap_
Log< level::Info, false > LogInfo

◆ loadFromFile()

bool SiPixelCondObjForHLTBuilder::loadFromFile ( )

Definition at line 351 of file SiPixelCondObjForHLTBuilder.cc.

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

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

351  {
352  float par0, par1; //,par2,par3;
353  int colid, rowid; //rocid
355 
356  std::ifstream in_file; // data file pointer
357  in_file.open(fileName_.c_str(), std::ios::in); // in C++
358  if (in_file.bad()) {
359  edm::LogError("SiPixelCondObjForHLTBuilder") << "Input file not found" << std::endl;
360  }
361  if (in_file.eof() != 0) {
362  edm::LogError("SiPixelCondObjForHLTBuilder") << in_file.eof() << " " << in_file.gcount() << " " << in_file.fail()
363  << " " << in_file.good() << " end of file " << std::endl;
364  return false;
365  }
366  //Load file header
367  char line[500];
368  for (int i = 0; i < 3; i++) {
369  in_file.getline(line, 500, '\n');
370  edm::LogInfo("SiPixelCondObjForHLTBuilder") << line << std::endl;
371  }
372  //Loading calibration constants from file, loop on pixels
373  for (int i = 0; i < (52 * 80); i++) {
374  in_file >> par0 >> par1 >> name >> colid >> rowid;
375 
376  edm::LogPrint("SiPixelCondObjForHLTBuilder")
377  << " Col " << colid << " Row " << rowid << " P0 " << par0 << " P1 " << par1 << std::endl;
378 
379  CalParameters onePix;
380  onePix.p0 = par0;
381  onePix.p1 = par1;
382 
383  // Convert ROC pixel index to channel
384  int chan = PixelIndices::pixelToChannelROC(rowid, colid);
385  calmap_.insert(std::pair<int, CalParameters>(chan, onePix));
386  }
387 
388  bool flag;
389  if (calmap_.size() == 4160) {
390  flag = true;
391  } else {
392  flag = false;
393  }
394  return flag;
395  }
Log< level::Error, false > LogError
static int pixelToChannelROC(const int rowROC, const int colROC)
Definition: PixelIndices.h:233
std::map< int, CalParameters, std::less< int > > calmap_
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_

bool cms::SiPixelCondObjForHLTBuilder::appendMode_
private

Definition at line 59 of file SiPixelCondObjForHLTBuilder.cc.

◆ calmap_

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

Definition at line 88 of file SiPixelCondObjForHLTBuilder.cc.

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

◆ deadFraction_

const double cms::SiPixelCondObjForHLTBuilder::deadFraction_
private

Definition at line 72 of file SiPixelCondObjForHLTBuilder.cc.

Referenced by analyze().

◆ fileName_

const std::string cms::SiPixelCondObjForHLTBuilder::fileName_
private

Definition at line 78 of file SiPixelCondObjForHLTBuilder.cc.

Referenced by loadFromFile().

◆ fromFile_

const bool cms::SiPixelCondObjForHLTBuilder::fromFile_
private

Definition at line 77 of file SiPixelCondObjForHLTBuilder.cc.

Referenced by analyze(), and beginJob().

◆ generateColumns_

const bool cms::SiPixelCondObjForHLTBuilder::generateColumns_
private

Definition at line 79 of file SiPixelCondObjForHLTBuilder.cc.

Referenced by analyze().

◆ meanGain_

const double cms::SiPixelCondObjForHLTBuilder::meanGain_
private

Definition at line 66 of file SiPixelCondObjForHLTBuilder.cc.

Referenced by analyze().

◆ meanGainFPix_

const double cms::SiPixelCondObjForHLTBuilder::meanGainFPix_
private

Definition at line 70 of file SiPixelCondObjForHLTBuilder.cc.

Referenced by analyze().

◆ meanPed_

const double cms::SiPixelCondObjForHLTBuilder::meanPed_
private

Definition at line 64 of file SiPixelCondObjForHLTBuilder.cc.

Referenced by analyze().

◆ meanPedFPix_

const double cms::SiPixelCondObjForHLTBuilder::meanPedFPix_
private

Definition at line 68 of file SiPixelCondObjForHLTBuilder.cc.

Referenced by analyze().

◆ noisyFraction_

const double cms::SiPixelCondObjForHLTBuilder::noisyFraction_
private

Definition at line 73 of file SiPixelCondObjForHLTBuilder.cc.

Referenced by analyze().

◆ numberOfModules_

const int cms::SiPixelCondObjForHLTBuilder::numberOfModules_
private

Definition at line 76 of file SiPixelCondObjForHLTBuilder.cc.

Referenced by analyze().

◆ pIndexConverter_

PixelIndices* cms::SiPixelCondObjForHLTBuilder::pIndexConverter_
private

Definition at line 89 of file SiPixelCondObjForHLTBuilder.cc.

◆ recordName_

const std::string cms::SiPixelCondObjForHLTBuilder::recordName_
private

Definition at line 62 of file SiPixelCondObjForHLTBuilder.cc.

Referenced by analyze().

◆ rmsGain_

const double cms::SiPixelCondObjForHLTBuilder::rmsGain_
private

Definition at line 67 of file SiPixelCondObjForHLTBuilder.cc.

Referenced by analyze().

◆ rmsGainFPix_

const double cms::SiPixelCondObjForHLTBuilder::rmsGainFPix_
private

Definition at line 71 of file SiPixelCondObjForHLTBuilder.cc.

Referenced by analyze().

◆ rmsPed_

const double cms::SiPixelCondObjForHLTBuilder::rmsPed_
private

Definition at line 65 of file SiPixelCondObjForHLTBuilder.cc.

Referenced by analyze().

◆ rmsPedFPix_

const double cms::SiPixelCondObjForHLTBuilder::rmsPedFPix_
private

Definition at line 69 of file SiPixelCondObjForHLTBuilder.cc.

Referenced by analyze().

◆ secondRocRowGainOffset_

const double cms::SiPixelCondObjForHLTBuilder::secondRocRowGainOffset_
private

Definition at line 74 of file SiPixelCondObjForHLTBuilder.cc.

Referenced by analyze().

◆ secondRocRowPedOffset_

const double cms::SiPixelCondObjForHLTBuilder::secondRocRowPedOffset_
private

Definition at line 75 of file SiPixelCondObjForHLTBuilder.cc.

Referenced by analyze().

◆ SiPixelGainCalibration_

std::unique_ptr<SiPixelGainCalibrationForHLT> cms::SiPixelCondObjForHLTBuilder::SiPixelGainCalibration_
private

Definition at line 60 of file SiPixelCondObjForHLTBuilder.cc.

Referenced by analyze().

◆ SiPixelGainCalibrationService_

SiPixelGainCalibrationForHLTService cms::SiPixelCondObjForHLTBuilder::SiPixelGainCalibrationService_
private

Definition at line 61 of file SiPixelCondObjForHLTBuilder.cc.

◆ tkGeometryToken_

const edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> cms::SiPixelCondObjForHLTBuilder::tkGeometryToken_
private

Definition at line 57 of file SiPixelCondObjForHLTBuilder.cc.

Referenced by analyze().