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("vectorRecHits")) {
137  extr->useVectorHits(cfgLayer.getParameter<edm::InputTag>("vectorRecHits"), iC);
138  }
139  if (cfgLayer.exists("useRingSlector") && cfgLayer.getParameter<bool>("useRingSlector")) {
140  extr->useRingSelector(cfgLayer.getParameter<int>("minRing"), cfgLayer.getParameter<int>("maxRing"));
141  }
143  cfgLayer.exists("useSimpleRphiHitsCleaner") ? cfgLayer.getParameter<bool>("useSimpleRphiHitsCleaner") : true;
144  extr->useSimpleRphiHitsCleaner(useSimpleRphiHitsCleaner);
145 
146  double minAbsZ = cfgLayer.exists("MinAbsZ") ? cfgLayer.getParameter<double>("MinAbsZ") : 0.;
147  if (minAbsZ > 0.) {
148  extr->setMinAbsZ(minAbsZ);
149  }
150  if (skipClusters) {
151  bool useProjection = cfgLayer.exists("useProjection") ? cfgLayer.getParameter<bool>("useProjection") : false;
152  if (useProjection) {
153  LogDebug("SeedingLayerSetsBuilder") << layerName << " will project partially masked matched rechit";
154  } else {
155  extr->setNoProjection();
156  }
157  }
158  extractor = std::move(extr);
159  }
160  if (extractor && skipClusters) {
161  extractor->useSkipClusters(cfgLayer.getParameter<edm::InputTag>("skipClusters"), iC);
162  }
163 }

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 165 of file SeedingLayerSetsBuilder.cc.

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

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:124
str
#define str(s)
Definition: TestProcessor.cc:51
ctfseeding::HitExtractorSTRP
Definition: HitExtractorSTRP.h:24
edm::ParameterSet::exists
bool exists(std::string const &parameterName) const
checks if a parameter exists
Definition: ParameterSet.cc:681
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:223
SeedingLayerSetsBuilder::LayerSpec::pixelHitProducer
std::string pixelHitProducer
Definition: SeedingLayerSetsBuilder.h:82
SeedingLayerSetsBuilder::nameToEnumId
static SeedingLayerId nameToEnumId(const std::string &name)
Definition: SeedingLayerSetsBuilder.cc:32
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
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
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