CMS 3D CMS Logo

Public Member Functions | Public Attributes

SiPixelDigitizerAlgorithm::PixelEfficiencies Struct Reference

List of all members.

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 Exception, FPixIndex, edm::ParameterSet::getParameter(), i, j, SiPixelDigitizerAlgorithm::NumberOfBarrelLayers, SiPixelDigitizerAlgorithm::NumberOfEndcapDisks, thePixelChipEfficiency, thePixelColEfficiency, and thePixelEfficiency.

                                                                                                                                                                       {
  // pixel inefficiency
  // Don't use Hard coded values, read inefficiencies in from python or don't use any
  int NumberOfTotLayers = NumberOfBarrelLayers + NumberOfEndcapDisks;
  FPixIndex=NumberOfBarrelLayers;
  if (AddPixelInefficiency){
                     int i=0;
                     thePixelColEfficiency[i++] = conf.getParameter<double>("thePixelColEfficiency_BPix1");
                     thePixelColEfficiency[i++] = conf.getParameter<double>("thePixelColEfficiency_BPix2");
                     thePixelColEfficiency[i++] = conf.getParameter<double>("thePixelColEfficiency_BPix3");
                     if (NumberOfBarrelLayers>=4){thePixelColEfficiency[i++] = conf.getParameter<double>("thePixelColEfficiency_BPix4");}
                     //
                     i=0;
                     thePixelEfficiency[i++] = conf.getParameter<double>("thePixelEfficiency_BPix1");
                     thePixelEfficiency[i++] = conf.getParameter<double>("thePixelEfficiency_BPix2");
                     thePixelEfficiency[i++] = conf.getParameter<double>("thePixelEfficiency_BPix3");
                     if (NumberOfBarrelLayers>=4){thePixelEfficiency[i++] = conf.getParameter<double>("thePixelEfficiency_BPix4");}
                     //
                     i=0;
                     thePixelChipEfficiency[i++] = conf.getParameter<double>("thePixelChipEfficiency_BPix1");
                     thePixelChipEfficiency[i++] = conf.getParameter<double>("thePixelChipEfficiency_BPix2");
                     thePixelChipEfficiency[i++] = conf.getParameter<double>("thePixelChipEfficiency_BPix3");
                     if (NumberOfBarrelLayers>=4){thePixelChipEfficiency[i++] = conf.getParameter<double>("thePixelChipEfficiency_BPix4");}
                     // The next is needed for Phase2 Tracker studies
                     if (NumberOfBarrelLayers>=5){
                        if (NumberOfTotLayers>20){throw cms::Exception("Configuration") <<"SiPixelDigitizer was given more layers than it can handle";}
                        // For Phase2 tracker layers just set the outermost BPix inefficiency to 99.9%
                        for (int j=5 ; j<=NumberOfBarrelLayers ; j++){
                            thePixelColEfficiency[j-1]=0.999;
                            thePixelEfficiency[j-1]=0.999;
                            thePixelChipEfficiency[j-1]=0.999;
                        }
                     }
                     //
                     i=FPixIndex;
                     thePixelColEfficiency[i++]   = conf.getParameter<double>("thePixelColEfficiency_FPix1");
                     thePixelColEfficiency[i++]   = conf.getParameter<double>("thePixelColEfficiency_FPix2");
                     if (NumberOfEndcapDisks>=3){thePixelColEfficiency[i++]   = conf.getParameter<double>("thePixelColEfficiency_FPix3");}
                     i=FPixIndex;
                     thePixelEfficiency[i++]      = conf.getParameter<double>("thePixelEfficiency_FPix1");
                     thePixelEfficiency[i++]      = conf.getParameter<double>("thePixelEfficiency_FPix2");
                     if (NumberOfEndcapDisks>=3){thePixelEfficiency[i++]      = conf.getParameter<double>("thePixelEfficiency_FPix3");}
                     i=FPixIndex;
                     thePixelChipEfficiency[i++]  = conf.getParameter<double>("thePixelChipEfficiency_FPix1");
                     thePixelChipEfficiency[i++]  = conf.getParameter<double>("thePixelChipEfficiency_FPix2");
                     if (NumberOfEndcapDisks>=3){thePixelChipEfficiency[i++]  = conf.getParameter<double>("thePixelChipEfficiency_FPix3");}
                     // The next is needed for Phase2 Tracker studies
                     if (NumberOfEndcapDisks>=4){
                        if (NumberOfTotLayers>20){throw cms::Exception("Configuration") <<"SiPixelDigitizer was given more layers than it can handle";}
                        // For Phase2 tracker layers just set the extra FPix disk inefficiency to 99.9%
                        for (int j=4+FPixIndex ; j<=NumberOfEndcapDisks+NumberOfBarrelLayers ; j++){
                            thePixelColEfficiency[j-1]=0.999;
                            thePixelEfficiency[j-1]=0.999;
                            thePixelChipEfficiency[j-1]=0.999;
                        }
                     }
  }
  // the first "NumberOfBarrelLayers" settings [0],[1], ... , [NumberOfBarrelLayers-1] are for the barrel pixels
  // the next  "NumberOfEndcapDisks"  settings [NumberOfBarrelLayers],[NumberOfBarrelLayers+1], ... [NumberOfEndcapDisks+NumberOfBarrelLayers-1]
  if(!AddPixelInefficiency) {  // No inefficiency, all 100% efficient
    for (int i=0; i<NumberOfTotLayers;i++) {
      thePixelEfficiency[i]     = 1.;  // pixels = 100%
      thePixelColEfficiency[i]  = 1.;  // columns = 100%
      thePixelChipEfficiency[i] = 1.;  // chips = 100%
    }
  }
}

Member Data Documentation