CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes
SiPixelDigitizerAlgorithm::PixelEfficiencies Struct Reference

Public Member Functions

 PixelEfficiencies (const edm::ParameterSet &conf, bool AddPixelInefficiency, int NumberOfBarrelLayers, int NumberOfEndcapDisks)
 

Public Attributes

unsigned int FPixIndex
 
std::vector< double > theLadderEfficiency_BPix [20]
 
std::vector< double > theModuleEfficiency_BPix [20]
 
float thePixelChipEfficiency [20]
 
float thePixelColEfficiency [20]
 
float thePixelEfficiency [20]
 
std::vector< double > thePUEfficiency_BPix [20]
 

Detailed Description

Internal use only.

Definition at line 232 of file SiPixelDigitizerAlgorithm.h.

Constructor & Destructor Documentation

SiPixelDigitizerAlgorithm::PixelEfficiencies::PixelEfficiencies ( const edm::ParameterSet conf,
bool  AddPixelInefficiency,
int  NumberOfBarrelLayers,
int  NumberOfEndcapDisks 
)

Definition at line 359 of file SiPixelDigitizerAlgorithm.cc.

References edm::hlt::Exception, FPixIndex, edm::ParameterSet::getParameter(), i, j, SiPixelDigitizerAlgorithm::NumberOfBarrelLayers, SiPixelDigitizerAlgorithm::NumberOfEndcapDisks, findQualityFiles::size, theLadderEfficiency_BPix, theModuleEfficiency_BPix, thePixelChipEfficiency, thePixelColEfficiency, thePixelEfficiency, and thePUEfficiency_BPix.

359  {
360  // pixel inefficiency
361  // Don't use Hard coded values, read inefficiencies in from python or don't use any
362  int NumberOfTotLayers = NumberOfBarrelLayers + NumberOfEndcapDisks;
365  int i=0;
366  thePixelColEfficiency[i++] = conf.getParameter<double>("thePixelColEfficiency_BPix1");
367  thePixelColEfficiency[i++] = conf.getParameter<double>("thePixelColEfficiency_BPix2");
368  thePixelColEfficiency[i++] = conf.getParameter<double>("thePixelColEfficiency_BPix3");
369  if (NumberOfBarrelLayers>=4){thePixelColEfficiency[i++] = conf.getParameter<double>("thePixelColEfficiency_BPix4");}
370  //
371  i=0;
372  thePixelEfficiency[i++] = conf.getParameter<double>("thePixelEfficiency_BPix1");
373  thePixelEfficiency[i++] = conf.getParameter<double>("thePixelEfficiency_BPix2");
374  thePixelEfficiency[i++] = conf.getParameter<double>("thePixelEfficiency_BPix3");
375  if (NumberOfBarrelLayers>=4){thePixelEfficiency[i++] = conf.getParameter<double>("thePixelEfficiency_BPix4");}
376  //
377  i=0;
378  thePixelChipEfficiency[i++] = conf.getParameter<double>("thePixelChipEfficiency_BPix1");
379  thePixelChipEfficiency[i++] = conf.getParameter<double>("thePixelChipEfficiency_BPix2");
380  thePixelChipEfficiency[i++] = conf.getParameter<double>("thePixelChipEfficiency_BPix3");
381  if (NumberOfBarrelLayers>=4){thePixelChipEfficiency[i++] = conf.getParameter<double>("thePixelChipEfficiency_BPix4");}
382  //
383  i=0;
384  theLadderEfficiency_BPix[i++] = conf.getParameter<std::vector<double> >("theLadderEfficiency_BPix1");
385  theLadderEfficiency_BPix[i++] = conf.getParameter<std::vector<double> >("theLadderEfficiency_BPix2");
386  theLadderEfficiency_BPix[i++] = conf.getParameter<std::vector<double> >("theLadderEfficiency_BPix3");
387  if ( ((theLadderEfficiency_BPix[0].size()!=20) || (theLadderEfficiency_BPix[1].size()!=32) ||
388  (theLadderEfficiency_BPix[2].size()!=44)) && (NumberOfBarrelLayers==3) )
389  throw cms::Exception("Configuration") << "Wrong ladder number in efficiency config!";
390  //
391  i=0;
392  theModuleEfficiency_BPix[i++] = conf.getParameter<std::vector<double> >("theModuleEfficiency_BPix1");
393  theModuleEfficiency_BPix[i++] = conf.getParameter<std::vector<double> >("theModuleEfficiency_BPix2");
394  theModuleEfficiency_BPix[i++] = conf.getParameter<std::vector<double> >("theModuleEfficiency_BPix3");
395  if ( ((theModuleEfficiency_BPix[0].size()!=4) || (theModuleEfficiency_BPix[1].size()!=4) ||
396  (theModuleEfficiency_BPix[2].size()!=4)) && (NumberOfBarrelLayers==3) )
397  throw cms::Exception("Configuration") << "Wrong module number in efficiency config!";
398  //
399  i=0;
400  thePUEfficiency_BPix[i++] = conf.getParameter<std::vector<double> >("thePUEfficiency_BPix1");
401  thePUEfficiency_BPix[i++] = conf.getParameter<std::vector<double> >("thePUEfficiency_BPix2");
402  thePUEfficiency_BPix[i++] = conf.getParameter<std::vector<double> >("thePUEfficiency_BPix3");
403  if ( ((thePUEfficiency_BPix[0].size()==0) || (thePUEfficiency_BPix[1].size()==0) ||
404  (thePUEfficiency_BPix[2].size()==0)) && (NumberOfBarrelLayers==3) )
405  throw cms::Exception("Configuration") << "At least one PU efficiency number is needed in efficiency config!";
406  // The next is needed for Phase2 Tracker studies
407  if (NumberOfBarrelLayers>=5){
408  if (NumberOfTotLayers>20){throw cms::Exception("Configuration") <<"SiPixelDigitizer was given more layers than it can handle";}
409  // For Phase2 tracker layers just set the outermost BPix inefficiency to 99.9%
410  for (int j=5 ; j<=NumberOfBarrelLayers ; j++){
411  thePixelColEfficiency[j-1]=0.999;
412  thePixelEfficiency[j-1]=0.999;
413  thePixelChipEfficiency[j-1]=0.999;
414  }
415  }
416  //
417  i=FPixIndex;
418  thePixelColEfficiency[i++] = conf.getParameter<double>("thePixelColEfficiency_FPix1");
419  thePixelColEfficiency[i++] = conf.getParameter<double>("thePixelColEfficiency_FPix2");
420  if (NumberOfEndcapDisks>=3){thePixelColEfficiency[i++] = conf.getParameter<double>("thePixelColEfficiency_FPix3");}
421  i=FPixIndex;
422  thePixelEfficiency[i++] = conf.getParameter<double>("thePixelEfficiency_FPix1");
423  thePixelEfficiency[i++] = conf.getParameter<double>("thePixelEfficiency_FPix2");
424  if (NumberOfEndcapDisks>=3){thePixelEfficiency[i++] = conf.getParameter<double>("thePixelEfficiency_FPix3");}
425  i=FPixIndex;
426  thePixelChipEfficiency[i++] = conf.getParameter<double>("thePixelChipEfficiency_FPix1");
427  thePixelChipEfficiency[i++] = conf.getParameter<double>("thePixelChipEfficiency_FPix2");
428  if (NumberOfEndcapDisks>=3){thePixelChipEfficiency[i++] = conf.getParameter<double>("thePixelChipEfficiency_FPix3");}
429  // The next is needed for Phase2 Tracker studies
430  if (NumberOfEndcapDisks>=4){
431  if (NumberOfTotLayers>20){throw cms::Exception("Configuration") <<"SiPixelDigitizer was given more layers than it can handle";}
432  // For Phase2 tracker layers just set the extra FPix disk inefficiency to 99.9%
433  for (int j=4+FPixIndex ; j<=NumberOfEndcapDisks+NumberOfBarrelLayers ; j++){
434  thePixelColEfficiency[j-1]=0.999;
435  thePixelEfficiency[j-1]=0.999;
436  thePixelChipEfficiency[j-1]=0.999;
437  }
438  }
439  }
440  // the first "NumberOfBarrelLayers" settings [0],[1], ... , [NumberOfBarrelLayers-1] are for the barrel pixels
441  // the next "NumberOfEndcapDisks" settings [NumberOfBarrelLayers],[NumberOfBarrelLayers+1], ... [NumberOfEndcapDisks+NumberOfBarrelLayers-1]
442  if(!AddPixelInefficiency) { // No inefficiency, all 100% efficient
443  for (int i=0; i<NumberOfTotLayers;i++) {
444  thePixelEfficiency[i] = 1.; // pixels = 100%
445  thePixelColEfficiency[i] = 1.; // columns = 100%
446  thePixelChipEfficiency[i] = 1.; // chips = 100%
447  }
448  }
449 }
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
int j
Definition: DBlmapReader.cc:9
tuple size
Write out results.

Member Data Documentation

unsigned int SiPixelDigitizerAlgorithm::PixelEfficiencies::FPixIndex
std::vector<double> SiPixelDigitizerAlgorithm::PixelEfficiencies::theLadderEfficiency_BPix[20]
std::vector<double> SiPixelDigitizerAlgorithm::PixelEfficiencies::theModuleEfficiency_BPix[20]
float SiPixelDigitizerAlgorithm::PixelEfficiencies::thePixelChipEfficiency[20]
float SiPixelDigitizerAlgorithm::PixelEfficiencies::thePixelColEfficiency[20]
float SiPixelDigitizerAlgorithm::PixelEfficiencies::thePixelEfficiency[20]
std::vector<double> SiPixelDigitizerAlgorithm::PixelEfficiencies::thePUEfficiency_BPix[20]