1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
#include "Alignment/HIPAlignmentAlgorithm/interface/HIPAlignableSpecificParameters.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
HIPAlignableSpecificParameters::HIPAlignableSpecificParameters(const Alignable* aliObj_, bool defaultFlag_)
: aliObj(aliObj_),
defaultFlag(defaultFlag_),
minRelParError(0),
maxRelParError(-1),
minNHits(0),
maxHitPull(-1),
applyPixelProbCut(false),
usePixelProbXYOrProbQ(false),
minPixelProbXY(0),
maxPixelProbXY(1),
minPixelProbQ(0),
maxPixelProbQ(1) {}
HIPAlignableSpecificParameters::HIPAlignableSpecificParameters(const HIPAlignableSpecificParameters& other)
: aliObj(other.aliObj),
defaultFlag(other.defaultFlag),
minRelParError(other.minRelParError),
maxRelParError(other.maxRelParError),
minNHits(other.minNHits),
maxHitPull(other.maxHitPull),
applyPixelProbCut(other.applyPixelProbCut),
usePixelProbXYOrProbQ(other.usePixelProbXYOrProbQ),
minPixelProbXY(other.minPixelProbXY),
maxPixelProbXY(other.maxPixelProbXY),
minPixelProbQ(other.minPixelProbQ),
maxPixelProbQ(other.maxPixelProbQ) {}
align::ID HIPAlignableSpecificParameters::id() const {
if (aliObj != nullptr)
return aliObj->id();
else
return 0;
}
align::StructureType HIPAlignableSpecificParameters::objId() const {
if (aliObj != nullptr)
return aliObj->alignableObjectId();
else
return align::invalid;
}
bool HIPAlignableSpecificParameters::matchAlignable(const Alignable* ali) const {
if (aliObj == (Alignable*)nullptr)
return false;
bool result = (aliObj == ali);
if (!result) { // Check deep components of the alignable for this specification
for (auto const& alideep : aliObj->deepComponents()) {
if (alideep == ali) {
result = true;
break;
}
}
//if (result) edm::LogWarning("Alignment") // This is correct. Ideally one should specify the same alignables aligned in the specifications
// << "[HIPAlignableSpecificParameters::matchAlignable] Alignment object with id " << ali->id() << " / " << ali->alignableObjectId()
// << " was found as a component of " << this->id() << " / " << this->objId();
}
return result;
}
bool HIPAlignableSpecificParameters::isDefault() const { return defaultFlag; }
|