CMS 3D CMS Logo

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

Public Member Functions

 LayerSpec (const LayerSpec &)=delete
 
 LayerSpec (LayerSpec &&)=default
 
 LayerSpec (unsigned short index, const std::string &layerName, const edm::ParameterSet &cfgLayer, edm::ConsumesCollector &iC)
 
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
 
int idLayer
 
const unsigned short nameIndex
 
std::string pixelHitProducer
 
TrackerDetSide side
 
GeomDetEnumerators::SubDetector subdet
 
bool usePixelHitProducer
 

Detailed Description

Definition at line 71 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 101 of file SeedingLayerSetsBuilder.cc.

105  : nameIndex(index), hitBuilder(cfgLayer.getParameter<string>("TTRHBuilder")) {
106  usePixelHitProducer = false;
107  if (cfgLayer.exists("HitProducer")) {
108  pixelHitProducer = cfgLayer.getParameter<string>("HitProducer");
109  usePixelHitProducer = true;
110  }
111 
112  bool skipClusters = cfgLayer.exists("skipClusters");
113  if (skipClusters) {
114  LogDebug("SeedingLayerSetsBuilder") << layerName << " ready for skipping";
115  } else {
116  LogDebug("SeedingLayerSetsBuilder") << layerName << " not skipping ";
117  }
118 
119  auto subdetData = nameToEnumId(layerName);
120  subdet = std::get<0>(subdetData);
121  side = std::get<1>(subdetData);
122  idLayer = std::get<2>(subdetData);
124  extractor = std::make_unique<HitExtractorPIX>(side, idLayer, pixelHitProducer, iC);
125  } else if (subdet != GeomDetEnumerators::invalidDet) { // strip
126  auto extr = std::make_unique<HitExtractorSTRP>(subdet, side, idLayer, clusterChargeCut(cfgLayer));
127  if (cfgLayer.exists("matchedRecHits")) {
128  extr->useMatchedHits(cfgLayer.getParameter<edm::InputTag>("matchedRecHits"), iC);
129  }
130  if (cfgLayer.exists("rphiRecHits")) {
131  extr->useRPhiHits(cfgLayer.getParameter<edm::InputTag>("rphiRecHits"), iC);
132  }
133  if (cfgLayer.exists("stereoRecHits")) {
134  extr->useStereoHits(cfgLayer.getParameter<edm::InputTag>("stereoRecHits"), iC);
135  }
136  if (cfgLayer.exists("useRingSlector") && cfgLayer.getParameter<bool>("useRingSlector")) {
137  extr->useRingSelector(cfgLayer.getParameter<int>("minRing"), cfgLayer.getParameter<int>("maxRing"));
138  }
140  cfgLayer.exists("useSimpleRphiHitsCleaner") ? cfgLayer.getParameter<bool>("useSimpleRphiHitsCleaner") : true;
141  extr->useSimpleRphiHitsCleaner(useSimpleRphiHitsCleaner);
142 
143  double minAbsZ = cfgLayer.exists("MinAbsZ") ? cfgLayer.getParameter<double>("MinAbsZ") : 0.;
144  if (minAbsZ > 0.) {
145  extr->setMinAbsZ(minAbsZ);
146  }
147  if (skipClusters) {
148  bool useProjection = cfgLayer.exists("useProjection") ? cfgLayer.getParameter<bool>("useProjection") : false;
149  if (useProjection) {
150  LogDebug("SeedingLayerSetsBuilder") << layerName << " will project partially masked matched rechit";
151  } else {
152  extr->setNoProjection();
153  }
154  }
155  extractor = std::move(extr);
156  }
157  if (extractor && skipClusters) {
158  extractor->useSkipClusters(cfgLayer.getParameter<edm::InputTag>("skipClusters"), iC);
159  }
160 }

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.

◆ ~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 162 of file SeedingLayerSetsBuilder.cc.

162  {
163  std::ostringstream str;
164  str << "Layer=" << names[nameIndex] << ", hitBldr: " << hitBuilder;
165 
166  str << ", useRingSelector: ";
167  HitExtractorSTRP* ext = nullptr;
168  if ((ext = dynamic_cast<HitExtractorSTRP*>(extractor.get())) && ext->useRingSelector()) {
169  auto minMaxRing = ext->getMinMaxRing();
170  str << "true,"
171  << " Rings: (" << std::get<0>(minMaxRing) << "," << std::get<1>(minMaxRing) << ")";
172  } else
173  str << "false";
174 
175  return str.str();
176 }

References names, and str.

Member Data Documentation

◆ extractor

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

Definition at line 89 of file SeedingLayerSetsBuilder.h.

Referenced by LayerSpec().

◆ hitBuilder

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

Definition at line 84 of file SeedingLayerSetsBuilder.h.

◆ idLayer

int SeedingLayerSetsBuilder::LayerSpec::idLayer

Definition at line 88 of file SeedingLayerSetsBuilder.h.

Referenced by LayerSpec().

◆ nameIndex

const unsigned short SeedingLayerSetsBuilder::LayerSpec::nameIndex

Definition at line 81 of file SeedingLayerSetsBuilder.h.

◆ pixelHitProducer

std::string SeedingLayerSetsBuilder::LayerSpec::pixelHitProducer

Definition at line 82 of file SeedingLayerSetsBuilder.h.

Referenced by LayerSpec().

◆ side

TrackerDetSide SeedingLayerSetsBuilder::LayerSpec::side

Definition at line 87 of file SeedingLayerSetsBuilder.h.

Referenced by LayerSpec().

◆ subdet

GeomDetEnumerators::SubDetector SeedingLayerSetsBuilder::LayerSpec::subdet

Definition at line 86 of file SeedingLayerSetsBuilder.h.

Referenced by LayerSpec().

◆ usePixelHitProducer

bool SeedingLayerSetsBuilder::LayerSpec::usePixelHitProducer

Definition at line 83 of file SeedingLayerSetsBuilder.h.

Referenced by LayerSpec().

ext
Definition: memstream.h:15
GeomDetEnumerators::invalidDet
Definition: GeomDetEnumerators.h:31
SeedingLayerSetsBuilder::LayerSpec::side
TrackerDetSide side
Definition: SeedingLayerSetsBuilder.h:87
GeomDetEnumerators::PixelBarrel
Definition: GeomDetEnumerators.h:11
SeedingLayerSetsBuilder::LayerSpec::subdet
GeomDetEnumerators::SubDetector subdet
Definition: SeedingLayerSetsBuilder.h:86
SeedingLayerSetsBuilder::LayerSpec::nameIndex
const unsigned short nameIndex
Definition: SeedingLayerSetsBuilder.h:81
HLTSiStripMonitoring_cff.skipClusters
skipClusters
Definition: HLTSiStripMonitoring_cff.py:177
names
const std::string names[nVars_]
Definition: PhotonIDValueMapProducer.cc:122
str
#define str(s)
Definition: TestProcessor.cc:48
ctfseeding::HitExtractorSTRP
Definition: HitExtractorSTRP.h:23
edm::ParameterSet::exists
bool exists(std::string const &parameterName) const
checks if a parameter exists
Definition: ParameterSet.cc:674
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
SeedingLayerSetsBuilder::LayerSpec::pixelHitProducer
std::string pixelHitProducer
Definition: SeedingLayerSetsBuilder.h:82
SeedingLayerSetsBuilder::nameToEnumId
static SeedingLayerId nameToEnumId(const std::string &name)
Definition: SeedingLayerSetsBuilder.cc:32
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
eostools.move
def move(src, dest)
Definition: eostools.py:511
SeedingLayerSetsBuilder::LayerSpec::extractor
std::unique_ptr< ctfseeding::HitExtractor > extractor
Definition: SeedingLayerSetsBuilder.h:89
SeedingLayerSetsBuilder::LayerSpec::idLayer
int idLayer
Definition: SeedingLayerSetsBuilder.h:88
SeedingLayerSetsBuilder::LayerSpec::usePixelHitProducer
bool usePixelHitProducer
Definition: SeedingLayerSetsBuilder.h:83
GeomDetEnumerators::PixelEndcap
Definition: GeomDetEnumerators.h:12
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
SeedingLayerSetsBuilder::LayerSpec::hitBuilder
const std::string hitBuilder
Definition: SeedingLayerSetsBuilder.h:84
clusterChargeCut
float clusterChargeCut(const edm::ParameterSet &conf, const char *name="clusterChargeCut")
Definition: ClusterChargeCut.h:7
edm::InputTag
Definition: InputTag.h:15
ConversionStep2_cff.useSimpleRphiHitsCleaner
useSimpleRphiHitsCleaner
Definition: ConversionStep2_cff.py:121