CMS 3D CMS Logo

Classes | Functions

/data/git/CMSSW_5_3_11_patch5/src/FastSimulation/CaloGeometryTools/interface/CaloSegment.h File Reference

#include "FastSimulation/CaloGeometryTools/interface/CaloPoint.h"
#include <string>
#include <iosfwd>

Go to the source code of this file.

Classes

class  CaloSegment
class  CaloSegment::inL0Segment
class  CaloSegment::inSegment
class  CaloSegment::inX0Segment
 This class is used to determine if a point lies in the segment. More...

Functions

std::ostream & operator<< (std::ostream &o, const CaloSegment &cid)

Function Documentation

std::ostream& operator<< ( std::ostream &  o,
const CaloSegment cid 
)

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

{
  ost << " DetId " ;
  if(!seg.entrance().getDetId().null()) 
    ost << seg.entrance().getDetId()() ;
  else 
    {
      ost << seg.entrance().whichDetector() ;
      //  ost<< " Entrance side " << seg.entrance().getSide()
      ost << " Point " << (math::XYZVector)seg.entrance() << std::endl;
    }
  ost  << "DetId " ;
  if(!seg.exit().getDetId().null()) 
    ost << seg.exit().getDetId()() ;
  else
    ost << seg.exit().whichDetector() ;

  //  ost << " Exit side " << seg.exit().getSide() 
  ost << " Point " << (math::XYZVector)seg.exit() << " " 
      << seg.length() << " cm " 
      << seg.X0length() << " X0 " 
      <<  seg.L0length() << " Lambda0 " ;
  switch (seg.material())
    {
    case CaloSegment::PbWO4:
      ost << "PbWO4 " ;
      break;
    case CaloSegment::CRACK:
      ost << "CRACK ";
      break;
    case CaloSegment::PS:
      ost << "PS ";
      break;
    case CaloSegment::HCAL:
      ost << "HCAL ";
      break;
    case CaloSegment::ECALHCALGAP:
      ost << "ECAL-HCAL GAP ";
      break;
    case CaloSegment::PSEEGAP:
      ost  << "PS-ECAL GAP";
      break;
    default:
      ost << "GAP " ;
    }
  return ost;
}