File indexing completed on 2023-03-17 11:19:20
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #include "RecoLocalMuon/DTSegment/src/DTSegmentExtendedCand.h"
0015
0016
0017
0018
0019 #include <iostream>
0020 using namespace std;
0021
0022
0023
0024
0025
0026
0027
0028
0029 bool DTSegmentExtendedCand::isCompatible(const DTSegmentExtendedCand::DTSLRecClusterForFit& clus) {
0030 LocalPoint posAtSL = position() + direction() * (clus.pos.z() - position().z()) / cos(direction().theta());
0031
0032 static constexpr float errScaleFact = 10.;
0033 static constexpr float minError = 25.;
0034
0035 return std::abs((posAtSL - clus.pos).x()) < max(errScaleFact * sqrt(clus.err.xx()), minError);
0036 }
0037
0038 unsigned int DTSegmentExtendedCand::nHits() const { return DTSegmentCand::nHits() + theClus.size(); }
0039
0040 bool DTSegmentExtendedCand::good() const {
0041 if (superLayer()->id().superLayer() == 2)
0042 return DTSegmentCand::nHits() >= nHitsMin && chi2() / NDOF() < chi2max * 2.;
0043 return DTSegmentCand::nHits() >= nHitsMin && chi2() / NDOF() < chi2max;
0044 }