CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_13_patch3/src/FastSimulation/CalorimeterProperties/src/PreshowerLayer1Properties.cc

Go to the documentation of this file.
00001 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00002 //This class header
00003 #include "FastSimulation/CalorimeterProperties/interface/PreshowerLayer1Properties.h"
00004 #include <cmath>
00005 PreshowerLayer1Properties::PreshowerLayer1Properties(const edm::ParameterSet& fastDet) 
00006   : PreshowerProperties()
00007 {
00008   // Preshower : mumber of Mips / GeV 
00009   mips = fastDet.getParameter<double>("PreshowerLayer1_mipsPerGeV");
00010   thick = fastDet.getParameter<double>("PreshowerLayer1_thickness");
00011 }
00012 
00013 double PreshowerLayer1Properties::thickness(double eta) const { 
00014 
00015   // eta is the pseudorapidity
00016   double e  = exp(-eta);
00017   double e2 = e*e;
00018   // 1 / cos theta
00019   double cinv  = (1.+e2)/(1.-e2);
00020   //    double c  = (1.-e2)/(1.+e2);
00021   //    double s  = 2.*e/(1.+e2);
00022   //    double t  = 2.*e/(1.-e2);
00023   double feta = fabs(eta);
00024   
00025   if ( 1.623 < feta && feta < 2.611 ) 
00026     {
00027       return thick * fabs(cinv); 
00028     }
00029   else
00030     {
00031       return 0;
00032     }
00033   
00034 }