41 if ((
index =
name.find(
"BPix")) != string::npos) {
44 idLayer = atoi(
name.substr(
index + 4, 1).c_str());
49 else if ((
index =
name.find(
"FPix")) != string::npos) {
51 idLayer = atoi(
name.substr(
index + 4).c_str());
52 if (
name.find(
"pos") != string::npos) {
61 else if ((
index =
name.find(
"TIB")) != string::npos) {
64 idLayer = atoi(
name.substr(
index + 3, 1).c_str());
69 else if ((
index =
name.find(
"TID")) != string::npos) {
71 idLayer = atoi(
name.substr(
index + 3, 1).c_str());
72 if (
name.find(
"pos") != string::npos) {
81 else if ((
index =
name.find(
"TOB")) != string::npos) {
84 idLayer = atoi(
name.substr(
index + 3, 1).c_str());
89 else if ((
index =
name.find(
"TEC")) != string::npos) {
91 idLayer = atoi(
name.substr(
index + 3, 1).c_str());
92 if (
name.find(
"pos") != string::npos) {
98 return std::make_tuple(subdet, side, idLayer);
105 : nameIndex(
index), hitBuilder(cfgLayer.getParameter<
string>(
"TTRHBuilder")) {
107 if (cfgLayer.
exists(
"HitProducer")) {
120 subdet = std::get<0>(subdetData);
121 side = std::get<1>(subdetData);
122 idLayer = std::get<2>(subdetData);
127 if (cfgLayer.
exists(
"matchedRecHits")) {
130 if (cfgLayer.
exists(
"rphiRecHits")) {
133 if (cfgLayer.
exists(
"stereoRecHits")) {
136 if (cfgLayer.
exists(
"vectorRecHits")) {
139 if (cfgLayer.
exists(
"useRingSlector") && cfgLayer.
getParameter<
bool>(
"useRingSlector")) {
143 cfgLayer.
exists(
"useSimpleRphiHitsCleaner") ? cfgLayer.
getParameter<
bool>(
"useSimpleRphiHitsCleaner") :
true;
146 double minAbsZ = cfgLayer.
exists(
"MinAbsZ") ? cfgLayer.
getParameter<
double>(
"MinAbsZ") : 0.;
148 extr->setMinAbsZ(minAbsZ);
151 bool useProjection = cfgLayer.
exists(
"useProjection") ? cfgLayer.
getParameter<
bool>(
"useProjection") :
false;
153 LogDebug(
"SeedingLayerSetsBuilder") <<
layerName <<
" will project partially masked matched rechit";
155 extr->setNoProjection();
166 std::ostringstream
str;
167 str <<
"Layer=" <<
names[nameIndex] <<
", hitBldr: " << hitBuilder;
169 str <<
", useRingSelector: ";
171 if ((
ext = dynamic_cast<HitExtractorSTRP*>(extractor.get())) &&
ext->useRingSelector()) {
172 auto minMaxRing =
ext->getMinMaxRing();
174 <<
" Rings: (" << std::get<0>(minMaxRing) <<
"," << std::get<1>(minMaxRing) <<
")";
190 std::vector<std::string> namesPset =
cfg.getParameter<std::vector<std::string> >(
"layerList");
193 typedef std::vector<std::string>::const_iterator IS;
194 typedef std::vector<std::vector<std::string> >::const_iterator
IT;
195 std::ostringstream
str;
211 <<
"Assuming all SeedingLayerSets to have same number of layers. LayerSet " << (it -
layerNamesInSets.begin())
215 unsigned short layerIndex = 0;
221 <<
"Too many layers in " << __FILE__ <<
":" << __LINE__
222 <<
", we may have to enlarge the index type from unsigned short to unsigned int";
246 empty.setAllowAnything();
248 desc.add<std::vector<std::string> >(
"layerList", {});
266 string name = nameLayer.substr(0, iEnd);
271 <<
"configuration for layer: " << nameLayer <<
" not found, job will probably crash!";
276 std::vector<std::vector<std::string> >
result;
277 for (std::vector<std::string>::const_iterator is = namesPSet.begin(); is < namesPSet.end(); ++is) {
278 vector<std::string> layersInSet;
281 while (
pos != string::npos) {
284 layersInSet.push_back(
layer);
287 result.push_back(layersInSet);
303 const std::vector<BarrelDetLayer const*>& bpx =
tracker.barrelLayers();
304 const std::vector<BarrelDetLayer const*>& tib =
tracker.tibLayers();
305 const std::vector<BarrelDetLayer const*>& tob =
tracker.tobLayers();
307 const std::vector<ForwardDetLayer const*>& fpx_pos =
tracker.posForwardLayers();
308 const std::vector<ForwardDetLayer const*>& tid_pos =
tracker.posTidLayers();
309 const std::vector<ForwardDetLayer const*>& tec_pos =
tracker.posTecLayers();
311 const std::vector<ForwardDetLayer const*>& fpx_neg =
tracker.negForwardLayers();
312 const std::vector<ForwardDetLayer const*>& tid_neg =
tracker.negTidLayers();
313 const std::vector<ForwardDetLayer const*>& tec_neg =
tracker.negTecLayers();
320 detLayer = bpx[
index];
323 detLayer = fpx_pos[
index];
325 detLayer = fpx_neg[
index];
328 detLayer = tib[
index];
331 detLayer = tid_pos[
index];
333 detLayer = tid_neg[
index];
336 detLayer = tob[
index];
339 detLayer = tec_pos[
index];
341 detLayer = tec_neg[
index];
356 std::vector<SeedingLayerId>
ret;
367 auto ret = std::make_unique<SeedingLayerSetsHits>(
375 ret->shrink_to_fit();
390 auto ret = std::make_unique<SeedingLayerSetsHits>(
395 for (
auto& rh : *fastSimrechits_) {
402 idLayer = tTopo->
pxbLayer(rh.det()->geographicalId());
405 idLayer = tTopo->
pxfDisk(rh.det()->geographicalId());
406 if (tTopo->
pxfSide(rh.det()->geographicalId()) == 1)
412 if (
layer.subdet == subdet &&
layer.side == side &&
layer.idLayer == idLayer) {
415 layerhits_.emplace_back(ptrHit);
421 ret->shrink_to_fit();