Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:11:13

0001 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0002 //This class header
0003 #include "FastSimulation/CalorimeterProperties/interface/PreshowerLayer1Properties.h"
0004 #include <cmath>
0005 PreshowerLayer1Properties::PreshowerLayer1Properties(const edm::ParameterSet& fastDet) : PreshowerProperties() {
0006   // Preshower : mumber of Mips / GeV
0007   mips = fastDet.getParameter<double>("PreshowerLayer1_mipsPerGeV");
0008   thick = fastDet.getParameter<double>("PreshowerLayer1_thickness");
0009 }
0010 
0011 double PreshowerLayer1Properties::thickness(double eta) const {
0012   // eta is the pseudorapidity
0013   double e = exp(-eta);
0014   double e2 = e * e;
0015   // 1 / cos theta
0016   double cinv = (1. + e2) / (1. - e2);
0017   //    double c  = (1.-e2)/(1.+e2);
0018   //    double s  = 2.*e/(1.+e2);
0019   //    double t  = 2.*e/(1.-e2);
0020   double feta = fabs(eta);
0021 
0022   if (1.623 < feta && feta < 2.611) {
0023     return thick * fabs(cinv);
0024   } else {
0025     return 0;
0026   }
0027 }