Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-07-10 02:34:31

0001 #include "DataFormats/ForwardDetId/interface/HGCScintillatorDetId.h"
0002 #include <ostream>
0003 #include <iostream>
0004 
0005 const HGCScintillatorDetId HGCScintillatorDetId::Undefined(0, 0, 0, 0, false);
0006 
0007 std::vector<HGCScintillatorDetId> HGCScintillatorDetId::detectorCells() const {
0008   std::vector<HGCScintillatorDetId> cells;
0009   int irad = ring();
0010   int ifi = iphi();
0011   int iz = zside();
0012   if (trigger()) {
0013     cells.emplace_back(HGCScintillatorDetId(type(), layer(), (2 * irad - 1) * iz, 2 * ifi - 1, false));
0014     cells.emplace_back(HGCScintillatorDetId(type(), layer(), 2 * irad * iz, 2 * ifi - 1, false));
0015     cells.emplace_back(HGCScintillatorDetId(type(), layer(), (2 * irad - 1) * iz, 2 * ifi, false));
0016     cells.emplace_back(HGCScintillatorDetId(type(), layer(), 2 * irad * iz, 2 * ifi, false));
0017   } else {
0018     cells.emplace_back(HGCScintillatorDetId(type(), layer(), irad * iz, ifi, false));
0019   }
0020   return cells;
0021 }
0022 
0023 std::ostream& operator<<(std::ostream& s, const HGCScintillatorDetId& id) {
0024   return s << " HGCScintillatorDetId::EE:HE= " << id.isEE() << ":" << id.isHE() << " trigger= " << id.trigger()
0025            << " granularity= " << id.granularity() << " type= " << id.type() << " SiPM= " << id.sipm()
0026            << " layer= " << id.layer() << " ring= " << id.iradius() << ":" << id.iradiusTrigger()
0027            << " phi= " << id.iphi() << ":" << id.iphiTrigger();
0028 }