CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
SeedingLayerSetsBuilder::LayerSpec Struct Reference

Public Member Functions

 LayerSpec (unsigned short index, const std::string &layerName, const edm::ParameterSet &cfgLayer, edm::ConsumesCollector &iC)
 
 LayerSpec (const LayerSpec &)=delete
 
 LayerSpec (LayerSpec &&)=default
 
LayerSpecoperator= (const LayerSpec &)=delete
 
LayerSpecoperator= (LayerSpec &&)=delete
 
std::string print (const std::vector< std::string > &names) const
 
 ~LayerSpec ()=default
 

Public Attributes

std::unique_ptr< ctfseeding::HitExtractorextractor
 
const std::string hitBuilder
 
const edm::ESGetToken< TransientTrackingRecHitBuilder, TransientRecHitRecordhitBuilderToken
 
int idLayer
 
const unsigned short nameIndex
 
std::string pixelHitProducer
 
TrackerDetSide side
 
GeomDetEnumerators::SubDetector subdet
 
bool usePixelHitProducer
 

Detailed Description

Definition at line 76 of file SeedingLayerSetsBuilder.h.

Constructor & Destructor Documentation

◆ LayerSpec() [1/3]

SeedingLayerSetsBuilder::LayerSpec::LayerSpec ( unsigned short  index,
const std::string &  layerName,
const edm::ParameterSet cfgLayer,
edm::ConsumesCollector iC 
)

Definition at line 100 of file SeedingLayerSetsBuilder.cc.

References clusterChargeCut(), edm::ParameterSet::exists(), extractor, edm::ParameterSet::getParameter(), idLayer, GeomDetEnumerators::invalidDet, LogDebug, eostools::move(), SeedingLayerSetsBuilder::nameToEnumId(), GeomDetEnumerators::PixelBarrel, GeomDetEnumerators::PixelEndcap, pixelHitProducer, side, HLTSiStripMonitoring_cff::skipClusters, subdet, usePixelHitProducer, and ConversionStep2_cff::useSimpleRphiHitsCleaner.

104  : nameIndex(index),
105  hitBuilder(cfgLayer.getParameter<string>("TTRHBuilder")),
107  usePixelHitProducer = false;
108  if (cfgLayer.exists("HitProducer")) {
109  pixelHitProducer = cfgLayer.getParameter<string>("HitProducer");
110  usePixelHitProducer = true;
111  }
112 
113  bool skipClusters = cfgLayer.exists("skipClusters");
114  if (skipClusters) {
115  LogDebug("SeedingLayerSetsBuilder") << layerName << " ready for skipping";
116  } else {
117  LogDebug("SeedingLayerSetsBuilder") << layerName << " not skipping ";
118  }
119 
120  auto subdetData = nameToEnumId(layerName);
121  subdet = std::get<0>(subdetData);
122  side = std::get<1>(subdetData);
123  idLayer = std::get<2>(subdetData);
125  extractor = std::make_unique<HitExtractorPIX>(side, idLayer, pixelHitProducer, iC);
126  } else if (subdet != GeomDetEnumerators::invalidDet) { // strip
127  auto extr = std::make_unique<HitExtractorSTRP>(subdet, side, idLayer, clusterChargeCut(cfgLayer), iC);
128  if (cfgLayer.exists("matchedRecHits")) {
129  extr->useMatchedHits(cfgLayer.getParameter<edm::InputTag>("matchedRecHits"), iC);
130  }
131  if (cfgLayer.exists("rphiRecHits")) {
132  extr->useRPhiHits(cfgLayer.getParameter<edm::InputTag>("rphiRecHits"), iC);
133  }
134  if (cfgLayer.exists("stereoRecHits")) {
135  extr->useStereoHits(cfgLayer.getParameter<edm::InputTag>("stereoRecHits"), iC);
136  }
137  if (cfgLayer.exists("vectorRecHits")) {
138  extr->useVectorHits(cfgLayer.getParameter<edm::InputTag>("vectorRecHits"), iC);
139  }
140  if (cfgLayer.exists("useRingSlector") && cfgLayer.getParameter<bool>("useRingSlector")) {
141  extr->useRingSelector(cfgLayer.getParameter<int>("minRing"), cfgLayer.getParameter<int>("maxRing"));
142  }
144  cfgLayer.exists("useSimpleRphiHitsCleaner") ? cfgLayer.getParameter<bool>("useSimpleRphiHitsCleaner") : true;
145  extr->useSimpleRphiHitsCleaner(useSimpleRphiHitsCleaner);
146 
147  double minAbsZ = cfgLayer.exists("MinAbsZ") ? cfgLayer.getParameter<double>("MinAbsZ") : 0.;
148  if (minAbsZ > 0.) {
149  extr->setMinAbsZ(minAbsZ);
150  }
151  if (skipClusters) {
152  bool useProjection = cfgLayer.exists("useProjection") ? cfgLayer.getParameter<bool>("useProjection") : false;
153  if (useProjection) {
154  LogDebug("SeedingLayerSetsBuilder") << layerName << " will project partially masked matched rechit";
155  } else {
156  extr->setNoProjection();
157  }
158  }
159  extractor = std::move(extr);
160  }
161  if (extractor && skipClusters) {
162  extractor->useSkipClusters(cfgLayer.getParameter<edm::InputTag>("skipClusters"), iC);
163  }
164 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
bool exists(std::string const &parameterName) const
checks if a parameter exists
std::unique_ptr< ctfseeding::HitExtractor > extractor
float clusterChargeCut(const edm::ParameterSet &conf, const char *name="clusterChargeCut")
GeomDetEnumerators::SubDetector subdet
static SeedingLayerId nameToEnumId(const std::string &name)
def move(src, dest)
Definition: eostools.py:511
#define LogDebug(id)
const edm::ESGetToken< TransientTrackingRecHitBuilder, TransientRecHitRecord > hitBuilderToken

◆ ~LayerSpec()

SeedingLayerSetsBuilder::LayerSpec::~LayerSpec ( )
default

◆ LayerSpec() [2/3]

SeedingLayerSetsBuilder::LayerSpec::LayerSpec ( const LayerSpec )
delete

◆ LayerSpec() [3/3]

SeedingLayerSetsBuilder::LayerSpec::LayerSpec ( LayerSpec &&  )
default

Member Function Documentation

◆ operator=() [1/2]

LayerSpec& SeedingLayerSetsBuilder::LayerSpec::operator= ( const LayerSpec )
delete

◆ operator=() [2/2]

LayerSpec& SeedingLayerSetsBuilder::LayerSpec::operator= ( LayerSpec &&  )
delete

◆ print()

std::string SeedingLayerSetsBuilder::LayerSpec::print ( const std::vector< std::string > &  names) const

Definition at line 166 of file SeedingLayerSetsBuilder.cc.

References names, and str.

166  {
167  std::ostringstream str;
168  str << "Layer=" << names[nameIndex] << ", hitBldr: " << hitBuilder;
169 
170  str << ", useRingSelector: ";
171  HitExtractorSTRP* ext = nullptr;
172  if ((ext = dynamic_cast<HitExtractorSTRP*>(extractor.get())) && ext->useRingSelector()) {
173  auto minMaxRing = ext->getMinMaxRing();
174  str << "true,"
175  << " Rings: (" << std::get<0>(minMaxRing) << "," << std::get<1>(minMaxRing) << ")";
176  } else
177  str << "false";
178 
179  return str.str();
180 }
std::unique_ptr< ctfseeding::HitExtractor > extractor
const std::string names[nVars_]
Definition: memstream.h:15
#define str(s)

Member Data Documentation

◆ extractor

std::unique_ptr<ctfseeding::HitExtractor> SeedingLayerSetsBuilder::LayerSpec::extractor

Definition at line 95 of file SeedingLayerSetsBuilder.h.

Referenced by LayerSpec().

◆ hitBuilder

const std::string SeedingLayerSetsBuilder::LayerSpec::hitBuilder

Definition at line 89 of file SeedingLayerSetsBuilder.h.

◆ hitBuilderToken

const edm::ESGetToken<TransientTrackingRecHitBuilder, TransientRecHitRecord> SeedingLayerSetsBuilder::LayerSpec::hitBuilderToken

Definition at line 90 of file SeedingLayerSetsBuilder.h.

◆ idLayer

int SeedingLayerSetsBuilder::LayerSpec::idLayer

Definition at line 94 of file SeedingLayerSetsBuilder.h.

Referenced by LayerSpec().

◆ nameIndex

const unsigned short SeedingLayerSetsBuilder::LayerSpec::nameIndex

Definition at line 86 of file SeedingLayerSetsBuilder.h.

◆ pixelHitProducer

std::string SeedingLayerSetsBuilder::LayerSpec::pixelHitProducer

Definition at line 87 of file SeedingLayerSetsBuilder.h.

Referenced by LayerSpec().

◆ side

TrackerDetSide SeedingLayerSetsBuilder::LayerSpec::side

Definition at line 93 of file SeedingLayerSetsBuilder.h.

Referenced by LayerSpec().

◆ subdet

GeomDetEnumerators::SubDetector SeedingLayerSetsBuilder::LayerSpec::subdet

Definition at line 92 of file SeedingLayerSetsBuilder.h.

Referenced by LayerSpec().

◆ usePixelHitProducer

bool SeedingLayerSetsBuilder::LayerSpec::usePixelHitProducer

Definition at line 88 of file SeedingLayerSetsBuilder.h.

Referenced by LayerSpec().