CMS 3D CMS Logo

EcalSimpleProducer.h
Go to the documentation of this file.
1 #ifndef SimCalorimetry_EcalElectronicsEmulationEcalSimpleProducer_h
2 #define SimCalorimetry_EcalElectronicsEmulationEcalSimpleProducer_h
3 
5 #include <memory>
6 #include <TFormula.h>
7 #include <string>
8 
39 
40  //constructor(s) and destructor(s)
41 public:
47 
50  ~EcalSimpleProducer() override{};
51 
55  void beginJob() override{};
56 
60  void produce(edm::Event& evt, const edm::EventSetup&) override;
61 
62  //method(s)
63 public:
64 private:
71  void replaceAll(std::string& s, const std::string& from,
72  const std::string& to) const;
73 
79  int cIndex2iEta(int iEta0) const{
80  return (iEta0<85)?iEta0-85:iEta0-84;
81  }
82 
88  int cIndex2iPhi(int iPhi0) const{
89  return (iPhi0+10)%360+1;
90  }
91 
97  int cIndex2iTtEta(int iEta0) const{
98  return (iEta0<28)?iEta0-28:iEta0-27;
99  }
100 
106  int cIndex2iTtPhi(int iPhi0) const{
107  return iPhi0+1;
108  }
109 
110  //attribute(s)
111 protected:
112 private:
115  std::unique_ptr<TFormula> formula_;
116 
119  std::unique_ptr<TFormula> tpFormula_;
120 
123  std::unique_ptr<TFormula> simHitFormula_;
124 
127  bool verbose_;
128 };
129 
130 #endif
int cIndex2iTtEta(int iEta0) const
~EcalSimpleProducer() override
std::unique_ptr< TFormula > simHitFormula_
std::unique_ptr< TFormula > tpFormula_
EcalSimpleProducer(const edm::ParameterSet &pset)
int cIndex2iEta(int iEta0) const
void beginJob() override
void produce(edm::Event &evt, const edm::EventSetup &) override
std::unique_ptr< TFormula > formula_
int cIndex2iPhi(int iPhi0) const
int cIndex2iTtPhi(int iPhi0) const
void replaceAll(std::string &s, const std::string &from, const std::string &to) const