Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:28:47

0001 #include "Phase2EndcapSubDisk.h"
0002 
0003 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0004 
0005 #include "DataFormats/GeometrySurface/interface/SimpleDiskBounds.h"
0006 
0007 #include "TrackingTools/DetLayers/interface/DetLayerException.h"
0008 #include "TrackingTools/GeomPropagators/interface/HelixForwardPlaneCrossing.h"
0009 
0010 #include <array>
0011 #include "DetGroupMerger.h"
0012 
0013 using namespace std;
0014 
0015 const std::vector<const GeometricSearchDet*>& Phase2EndcapSubDisk::components() const {
0016   throw cms::Exception("Phase2EndcapSubDisk::components() is not implemented");
0017 }
0018 
0019 void Phase2EndcapSubDisk::fillRingPars(int i) {
0020   const BoundDisk& ringDisk = static_cast<const BoundDisk&>(theComps[i]->surface());
0021   ringPars.push_back(tkDetUtil::fillRingParametersFromDisk(ringDisk));
0022 }
0023 
0024 Phase2EndcapSubDisk::Phase2EndcapSubDisk(vector<const Phase2EndcapSingleRing*>& rings)
0025     : RingedForwardLayer(true), theComponents{nullptr} {
0026   theRingSize = rings.size();
0027   LogDebug("TkDetLayers") << "Number of rings in Phase2EndcapSubDisk is " << theRingSize << std::endl;
0028   setSurface(computeDisk(rings));
0029 
0030   for (unsigned int i = 0; i != rings.size(); ++i) {
0031     theComps.push_back(rings[i]);
0032     fillRingPars(i);
0033     theBasicComps.insert(
0034         theBasicComps.end(), (*rings[i]).basicComponents().begin(), (*rings[i]).basicComponents().end());
0035   }
0036 
0037   LogDebug("TkDetLayers") << "==== DEBUG Phase2EndcapSubDisk =====";
0038   LogDebug("TkDetLayers") << "r,zed pos  , thickness, innerR, outerR: " << this->position().perp() << " , "
0039                           << this->position().z() << " , " << this->specificSurface().bounds().thickness() << " , "
0040                           << this->specificSurface().innerRadius() << " , " << this->specificSurface().outerRadius();
0041 }
0042 
0043 BoundDisk* Phase2EndcapSubDisk::computeDisk(const vector<const Phase2EndcapSingleRing*>& rings) const {
0044   return tkDetUtil::computeDisk(rings);
0045 }
0046 
0047 Phase2EndcapSubDisk::~Phase2EndcapSubDisk() {
0048   for (auto c : theComps)
0049     delete c;
0050 
0051   delete theComponents.load();
0052 }
0053 
0054 void Phase2EndcapSubDisk::groupedCompatibleDetsV(const TrajectoryStateOnSurface& startingState,
0055                                                  const Propagator& prop,
0056                                                  const MeasurementEstimator& est,
0057                                                  std::vector<DetGroup>& result) const {
0058   tkDetUtil::groupedCompatibleDetsV(startingState, prop, est, result, theRingSize, theComps, ringPars);
0059   return;
0060 }
0061 
0062 float Phase2EndcapSubDisk::computeWindowSize(const GeomDet* det,
0063                                              const TrajectoryStateOnSurface& tsos,
0064                                              const MeasurementEstimator& est) const {
0065   return tkDetUtil::computeYdirWindowSize(det, tsos, est);
0066 }
0067 
0068 bool Phase2EndcapSubDisk::overlapInR(const TrajectoryStateOnSurface& tsos,
0069                                      int index,
0070                                      double ymax,
0071                                      std::vector<tkDetUtil::RingPar> ringParams) const {
0072   return tkDetUtil::overlapInR(tsos, index, ymax, ringParams);
0073 }