CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Private Attributes
CaloSegment Class Reference

#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 CaloPointentrance () const
 first point of the segment More...
 
const CaloPointexit () const
 last point of the segment (there are only two) More...
 
double L0length () const
 length of the segment (in L9) More...
 
double length () const
 length of the segment (in cm) More...
 
Material material () const
 material More...
 
bool operator< (const CaloSegment &s) const
 ordering operator wrt to the particle direction More...
 
XYZPoint positionAtDepthincm (double depth) const
 space point corresponding to this depth (in cm) More...
 
XYZPoint positionAtDepthinL0 (double depth) const
 space point corresponding to this depth (in L0) More...
 
XYZPoint positionAtDepthinX0 (double depth) const
 space point corresponding to this depth (in X0) More...
 
double sEntrance () const
 absciss of the entrance (in cm) More...
 
double sExit () const
 absciss of the exit (in cm) More...
 
double sL0Entrance () const
 absciss of the entrance (in L0) More...
 
double sL0Exit () const
 absciss of the exit (in L0) More...
 
double sX0Entrance () const
 absciss of the entrance (in X0) More...
 
double sX0Exit () const
 absciss of the exit (in X0) More...
 
DetId::Detector whichDetector () const
 In which detector. More...
 
double x0FromCm (double cm) const
 cm to X0 conversion More...
 
double X0length () const
 length of the segment (in X0) More...
 
 ~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_
 

Detailed Description

Definition at line 15 of file CaloSegment.h.

Member Typedef Documentation

◆ XYZPoint

Definition at line 18 of file CaloSegment.h.

◆ XYZVector

Definition at line 17 of file CaloSegment.h.

Member Enumeration Documentation

◆ Material

Enumerator
PbWO4 
CRACK 
GAP 
PS 
HCAL 
ECALHCALGAP 
PSEEGAP 

Definition at line 20 of file CaloSegment.h.

Constructor & Destructor Documentation

◆ CaloSegment()

CaloSegment::CaloSegment ( const CaloPoint in,
const CaloPoint out,
double  si,
double  siX0,
double  liX0,
Material  mat,
const CaloGeometryHelper myCalorimeter 
)

Definition at line 11 of file CaloSegment.cc.

References gather_cfg::cout, CRACK, detector_, EcalBarrel, EcalEndcap, ECALHCALGAP, Calorimeter::ecalProperties(), entrance_, exit_, GAP, HCAL, Calorimeter::hcalProperties(), recoMuon::in, PreshowerProperties::interactionLength(), ECALProperties::interactionLength(), HCALProperties::interactionLength(), L0length_, Calorimeter::layer1Properties(), Calorimeter::layer2Properties(), length_, mag2(), MillePedeFileConverter_cfg::out, PbWO4, PS, PSEEGAP, PreshowerLayer2Properties::pseeIntLenIncm(), PreshowerLayer2Properties::pseeRadLenIncm(), PreshowerProperties::radLenIncm(), ECALProperties::radLenIncm(), HCALProperties::radLenIncm(), Calorimetry_cff::radLenIncm, sentrance_, sexit_, sL0entrance_, sL0exit_, mathSSE::sqrt(), sX0entrance_, sX0exit_, and X0length_.

18  : entrance_(in),
19  exit_(out),
20  sentrance_(si),
21  sX0entrance_(siX0),
22  sL0entrance_(siL0),
23  material_(mat)
24 
25 {
27  // Change this. CaloProperties from FamosShower should be used instead
28  double radLenIncm = 999999;
29  double intLenIncm = 999999;
30  detector_ = in.whichDetector();
31  if (detector_ != out.whichDetector() && mat != CRACK && mat != GAP && mat != ECALHCALGAP) {
32  std::cout << " Problem in the segments " << detector_ << " " << out.whichDetector() << std::endl;
33  }
34  switch (mat) {
35  case PbWO4: {
36  int det = 0;
37  if (in.whichSubDetector() == EcalBarrel)
38  det = 1;
39  if (in.whichSubDetector() == EcalEndcap)
40  det = 2;
41 
42  radLenIncm = myCalorimeter->ecalProperties(det)->radLenIncm();
43  intLenIncm = myCalorimeter->ecalProperties(det)->interactionLength();
44  } break;
45  case CRACK: {
46  radLenIncm = 8.9; //cracks : Al
47  intLenIncm = 35.4;
48  } break;
49  case PS: {
50  radLenIncm = myCalorimeter->layer1Properties(1)->radLenIncm();
51  intLenIncm = myCalorimeter->layer1Properties(1)->interactionLength();
52  } break;
53  case HCAL: {
54  radLenIncm = myCalorimeter->hcalProperties(1)->radLenIncm();
55  intLenIncm = myCalorimeter->hcalProperties(1)->interactionLength();
56  } break;
57  case ECALHCALGAP: {
58  // From Olga's & Patrick's talk PRS/JetMET 21 Sept 2004
59  radLenIncm = 22.3;
60  intLenIncm = 140;
61  } break;
62  case PSEEGAP: {
63  // according to Sunanda 0.19 X0 (0.08X0 of polyethylene), support (0.06X0 of aluminium) + other stuff
64  // in the geometry 12 cm between layer and entrance of EE. Polyethylene is rather 48 and Al 8.9 (PDG)
65  // for the inLen, just rescale according to PDG (85cm)
66  radLenIncm = myCalorimeter->layer2Properties(1)->pseeRadLenIncm();
67  intLenIncm = myCalorimeter->layer2Properties(1)->pseeIntLenIncm();
68  } break;
69  default:
70  radLenIncm = 999999;
71  }
73  sL0exit_ = sL0entrance_ + (sexit_ - sentrance_) / intLenIncm;
74  if (mat == GAP) {
77  }
81 }
double radLenIncm() const override
Radiation length in cm.
const PreshowerLayer1Properties * layer1Properties(int onLayer1) const
Preshower Layer1 properties.
Definition: Calorimeter.cc:103
double radLenIncm() const override
Radiation length in cm.
const ECALProperties * ecalProperties(int onEcal) const
ECAL properties.
Definition: Calorimeter.cc:78
const PreshowerLayer2Properties * layer2Properties(int onLayer2) const
Preshower Layer2 properties.
Definition: Calorimeter.cc:110
CaloPoint entrance_
Definition: CaloSegment.h:71
double pseeRadLenIncm() const
properties of the material between ES and EE
double interactionLength() const override
Interaction length in cm.
double pseeIntLenIncm() const
properties of the material between ES and EE; there is about 12 cm between the two.
double sexit_
Definition: CaloSegment.h:74
double X0length_
Definition: CaloSegment.h:78
double sL0exit_
Definition: CaloSegment.h:80
double radLenIncm() const override
Radiation length in cm.
T sqrt(T t)
Definition: SSEVec.h:19
double sX0exit_
Definition: CaloSegment.h:76
double sentrance_
Definition: CaloSegment.h:73
double sL0entrance_
Definition: CaloSegment.h:79
double interactionLength() const override
Muon critical energy in GeV.
CaloPoint exit_
Definition: CaloSegment.h:72
T mag2() const
The vector magnitude squared. Equivalent to vec.dot(vec)
DetId::Detector detector_
Definition: CaloSegment.h:83
Material material_
Definition: CaloSegment.h:82
double length_
Definition: CaloSegment.h:77
double sX0entrance_
Definition: CaloSegment.h:75
const HCALProperties * hcalProperties(int onHcal) const
HCAL properties.
Definition: Calorimeter.cc:88
double L0length_
Definition: CaloSegment.h:81
double interactionLength() const override
Interaction length in cm: 18.5 for Standard ECAL.

◆ ~CaloSegment()

CaloSegment::~CaloSegment ( )
inline

Definition at line 29 of file CaloSegment.h.

29 { ; }

Member Function Documentation

◆ entrance()

const CaloPoint& CaloSegment::entrance ( ) const
inline

first point of the segment

Definition at line 49 of file CaloSegment.h.

References entrance_.

Referenced by operator<<().

49 { return entrance_; };
CaloPoint entrance_
Definition: CaloSegment.h:71

◆ exit()

const CaloPoint& CaloSegment::exit ( ) const
inline

last point of the segment (there are only two)

Definition at line 51 of file CaloSegment.h.

References exit_.

Referenced by operator<<().

51 { return exit_; };
CaloPoint exit_
Definition: CaloSegment.h:72

◆ L0length()

double CaloSegment::L0length ( ) const
inline

length of the segment (in L9)

Definition at line 47 of file CaloSegment.h.

References L0length_.

Referenced by EcalHitMaker::buildSegments(), and operator<<().

47 { return L0length_; };
double L0length_
Definition: CaloSegment.h:81

◆ length()

double CaloSegment::length ( ) const
inline

length of the segment (in cm)

Definition at line 43 of file CaloSegment.h.

References length_.

Referenced by EcalHitMaker::buildSegments(), and operator<<().

43 { return length_; };
double length_
Definition: CaloSegment.h:77

◆ material()

Material CaloSegment::material ( void  ) const
inline

material

Definition at line 56 of file CaloSegment.h.

References material_.

Referenced by operator<<().

56 { return material_; };
Material material_
Definition: CaloSegment.h:82

◆ operator<()

bool CaloSegment::operator< ( const CaloSegment s) const
inline

ordering operator wrt to the particle direction

Definition at line 54 of file CaloSegment.h.

References alignCSCRings::s, sentrance_, sExit(), and sexit_.

54 { return sentrance_ < s.sEntrance() && sexit_ < sExit(); }
double sexit_
Definition: CaloSegment.h:74
double sentrance_
Definition: CaloSegment.h:73
double sExit() const
absciss of the exit (in cm)
Definition: CaloSegment.h:33

◆ positionAtDepthincm()

CaloSegment::XYZPoint CaloSegment::positionAtDepthincm ( double  depth) const

space point corresponding to this depth (in cm)

Definition at line 83 of file CaloSegment.cc.

References hcalRecHitTable_cff::depth, entrance_, exit_, sentrance_, and sexit_.

83  {
84  if (depth < sentrance_ || depth > sexit_)
85  return XYZPoint();
86  return XYZPoint(entrance_ + ((depth - sentrance_) / (sexit_ - sentrance_) * (exit_ - entrance_)));
87 }
math::XYZVector XYZPoint
Definition: CaloSegment.h:18
CaloPoint entrance_
Definition: CaloSegment.h:71
double sexit_
Definition: CaloSegment.h:74
double sentrance_
Definition: CaloSegment.h:73
CaloPoint exit_
Definition: CaloSegment.h:72

◆ positionAtDepthinL0()

CaloSegment::XYZPoint CaloSegment::positionAtDepthinL0 ( double  depth) const

space point corresponding to this depth (in L0)

Definition at line 95 of file CaloSegment.cc.

References hcalRecHitTable_cff::depth, entrance_, exit_, sL0entrance_, and sL0exit_.

95  {
96  if (depth < sL0entrance_ || depth > sL0exit_)
97  return XYZPoint();
99 }
math::XYZVector XYZPoint
Definition: CaloSegment.h:18
CaloPoint entrance_
Definition: CaloSegment.h:71
double sL0exit_
Definition: CaloSegment.h:80
double sL0entrance_
Definition: CaloSegment.h:79
CaloPoint exit_
Definition: CaloSegment.h:72

◆ positionAtDepthinX0()

CaloSegment::XYZPoint CaloSegment::positionAtDepthinX0 ( double  depth) const

space point corresponding to this depth (in X0)

Definition at line 89 of file CaloSegment.cc.

References hcalRecHitTable_cff::depth, entrance_, exit_, sX0entrance_, and sX0exit_.

89  {
90  if (depth < sX0entrance_ || depth > sX0exit_)
91  return XYZPoint();
93 }
math::XYZVector XYZPoint
Definition: CaloSegment.h:18
CaloPoint entrance_
Definition: CaloSegment.h:71
double sX0exit_
Definition: CaloSegment.h:76
CaloPoint exit_
Definition: CaloSegment.h:72
double sX0entrance_
Definition: CaloSegment.h:75

◆ sEntrance()

double CaloSegment::sEntrance ( ) const
inline

absciss of the entrance (in cm)

Definition at line 31 of file CaloSegment.h.

References sentrance_.

Referenced by CaloSegment::inSegment::operator()().

31 { return sentrance_; };
double sentrance_
Definition: CaloSegment.h:73

◆ sExit()

double CaloSegment::sExit ( ) const
inline

absciss of the exit (in cm)

Definition at line 33 of file CaloSegment.h.

References sexit_.

Referenced by CaloSegment::inSegment::operator()(), and operator<().

33 { return sexit_; };
double sexit_
Definition: CaloSegment.h:74

◆ sL0Entrance()

double CaloSegment::sL0Entrance ( ) const
inline

absciss of the entrance (in L0)

Definition at line 39 of file CaloSegment.h.

References sL0entrance_.

Referenced by CaloSegment::inL0Segment::operator()().

39 { return sL0entrance_; };
double sL0entrance_
Definition: CaloSegment.h:79

◆ sL0Exit()

double CaloSegment::sL0Exit ( ) const
inline

absciss of the exit (in L0)

Definition at line 41 of file CaloSegment.h.

References sL0exit_.

Referenced by CaloSegment::inL0Segment::operator()().

41 { return sL0exit_; };
double sL0exit_
Definition: CaloSegment.h:80

◆ sX0Entrance()

double CaloSegment::sX0Entrance ( ) const
inline

absciss of the entrance (in X0)

Definition at line 35 of file CaloSegment.h.

References sX0entrance_.

Referenced by CaloSegment::inX0Segment::operator()().

35 { return sX0entrance_; };
double sX0entrance_
Definition: CaloSegment.h:75

◆ sX0Exit()

double CaloSegment::sX0Exit ( ) const
inline

absciss of the exit (in X0)

Definition at line 37 of file CaloSegment.h.

References sX0exit_.

Referenced by CaloSegment::inX0Segment::operator()().

37 { return sX0exit_; };
double sX0exit_
Definition: CaloSegment.h:76

◆ whichDetector()

DetId::Detector CaloSegment::whichDetector ( ) const
inline

In which detector.

Definition at line 58 of file CaloSegment.h.

References detector_.

58 { return detector_; };
DetId::Detector detector_
Definition: CaloSegment.h:83

◆ x0FromCm()

double CaloSegment::x0FromCm ( double  cm) const

cm to X0 conversion

Definition at line 101 of file CaloSegment.cc.

References length_, sX0entrance_, and X0length_.

101 { return sX0entrance_ + cm / length_ * X0length_; }
double X0length_
Definition: CaloSegment.h:78
double length_
Definition: CaloSegment.h:77
double sX0entrance_
Definition: CaloSegment.h:75

◆ X0length()

double CaloSegment::X0length ( ) const
inline

length of the segment (in X0)

Definition at line 45 of file CaloSegment.h.

References X0length_.

Referenced by EcalHitMaker::buildSegments(), and operator<<().

45 { return X0length_; };
double X0length_
Definition: CaloSegment.h:78

Member Data Documentation

◆ detector_

DetId::Detector CaloSegment::detector_
private

Definition at line 83 of file CaloSegment.h.

Referenced by CaloSegment(), and whichDetector().

◆ entrance_

CaloPoint CaloSegment::entrance_
private

◆ exit_

CaloPoint CaloSegment::exit_
private

◆ L0length_

double CaloSegment::L0length_
private

Definition at line 81 of file CaloSegment.h.

Referenced by CaloSegment(), and L0length().

◆ length_

double CaloSegment::length_
private

Definition at line 77 of file CaloSegment.h.

Referenced by CaloSegment(), length(), and x0FromCm().

◆ material_

Material CaloSegment::material_
private

Definition at line 82 of file CaloSegment.h.

Referenced by material().

◆ sentrance_

double CaloSegment::sentrance_
private

Definition at line 73 of file CaloSegment.h.

Referenced by CaloSegment(), operator<(), positionAtDepthincm(), and sEntrance().

◆ sexit_

double CaloSegment::sexit_
private

Definition at line 74 of file CaloSegment.h.

Referenced by CaloSegment(), operator<(), positionAtDepthincm(), and sExit().

◆ sL0entrance_

double CaloSegment::sL0entrance_
private

Definition at line 79 of file CaloSegment.h.

Referenced by CaloSegment(), positionAtDepthinL0(), and sL0Entrance().

◆ sL0exit_

double CaloSegment::sL0exit_
private

Definition at line 80 of file CaloSegment.h.

Referenced by CaloSegment(), positionAtDepthinL0(), and sL0Exit().

◆ sX0entrance_

double CaloSegment::sX0entrance_
private

Definition at line 75 of file CaloSegment.h.

Referenced by CaloSegment(), positionAtDepthinX0(), sX0Entrance(), and x0FromCm().

◆ sX0exit_

double CaloSegment::sX0exit_
private

Definition at line 76 of file CaloSegment.h.

Referenced by CaloSegment(), positionAtDepthinX0(), and sX0Exit().

◆ X0length_

double CaloSegment::X0length_
private

Definition at line 78 of file CaloSegment.h.

Referenced by CaloSegment(), x0FromCm(), and X0length().