CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
BremRecoveryPhiRoadAlgo.cc
Go to the documentation of this file.
1 
4 
5 #include <iostream>
6 
8  // get barrel and endcap parametersets
9  edm::ParameterSet barrelPset = pset.getParameter<edm::ParameterSet>("barrel");
10  edm::ParameterSet endcapPset = pset.getParameter<edm::ParameterSet>("endcap");
11 
12  // set barrel parameters
13  etVec_ = barrelPset.getParameter<std::vector<double> >("etVec");
14  cryVec_ = barrelPset.getParameter<std::vector<int> >("cryVec");
15  cryMin_ = barrelPset.getParameter<int>("cryMin");
16 
17  // set endcap parameters
18  a_ = endcapPset.getParameter<double>("a");
19  b_ = endcapPset.getParameter<double>("b");
20  c_ = endcapPset.getParameter<double>("c");
21 }
22 
24  //
25  // Take as input the ET in 5x5 crystals
26  // and compute the optimal phi road
27  // as a number of crystals
28 
29  for (unsigned int i = 0; i < cryVec_.size(); ++i) {
30  if (et < etVec_[i])
31  return cryVec_[i];
32  }
33  return cryMin_;
34 }
35 
37  //
38  // Take as input the energy in the seed BasicCluster
39  // and return the optimal phi road
40  // length in radians
41 
42  return ((a_ / (energy + b_)) + c_);
43 }
double endcapPhiRoad(double energy)
std::vector< double > etVec_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
BremRecoveryPhiRoadAlgo(const edm::ParameterSet &pset)