#include <CaloSegment.h>
Classes | |
class | inL0Segment |
class | inSegment |
class | inX0Segment |
This class is used to determine if a point lies in the segment. More... | |
Public Types | |
enum | Material { PbWO4 = 0, CRACK = 1, GAP = 2, PS = 3, HCAL = 4, ECALHCALGAP = 5, PSEEGAP = 6 } |
typedef math::XYZVector | XYZPoint |
typedef math::XYZVector | XYZVector |
Public Member Functions | |
CaloSegment (const CaloPoint &in, const CaloPoint &out, double si, double siX0, double liX0, Material mat, const CaloGeometryHelper *) | |
const CaloPoint & | entrance () const |
first point of the segment | |
const CaloPoint & | exit () const |
last point of the segment (there are only two) | |
double | L0length () const |
length of the segment (in L9) | |
double | length () const |
length of the segment (in cm) | |
Material | material () const |
material | |
bool | operator< (const CaloSegment &s) const |
ordering operator wrt to the particle direction | |
XYZPoint | positionAtDepthincm (double depth) const |
space point corresponding to this depth (in cm) | |
XYZPoint | positionAtDepthinL0 (double depth) const |
space point corresponding to this depth (in L0) | |
XYZPoint | positionAtDepthinX0 (double depth) const |
space point corresponding to this depth (in X0) | |
double | sEntrance () const |
absciss of the entrance (in cm) | |
double | sExit () const |
absciss of the exit (in cm) | |
double | sL0Entrance () const |
absciss of the entrance (in L0) | |
double | sL0Exit () const |
absciss of the exit (in L0) | |
double | sX0Entrance () const |
absciss of the entrance (in X0) | |
double | sX0Exit () const |
absciss of the exit (in X0) | |
DetId::Detector | whichDetector () const |
In which detector. | |
double | x0FromCm (double cm) const |
cm to X0 conversion | |
double | X0length () const |
length of the segment (in X0) | |
~CaloSegment () | |
Private Attributes | |
DetId::Detector | detector_ |
CaloPoint | entrance_ |
CaloPoint | exit_ |
double | L0length_ |
double | length_ |
Material | material_ |
double | sentrance_ |
double | sexit_ |
double | sL0entrance_ |
double | sL0exit_ |
double | sX0entrance_ |
double | sX0exit_ |
double | X0length_ |
Definition at line 15 of file CaloSegment.h.
typedef math::XYZVector CaloSegment::XYZPoint |
Definition at line 21 of file CaloSegment.h.
Definition at line 20 of file CaloSegment.h.
Definition at line 23 of file CaloSegment.h.
CaloSegment::CaloSegment | ( | const CaloPoint & | in, |
const CaloPoint & | out, | ||
double | si, | ||
double | siX0, | ||
double | liX0, | ||
Material | mat, | ||
const CaloGeometryHelper * | myCalorimeter | ||
) |
Definition at line 9 of file CaloSegment.cc.
References gather_cfg::cout, CRACK, detector_, ECALHCALGAP, Calorimeter::ecalProperties(), entrance_, exit_, GAP, HCAL, Calorimeter::hcalProperties(), HCALProperties::interactionLength(), ECALProperties::interactionLength(), PreshowerProperties::interactionLength(), L0length_, Calorimeter::layer1Properties(), Calorimeter::layer2Properties(), length_, mag2(), PbWO4, PS, PSEEGAP, PreshowerLayer2Properties::pseeIntLenIncm(), PreshowerLayer2Properties::pseeRadLenIncm(), PreshowerProperties::radLenIncm(), ECALProperties::radLenIncm(), HCALProperties::radLenIncm(), sentrance_, sexit_, sL0entrance_, sL0exit_, mathSSE::sqrt(), sX0entrance_, sX0exit_, and X0length_.
: entrance_(in), exit_(out), sentrance_(si), sX0entrance_(siX0), sL0entrance_(siL0), material_(mat) { sexit_= sentrance_+std::sqrt((exit_-entrance_).mag2()); // Change this. CaloProperties from FamosShower should be used instead double radLenIncm=999999; double intLenIncm=999999; detector_=in.whichDetector(); if(detector_!=out.whichDetector()&&mat!=CRACK&&mat!=GAP&&mat!=ECALHCALGAP) { std::cout << " Problem in the segments " << detector_ << " " << out.whichDetector() <<std::endl; } switch (mat) { case PbWO4: { radLenIncm = myCalorimeter->ecalProperties(1)->radLenIncm(); intLenIncm = myCalorimeter->ecalProperties(1)->interactionLength(); } break; case CRACK: { radLenIncm=8.9;//cracks : Al intLenIncm=35.4; } break; case PS: { radLenIncm = myCalorimeter->layer1Properties(1)->radLenIncm(); intLenIncm = myCalorimeter->layer1Properties(1)->interactionLength(); } break; case HCAL: { radLenIncm = myCalorimeter->hcalProperties(1)->radLenIncm(); intLenIncm = myCalorimeter->hcalProperties(1)->interactionLength(); } break; case ECALHCALGAP: { // From Olga's & Patrick's talk PRS/JetMET 21 Sept 2004 radLenIncm = 22.3; intLenIncm = 140; } break; case PSEEGAP: { // according to Sunanda 0.19 X0 (0.08X0 of polyethylene), support (0.06X0 of aluminium) + other stuff // in the geometry 12 cm between layer and entrance of EE. Polyethylene is rather 48 and Al 8.9 (PDG) // for the inLen, just rescale according to PDG (85cm) radLenIncm = myCalorimeter->layer2Properties(1)->pseeRadLenIncm(); intLenIncm = myCalorimeter->layer2Properties(1)->pseeIntLenIncm(); } break; default: radLenIncm=999999; } sX0exit_ = sX0entrance_+(sexit_-sentrance_)/radLenIncm; sL0exit_ = sL0entrance_+(sexit_-sentrance_)/intLenIncm; if(mat==GAP) { sX0exit_=sX0entrance_; sL0exit_=sL0entrance_; } length_ = sexit_-sentrance_; X0length_ = sX0exit_-sX0entrance_; L0length_ = sL0exit_-sL0entrance_; }
CaloSegment::~CaloSegment | ( | ) | [inline] |
Definition at line 27 of file CaloSegment.h.
{;}
const CaloPoint& CaloSegment::entrance | ( | ) | const [inline] |
first point of the segment
Definition at line 47 of file CaloSegment.h.
References entrance_.
Referenced by operator<<().
{ return entrance_;};
const CaloPoint& CaloSegment::exit | ( | ) | const [inline] |
last point of the segment (there are only two)
Definition at line 49 of file CaloSegment.h.
References exit_.
Referenced by operator<<().
{ return exit_;};
double CaloSegment::L0length | ( | ) | const [inline] |
length of the segment (in L9)
Definition at line 45 of file CaloSegment.h.
References L0length_.
Referenced by EcalHitMaker::buildSegments(), and operator<<().
{ return L0length_;};
double CaloSegment::length | ( | ) | const [inline] |
length of the segment (in cm)
Definition at line 41 of file CaloSegment.h.
References length_.
Referenced by EcalHitMaker::buildSegments(), and operator<<().
{ return length_;};
Material CaloSegment::material | ( | ) | const [inline] |
material
Definition at line 55 of file CaloSegment.h.
References material_.
Referenced by operator<<().
{ return material_; };
bool CaloSegment::operator< | ( | const CaloSegment & | s | ) | const [inline] |
ordering operator wrt to the particle direction
Definition at line 52 of file CaloSegment.h.
References sEntrance(), sentrance_, sExit(), and sexit_.
{ return sentrance_<s.sEntrance()&&sexit_<sExit(); }
CaloSegment::XYZPoint CaloSegment::positionAtDepthincm | ( | double | depth | ) | const |
space point corresponding to this depth (in cm)
Definition at line 98 of file CaloSegment.cc.
References entrance_, exit_, sentrance_, and sexit_.
{ if (depth<sentrance_||depth>sexit_) return XYZPoint(); return XYZPoint(entrance_+((depth-sentrance_)/(sexit_-sentrance_)*(exit_-entrance_))); }
CaloSegment::XYZPoint CaloSegment::positionAtDepthinL0 | ( | double | depth | ) | const |
space point corresponding to this depth (in L0)
Definition at line 112 of file CaloSegment.cc.
References entrance_, exit_, sL0entrance_, and sL0exit_.
{ if (depth<sL0entrance_||depth>sL0exit_) return XYZPoint(); return XYZPoint(entrance_+((depth-sL0entrance_)/(sL0exit_-sL0entrance_)*(exit_-entrance_))); }
CaloSegment::XYZPoint CaloSegment::positionAtDepthinX0 | ( | double | depth | ) | const |
space point corresponding to this depth (in X0)
Definition at line 105 of file CaloSegment.cc.
References entrance_, exit_, sX0entrance_, and sX0exit_.
{ if (depth<sX0entrance_||depth>sX0exit_) return XYZPoint(); return XYZPoint(entrance_+((depth-sX0entrance_)/(sX0exit_-sX0entrance_)*(exit_-entrance_))); }
double CaloSegment::sEntrance | ( | ) | const [inline] |
absciss of the entrance (in cm)
Definition at line 29 of file CaloSegment.h.
References sentrance_.
Referenced by CaloSegment::inSegment::operator()(), and operator<().
{ return sentrance_;};
double CaloSegment::sExit | ( | ) | const [inline] |
absciss of the exit (in cm)
Definition at line 31 of file CaloSegment.h.
References sexit_.
Referenced by CaloSegment::inSegment::operator()(), and operator<().
{ return sexit_;};
double CaloSegment::sL0Entrance | ( | ) | const [inline] |
absciss of the entrance (in L0)
Definition at line 37 of file CaloSegment.h.
References sL0entrance_.
Referenced by CaloSegment::inL0Segment::operator()().
{ return sL0entrance_;};
double CaloSegment::sL0Exit | ( | ) | const [inline] |
absciss of the exit (in L0)
Definition at line 39 of file CaloSegment.h.
References sL0exit_.
Referenced by CaloSegment::inL0Segment::operator()().
{ return sL0exit_;};
double CaloSegment::sX0Entrance | ( | ) | const [inline] |
absciss of the entrance (in X0)
Definition at line 33 of file CaloSegment.h.
References sX0entrance_.
Referenced by CaloSegment::inX0Segment::operator()().
{ return sX0entrance_;};
double CaloSegment::sX0Exit | ( | ) | const [inline] |
absciss of the exit (in X0)
Definition at line 35 of file CaloSegment.h.
References sX0exit_.
Referenced by CaloSegment::inX0Segment::operator()().
{ return sX0exit_;};
DetId::Detector CaloSegment::whichDetector | ( | ) | const [inline] |
In which detector.
Definition at line 57 of file CaloSegment.h.
References detector_.
{return detector_;};
double CaloSegment::x0FromCm | ( | double | cm | ) | const |
cm to X0 conversion
Definition at line 119 of file CaloSegment.cc.
References length_, sX0entrance_, and X0length_.
{ return sX0entrance_+cm/length_*X0length_; }
double CaloSegment::X0length | ( | ) | const [inline] |
length of the segment (in X0)
Definition at line 43 of file CaloSegment.h.
References X0length_.
Referenced by EcalHitMaker::buildSegments(), and operator<<().
{ return X0length_;};
DetId::Detector CaloSegment::detector_ [private] |
Definition at line 82 of file CaloSegment.h.
Referenced by CaloSegment(), and whichDetector().
CaloPoint CaloSegment::entrance_ [private] |
Definition at line 70 of file CaloSegment.h.
Referenced by CaloSegment(), entrance(), positionAtDepthincm(), positionAtDepthinL0(), and positionAtDepthinX0().
CaloPoint CaloSegment::exit_ [private] |
Definition at line 71 of file CaloSegment.h.
Referenced by CaloSegment(), exit(), positionAtDepthincm(), positionAtDepthinL0(), and positionAtDepthinX0().
double CaloSegment::L0length_ [private] |
Definition at line 80 of file CaloSegment.h.
Referenced by CaloSegment(), and L0length().
double CaloSegment::length_ [private] |
Definition at line 76 of file CaloSegment.h.
Referenced by CaloSegment(), length(), and x0FromCm().
Material CaloSegment::material_ [private] |
Definition at line 81 of file CaloSegment.h.
Referenced by material().
double CaloSegment::sentrance_ [private] |
Definition at line 72 of file CaloSegment.h.
Referenced by CaloSegment(), operator<(), positionAtDepthincm(), and sEntrance().
double CaloSegment::sexit_ [private] |
Definition at line 73 of file CaloSegment.h.
Referenced by CaloSegment(), operator<(), positionAtDepthincm(), and sExit().
double CaloSegment::sL0entrance_ [private] |
Definition at line 78 of file CaloSegment.h.
Referenced by CaloSegment(), positionAtDepthinL0(), and sL0Entrance().
double CaloSegment::sL0exit_ [private] |
Definition at line 79 of file CaloSegment.h.
Referenced by CaloSegment(), positionAtDepthinL0(), and sL0Exit().
double CaloSegment::sX0entrance_ [private] |
Definition at line 74 of file CaloSegment.h.
Referenced by CaloSegment(), positionAtDepthinX0(), sX0Entrance(), and x0FromCm().
double CaloSegment::sX0exit_ [private] |
Definition at line 75 of file CaloSegment.h.
Referenced by CaloSegment(), positionAtDepthinX0(), and sX0Exit().
double CaloSegment::X0length_ [private] |
Definition at line 77 of file CaloSegment.h.
Referenced by CaloSegment(), x0FromCm(), and X0length().