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
 
double theInnerEfficiency_FPix [20]
 
std::vector< double > theLadderEfficiency_BPix [20]
 
std::vector< double > theModuleEfficiency_BPix [20]
 
double theOuterEfficiency_FPix [20]
 
double thePixelChipEfficiency [20]
 
double thePixelColEfficiency [20]
 
double thePixelEfficiency [20]
 
std::vector< double > thePUEfficiency [20]
 

Detailed Description

Internal use only.

Definition at line 241 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, theInnerEfficiency_FPix, theLadderEfficiency_BPix, theModuleEfficiency_BPix, theOuterEfficiency_FPix, thePixelChipEfficiency, thePixelColEfficiency, thePixelEfficiency, and thePUEfficiency.

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[i++] = conf.getParameter<std::vector<double> >("thePUEfficiency_BPix1");
401  thePUEfficiency[i++] = conf.getParameter<std::vector<double> >("thePUEfficiency_BPix2");
402  thePUEfficiency[i++] = conf.getParameter<std::vector<double> >("thePUEfficiency_BPix3");
403  if ( ((thePUEfficiency[0].size()==0) || (thePUEfficiency[1].size()==0) ||
404  (thePUEfficiency[2].size()==0)) && (NumberOfBarrelLayers==3) )
405  throw cms::Exception("Configuration") << "At least one PU efficiency (BPix) 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% THESE VALUES ARE HARDCODED ALSO ELSEWHERE IN THIS FILE
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% THESE VALUES ARE HARDCODED ALSO ELSEWHERE IN THIS FILE
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  //FPix Dynamic Inefficiency
440  i=FPixIndex;
441  theInnerEfficiency_FPix[i++] = conf.getParameter<double>("theInnerEfficiency_FPix1");
442  theInnerEfficiency_FPix[i++] = conf.getParameter<double>("theInnerEfficiency_FPix2");
443  i=FPixIndex;
444  theOuterEfficiency_FPix[i++] = conf.getParameter<double>("theOuterEfficiency_FPix1");
445  theOuterEfficiency_FPix[i++] = conf.getParameter<double>("theOuterEfficiency_FPix2");
446  i=FPixIndex;
447  thePUEfficiency[i++] = conf.getParameter<std::vector<double> >("thePUEfficiency_FPix_Inner");
448  thePUEfficiency[i++] = conf.getParameter<std::vector<double> >("thePUEfficiency_FPix_Outer");
449  if ( ((thePUEfficiency[3].size()==0) || (thePUEfficiency[4].size()==0)) && (NumberOfEndcapDisks==2) )
450  throw cms::Exception("Configuration") << "At least one (FPix) PU efficiency number is needed in efficiency config!";
451  }
452  // the first "NumberOfBarrelLayers" settings [0],[1], ... , [NumberOfBarrelLayers-1] are for the barrel pixels
453  // the next "NumberOfEndcapDisks" settings [NumberOfBarrelLayers],[NumberOfBarrelLayers+1], ... [NumberOfEndcapDisks+NumberOfBarrelLayers-1]
454 }
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
double SiPixelDigitizerAlgorithm::PixelEfficiencies::theInnerEfficiency_FPix[20]
std::vector<double> SiPixelDigitizerAlgorithm::PixelEfficiencies::theLadderEfficiency_BPix[20]
std::vector<double> SiPixelDigitizerAlgorithm::PixelEfficiencies::theModuleEfficiency_BPix[20]
double SiPixelDigitizerAlgorithm::PixelEfficiencies::theOuterEfficiency_FPix[20]
double SiPixelDigitizerAlgorithm::PixelEfficiencies::thePixelChipEfficiency[20]
double SiPixelDigitizerAlgorithm::PixelEfficiencies::thePixelColEfficiency[20]
double SiPixelDigitizerAlgorithm::PixelEfficiencies::thePixelEfficiency[20]
std::vector<double> SiPixelDigitizerAlgorithm::PixelEfficiencies::thePUEfficiency[20]