Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-09-01 02:45:01

0001 //FAMOS headers
0002 #include "FastSimulation/CaloGeometryTools/interface/CaloPoint.h"
0003 
0004 std::ostream& operator<<(std::ostream& ost, const CaloPoint& cid) {
0005   ost << " DetId ";
0006   if (!cid.getDetId().null())
0007     ost << (uint32_t)cid.getDetId()();
0008   else
0009     ost << cid.whichDetector();
0010   //  ost << " Side " << cid.getSide() << " Point " << (XYZPoint)cid;
0011   ost << " Point " << (math::XYZVector)cid;
0012   return ost;
0013 }
0014 
0015 // For the ECAL
0016 CaloPoint::CaloPoint(const DetId& cell, CaloDirection side, const XYZPoint& position)
0017     : XYZPoint(position), cellid_(cell), side_(side) {
0018   detector_ = cell.det();
0019   subdetector_ = cell.subdetId();
0020   layer_ = 0;
0021 }
0022 
0023 //hcal
0024 CaloPoint::CaloPoint(DetId::Detector det, const XYZPoint& position) : XYZPoint(position), detector_(det) {
0025   subdetector_ = 0;
0026   layer_ = 0;
0027   side_ = CaloDirection::NONE;
0028 }
0029 
0030 //preshower
0031 CaloPoint::CaloPoint(DetId::Detector detector, int subdetn, int layer, const XYZPoint& position)
0032     : XYZPoint(position), detector_(detector), subdetector_(subdetn), layer_(layer) {
0033   cellid_ = DetId();
0034   side_ = CaloDirection::NONE;
0035 }