CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/FastSimulation/Muons/interface/FML1EfficiencyHandler.h

Go to the documentation of this file.
00001 #ifndef FML1EfficiencyHandler_H
00002 #define FML1EfficiencyHandler_H
00003 
00010 #include <cmath>
00011 
00012 class RandomEngine;
00013 class SimpleL1MuGMTCand;
00014 
00015 class FML1EfficiencyHandler {
00016 
00017 public:
00018 
00020   FML1EfficiencyHandler(const RandomEngine * engine);
00021    
00023   ~FML1EfficiencyHandler();
00024    
00026   bool kill(const SimpleL1MuGMTCand *);
00027 
00028 private:
00029 
00030   
00031   const RandomEngine * random;
00032   static const int nEtaBins=120;
00033   static const int nPhiBins=100;
00034   double Effic_Eta[nEtaBins];
00035   double Effic_Phi_Barrel[nPhiBins];
00036   double Effic_Phi_Endcap[nPhiBins];
00037   double Effic_Phi_Extern[nPhiBins];
00038 
00039 
00040   inline double tuningfactor(int ieta) {
00041     double tf=0.;
00042     switch (ieta) {
00043     case 0: 
00044       tf = 1.045;
00045       break;
00046     case 1:
00047       tf = 1.049;
00048       break;
00049     case 2:  
00050       tf = 1.059;
00051       break;
00052     }
00053     return tf ;
00054   }
00055 
00056 
00057   inline double dumpingfactor(int ieta , float pt) {
00058     if (pt<3.) return 0.;
00059     //    float df=0.;
00060     double df=0.;
00061     switch (ieta) {
00062     case 0: 
00063       df = 1. - 1.260 * exp(-(pt-2.607)*(pt-2.607)) ;
00064       break;
00065     case 1:  
00066       df = 1. - 5.540 * exp(-(pt-1.401)*(pt-1.401)) ;
00067       break;
00068     case 2:  
00069       df = 1.;
00070       break;
00071     }
00072     return (df>0? df: 0.) ;
00073   }
00074 
00075 };
00076 
00077 #endif