CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | 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 SiPixelGainCalibrationAnalysis SiPixelIsAliveCalibration SiPixelSCurveCalibrationAnalysis

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 (const edm::ParameterSet &)
 
 SiPixelOfflineCalibAnalysisBase ()
 
std::string translateDetIdToString (uint32_t detid)
 
 ~SiPixelOfflineCalibAnalysisBase ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

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 Public Attributes

static TF1 * fitFunction_ = NULL
 

Protected Member Functions

uint32_t & EventNumber ()
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

Protected Attributes

edm::ESHandle
< SiPixelCalibConfiguration
calib_
 
std::string calibrationMode_
 
edm::ESHandle< TrackerGeometrygeom_
 
short nTriggers_
 
edm::ESHandle
< SiPixelFedCablingMap
theCablingMap_
 

Static Protected Attributes

static std::vector< short > vCalValues_
 

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &)
 
void beginJob ()
 
virtual void beginRun (const edm::Run &, const edm::EventSetup &)
 
void beginRun (const edm::EventSetup &iSetup)
 
virtual void calibrationEnd ()
 
virtual void calibrationSetup (const edm::EventSetup &iSetup)
 
virtual bool checkCorrectCalibrationType ()
 
bool checkPixel (uint32_t detid, short row, short column)
 
void endJob ()
 
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_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 

Detailed Description

Description: Base class for Pixel calibrations

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

Definition at line 68 of file SiPixelOfflineCalibAnalysisBase.h.

Constructor & Destructor Documentation

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

Definition at line 36 of file SiPixelOfflineCalibAnalysisBase.cc.

References createOutputFile_, daqBE_, folderMaker_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), outputFileName_, and siPixelCalibDigiProducer_.

37 {
38  siPixelCalibDigiProducer_ = iConfig.getParameter<edm::InputTag>("DetSetVectorSiPixelCalibDigiTag");
39  createOutputFile_ = iConfig.getUntrackedParameter<bool>("saveFile",false);
40  outputFileName_ = iConfig.getParameter<std::string>("outputFileName");
43 
44 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
SiPixelOfflineCalibAnalysisBase::~SiPixelOfflineCalibAnalysisBase ( )

Definition at line 51 of file SiPixelOfflineCalibAnalysisBase.cc.

52 {
53 }
SiPixelOfflineCalibAnalysisBase::SiPixelOfflineCalibAnalysisBase ( )

Definition at line 46 of file SiPixelOfflineCalibAnalysisBase.cc.

References edm::hlt::Exception.

47 {
48  throw cms::Exception("") << "ERROR: Classes derived from SiPixelOfflineCalibAnalysisBase must call SiPixelOfflineCalibAnalysisBase::SiPixelOfflineCalibAnalysisBase(const edm::ParameterSet& iConfig) from their constructor." << std::endl;
49 }

Member Function Documentation

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

Definition at line 332 of file SiPixelOfflineCalibAnalysisBase.cc.

References MonitorElement::getTH1().

332  {
333 
334  if(func){
335  ele->getTH1()->GetListOfFunctions()->Add(func);
336  }
337  return;
338 }
TH1 * getTH1(void) const
void SiPixelOfflineCalibAnalysisBase::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
privatevirtual

Implements edm::EDAnalyzer.

Definition at line 62 of file SiPixelOfflineCalibAnalysisBase.cc.

References calib_, calibrationSetup(), checkCorrectCalibrationType(), edm::DetSet< T >::data, detIdNames_, detIdsEntered_, doFits(), edm::DetSet< T >::end(), eventCounter_, geom_, edm::EventSetup::get(), edm::Event::getByLabel(), edm::EventBase::id(), newDetID(), edm::EventID::run(), cond::runnumber, runnumbers_, siPixelCalibDigiProducer_, theCablingMap_, and translateDetIdToString().

63 {
64  using namespace edm;
65 
66  iSetup.get<TrackerDigiGeometryRecord>().get( geom_ );
69  if(eventCounter_==0)
70  this->calibrationSetup(iSetup);
71  eventCounter_++;
72 
73  // check first if you're analyzing the right type of calibration
75  return;
76 
77  uint32_t runnumber=iEvent.id().run();
78  if(runnumbers_.size()==0)
79  runnumbers_.push_back(runnumber);
80  else{
81  bool foundnumber=false;
82  for(size_t iter=0; iter<runnumbers_.size() && !foundnumber; ++ iter){
83  if(runnumbers_[iter]==runnumber){
84  foundnumber=true;
85  continue;
86  }
87  }
88  if(!foundnumber)
89  runnumbers_.push_back(runnumber);
90  }
91 
93  iEvent.getByLabel(siPixelCalibDigiProducer_, thePlaquettes);
94 
96 
97  //loop over the plaquettes pulsed in this pattern
98  for(digiIter=thePlaquettes->begin(); digiIter!=thePlaquettes->end(); ++digiIter)
99  {
100  uint32_t detId = digiIter->id;
101  //check to see if this detID has not been encountered. If not, run the newDetID (pure virtual) function
102  if (detIdsEntered_.find(detId) == detIdsEntered_.end())
103  {
104  detIdsEntered_.insert(std::make_pair(detId, 0));
105  detIdNames_.insert(std::make_pair(detId, translateDetIdToString(detId)));
106  newDetID(detId);
107  }
109  //loop over pixels pulsed in the current plaquette
110  for(ipix=digiIter->data.begin(); ipix!=digiIter->end(); ++ipix)
111  {
112  //called derived function to fit this curve
113  this->doFits(detId, ipix);
114  }
115  }
116 
117 }
RunNumber_t run() const
Definition: EventID.h:42
iterator end()
Definition: DetSet.h:59
edm::ESHandle< SiPixelCalibConfiguration > calib_
std::map< uint32_t, std::string > detIdNames_
std::string translateDetIdToString(uint32_t detid)
edm::ESHandle< TrackerGeometry > geom_
virtual void calibrationSetup(const edm::EventSetup &iSetup)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:355
const T & get() const
Definition: EventSetup.h:55
edm::EventID id() const
Definition: EventBase.h:56
collection_type data
Definition: DetSet.h:77
virtual bool doFits(uint32_t detid, std::vector< SiPixelCalibDigi >::const_iterator ipix)
collection_type::const_iterator const_iterator
Definition: DetSet.h:32
collection_type::const_iterator const_iterator
Definition: DetSetVector.h:106
edm::ESHandle< SiPixelFedCablingMap > theCablingMap_
void SiPixelOfflineCalibAnalysisBase::beginJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 136 of file SiPixelOfflineCalibAnalysisBase.cc.

137 {
138 
139 }
void SiPixelOfflineCalibAnalysisBase::beginRun ( const edm::Run ,
const edm::EventSetup iSetup 
)
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 119 of file SiPixelOfflineCalibAnalysisBase.cc.

References calib_, calibrationMode_, calibrationSetup(), gather_cfg::cout, geom_, edm::EventSetup::get(), edm::InputTag::label(), nTriggers_, siPixelCalibDigiProducer_, theCablingMap_, theHistogramIdWorker_, and vCalValues_.

120 {
121  //load the calibration information from the database
122  iSetup.get<SiPixelCalibConfigurationRcd>().get(calib_);
123  iSetup.get<TrackerDigiGeometryRecord>().get( geom_ );
125 
126  calibrationMode_ = calib_->getCalibrationMode();
127  nTriggers_ = calib_->getNTriggers();
128  vCalValues_ = calib_->getVCalValues();
129  std::cout << "!!!! in beginRun" << std::endl;
130  edm::LogInfo("SiPixelOfflineCalibAnalysisBase") << "Calibration file loaded. Mode: " << calibrationMode_ << " nTriggers: " << nTriggers_ << " Vcal steps: " << vCalValues_.size() << std::endl;
131  //call calibrationSetup virtual function
132  this->calibrationSetup(iSetup);
134 }
edm::ESHandle< SiPixelCalibConfiguration > calib_
edm::ESHandle< TrackerGeometry > geom_
virtual void calibrationSetup(const edm::EventSetup &iSetup)
const T & get() const
Definition: EventSetup.h:55
std::string const & label() const
Definition: InputTag.h:25
tuple cout
Definition: gather_cfg.py:41
edm::ESHandle< SiPixelFedCablingMap > theCablingMap_
void SiPixelOfflineCalibAnalysisBase::beginRun ( const edm::EventSetup iSetup)
private
MonitorElement * SiPixelOfflineCalibAnalysisBase::bookDQMHistogram1D ( uint32_t  detid,
std::string  name,
std::string  title,
int  nchX,
double  lowX,
double  highX 
)

Definition at line 190 of file SiPixelOfflineCalibAnalysisBase.cc.

References DQMStore::book1D(), daqBE_, SiPixelHistogramId::setHistoId(), and theHistogramIdWorker_.

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

191 {
192  std::string hid = theHistogramIdWorker_->setHistoId(name,detid);
193  return daqBE_->book1D(hid, title, nchX, lowX, highX);
194 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:514
std::string setHistoId(std::string variable, uint32_t &rawId)
Set Histogram Id.
MonitorElement * SiPixelOfflineCalibAnalysisBase::bookDQMHistogram1D ( uint32_t  detid,
std::string  name,
std::string  title,
int  nchX,
float *  xbinsize 
)

Definition at line 196 of file SiPixelOfflineCalibAnalysisBase.cc.

References DQMStore::book1D(), daqBE_, SiPixelHistogramId::setHistoId(), and theHistogramIdWorker_.

197 {
198  std::string hid = theHistogramIdWorker_->setHistoId(name,detid);
199  return daqBE_->book1D(hid, title, nchX, xbinsize);
200 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:514
std::string setHistoId(std::string variable, uint32_t &rawId)
Set Histogram Id.
MonitorElement * SiPixelOfflineCalibAnalysisBase::bookDQMHistogram2D ( uint32_t  detid,
std::string  name,
std::string  title,
int  nchX,
double  lowX,
double  highX,
int  nchY,
double  lowY,
double  highY 
)

Definition at line 202 of file SiPixelOfflineCalibAnalysisBase.cc.

References DQMStore::book2D(), daqBE_, SiPixelHistogramId::setHistoId(), and theHistogramIdWorker_.

203 {
204  std::string hid = theHistogramIdWorker_->setHistoId(name,detid);
205  return daqBE_->book2D(hid, title, nchX, lowX, highX, nchY, lowY, highY);
206 }
std::string setHistoId(std::string variable, uint32_t &rawId)
Set Histogram Id.
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:642
MonitorElement * SiPixelOfflineCalibAnalysisBase::bookDQMHistoPlaquetteSummary2D ( uint32_t  detid,
std::string  name,
std::string  title 
)

Definition at line 208 of file SiPixelOfflineCalibAnalysisBase.cc.

References DQMStore::book2D(), daqBE_, geom_, TrackerGeometry::idToDet(), PixelTopology::ncolumns(), PixelTopology::nrows(), SiPixelHistogramId::setHistoId(), PixelGeomDetUnit::specificTopology(), and theHistogramIdWorker_.

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

208  {
209  DetId detId(detid);
210  const TrackerGeometry &theTracker(*geom_);
211  const PixelGeomDetUnit *theGeomDet = dynamic_cast<const PixelGeomDetUnit*> ( theTracker.idToDet(detId) );
212  int maxcol = theGeomDet->specificTopology().ncolumns();
213  int maxrow = theGeomDet->specificTopology().nrows();
214 
215 
216  std::string hid = theHistogramIdWorker_->setHistoId(name,detid);
217  return daqBE_->book2D(hid,title,maxcol,0,maxcol,maxrow,0,maxrow);
218 }
virtual int ncolumns() const =0
virtual int nrows() const =0
edm::ESHandle< TrackerGeometry > geom_
std::string setHistoId(std::string variable, uint32_t &rawId)
Set Histogram Id.
Definition: DetId.h:20
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:642
void SiPixelOfflineCalibAnalysisBase::calibrationEnd ( )
privatevirtual

Reimplemented in SiPixelSCurveCalibrationAnalysis, SiPixelGainCalibrationAnalysis, and SiPixelIsAliveCalibration.

Definition at line 269 of file SiPixelOfflineCalibAnalysisBase.cc.

Referenced by endJob().

270 {
271  // do nothing
272 }
void SiPixelOfflineCalibAnalysisBase::calibrationSetup ( const edm::EventSetup iSetup)
privatevirtual

Reimplemented in SiPixelSCurveCalibrationAnalysis, SiPixelGainCalibrationAnalysis, and SiPixelIsAliveCalibration.

Definition at line 264 of file SiPixelOfflineCalibAnalysisBase.cc.

Referenced by analyze(), and beginRun().

265 {
266  //do nothing
267 }
bool SiPixelOfflineCalibAnalysisBase::checkCorrectCalibrationType ( )
privatevirtual

Reimplemented in SiPixelSCurveCalibrationAnalysis, SiPixelGainCalibrationAnalysis, and SiPixelIsAliveCalibration.

Definition at line 236 of file SiPixelOfflineCalibAnalysisBase.cc.

Referenced by analyze().

237 {
238  return true;
239 }
bool SiPixelOfflineCalibAnalysisBase::checkPixel ( uint32_t  detid,
short  row,
short  column 
)
private

Definition at line 281 of file SiPixelOfflineCalibAnalysisBase.cc.

References calib_, sipixelobjects::ElectronicIndex::dcol, sipixelobjects::LocalPixel::DcolPxid::dcol, cond::rpcobgas::detid, edm::ESHandle< class >::product(), sipixelobjects::ElectronicIndex::pxid, sipixelobjects::LocalPixel::DcolPxid::pxid, sipixelobjects::LocalPixel::rocCol(), sipixelobjects::LocalPixel::rocRow(), and theCablingMap_.

282 {
283  // finds the fed ID:
284  int thefedid = -1;
285  for(int fedid=0; fedid<=40 && thefedid==-1; ++fedid)
286  {
287  SiPixelFrameConverter converter(theCablingMap_.product(),fedid);
288  if(converter.hasDetUnit(detid))
289  {
290  thefedid=fedid;
291  }
292  }
293  if(thefedid==-1)
294  return false; // fed ID not associated with det ID. No pattern check possible
295 
296  SiPixelFrameConverter formatter(theCablingMap_.product(),thefedid);
297  sipixelobjects::DetectorIndex detector ={detid, row, col};
299 
300  formatter.toCabling(cabling,detector);
301  // cabling should now contain cabling.roc and cabling.dcol and cabling.pxid
302 
303  // however, the coordinates now need to be converted from dcl, pxid to the row,col coordinates used in the calibration info
305  loc.dcol = cabling.dcol;
306  loc.pxid = cabling.pxid;
307  sipixelobjects::LocalPixel locpixel(loc);
308  short localrow = locpixel.rocRow();
309  short localcol = locpixel.rocCol();
310 
311  // now get the patterns from the calib object:
312  std::vector<short> calibcols = calib_->getColumnPattern();
313  std::vector<short> calibrows = calib_->getRowPattern();
314  // first check rows:
315  for(size_t irow=0; irow<calibrows.size(); ++irow)
316  {
317  if(calibrows[irow]==localrow)
318  {
319  // check the columns
320  for(size_t icol=0; icol<calibcols.size(); ++icol)
321  {
322  if(calibcols[icol]==localcol)
323  return true;
324  }
325  }
326  }
327 
328  return false;
329 }
edm::ESHandle< SiPixelCalibConfiguration > calib_
identify pixel inside single ROC
Definition: LocalPixel.h:7
double collumn and pixel ID in double collumn representation
Definition: LocalPixel.h:22
T const * product() const
Definition: ESHandle.h:62
edm::ESHandle< SiPixelFedCablingMap > theCablingMap_
bool SiPixelOfflineCalibAnalysisBase::doFits ( uint32_t  detid,
std::vector< SiPixelCalibDigi >::const_iterator  ipix 
)
virtual

Reimplemented in SiPixelSCurveCalibrationAnalysis, SiPixelGainCalibrationAnalysis, and SiPixelIsAliveCalibration.

Definition at line 242 of file SiPixelOfflineCalibAnalysisBase.cc.

References gather_cfg::cout, and i.

Referenced by analyze().

243 {
244  short row=ipix->row();
245  short col=ipix->col();
246  std::vector<uint8_t> nentries = ipix->getnentries();
247  std::vector<uint32_t> sum = ipix->getsum();
248  std::vector<uint32_t> sumquares = ipix->getsumsquares();
249  //do nothing
250  //return false;
251  //
252  //DEBUG
253  std::cout << "Row: " << row << " Col: " << col << std::endl;
254  for (unsigned int i = 0; i < sum.size(); i++)
255  {
256  std::cout << sum[i] << " ";
257  }
258  std::cout << std::endl;
259  return false;
260 
261 }
int i
Definition: DBlmapReader.cc:9
tuple cout
Definition: gather_cfg.py:41
void SiPixelOfflineCalibAnalysisBase::endJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 144 of file SiPixelOfflineCalibAnalysisBase.cc.

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

144  {
145  this->calibrationEnd();
146  edm::LogInfo("SiPixelOfflineCalibAnalysisBase") << "Running end job... output file name is: " << outputFileName_;
147  if (!outputFileName_.empty() && createOutputFile_)
148  {
149  edm::LogInfo("SiPixelOfflineCalibAnalysisBase") << "Writing ROOT file to: " << outputFileName_ << std::endl;
151  }
152 }
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
Definition: DQMStore.cc:1898
uint32_t& SiPixelOfflineCalibAnalysisBase::EventNumber ( )
inlineprotected
std::vector<uint32_t>& SiPixelOfflineCalibAnalysisBase::getRunNumbers ( )
inline

Definition at line 97 of file SiPixelOfflineCalibAnalysisBase.h.

References runnumbers_.

97 { return runnumbers_;}
const std::vector< short > * SiPixelOfflineCalibAnalysisBase::getVcalValues ( )
static

Definition at line 157 of file SiPixelOfflineCalibAnalysisBase.cc.

References vCalValues_.

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

158 {
159  return &vCalValues_;
160 }
void SiPixelOfflineCalibAnalysisBase::newDetID ( uint32_t  detid)
privatevirtual

Reimplemented in SiPixelSCurveCalibrationAnalysis, SiPixelGainCalibrationAnalysis, and SiPixelIsAliveCalibration.

Definition at line 274 of file SiPixelOfflineCalibAnalysisBase.cc.

References cond::rpcobgas::detid, and detIdNames_.

Referenced by analyze().

275 {
276  //do nothing
277  edm::LogInfo("SiPixelOfflineCalibAnalysisBase") << "SiPixelOfflineCalibAnalysisBase - Found new DetID: " << detid << " Name: " << detIdNames_[detid];
278 }
std::map< uint32_t, std::string > detIdNames_
bool SiPixelOfflineCalibAnalysisBase::setDQMDirectory ( std::string  dirName)
bool SiPixelOfflineCalibAnalysisBase::setDQMDirectory ( uint32_t  detID)

Definition at line 228 of file SiPixelOfflineCalibAnalysisBase.cc.

References folderMaker_, and SiPixelFolderOrganizer::setModuleFolder().

229 {
230  return folderMaker_->setModuleFolder(detID,0);
231 }
bool setModuleFolder(const uint32_t &rawdetid=0, int type=0)
Set folder name for a module or plaquette.
std::string SiPixelOfflineCalibAnalysisBase::translateDetIdToString ( uint32_t  detid)

Definition at line 163 of file SiPixelOfflineCalibAnalysisBase.cc.

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

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

164 {
165  std::map<uint32_t, std::string>::iterator detNameIter = detIdNames_.find(detid);
166  if (detNameIter != detIdNames_.end()) {
167  return detNameIter->second;
168  }
169  std::string output = "DetID translation error";
170  DetId detId(detid);
171  uint32_t detSubId = detId.subdetId();
172  if (detSubId > 2 || detSubId < 1)
173  {
174  edm::LogError("SiPixelOfflineCalibAnalysisBase") << "ERROR: Expected a pixel detector ID (1 - barrel, 2 - forward) but got " << detSubId << std::endl;
175  return output;
176  }
177  if (detSubId == 2) //FPIX
178  {
179  PixelEndcapName nameworker(detid);
180  output = nameworker.name();
181  } else //BPIX
182  {
183  PixelBarrelName nameworker(detid);
184  output = nameworker.name();
185  }
186  detIdNames_.insert(std::make_pair(detid, output));
187  return output;
188 }
std::map< uint32_t, std::string > detIdNames_
Definition: DetId.h:20

Member Data Documentation

edm::ESHandle<SiPixelCalibConfiguration> SiPixelOfflineCalibAnalysisBase::calib_
protected
std::string SiPixelOfflineCalibAnalysisBase::calibrationMode_
protected
bool SiPixelOfflineCalibAnalysisBase::createOutputFile_
private

Definition at line 118 of file SiPixelOfflineCalibAnalysisBase.h.

Referenced by endJob(), and SiPixelOfflineCalibAnalysisBase().

DQMStore* SiPixelOfflineCalibAnalysisBase::daqBE_
private
std::map<uint32_t, std::string> SiPixelOfflineCalibAnalysisBase::detIdNames_
private

Definition at line 126 of file SiPixelOfflineCalibAnalysisBase.h.

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

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

Definition at line 125 of file SiPixelOfflineCalibAnalysisBase.h.

Referenced by analyze().

uint32_t SiPixelOfflineCalibAnalysisBase::eventCounter_
private

Definition at line 121 of file SiPixelOfflineCalibAnalysisBase.h.

Referenced by analyze(), and EventNumber().

TF1 * SiPixelOfflineCalibAnalysisBase::fitFunction_ = NULL
static
SiPixelFolderOrganizer* SiPixelOfflineCalibAnalysisBase::folderMaker_
private
edm::ESHandle<TrackerGeometry> SiPixelOfflineCalibAnalysisBase::geom_
protected
short SiPixelOfflineCalibAnalysisBase::nTriggers_
protected
std::string SiPixelOfflineCalibAnalysisBase::outputFileName_
private

Definition at line 117 of file SiPixelOfflineCalibAnalysisBase.h.

Referenced by endJob(), and SiPixelOfflineCalibAnalysisBase().

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

Definition at line 120 of file SiPixelOfflineCalibAnalysisBase.h.

Referenced by analyze(), and getRunNumbers().

edm::InputTag SiPixelOfflineCalibAnalysisBase::siPixelCalibDigiProducer_
private
edm::ESHandle<SiPixelFedCablingMap> SiPixelOfflineCalibAnalysisBase::theCablingMap_
protected
SiPixelHistogramId* SiPixelOfflineCalibAnalysisBase::theHistogramIdWorker_
private
std::vector< short > SiPixelOfflineCalibAnalysisBase::vCalValues_
staticprotected