CMS 3D CMS Logo

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

Go to the source code of this file.

Functions

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

Function Documentation

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

Definition at line 123 of file CaloSegment.cc.

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

124 {
125  ost << " DetId " ;
126  if(!seg.entrance().getDetId().null())
127  ost << seg.entrance().getDetId()() ;
128  else
129  {
130  ost << seg.entrance().whichDetector() ;
131  // ost<< " Entrance side " << seg.entrance().getSide()
132  ost << " Point " << (math::XYZVector)seg.entrance() << std::endl;
133  }
134  ost << "DetId " ;
135  if(!seg.exit().getDetId().null())
136  ost << seg.exit().getDetId()() ;
137  else
138  ost << seg.exit().whichDetector() ;
139 
140  // ost << " Exit side " << seg.exit().getSide()
141  ost << " Point " << (math::XYZVector)seg.exit() << " "
142  << seg.length() << " cm "
143  << seg.X0length() << " X0 "
144  << seg.L0length() << " Lambda0 " ;
145  switch (seg.material())
146  {
147  case CaloSegment::PbWO4:
148  ost << "PbWO4 " ;
149  break;
150  case CaloSegment::CRACK:
151  ost << "CRACK ";
152  break;
153  case CaloSegment::PS:
154  ost << "PS ";
155  break;
156  case CaloSegment::HCAL:
157  ost << "HCAL ";
158  break;
160  ost << "ECAL-HCAL GAP ";
161  break;
163  ost << "PS-ECAL GAP";
164  break;
165  default:
166  ost << "GAP " ;
167  }
168  return ost;
169 }
double length() const
length of the segment (in cm)
Definition: CaloSegment.h:41
const CaloPoint & entrance() const
first point of the segment
Definition: CaloSegment.h:47
double X0length() const
length of the segment (in X0)
Definition: CaloSegment.h:43
double L0length() const
length of the segment (in L9)
Definition: CaloSegment.h:45
Material material() const
material
Definition: CaloSegment.h:55
const CaloPoint & exit() const
last point of the segment (there are only two)
Definition: CaloSegment.h:49
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31