test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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

Definition at line 21 of file CaloSegment.h.

Definition at line 20 of file CaloSegment.h.

Member Enumeration Documentation

Enumerator
PbWO4 
CRACK 
GAP 
PS 
HCAL 
ECALHCALGAP 
PSEEGAP 

Definition at line 23 of file CaloSegment.h.

Constructor & Destructor Documentation

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(), PreshowerProperties::interactionLength(), ECALProperties::interactionLength(), HCALProperties::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_.

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

Definition at line 27 of file CaloSegment.h.

27 {;}

Member Function Documentation

const CaloPoint& CaloSegment::entrance ( ) const
inline

first point of the segment

Definition at line 47 of file CaloSegment.h.

References entrance_.

Referenced by operator<<().

47 { return entrance_;};
CaloPoint entrance_
Definition: CaloSegment.h:70
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 argparse.ArgumentParser::error(), python.rootplot.argparse.ArgumentParser::error(), and operator<<().

49 { return exit_;};
CaloPoint exit_
Definition: CaloSegment.h:71
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<<().

45 { return L0length_;};
double L0length_
Definition: CaloSegment.h:80
double CaloSegment::length ( ) const
inline
Material CaloSegment::material ( void  ) const
inline

material

Definition at line 55 of file CaloSegment.h.

References material_.

Referenced by operator<<().

55 { return material_; };
Material material_
Definition: CaloSegment.h:81
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_.

53  { return sentrance_<s.sEntrance()&&sexit_<sExit(); }
double sexit_
Definition: CaloSegment.h:73
double sentrance_
Definition: CaloSegment.h:72
double sEntrance() const
absciss of the entrance (in cm)
Definition: CaloSegment.h:29
double sExit() const
absciss of the exit (in cm)
Definition: CaloSegment.h:31
CaloSegment::XYZPoint CaloSegment::positionAtDepthincm ( double  depth) const

space point corresponding to this depth (in cm)

Definition at line 105 of file CaloSegment.cc.

References entrance_, exit_, sentrance_, and sexit_.

106 {
107  if (depth<sentrance_||depth>sexit_) return XYZPoint();
109 }
math::XYZVector XYZPoint
Definition: CaloSegment.h:21
CaloPoint entrance_
Definition: CaloSegment.h:70
double sexit_
Definition: CaloSegment.h:73
double sentrance_
Definition: CaloSegment.h:72
CaloPoint exit_
Definition: CaloSegment.h:71
CaloSegment::XYZPoint CaloSegment::positionAtDepthinL0 ( double  depth) const

space point corresponding to this depth (in L0)

Definition at line 119 of file CaloSegment.cc.

References entrance_, exit_, sL0entrance_, and sL0exit_.

120 {
121  if (depth<sL0entrance_||depth>sL0exit_) return XYZPoint();
123 }
math::XYZVector XYZPoint
Definition: CaloSegment.h:21
CaloPoint entrance_
Definition: CaloSegment.h:70
double sL0exit_
Definition: CaloSegment.h:79
double sL0entrance_
Definition: CaloSegment.h:78
CaloPoint exit_
Definition: CaloSegment.h:71
CaloSegment::XYZPoint CaloSegment::positionAtDepthinX0 ( double  depth) const

space point corresponding to this depth (in X0)

Definition at line 112 of file CaloSegment.cc.

References entrance_, exit_, sX0entrance_, and sX0exit_.

113 {
114  if (depth<sX0entrance_||depth>sX0exit_) return XYZPoint();
116 }
math::XYZVector XYZPoint
Definition: CaloSegment.h:21
CaloPoint entrance_
Definition: CaloSegment.h:70
double sX0exit_
Definition: CaloSegment.h:75
CaloPoint exit_
Definition: CaloSegment.h:71
double sX0entrance_
Definition: CaloSegment.h:74
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<().

29 { return sentrance_;};
double sentrance_
Definition: CaloSegment.h:72
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<().

31 { return sexit_;};
double sexit_
Definition: CaloSegment.h:73
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()().

37 { return sL0entrance_;};
double sL0entrance_
Definition: CaloSegment.h:78
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()().

39 { return sL0exit_;};
double sL0exit_
Definition: CaloSegment.h:79
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()().

33 { return sX0entrance_;};
double sX0entrance_
Definition: CaloSegment.h:74
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()().

35 { return sX0exit_;};
double sX0exit_
Definition: CaloSegment.h:75
DetId::Detector CaloSegment::whichDetector ( ) const
inline

In which detector.

Definition at line 57 of file CaloSegment.h.

References detector_.

57 {return detector_;};
DetId::Detector detector_
Definition: CaloSegment.h:82
double CaloSegment::x0FromCm ( double  cm) const

cm to X0 conversion

Definition at line 126 of file CaloSegment.cc.

References length_, sX0entrance_, and X0length_.

126  {
127  return sX0entrance_+cm/length_*X0length_;
128 }
double X0length_
Definition: CaloSegment.h:77
double length_
Definition: CaloSegment.h:76
double sX0entrance_
Definition: CaloSegment.h:74
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<<().

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

Member Data Documentation

DetId::Detector CaloSegment::detector_
private

Definition at line 82 of file CaloSegment.h.

Referenced by CaloSegment(), and whichDetector().

CaloPoint CaloSegment::entrance_
private
CaloPoint CaloSegment::exit_
private
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().