CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EcalSimpleSource.h
Go to the documentation of this file.
1 /*
2  * $Id: EcalSimpleSource.h,v 1.2 2007/03/07 19:42:02 pgras Exp $
3  */
4 
5 #ifndef ECALSIMPLESOURCE_H
6 #define ECALSIMPLESOURCE_H
7 
9 #include <memory>
10 #include <TFormula.h>
11 #include <string>
12 
43 
44  //constructor(s) and destructor(s)
45 public:
51  const edm::InputSourceDescription& sdesc);
52 
55  virtual ~EcalSimpleSource(){};
56 
60  void beginJob(){};
61 
65  virtual bool produce(edm::Event& evt);
66 
67  //method(s)
68 public:
69 private:
76  void replaceAll(std::string& s, const std::string& from,
77  const std::string& to) const;
78 
84  int cIndex2iEta(int iEta0) const{
85  return (iEta0<85)?iEta0-85:iEta0-84;
86  }
87 
93  int cIndex2iPhi(int iPhi0) const{
94  return (iPhi0+10)%360+1;
95  }
96 
102  int cIndex2iTtEta(int iEta0) const{
103  return (iEta0<28)?iEta0-28:iEta0-27;
104  }
105 
111  int cIndex2iTtPhi(int iPhi0) const{
112  return iPhi0+1;
113  }
114 
115  //attribute(s)
116 protected:
117 private:
120  std::auto_ptr<TFormula> formula_;
121 
124  std::auto_ptr<TFormula> tpFormula_;
125 
128  std::auto_ptr<TFormula> simHitFormula_;
129 
132  bool verbose_;
133 };
134 
135 #endif
virtual bool produce(edm::Event &evt)
std::auto_ptr< TFormula > formula_
std::auto_ptr< TFormula > tpFormula_
int cIndex2iPhi(int iPhi0) const
virtual ~EcalSimpleSource()
EcalSimpleSource(const edm::ParameterSet &pset, const edm::InputSourceDescription &sdesc)
int cIndex2iTtPhi(int iPhi0) const
tuple pset
Definition: CrabTask.py:85
static std::string from(" from ")
int cIndex2iTtEta(int iEta0) const
void replaceAll(std::string &s, const std::string &from, const std::string &to) const
string s
Definition: asciidump.py:422
std::auto_ptr< TFormula > simHitFormula_
int cIndex2iEta(int iEta0) const