CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_0/src/FastSimulation/CaloGeometryTools/src/CaloPoint.cc

Go to the documentation of this file.
00001 //FAMOS headers
00002 #include "FastSimulation/CaloGeometryTools/interface/CaloPoint.h"
00003 
00004 std::ostream & operator<<(std::ostream& ost ,const CaloPoint& cid)
00005 {
00006   ost << " DetId " ;
00007   if(!cid.getDetId().null())
00008     ost <<  (uint32_t)cid.getDetId()();
00009   else
00010     ost << cid.whichDetector();
00011   //  ost << " Side " << cid.getSide() << " Point " << (XYZPoint)cid;
00012   ost << " Point " << (math::XYZVector)cid;
00013   return ost;
00014 }
00015 
00016 // For the ECAL
00017 CaloPoint::CaloPoint(const DetId & cell, CaloDirection side, const XYZPoint& position):
00018   XYZPoint(position),cellid_(cell),side_(side)
00019 {
00020   detector_=cell.det();
00021   subdetector_=cell.subdetId();
00022   layer_=0;
00023 }
00024 
00025 //hcal
00026 CaloPoint::CaloPoint(DetId::Detector det,const XYZPoint& position)
00027   :XYZPoint(position),detector_(det)
00028 {
00029   subdetector_=0;
00030   layer_=0;
00031 }
00032 
00033 //preshower
00034 CaloPoint::CaloPoint(DetId::Detector detector,int subdetn, int layer,const XYZPoint& position)
00035   :XYZPoint(position),detector_(detector),subdetector_(subdetn),layer_(layer)
00036 {
00037   cellid_=DetId();
00038 }