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")) {
114 LogDebug(
"SeedingLayerSetsBuilder") << layerName <<
" ready for skipping";
116 LogDebug(
"SeedingLayerSetsBuilder") << layerName <<
" not skipping ";
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(
"useRingSlector") && cfgLayer.
getParameter<
bool>(
"useRingSlector")) {
140 cfgLayer.
exists(
"useSimpleRphiHitsCleaner") ? cfgLayer.
getParameter<
bool>(
"useSimpleRphiHitsCleaner") :
true;
143 double minAbsZ = cfgLayer.
exists(
"MinAbsZ") ? cfgLayer.
getParameter<
double>(
"MinAbsZ") : 0.;
145 extr->setMinAbsZ(minAbsZ);
148 bool useProjection = cfgLayer.
exists(
"useProjection") ? cfgLayer.
getParameter<
bool>(
"useProjection") :
false;
150 LogDebug(
"SeedingLayerSetsBuilder") << layerName <<
" will project partially masked matched rechit";
152 extr->setNoProjection();
163 std::ostringstream
str;
164 str <<
"Layer=" <<
names[nameIndex] <<
", hitBldr: " << hitBuilder;
166 str <<
", useRingSelector: ";
168 if ((
ext = dynamic_cast<HitExtractorSTRP*>(extractor.get())) &&
ext->useRingSelector()) {
169 auto minMaxRing =
ext->getMinMaxRing();
171 <<
" Rings: (" << std::get<0>(minMaxRing) <<
"," << std::get<1>(minMaxRing) <<
")";
187 std::vector<std::string> namesPset =
cfg.getParameter<std::vector<std::string> >(
"layerList");
190 typedef std::vector<std::string>::const_iterator IS;
191 typedef std::vector<std::vector<std::string> >::const_iterator
IT;
192 std::ostringstream
str;
208 <<
"Assuming all SeedingLayerSets to have same number of layers. LayerSet " << (it -
layerNamesInSets.begin())
212 unsigned short layerIndex = 0;
218 <<
"Too many layers in " << __FILE__ <<
":" << __LINE__
219 <<
", we may have to enlarge the index type from unsigned short to unsigned int";
243 empty.setAllowAnything();
245 desc.
add<std::vector<std::string> >(
"layerList", {});
263 string name = nameLayer.substr(0, iEnd);
268 <<
"configuration for layer: " << nameLayer <<
" not found, job will probably crash!";
273 std::vector<std::vector<std::string> >
result;
274 for (std::vector<std::string>::const_iterator is = namesPSet.begin(); is < namesPSet.end(); ++is) {
275 vector<std::string> layersInSet;
278 while (
pos != string::npos) {
280 string layer =
line.substr(0,
pos);
281 layersInSet.push_back(layer);
284 result.push_back(layersInSet);
300 const std::vector<BarrelDetLayer const*>& bpx =
tracker.barrelLayers();
301 const std::vector<BarrelDetLayer const*>& tib =
tracker.tibLayers();
302 const std::vector<BarrelDetLayer const*>& tob =
tracker.tobLayers();
304 const std::vector<ForwardDetLayer const*>& fpx_pos =
tracker.posForwardLayers();
305 const std::vector<ForwardDetLayer const*>& tid_pos =
tracker.posTidLayers();
306 const std::vector<ForwardDetLayer const*>& tec_pos =
tracker.posTecLayers();
308 const std::vector<ForwardDetLayer const*>& fpx_neg =
tracker.negForwardLayers();
309 const std::vector<ForwardDetLayer const*>& tid_neg =
tracker.negTidLayers();
310 const std::vector<ForwardDetLayer const*>& tec_neg =
tracker.negTecLayers();
314 int index = layer.idLayer - 1;
317 detLayer = bpx[
index];
320 detLayer = fpx_pos[
index];
322 detLayer = fpx_neg[
index];
325 detLayer = tib[
index];
328 detLayer = tid_pos[
index];
330 detLayer = tid_neg[
index];
333 detLayer = tob[
index];
336 detLayer = tec_pos[
index];
338 detLayer = tec_neg[
index];
353 std::vector<SeedingLayerId>
ret;
356 ret.emplace_back(layer.subdet, layer.side, layer.idLayer);
364 auto ret = std::make_unique<SeedingLayerSetsHits>(
372 ret->shrink_to_fit();
387 auto ret = std::make_unique<SeedingLayerSetsHits>(
392 for (
auto& rh : *fastSimrechits_) {
399 idLayer = tTopo->
pxbLayer(rh.det()->geographicalId());
402 idLayer = tTopo->
pxfDisk(rh.det()->geographicalId());
403 if (tTopo->
pxfSide(rh.det()->geographicalId()) == 1)
409 if (layer.subdet == subdet && layer.side == side && layer.idLayer == idLayer) {
412 layerhits_.emplace_back(ptrHit);
418 ret->shrink_to_fit();