CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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::HitExtractor
extractor
 
const std::string hitBuilder
 
const edm::ESGetToken
< TransientTrackingRecHitBuilder,
TransientRecHitRecord
hitBuilderToken
 
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

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, HLT_FULL_cff::skipClusters, subdet, and usePixelHitProducer.

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  }
143  bool useSimpleRphiHitsCleaner =
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 }
constexpr char const * layerName[numberOfLayers]
std::unique_ptr< ctfseeding::HitExtractor > extractor
bool exists(std::string const &parameterName) const
checks if a parameter exists
float clusterChargeCut(const edm::ParameterSet &conf, const char *name="clusterChargeCut")
GeomDetEnumerators::SubDetector subdet
def move
Definition: eostools.py:511
static SeedingLayerId nameToEnumId(const std::string &name)
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
tuple skipClusters
#define LogDebug(id)
const edm::ESGetToken< TransientTrackingRecHitBuilder, TransientRecHitRecord > hitBuilderToken
SeedingLayerSetsBuilder::LayerSpec::~LayerSpec ( )
default
SeedingLayerSetsBuilder::LayerSpec::LayerSpec ( const LayerSpec )
delete
SeedingLayerSetsBuilder::LayerSpec::LayerSpec ( LayerSpec &&  )
default

Member Function Documentation

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

Definition at line 166 of file SeedingLayerSetsBuilder.cc.

References ctfseeding::HitExtractorSTRP::getMinMaxRing(), str, and ctfseeding::HitExtractorSTRP::useRingSelector().

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_]
void useRingSelector(int minRing, int maxRing)
#define str(s)
std::tuple< int, int > getMinMaxRing() const

Member Data Documentation

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

Definition at line 95 of file SeedingLayerSetsBuilder.h.

Referenced by LayerSpec().

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

Definition at line 89 of file SeedingLayerSetsBuilder.h.

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

Definition at line 90 of file SeedingLayerSetsBuilder.h.

int SeedingLayerSetsBuilder::LayerSpec::idLayer

Definition at line 94 of file SeedingLayerSetsBuilder.h.

Referenced by LayerSpec().

const unsigned short SeedingLayerSetsBuilder::LayerSpec::nameIndex

Definition at line 86 of file SeedingLayerSetsBuilder.h.

std::string SeedingLayerSetsBuilder::LayerSpec::pixelHitProducer

Definition at line 87 of file SeedingLayerSetsBuilder.h.

Referenced by LayerSpec().

TrackerDetSide SeedingLayerSetsBuilder::LayerSpec::side

Definition at line 93 of file SeedingLayerSetsBuilder.h.

Referenced by LayerSpec().

GeomDetEnumerators::SubDetector SeedingLayerSetsBuilder::LayerSpec::subdet

Definition at line 92 of file SeedingLayerSetsBuilder.h.

Referenced by LayerSpec().

bool SeedingLayerSetsBuilder::LayerSpec::usePixelHitProducer

Definition at line 88 of file SeedingLayerSetsBuilder.h.

Referenced by LayerSpec().