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 <TFormula.h>
6 #include <memory>
7 #include <string>
8 
39  // constructor(s) and destructor(s)
40 public:
46 
49  ~EcalSimpleProducer() override{};
50 
54  void beginJob() override{};
55 
59  void produce(edm::Event &evt, const edm::EventSetup &) override;
60 
61  // method(s)
62 public:
63 private:
70  void replaceAll(std::string &s, const std::string &from, const std::string &to) const;
71 
77  int cIndex2iEta(int iEta0) const { return (iEta0 < 85) ? iEta0 - 85 : iEta0 - 84; }
78 
84  int cIndex2iPhi(int iPhi0) const { return (iPhi0 + 10) % 360 + 1; }
85 
91  int cIndex2iTtEta(int iEta0) const { return (iEta0 < 28) ? iEta0 - 28 : iEta0 - 27; }
92 
98  int cIndex2iTtPhi(int iPhi0) const { return iPhi0 + 1; }
99 
100  // attribute(s)
101 protected:
102 private:
105  std::unique_ptr<TFormula> formula_;
106 
109  std::unique_ptr<TFormula> tpFormula_;
110 
113  std::unique_ptr<TFormula> simHitFormula_;
114 
117  bool verbose_;
118 };
119 
120 #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