CMS 3D CMS Logo

Functions
CaloSegment.cc File Reference
#include "FastSimulation/CaloGeometryTools/interface/CaloSegment.h"
#include "FastSimulation/CaloGeometryTools/interface/CaloGeometryHelper.h"
#include "FastSimulation/CalorimeterProperties/interface/PreshowerLayer1Properties.h"
#include "FastSimulation/CalorimeterProperties/interface/PreshowerLayer2Properties.h"
#include "FastSimulation/CalorimeterProperties/interface/HCALProperties.h"
#include "FastSimulation/CalorimeterProperties/interface/ECALProperties.h"
#include "DataFormats/EcalDetId/interface/EcalSubdetector.h"

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &ost, const CaloSegment &seg)
 

Function Documentation

◆ operator<<()

std::ostream& operator<< ( std::ostream &  ost,
const CaloSegment seg 
)

Definition at line 103 of file CaloSegment.cc.

103  {
104  ost << " DetId ";
105  if (!seg.entrance().getDetId().null())
106  ost << seg.entrance().getDetId()();
107  else {
108  ost << seg.entrance().whichDetector();
109  // ost<< " Entrance side " << seg.entrance().getSide()
110  ost << " Point " << (math::XYZVector)seg.entrance() << std::endl;
111  }
112  ost << "DetId ";
113  if (!seg.exit().getDetId().null())
114  ost << seg.exit().getDetId()();
115  else
116  ost << seg.exit().whichDetector();
117 
118  // ost << " Exit side " << seg.exit().getSide()
119  ost << " Point " << (math::XYZVector)seg.exit() << " " << seg.length() << " cm " << seg.X0length() << " X0 "
120  << seg.L0length() << " Lambda0 ";
121  switch (seg.material()) {
122  case CaloSegment::PbWO4:
123  ost << "PbWO4 ";
124  break;
125  case CaloSegment::CRACK:
126  ost << "CRACK ";
127  break;
128  case CaloSegment::PS:
129  ost << "PS ";
130  break;
131  case CaloSegment::HCAL:
132  ost << "HCAL ";
133  break;
135  ost << "ECAL-HCAL GAP ";
136  break;
138  ost << "PS-ECAL GAP";
139  break;
140  default:
141  ost << "GAP ";
142  }
143  return ost;
144 }

References CaloSegment::CRACK, CaloSegment::ECALHCALGAP, CaloSegment::entrance(), CaloSegment::exit(), CaloSegment::HCAL, CaloSegment::L0length(), CaloSegment::length(), CaloSegment::material(), CaloSegment::PbWO4, CaloSegment::PS, CaloSegment::PSEEGAP, and CaloSegment::X0length().

CaloSegment::PS
Definition: CaloSegment.h:20
CaloSegment::PSEEGAP
Definition: CaloSegment.h:20
CaloSegment::material
Material material() const
material
Definition: CaloSegment.h:56
CaloSegment::PbWO4
Definition: CaloSegment.h:20
CaloSegment::L0length
double L0length() const
length of the segment (in L9)
Definition: CaloSegment.h:47
CaloSegment::HCAL
Definition: CaloSegment.h:20
CaloSegment::entrance
const CaloPoint & entrance() const
first point of the segment
Definition: CaloSegment.h:49
CaloSegment::CRACK
Definition: CaloSegment.h:20
math::XYZVector
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
CaloSegment::exit
const CaloPoint & exit() const
last point of the segment (there are only two)
Definition: CaloSegment.h:51
CaloSegment::length
double length() const
length of the segment (in cm)
Definition: CaloSegment.h:43
CaloSegment::ECALHCALGAP
Definition: CaloSegment.h:20
CaloSegment::X0length
double X0length() const
length of the segment (in X0)
Definition: CaloSegment.h:45