Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:14:40

0001 #include "Geometry/GEMGeometry/interface/ME0EtaPartitionSpecs.h"
0002 #include "Geometry/CommonTopologies/interface/RectangularStripTopology.h"
0003 #include "Geometry/CommonTopologies/interface/TrapezoidalStripTopology.h"
0004 
0005 using namespace GeomDetEnumerators;
0006 
0007 ME0EtaPartitionSpecs::ME0EtaPartitionSpecs(SubDetector rss, const std::string& name, const ME0Specs& pars)
0008     : GeomDetType(name, rss), _p(pars), _n(name) {
0009   if (rss == ME0) {
0010     float b = _p[0];
0011     float B = _p[1];
0012     float h = _p[2];
0013     float r0 = h * (B + b) / (B - b);
0014     float striplength = h * 2;
0015     float strips = _p[3];
0016     float pitch = (b + B) / strips;
0017     int nstrip = static_cast<int>(strips);
0018     _top = new TrapezoidalStripTopology(nstrip, pitch, striplength, r0);
0019 
0020     float pads = _p[4];
0021     float pad_pitch = (b + B) / pads;
0022     int npad = static_cast<int>(pads);
0023     _top_pad = new TrapezoidalStripTopology(npad, pad_pitch, striplength, r0);
0024   } else {
0025     _top = nullptr;
0026     _top_pad = nullptr;
0027   }
0028 }
0029 
0030 ME0EtaPartitionSpecs::~ME0EtaPartitionSpecs() {
0031   if (_top)
0032     delete _top;
0033   if (_top_pad)
0034     delete _top_pad;
0035 }
0036 
0037 const Topology& ME0EtaPartitionSpecs::topology() const { return *_top; }
0038 
0039 const StripTopology& ME0EtaPartitionSpecs::specificTopology() const { return *_top; }
0040 
0041 const Topology& ME0EtaPartitionSpecs::padTopology() const { return *_top_pad; }
0042 
0043 const StripTopology& ME0EtaPartitionSpecs::specificPadTopology() const { return *_top_pad; }
0044 
0045 const std::string& ME0EtaPartitionSpecs::detName() const { return _n; }
0046 
0047 const std::vector<float>& ME0EtaPartitionSpecs::parameters() const { return _p; }