16 throw cms::Exception(
"Phase2EndcapLayerDoubleDisk::components() is not implemented");
23 subDiskPars.push_back(tempPar);
28 theSubDisksSize = subDisks.size();
29 LogDebug(
"TkDetLayers") <<
"Number of subdisks in Phase2 IT EC layer is " << theSubDisksSize << std::endl;
32 for (
unsigned int i = 0;
i != subDisks.size(); ++
i) {
33 theComps.push_back(subDisks[
i]);
36 theBasicComps.end(), (*subDisks[
i]).basicComponents().begin(), (*subDisks[
i]).basicComponents().end());
39 LogDebug(
"TkDetLayers") <<
"==== DEBUG Phase2EndcapLayer =====";
40 LogDebug(
"TkDetLayers") <<
"r,zed pos , thickness, innerR, outerR: " << this->
position().perp() <<
" , "
41 << this->
position().z() <<
" , " << this->specificSurface().bounds().thickness() <<
" , "
42 << this->specificSurface().innerRadius() <<
" , " << this->specificSurface().outerRadius();
59 std::vector<DetGroup>&
result)
const {
65 std::fill(subDiskOrder.begin(), subDiskOrder.end(), 1);
73 std::fill(subDiskOrder.begin(), subDiskOrder.end(), 0);
79 throw DetLayerException(
"SubDisks in Endcap Layer have same z position, no idea how to order them!");
83 auto index = [&subDiskIndices, &subDiskOrder](
int i) {
return subDiskOrder[subDiskIndices[
i]]; };
85 std::vector<DetGroup> closestResult;
86 theComps[subDiskIndices[0]]->groupedCompatibleDetsV(startingState, prop, est, closestResult);
88 if (closestResult.empty()) {
89 theComps[subDiskIndices[1]]->groupedCompatibleDetsV(startingState, prop, est, result);
95 bool subdisk1ok = subDiskIndices[1] != -1;
114 std::vector<DetGroup> subdisk1res;
115 theComps[subDiskIndices[1]]->groupedCompatibleDetsV(startingState, prop, est, subdisk1res);
117 result.swap(closestResult);
121 std::vector<DetGroup> subdisk1res;
123 theComps[subDiskIndices[1]]->groupedCompatibleDetsV(startingState, prop, est, subdisk1res);
125 if (!subdisk1res.empty()) {
130 result.swap(closestResult);
148 Crossing myXing(startPos, startDir,
rho, propDir);
150 std::vector<GlobalPoint> subDiskCrossings;
155 pair<bool, double> pathlen = myXing.pathLength(theSubDisk);
157 subDiskCrossings.push_back(
GlobalPoint(myXing.position(pathlen.second)));
160 subDiskCrossings.push_back(
GlobalPoint(0., 0., 0.));
170 std::array<int, 2> theBins = {{-1, -1}};
173 float zDiff0 =
std::abs(subDiskCrossing[0].
z() - initialZ);
177 float testDiff =
std::abs(subDiskCrossing[i].
z() - subDiskZ);
178 if (testDiff < zDiff0) {
181 theBins[1] = theBins[0];
183 }
else if (zDiff1 < 0 || testDiff < zDiff1) {
std::vector< const Phase2EndcapSubDisk * > theComps
const edm::EventSetup & c
std::array< int, 2 > subDiskIndicesByCrossingProximity(const TrajectoryStateOnSurface &startingState, const Propagator &prop) const
BoundDisk * computeDisk(const std::vector< const T * > &structures)
Global3DPoint GlobalPoint
GlobalPoint globalPosition() const
std::vector< SubDiskPar > subDiskPars
virtual PropagationDirection propagationDirection() const final
Phase2EndcapLayerDoubleDisk(std::vector< const Phase2EndcapSubDisk * > &subDisks)
~Phase2EndcapLayerDoubleDisk() override
static void addSameLevel(std::vector< DetGroup > &&gvec, std::vector< DetGroup > &result)
std::array< int, 2 > findTwoClosest(std::vector< GlobalPoint >) const
Abs< T >::type abs(const T &t)
std::atomic< std::vector< const GeometricSearchDet * > * > theComponents
BoundDisk * computeDisk(const std::vector< const Phase2EndcapSubDisk * > &subDisks) const
void fill(std::map< std::string, TH1 * > &h, const std::string &s, double x)
const std::vector< const GeometricSearchDet * > & components() const override
GlobalVector globalMomentum() const
static int position[264][3]
Vector2DBase< float, LocalTag > Local2DVector
static void orderAndMergeTwoLevels(std::vector< DetGroup > &&one, std::vector< DetGroup > &&two, std::vector< DetGroup > &result, int firstIndex, int firstCrossed)
void groupedCompatibleDetsV(const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, std::vector< DetGroup > &result) const override
void fillSubDiskPars(int i)
double transverseCurvature() const