CMS 3D CMS Logo

CaloSegment.h
Go to the documentation of this file.
1 #ifndef CaloSegment_h
2 #define CaloSegment_h
3 
9 //FAMOS headers
11 
12 #include <string>
13 
14 class CaloGeometryHelper;
15 class CaloSegment {
16 public:
19 
20  enum Material { PbWO4 = 0, CRACK = 1, GAP = 2, PS = 3, HCAL = 4, ECALHCALGAP = 5, PSEEGAP = 6 };
21 
22  CaloSegment(const CaloPoint& in,
23  const CaloPoint& out,
24  double si,
25  double siX0,
26  double liX0,
27  Material mat,
28  const CaloGeometryHelper*);
29  ~CaloSegment() { ; }
31  inline double sEntrance() const { return sentrance_; };
33  inline double sExit() const { return sexit_; };
35  inline double sX0Entrance() const { return sX0entrance_; };
37  inline double sX0Exit() const { return sX0exit_; };
39  inline double sL0Entrance() const { return sL0entrance_; };
41  inline double sL0Exit() const { return sL0exit_; };
43  inline double length() const { return length_; };
45  inline double X0length() const { return X0length_; };
47  inline double L0length() const { return L0length_; };
49  inline const CaloPoint& entrance() const { return entrance_; };
51  inline const CaloPoint& exit() const { return exit_; };
52 
54  inline bool operator<(const CaloSegment& s) const { return sentrance_ < s.sEntrance() && sexit_ < sExit(); }
56  inline Material material() const { return material_; };
58  inline DetId::Detector whichDetector() const { return detector_; };
60  XYZPoint positionAtDepthincm(double depth) const;
62  XYZPoint positionAtDepthinX0(double depth) const;
64  XYZPoint positionAtDepthinL0(double depth) const;
65 
67  double x0FromCm(double cm) const;
68 
69 private:
70  // static ECALProperties myCaloProperties;
71  CaloPoint entrance_;
72  CaloPoint exit_;
73  double sentrance_;
74  double sexit_;
75  double sX0entrance_;
76  double sX0exit_;
77  double length_;
78  double X0length_;
79  double sL0entrance_;
80  double sL0exit_;
81  double L0length_;
84 
85 public:
87  class inX0Segment {
88  public:
89  // inSegment(const CaloSegment & ref):segment_(ref){;};
91  : ref_(depth){
92  //std::cout << "inSegment " << std::endl;
93  };
94  ~inX0Segment() { ; };
95  // in X0 !!!
96  // bool operator() (double value) const
97  // {
98  // return (value>segment_.sX0Entrance()&&value<segment_.sX0Exit());
99  // }
100  bool operator()(const CaloSegment& segment) const {
101  return (ref_ > segment.sX0Entrance() && ref_ < segment.sX0Exit());
102  }
103 
104  private:
105  // const CaloSegment & segment_;
106  double ref_;
107  };
108 
109  class inL0Segment {
110  public:
111  // inSegment(const CaloSegment & ref):segment_(ref){;};
113  : ref_(depth){
114  //std::cout << "inSegment " << std::endl;
115  };
116  ~inL0Segment() { ; };
117  // in X0 !!!
118  // bool operator() (double value) const
119  // {
120  // return (value>segment_.sX0Entrance()&&value<segment_.sX0Exit());
121  // }
122  bool operator()(const CaloSegment& segment) const {
123  return (ref_ > segment.sL0Entrance() && ref_ < segment.sL0Exit());
124  }
125 
126  private:
127  // const CaloSegment & segment_;
128  double ref_;
129  };
130 
131  class inSegment {
132  public:
133  // inSegment(const CaloSegment & ref):segment_(ref){;};
134  inSegment(double depth)
135  : ref_(depth){
136  //std::cout << "inSegment " << std::endl;
137  };
138  ~inSegment() { ; };
139  // in X0 !!!
140  // bool operator() (double value) const
141  // {
142  // return (value>segment_.sX0Entrance()&&value<segment_.sX0Exit());
143  // }
144  bool operator()(const CaloSegment& segment) const {
145  // std::cout << " Entrance " << segment.sEntrance() << " Exit " << segment.sExit() << " " << ref_ << " " << segment.whichDetector() << std::endl;
146  return (ref_ > segment.sEntrance() && ref_ < segment.sExit());
147  }
148 
149  private:
150  // const CaloSegment & segment_;
151  double ref_;
152  };
153 };
154 #include <iosfwd>
155 std::ostream& operator<<(std::ostream& o, const CaloSegment& cid);
156 
157 #endif
CaloSegment::XYZPoint
math::XYZVector XYZPoint
Definition: CaloSegment.h:18
CaloSegment::sX0Exit
double sX0Exit() const
absciss of the exit (in X0)
Definition: CaloSegment.h:37
CaloSegment::PS
Definition: CaloSegment.h:20
CaloSegment::sX0Entrance
double sX0Entrance() const
absciss of the entrance (in X0)
Definition: CaloSegment.h:35
CaloPoint.h
CaloSegment::whichDetector
DetId::Detector whichDetector() const
In which detector.
Definition: CaloSegment.h:58
CaloSegment::inSegment::ref_
double ref_
Definition: CaloSegment.h:151
CaloSegment::inX0Segment::inX0Segment
inX0Segment(double depth)
Definition: CaloSegment.h:90
EcalTangentSkim_cfg.o
o
Definition: EcalTangentSkim_cfg.py:36
CaloSegment::entrance_
CaloPoint entrance_
Definition: CaloSegment.h:71
alignCSCRings.s
s
Definition: alignCSCRings.py:92
CaloSegment::GAP
Definition: CaloSegment.h:20
CaloSegment::PSEEGAP
Definition: CaloSegment.h:20
CaloSegment::sL0exit_
double sL0exit_
Definition: CaloSegment.h:80
CaloSegment::material
Material material() const
material
Definition: CaloSegment.h:56
CaloSegment::PbWO4
Definition: CaloSegment.h:20
CaloSegment::sexit_
double sexit_
Definition: CaloSegment.h:74
CaloSegment::inSegment
Definition: CaloSegment.h:131
CaloSegment::sEntrance
double sEntrance() const
absciss of the entrance (in cm)
Definition: CaloSegment.h:31
CaloSegment::positionAtDepthinX0
XYZPoint positionAtDepthinX0(double depth) const
space point corresponding to this depth (in X0)
Definition: CaloSegment.cc:89
CaloSegment::L0length
double L0length() const
length of the segment (in L9)
Definition: CaloSegment.h:47
HCAL
Definition: HCAL.py:1
LEDCalibrationChannels.depth
depth
Definition: LEDCalibrationChannels.py:65
CaloSegment::inSegment::inSegment
inSegment(double depth)
Definition: CaloSegment.h:134
CaloSegment::exit_
CaloPoint exit_
Definition: CaloSegment.h:72
CaloSegment::inL0Segment::inL0Segment
inL0Segment(double depth)
Definition: CaloSegment.h:112
CaloSegment::X0length_
double X0length_
Definition: CaloSegment.h:78
CaloSegment::~CaloSegment
~CaloSegment()
Definition: CaloSegment.h:29
CaloSegment
Definition: CaloSegment.h:15
CaloSegment::Material
Material
Definition: CaloSegment.h:20
CaloSegment::entrance
const CaloPoint & entrance() const
first point of the segment
Definition: CaloSegment.h:49
CaloSegment::material_
Material material_
Definition: CaloSegment.h:82
CaloSegment::detector_
DetId::Detector detector_
Definition: CaloSegment.h:83
CaloSegment::CRACK
Definition: CaloSegment.h:20
recoMuon::in
Definition: RecoMuonEnumerators.h:6
math::XYZVector
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
CaloSegment::sExit
double sExit() const
absciss of the exit (in cm)
Definition: CaloSegment.h:33
CaloSegment::length_
double length_
Definition: CaloSegment.h:77
CaloSegment::exit
const CaloPoint & exit() const
last point of the segment (there are only two)
Definition: CaloSegment.h:51
CaloSegment::inL0Segment::ref_
double ref_
Definition: CaloSegment.h:128
CaloSegment::XYZVector
math::XYZVector XYZVector
Definition: CaloSegment.h:17
CaloSegment::inL0Segment::operator()
bool operator()(const CaloSegment &segment) const
Definition: CaloSegment.h:122
operator<<
std::ostream & operator<<(std::ostream &o, const CaloSegment &cid)
Definition: CaloSegment.cc:103
DetId::Detector
Detector
Definition: DetId.h:24
CaloSegment::inL0Segment::~inL0Segment
~inL0Segment()
Definition: CaloSegment.h:116
CaloSegment::positionAtDepthincm
XYZPoint positionAtDepthincm(double depth) const
space point corresponding to this depth (in cm)
Definition: CaloSegment.cc:83
CaloSegment::inSegment::operator()
bool operator()(const CaloSegment &segment) const
Definition: CaloSegment.h:144
CaloSegment::sX0exit_
double sX0exit_
Definition: CaloSegment.h:76
XYZPoint
math::XYZVector XYZPoint
Definition: CalorimetryManager.cc:69
CaloSegment::sX0entrance_
double sX0entrance_
Definition: CaloSegment.h:75
CaloSegment::inX0Segment::~inX0Segment
~inX0Segment()
Definition: CaloSegment.h:94
CaloSegment::sentrance_
double sentrance_
Definition: CaloSegment.h:73
CaloSegment::inX0Segment::ref_
double ref_
Definition: CaloSegment.h:106
CaloSegment::L0length_
double L0length_
Definition: CaloSegment.h:81
CaloSegment::CaloSegment
CaloSegment(const CaloPoint &in, const CaloPoint &out, double si, double siX0, double liX0, Material mat, const CaloGeometryHelper *)
Definition: CaloSegment.cc:11
CaloSegment::length
double length() const
length of the segment (in cm)
Definition: CaloSegment.h:43
CaloSegment::inSegment::~inSegment
~inSegment()
Definition: CaloSegment.h:138
CaloSegment::sL0entrance_
double sL0entrance_
Definition: CaloSegment.h:79
CaloSegment::ECALHCALGAP
Definition: CaloSegment.h:20
CaloSegment::positionAtDepthinL0
XYZPoint positionAtDepthinL0(double depth) const
space point corresponding to this depth (in L0)
Definition: CaloSegment.cc:95
CaloSegment::sL0Exit
double sL0Exit() const
absciss of the exit (in L0)
Definition: CaloSegment.h:41
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
CaloSegment::x0FromCm
double x0FromCm(double cm) const
cm to X0 conversion
Definition: CaloSegment.cc:101
CaloSegment::inX0Segment::operator()
bool operator()(const CaloSegment &segment) const
Definition: CaloSegment.h:100
CaloGeometryHelper
Definition: CaloGeometryHelper.h:18
CaloSegment::X0length
double X0length() const
length of the segment (in X0)
Definition: CaloSegment.h:45
CaloSegment::sL0Entrance
double sL0Entrance() const
absciss of the entrance (in L0)
Definition: CaloSegment.h:39
CaloSegment::inL0Segment
Definition: CaloSegment.h:109
CaloSegment::operator<
bool operator<(const CaloSegment &s) const
ordering operator wrt to the particle direction
Definition: CaloSegment.h:54
CaloSegment::inX0Segment
This class is used to determine if a point lies in the segment.
Definition: CaloSegment.h:87