00001 00002 #include "RecoEcal/EgammaCoreTools/interface/BremRecoveryPhiRoadAlgo.h" 00003 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00004 00005 #include <iostream> 00006 00007 BremRecoveryPhiRoadAlgo::BremRecoveryPhiRoadAlgo(const edm::ParameterSet& pset) 00008 { 00009 00010 // get barrel and endcap parametersets 00011 edm::ParameterSet barrelPset = pset.getParameter<edm::ParameterSet>("barrel"); 00012 edm::ParameterSet endcapPset = pset.getParameter<edm::ParameterSet>("endcap"); 00013 00014 // set barrel parameters 00015 etVec_ = barrelPset.getParameter<std::vector<double> >("etVec"); 00016 cryVec_ = barrelPset.getParameter<std::vector<int> >("cryVec"); 00017 cryMin_ = barrelPset.getParameter<int>("cryMin"); 00018 00019 // set endcap parameters 00020 a_ = endcapPset.getParameter<double>("a"); 00021 b_ = endcapPset.getParameter<double>("b"); 00022 c_ = endcapPset.getParameter<double>("c"); 00023 00024 } 00025 00026 int BremRecoveryPhiRoadAlgo::barrelPhiRoad(double et) 00027 { 00028 00029 // 00030 // Take as input the ET in 5x5 crystals 00031 // and compute the optimal phi road 00032 // as a number of crystals 00033 00034 for (unsigned int i = 0; i < cryVec_.size(); ++i) 00035 { 00036 if (et < etVec_[i]) return cryVec_[i]; 00037 } 00038 return cryMin_; 00039 00040 } 00041 00042 double BremRecoveryPhiRoadAlgo::endcapPhiRoad(double energy) 00043 { 00044 00045 // 00046 // Take as input the energy in the seed BasicCluster 00047 // and return the optimal phi road 00048 // length in radians 00049 00050 return ((a_ / (energy + b_)) + c_); 00051 00052 } 00053