|
|
Go to the documentation of this file.
34 #include <type_traits>
58 void endJob()
override;
60 void validateME0ChamberGeometry();
61 void validateME0EtaPartitionGeometry();
62 void validateME0EtaPartitionGeometry2();
64 void compareTransform(
const GlobalPoint&,
const TGeoMatrix*);
65 void compareShape(
const GeomDet*,
const float*);
68 float getDiff(
const float,
const float);
71 void makeHistograms2(
const char*);
72 void makeHistogram(
const string&, vector<float>&);
75 globalDistances_.clear();
77 bottomWidths_.clear();
106 iConfig.getUntrackedParameter<
string>(
"infileName",
"cmsRecoGeom-2026.root")),
107 outfileName_(iConfig.getUntrackedParameter<
string>(
"outfileName",
"validateME0Geometry.root")),
108 tolerance_(iConfig.getUntrackedParameter<
int>(
"tolerance", 6)) {
116 LogTrace(
"ME0Geometry") <<
"Validating ME0 chamber geometry";
121 LogError(
"ME0Geometry") <<
"Invalid ME0 geometry";
134 LogTrace(
"ME0Geometry") <<
"Failed to get matrix of ME0 chamber with detid: " << chId.
rawId();
142 LogTrace(
"ME0Geometry") <<
"Failed to get shape of ME0 chamber with detid: " << chId.
rawId();
159 LogTrace(
"ME0Geometry") <<
"Failed to get matrix of ME0 eta partition 2 with detid: " << chId.
rawId();
167 LogTrace(
"ME0Geometry") <<
"Failed to get shape of ME0 eta partition 2 with detid: " << chId.
rawId();
180 const int n_strips = it->nstrips();
181 const float n_pitch = it->pitch();
188 for (
int istrips = 1; istrips <= n_strips; istrips++) {
199 LogWarning(
"ME0Geometry") <<
"ATTENTION! nStrips == 0";
206 double local[3] = {0.0, 0.0, 0.0};
219 float shapeBottomWidth;
221 float shapeThickness;
224 shapeTopWidth = shape[2];
225 shapeBottomWidth = shape[1];
226 shapeLength = shape[4];
227 shapeThickness = shape[3];
228 }
else if (shape[0] == 2) {
229 shapeTopWidth = shape[1];
230 shapeBottomWidth = shape[1];
231 shapeLength = shape[2];
232 shapeThickness = shape[3];
234 LogTrace(
"ME0Geometry") <<
"Failed to get box or trapezoid from shape";
239 float topWidth, bottomWidth;
244 array<const float, 4>
const& ps = tpbs->parameters();
253 }
else if ((dynamic_cast<const RectangularPlaneBounds*>(bounds))) {
256 bottomWidth = topWidth;
260 LogTrace(
"ME0Geometry") <<
"Failed to get bounds";
272 (
p1.z() -
p2.z()) * (
p1.z() -
p2.z()));
279 return (val1 - val2);
287 string gdn =
d +
": distance between points in global coordinates";
290 string twn =
d +
": absolute difference between top widths (along X)";
293 string bwn =
d +
": absolute difference between bottom widths (along X)";
296 string ln =
d +
": absolute difference between lengths (along Y)";
299 string tn =
d +
": absolute difference between thicknesses (along Z)";
308 string ns =
d +
": absolute difference between nStrips";
311 string pi =
d +
": absolute difference between Strips Pitch";
314 string pl =
d +
": absolute difference between Strips Length";
324 TH1D
hist(
name.c_str(),
name.c_str(), 100, *minE * (1 + 0.10), *
maxE * (1 + 0.10));
326 for (
auto const& it :
data)
329 hist.GetXaxis()->SetTitle(
"[cm]");
const std::vector< ME0EtaPartition const * > & etaPartitions() const
Return a vector of all ME0 eta partitions.
void validateME0ChamberGeometry()
virtual float width() const =0
~ME0GeometryValidate() override
void loadMap(const char *fileName)
void compareTransform(const GlobalPoint &, const TGeoMatrix *)
const float * getShapePars(unsigned int id) const
Point3DBase< Scalar, LocalTag > LocalPoint
const std::vector< const ME0Chamber * > & chambers() const
Return a vector of all ME0 chambers.
void validateME0EtaPartitionGeometry()
virtual float length() const =0
void analyze(const edm::Event &, const edm::EventSetup &) override
void makeHistograms(const char *)
const Plane & surface() const
The nominal surface of the GeomDet.
const float * getParameters(unsigned int id) const
const TGeoMatrix * getMatrix(unsigned int id) const
vector< float > topWidths_
#define DEFINE_FWK_MODULE(type)
void validateME0EtaPartitionGeometry2()
const Bounds & bounds() const
ME0GeometryValidate(const ParameterSet &)
void makeHistograms2(const char *)
Global3DPoint GlobalPoint
float getDiff(const float, const float)
virtual float thickness() const =0
virtual float stripLength() const =0
vector< float > bottomWidths_
vector< float > globalDistances_
float getDistance(const GlobalPoint &, const GlobalPoint &)
example_stream void analyze(const edm::Event &, const edm::EventSetup &) override
edm::ESHandle< ME0Geometry > me0Geometry_
constexpr uint32_t rawId() const
get the raw id
char data[epos_bytes_allocation]
Abs< T >::type abs(const T &t)
vector< float > thicknesses_
void makeHistogram(const string &, vector< float > &)
vector< float > stripslen_
enable_if<!numeric_limits< T >::is_integer, bool >::type almost_equal(T x, T y, int ulp)
void compareShape(const GeomDet *, const float *)