66 bool usePhase2_ =
false;
73 int stripQualityFlags = 0;
74 int stripQualityDebugFlags = 0;
76 if (
pset.getParameter<
bool>(
"UseStripModuleQualityDB")) {
78 if (
pset.getUntrackedParameter<
bool>(
"DebugStripModuleQualityDB",
false)) {
82 if (
pset.getParameter<
bool>(
"UseStripAPVFiberQualityDB")) {
84 if (
pset.getUntrackedParameter<
bool>(
"DebugStripAPVFiberQualityDB",
false)) {
87 if (
pset.getParameter<
bool>(
"MaskBadAPVFibers")) {
91 if (
pset.getParameter<
bool>(
"UseStripStripQualityDB")) {
93 if (
pset.getUntrackedParameter<
bool>(
"DebugStripStripQualityDB",
false)) {
97 return std::make_pair(stripQualityFlags, stripQualityDebugFlags);
101 int pixelQualityFlags = 0;
102 int pixelQualityDebugFlags = 0;
104 if (
pset.getParameter<
bool>(
"UsePixelModuleQualityDB")) {
106 if (
pset.getUntrackedParameter<
bool>(
"DebugPixelModuleQualityDB",
false)) {
110 if (
pset.getParameter<
bool>(
"UsePixelROCQualityDB")) {
112 if (
pset.getUntrackedParameter<
bool>(
"DebugPixelROCQualityDB",
false)) {
117 return std::make_pair(pixelQualityFlags, pixelQualityDebugFlags);
124 auto c = setWhatProduced(
this, myname);
126 std::tie(pixelQualityFlags_, pixelQualityDebugFlags_) = pixelFlags(
p);
127 if (pixelQualityFlags_ != 0) {
128 pixelQualityToken_ =
c.consumes();
129 pixelCablingToken_ =
c.consumes();
132 std::tie(stripQualityFlags_, stripQualityDebugFlags_) = stripFlags(
p);
133 if (stripQualityFlags_ != 0) {
138 pset.getParameter<uint32_t>(
"maxConsecutiveBad"));
142 badStripCuts_.tib = makeBadStripCuts(cutPset.getParameter<
edm::ParameterSet>(
"TIB"));
143 badStripCuts_.tob = makeBadStripCuts(cutPset.getParameter<
edm::ParameterSet>(
"TOB"));
144 badStripCuts_.tid = makeBadStripCuts(cutPset.getParameter<
edm::ParameterSet>(
"TID"));
145 badStripCuts_.tec = makeBadStripCuts(cutPset.getParameter<
edm::ParameterSet>(
"TEC"));
152 trackerTopologyToken_ =
c.consumes();
153 trackerGeomToken_ =
c.consumes();
154 geometricSearchTrackerToken_ =
c.consumes();
157 auto phase2 =
p.getParameter<
std::string>(
"Phase2StripCPE");
158 if (not phase2.empty()) {
171 if (pixelQualityFlags_ != 0) {
172 ptr_pixelQuality = &iRecord.
get(pixelQualityToken_);
173 ptr_pixelCabling = &iRecord.
get(pixelCablingToken_);
178 if (stripQualityFlags_ != 0) {
179 ptr_stripQuality = &iRecord.
get(stripQualityToken_);
184 ptr_phase2TrackerCPE = &iRecord.
get(phase2TrackerCPEToken_);
186 return std::make_unique<MeasurementTrackerImpl>(badStripCuts_,
187 &iRecord.
get(pixelCPEToken_),
188 &iRecord.
get(stripCPEToken_),
189 &iRecord.
get(hitMatcherToken_),
190 &iRecord.
get(trackerTopologyToken_),
191 &iRecord.
get(trackerGeomToken_),
192 &iRecord.
get(geometricSearchTrackerToken_),
195 stripQualityDebugFlags_,
199 pixelQualityDebugFlags_,
200 ptr_phase2TrackerCPE);
212 desc.add<
std::string>(
"Phase2StripCPE",
"")->setComment(
"empty string used to turn off Phase 2");
215 desc.add<
bool>(
"UseStripModuleQualityDB",
true);
216 desc.addUntracked<
bool>(
"DebugStripModuleQualityDB",
false)->setComment(
"Dump out info on module status");
217 desc.add<
bool>(
"UseStripAPVFiberQualityDB",
true)->setComment(
"Read APV and Fiber status from SiStripQuality");
218 desc.addUntracked<
bool>(
"DebugStripAPVFiberQualityDB",
false)->setComment(
"Dump out info on module status");
219 desc.add<
bool>(
"MaskBadAPVFibers",
true)
221 "if set to true, clusters with barycenter on bad APV and Fibers are ignored. (UseStripAPVFiberQualityDB must "
222 "also be true for this to work)");
224 desc.add<
bool>(
"UseStripStripQualityDB",
true)->setComment(
"read Strip status from SiStripQuality");
225 desc.addUntracked<
bool>(
"DebugStripStripQualityDB",
false)->setComment(
"dump out info on module status");
230 badStripCutsDesc.
add<uint32_t>(
"maxBad", 4);
231 badStripCutsDesc.
add<uint32_t>(
"maxConsecutiveBad", 2);
242 desc.add<
bool>(
"UsePixelModuleQualityDB",
true)->setComment(
"Use DB info at the module level (that is, detid level)");
243 desc.addUntracked<
bool>(
"DebugPixelModuleQualityDB",
false)->setComment(
"dump out info on module status");
244 desc.add<
bool>(
"UsePixelROCQualityDB",
true)->setComment(
"Use DB info at the ROC level");
245 desc.addUntracked<
bool>(
"DebugPixelROCQualityDB",
false)->setComment(
"dump out info om module status ");
247 descriptions.
add(
"_MeasurementTrackerESProducer_default",
desc);