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"
#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

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

Definition at line 130 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().

131 {
132  ost << " DetId " ;
133  if(!seg.entrance().getDetId().null())
134  ost << seg.entrance().getDetId()() ;
135  else
136  {
137  ost << seg.entrance().whichDetector() ;
138  // ost<< " Entrance side " << seg.entrance().getSide()
139  ost << " Point " << (math::XYZVector)seg.entrance() << std::endl;
140  }
141  ost << "DetId " ;
142  if(!seg.exit().getDetId().null())
143  ost << seg.exit().getDetId()() ;
144  else
145  ost << seg.exit().whichDetector() ;
146 
147  // ost << " Exit side " << seg.exit().getSide()
148  ost << " Point " << (math::XYZVector)seg.exit() << " "
149  << seg.length() << " cm "
150  << seg.X0length() << " X0 "
151  << seg.L0length() << " Lambda0 " ;
152  switch (seg.material())
153  {
154  case CaloSegment::PbWO4:
155  ost << "PbWO4 " ;
156  break;
157  case CaloSegment::CRACK:
158  ost << "CRACK ";
159  break;
160  case CaloSegment::PS:
161  ost << "PS ";
162  break;
163  case CaloSegment::HCAL:
164  ost << "HCAL ";
165  break;
167  ost << "ECAL-HCAL GAP ";
168  break;
170  ost << "PS-ECAL GAP";
171  break;
172  default:
173  ost << "GAP " ;
174  }
175  return ost;
176 }
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:30