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 360 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.

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