CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Deposition.h
Go to the documentation of this file.
1 #ifndef DEPOSITION_HH_
2 #define DEPOSITION_HH_
3 #include <iostream>
4 
5 #include <boost/shared_ptr.hpp>
6 
8 
9 namespace pftools {
10 
20 class Deposition {
21 public:
22 
23  inline void setEnergy(double energy) {
24  myEnergy = energy;
25  }
26 
27 
28  inline double getEta() const {
29  return myEta;
30  }
31  ;
32 
33  inline double getPhi() const {
34  return myPhi;
35  }
36  ;
37 
38  inline double getEnergy() const {
39  return myEnergy;
40  }
41  ;
42 
44  return myElementPtr;
45  }
46  ;
47 
48  /*
49  * Returns the user specified "depth" for this deposition.
50  * Usually presumed to be zero.
51  * */
52  inline double getDepth() const {
53  return myDepth;
54  }
55  ;
56 
57  Deposition(DetectorElementPtr element, double eta = 0.0, double phi = 0.0,
58  double energy = 0.0, double depth = 0.0);
59 
60  virtual ~Deposition();
61 
62  /*
63  * Streams a description of this deposition into the supplied stream.
64  * */
65  friend std::ostream& operator<<(std::ostream& s, const Deposition& d);
66 
67 private:
68  //DetectorElement* myElement;
70 
71  double myEta;
72  double myPhi;
73  double myEnergy;
74  double myDepth;
75 };
76 
77 typedef boost::shared_ptr<Deposition> DepositionPtr;
78 
79 }
80 
81 #endif /*DEPOSITION_HH_*/
boost::shared_ptr< Deposition > DepositionPtr
Definition: Deposition.h:77
DetectorElementPtr getDetectorElement() const
Definition: Deposition.h:43
double getEnergy() const
Definition: Deposition.h:38
T eta() const
boost::shared_ptr< DetectorElement > DetectorElementPtr
This class holds an arbitrary energy deposition, specified in terms of angular position, energy, depth (optional) and detector element type.
Definition: Deposition.h:20
friend std::ostream & operator<<(std::ostream &s, const Deposition &d)
Deposition(DetectorElementPtr element, double eta=0.0, double phi=0.0, double energy=0.0, double depth=0.0)
Definition: Deposition.cc:3
void setEnergy(double energy)
Definition: Deposition.h:23
virtual ~Deposition()
Definition: Deposition.cc:9
double getDepth() const
Definition: Deposition.h:52
DetectorElementPtr myElementPtr
Definition: Deposition.h:69
double getPhi() const
Definition: Deposition.h:33
double getEta() const
Definition: Deposition.h:28
Definition: DDAxes.h:10