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.

20 { PbWO4 = 0, CRACK = 1, GAP = 2, PS = 3, HCAL = 4, ECALHCALGAP = 5, PSEEGAP = 6 };

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.

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 }

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_.

◆ ~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.

49 { return entrance_; };

References entrance_.

Referenced by operator<<().

◆ exit()

const CaloPoint& CaloSegment::exit ( ) const
inline

last point of the segment (there are only two)

Definition at line 51 of file CaloSegment.h.

51 { return exit_; };

References exit_.

Referenced by operator<<().

◆ L0length()

double CaloSegment::L0length ( ) const
inline

length of the segment (in L9)

Definition at line 47 of file CaloSegment.h.

47 { return L0length_; };

References L0length_.

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

◆ length()

double CaloSegment::length ( ) const
inline

length of the segment (in cm)

Definition at line 43 of file CaloSegment.h.

43 { return length_; };

References length_.

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

◆ material()

Material CaloSegment::material ( void  ) const
inline

material

Definition at line 56 of file CaloSegment.h.

56 { return material_; };

References material_.

Referenced by operator<<().

◆ operator<()

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

ordering operator wrt to the particle direction

Definition at line 54 of file CaloSegment.h.

54 { return sentrance_ < s.sEntrance() && sexit_ < sExit(); }

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

◆ positionAtDepthincm()

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

space point corresponding to this depth (in cm)

Definition at line 83 of file CaloSegment.cc.

83  {
84  if (depth < sentrance_ || depth > sexit_)
85  return XYZPoint();
86  return XYZPoint(entrance_ + ((depth - sentrance_) / (sexit_ - sentrance_) * (exit_ - entrance_)));
87 }

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

◆ positionAtDepthinL0()

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

space point corresponding to this depth (in L0)

Definition at line 95 of file CaloSegment.cc.

95  {
96  if (depth < sL0entrance_ || depth > sL0exit_)
97  return XYZPoint();
99 }

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

◆ positionAtDepthinX0()

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

space point corresponding to this depth (in X0)

Definition at line 89 of file CaloSegment.cc.

89  {
90  if (depth < sX0entrance_ || depth > sX0exit_)
91  return XYZPoint();
93 }

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

◆ sEntrance()

double CaloSegment::sEntrance ( ) const
inline

absciss of the entrance (in cm)

Definition at line 31 of file CaloSegment.h.

31 { return sentrance_; };

References sentrance_.

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

◆ sExit()

double CaloSegment::sExit ( ) const
inline

absciss of the exit (in cm)

Definition at line 33 of file CaloSegment.h.

33 { return sexit_; };

References sexit_.

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

◆ sL0Entrance()

double CaloSegment::sL0Entrance ( ) const
inline

absciss of the entrance (in L0)

Definition at line 39 of file CaloSegment.h.

39 { return sL0entrance_; };

References sL0entrance_.

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

◆ sL0Exit()

double CaloSegment::sL0Exit ( ) const
inline

absciss of the exit (in L0)

Definition at line 41 of file CaloSegment.h.

41 { return sL0exit_; };

References sL0exit_.

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

◆ sX0Entrance()

double CaloSegment::sX0Entrance ( ) const
inline

absciss of the entrance (in X0)

Definition at line 35 of file CaloSegment.h.

35 { return sX0entrance_; };

References sX0entrance_.

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

◆ sX0Exit()

double CaloSegment::sX0Exit ( ) const
inline

absciss of the exit (in X0)

Definition at line 37 of file CaloSegment.h.

37 { return sX0exit_; };

References sX0exit_.

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

◆ whichDetector()

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

In which detector.

Definition at line 58 of file CaloSegment.h.

58 { return detector_; };

References detector_.

◆ x0FromCm()

double CaloSegment::x0FromCm ( double  cm) const

cm to X0 conversion

Definition at line 101 of file CaloSegment.cc.

101 { return sX0entrance_ + cm / length_ * X0length_; }

References length_, sX0entrance_, and X0length_.

◆ X0length()

double CaloSegment::X0length ( ) const
inline

length of the segment (in X0)

Definition at line 45 of file CaloSegment.h.

45 { return X0length_; };

References X0length_.

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

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().

CaloSegment::XYZPoint
math::XYZVector XYZPoint
Definition: CaloSegment.h:18
Calorimeter::hcalProperties
const HCALProperties * hcalProperties(int onHcal) const
HCAL properties.
Definition: Calorimeter.cc:88
CaloSegment::PS
Definition: CaloSegment.h:20
Calorimeter::ecalProperties
const ECALProperties * ecalProperties(int onEcal) const
ECAL properties.
Definition: Calorimeter.cc:78
PreshowerProperties::interactionLength
double interactionLength() const override
Muon critical energy in GeV.
Definition: PreshowerProperties.h:39
Calorimeter::layer2Properties
const PreshowerLayer2Properties * layer2Properties(int onLayer2) const
Preshower Layer2 properties.
Definition: Calorimeter.cc:110
gather_cfg.cout
cout
Definition: gather_cfg.py:144
HCALProperties::radLenIncm
double radLenIncm() const override
Radiation length in cm.
Definition: HCALProperties.h:37
Calorimeter::layer1Properties
const PreshowerLayer1Properties * layer1Properties(int onLayer1) const
Preshower Layer1 properties.
Definition: Calorimeter.cc:103
EcalBarrel
Definition: EcalSubdetector.h:10
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::PbWO4
Definition: CaloSegment.h:20
CaloSegment::sexit_
double sexit_
Definition: CaloSegment.h:74
PreshowerLayer2Properties::pseeIntLenIncm
double pseeIntLenIncm() const
properties of the material between ES and EE; there is about 12 cm between the two.
Definition: PreshowerLayer2Properties.h:36
PreshowerProperties::radLenIncm
double radLenIncm() const override
Radiation length in cm.
Definition: PreshowerProperties.h:28
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
HCALProperties::interactionLength
double interactionLength() const override
Interaction length in cm.
Definition: HCALProperties.h:56
Calorimetry_cff.radLenIncm
radLenIncm
Definition: Calorimetry_cff.py:131
CaloSegment::HCAL
Definition: CaloSegment.h:20
HCAL
Definition: HCAL.py:1
LEDCalibrationChannels.depth
depth
Definition: LEDCalibrationChannels.py:65
CaloSegment::exit_
CaloPoint exit_
Definition: CaloSegment.h:72
EcalEndcap
Definition: EcalSubdetector.h:10
CaloSegment::X0length_
double X0length_
Definition: CaloSegment.h:78
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
CaloSegment::sExit
double sExit() const
absciss of the exit (in cm)
Definition: CaloSegment.h:33
CaloSegment::length_
double length_
Definition: CaloSegment.h:77
mag2
T mag2() const
The vector magnitude squared. Equivalent to vec.dot(vec)
Definition: Basic3DVectorLD.h:124
CaloSegment::sX0exit_
double sX0exit_
Definition: CaloSegment.h:76
CaloSegment::sX0entrance_
double sX0entrance_
Definition: CaloSegment.h:75
CaloSegment::sentrance_
double sentrance_
Definition: CaloSegment.h:73
PreshowerLayer2Properties::pseeRadLenIncm
double pseeRadLenIncm() const
properties of the material between ES and EE
Definition: PreshowerLayer2Properties.h:38
ECALProperties::radLenIncm
double radLenIncm() const override
Radiation length in cm.
Definition: ECALProperties.h:32
CaloSegment::L0length_
double L0length_
Definition: CaloSegment.h:81
CaloSegment::sL0entrance_
double sL0entrance_
Definition: CaloSegment.h:79
CaloSegment::ECALHCALGAP
Definition: CaloSegment.h:20
ECALProperties::interactionLength
double interactionLength() const override
Interaction length in cm: 18.5 for Standard ECAL.
Definition: ECALProperties.h:49
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31