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
 
float thePixelChipEfficiency [20]
 
float thePixelColEfficiency [20]
 
float thePixelEfficiency [20]
 

Detailed Description

Internal use only.

Definition at line 230 of file SiPixelDigitizerAlgorithm.h.

Constructor & Destructor Documentation

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

Definition at line 365 of file SiPixelDigitizerAlgorithm.cc.

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

365  {
366  // pixel inefficiency
367  // Don't use Hard coded values, read inefficiencies in from python or don't use any
368  int NumberOfTotLayers = NumberOfBarrelLayers + NumberOfEndcapDisks;
371  int i=0;
372  thePixelColEfficiency[i++] = conf.getParameter<double>("thePixelColEfficiency_BPix1");
373  thePixelColEfficiency[i++] = conf.getParameter<double>("thePixelColEfficiency_BPix2");
374  thePixelColEfficiency[i++] = conf.getParameter<double>("thePixelColEfficiency_BPix3");
375  if (NumberOfBarrelLayers>=4){thePixelColEfficiency[i++] = conf.getParameter<double>("thePixelColEfficiency_BPix4");}
376  //
377  i=0;
378  thePixelEfficiency[i++] = conf.getParameter<double>("thePixelEfficiency_BPix1");
379  thePixelEfficiency[i++] = conf.getParameter<double>("thePixelEfficiency_BPix2");
380  thePixelEfficiency[i++] = conf.getParameter<double>("thePixelEfficiency_BPix3");
381  if (NumberOfBarrelLayers>=4){thePixelEfficiency[i++] = conf.getParameter<double>("thePixelEfficiency_BPix4");}
382  //
383  i=0;
384  thePixelChipEfficiency[i++] = conf.getParameter<double>("thePixelChipEfficiency_BPix1");
385  thePixelChipEfficiency[i++] = conf.getParameter<double>("thePixelChipEfficiency_BPix2");
386  thePixelChipEfficiency[i++] = conf.getParameter<double>("thePixelChipEfficiency_BPix3");
387  if (NumberOfBarrelLayers>=4){thePixelChipEfficiency[i++] = conf.getParameter<double>("thePixelChipEfficiency_BPix4");}
388  // The next is needed for Phase2 Tracker studies
389  if (NumberOfBarrelLayers>=5){
390  if (NumberOfTotLayers>20){throw cms::Exception("Configuration") <<"SiPixelDigitizer was given more layers than it can handle";}
391  // For Phase2 tracker layers just set the outermost BPix inefficiency to 99.9%
392  for (int j=5 ; j<=NumberOfBarrelLayers ; j++){
393  thePixelColEfficiency[j-1]=0.999;
394  thePixelEfficiency[j-1]=0.999;
395  thePixelChipEfficiency[j-1]=0.999;
396  }
397  }
398  //
399  i=FPixIndex;
400  thePixelColEfficiency[i++] = conf.getParameter<double>("thePixelColEfficiency_FPix1");
401  thePixelColEfficiency[i++] = conf.getParameter<double>("thePixelColEfficiency_FPix2");
402  if (NumberOfEndcapDisks>=3){thePixelColEfficiency[i++] = conf.getParameter<double>("thePixelColEfficiency_FPix3");}
403  i=FPixIndex;
404  thePixelEfficiency[i++] = conf.getParameter<double>("thePixelEfficiency_FPix1");
405  thePixelEfficiency[i++] = conf.getParameter<double>("thePixelEfficiency_FPix2");
406  if (NumberOfEndcapDisks>=3){thePixelEfficiency[i++] = conf.getParameter<double>("thePixelEfficiency_FPix3");}
407  i=FPixIndex;
408  thePixelChipEfficiency[i++] = conf.getParameter<double>("thePixelChipEfficiency_FPix1");
409  thePixelChipEfficiency[i++] = conf.getParameter<double>("thePixelChipEfficiency_FPix2");
410  if (NumberOfEndcapDisks>=3){thePixelChipEfficiency[i++] = conf.getParameter<double>("thePixelChipEfficiency_FPix3");}
411  // The next is needed for Phase2 Tracker studies
412  if (NumberOfEndcapDisks>=4){
413  if (NumberOfTotLayers>20){throw cms::Exception("Configuration") <<"SiPixelDigitizer was given more layers than it can handle";}
414  // For Phase2 tracker layers just set the extra FPix disk inefficiency to 99.9%
415  for (int j=4+FPixIndex ; j<=NumberOfEndcapDisks+NumberOfBarrelLayers ; j++){
416  thePixelColEfficiency[j-1]=0.999;
417  thePixelEfficiency[j-1]=0.999;
418  thePixelChipEfficiency[j-1]=0.999;
419  }
420  }
421  }
422  // the first "NumberOfBarrelLayers" settings [0],[1], ... , [NumberOfBarrelLayers-1] are for the barrel pixels
423  // the next "NumberOfEndcapDisks" settings [NumberOfBarrelLayers],[NumberOfBarrelLayers+1], ... [NumberOfEndcapDisks+NumberOfBarrelLayers-1]
424  if(!AddPixelInefficiency) { // No inefficiency, all 100% efficient
425  for (int i=0; i<NumberOfTotLayers;i++) {
426  thePixelEfficiency[i] = 1.; // pixels = 100%
427  thePixelColEfficiency[i] = 1.; // columns = 100%
428  thePixelChipEfficiency[i] = 1.; // chips = 100%
429  }
430  }
431 }
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
int j
Definition: DBlmapReader.cc:9

Member Data Documentation

unsigned int SiPixelDigitizerAlgorithm::PixelEfficiencies::FPixIndex
float SiPixelDigitizerAlgorithm::PixelEfficiencies::thePixelChipEfficiency[20]
float SiPixelDigitizerAlgorithm::PixelEfficiencies::thePixelColEfficiency[20]
float SiPixelDigitizerAlgorithm::PixelEfficiencies::thePixelEfficiency[20]