File indexing completed on 2024-04-06 12:31:36
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #include "TrackingTools/TrackAssociator/interface/FiducialVolume.h"
0016 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0017 #include "FWCore/Utilities/interface/Exception.h"
0018
0019 bool FiducialVolume::isValid() const { return minR_ < 1e4 && maxR_ >= minR_ && minZ_ < 1e4 && maxZ_ >= minZ_; }
0020
0021 void FiducialVolume::addActivePoint(const GlobalPoint& point) {
0022 if (point.perp() > maxR_)
0023 maxR_ = point.perp();
0024 if (fabs(point.eta()) < 1 && point.perp() < minR_)
0025 minR_ = point.perp();
0026 if (fabs(point.z()) > maxZ_)
0027 maxZ_ = fabs(point.z());
0028 if (fabs(point.eta()) > 1.7 && fabs(point.z()) < minZ_)
0029 minZ_ = fabs(point.z());
0030 }
0031
0032 void FiducialVolume::reset() {
0033 minR_ = 1e5;
0034 maxR_ = -1;
0035 minZ_ = 1e5;
0036 maxZ_ = -1;
0037 }
0038
0039 void FiducialVolume::determinInnerDimensions() {
0040 if (maxR_ > 0 && maxR_ < minR_)
0041 minR_ = maxR_;
0042 if (maxZ_ > 0 && maxZ_ < minZ_)
0043 minZ_ = maxZ_;
0044 }