CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
SeedingLayerSetsBuilder Class Reference

#include <SeedingLayerSetsBuilder.h>

Classes

struct  LayerSpec
 

Public Types

typedef unsigned short LayerSetIndex
 
using SeedingLayerId = std::tuple< GeomDetEnumerators::SubDetector, ctfseeding::SeedingLayer::Side, int >
 

Public Member Functions

bool check (const edm::EventSetup &es)
 
void hits (const edm::Event &ev, const edm::EventSetup &es, std::vector< unsigned int > &indices, ctfseeding::SeedingLayer::Hits &hits) const
 
const std::vector< const DetLayer * > & layerDets () const
 
const std::vector< std::string > & layerNames () const
 
ctfseeding::SeedingLayerSets layers (const edm::EventSetup &es)
 
const std::vector< LayerSetIndex > & layerSetIndices () const
 
std::unique_ptr< SeedingLayerSetsHitsmakeSeedingLayerSetsHitsforFastSim (const edm::Event &ev, const edm::EventSetup &es)
 
unsigned short numberOfLayers () const
 
unsigned short numberOfLayersInSet () const
 
 SeedingLayerSetsBuilder ()=default
 
 SeedingLayerSetsBuilder (const edm::ParameterSet &cfg, edm::ConsumesCollector &iC, const edm::InputTag &fastsimHitTag)
 
 SeedingLayerSetsBuilder (const edm::ParameterSet &cfg, edm::ConsumesCollector &iC)
 
 SeedingLayerSetsBuilder (const edm::ParameterSet &cfg, edm::ConsumesCollector &&iC)
 
void updateEventSetup (const edm::EventSetup &es)
 
 ~SeedingLayerSetsBuilder ()
 

Static Public Member Functions

static std::vector< std::vector< std::string > > layerNamesInSets (const std::vector< std::string > &namesPSet)
 
static SeedingLayerId nameToEnumId (const std::string &name)
 

Private Member Functions

edm::ParameterSet layerConfig (const std::string &nameLayer, const edm::ParameterSet &cfg) const
 

Private Attributes

edm::EDGetTokenT< FastTrackerRecHitCollectionfastSimrecHitsToken_
 
edm::ESWatcher< TrackerRecoGeometryRecordgeometryWatcher_
 
std::vector< const DetLayer * > theLayerDets
 
std::vector< std::string > theLayerNames
 
std::vector< LayerSpectheLayers
 
std::vector< LayerSetIndextheLayerSetIndices
 
unsigned short theNumberOfLayersInSet
 
std::vector< const TransientTrackingRecHitBuilder * > theTTRHBuilders
 
edm::ESWatcher< TransientRecHitRecordtrhWatcher_
 

Detailed Description

Definition at line 23 of file SeedingLayerSetsBuilder.h.

Member Typedef Documentation

Definition at line 38 of file SeedingLayerSetsBuilder.h.

Definition at line 49 of file SeedingLayerSetsBuilder.h.

Constructor & Destructor Documentation

SeedingLayerSetsBuilder::SeedingLayerSetsBuilder ( )
default
SeedingLayerSetsBuilder::SeedingLayerSetsBuilder ( const edm::ParameterSet cfg,
edm::ConsumesCollector iC,
const edm::InputTag fastsimHitTag 
)

Definition at line 184 of file SeedingLayerSetsBuilder.cc.

References edm::ConsumesCollector::consumes(), and fastSimrecHitsToken_.

184  :
185  SeedingLayerSetsBuilder(cfg, iC)
186 {
188 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
SeedingLayerSetsBuilder()=default
edm::EDGetTokenT< FastTrackerRecHitCollection > fastSimrecHitsToken_
SeedingLayerSetsBuilder::SeedingLayerSetsBuilder ( const edm::ParameterSet cfg,
edm::ConsumesCollector iC 
)

Definition at line 193 of file SeedingLayerSetsBuilder.cc.

References Exception, spr::find(), runEdmFileComparison::found, edm::ParameterSet::getParameter(), layerConfig(), layerNamesInSets(), SiStripPI::max, harvestTrackValidationPlots::str, AlCaHLTBitMon_QueryRunRegistry::string, theLayerDets, theLayerNames, theLayers, theLayerSetIndices, theNumberOfLayersInSet, and theTTRHBuilders.

194 {
195  std::vector<std::string> namesPset = cfg.getParameter<std::vector<std::string> >("layerList");
196  std::vector<std::vector<std::string> > layerNamesInSets = this->layerNamesInSets(namesPset);
197  // debug printout of layers
198  typedef std::vector<std::string>::const_iterator IS;
199  typedef std::vector<std::vector<std::string> >::const_iterator IT;
200  std::ostringstream str;
201  // The following should not be set to cout
202 // for (IT it = layerNamesInSets.begin(); it != layerNamesInSets.end(); it++) {
203 // str << "SET: ";
204 // for (IS is = it->begin(); is != it->end(); is++) str << *is <<" ";
205 // str << std::endl;
206 // }
207 // std::cout << str.str() << std::endl;
208  if(layerNamesInSets.empty())
210  else
211  theNumberOfLayersInSet = layerNamesInSets[0].size();
212 
213 
214  for (IT it = layerNamesInSets.begin(); it != layerNamesInSets.end(); it++) {
215  if(it->size() != theNumberOfLayersInSet)
216  throw cms::Exception("Configuration") << "Assuming all SeedingLayerSets to have same number of layers. LayerSet " << (it-layerNamesInSets.begin()) << " has " << it->size() << " while 0th has " << theNumberOfLayersInSet;
217  for(const std::string& layerName: *it) {
218  auto found = std::find(theLayerNames.begin(), theLayerNames.end(), layerName);
219  unsigned short layerIndex = 0;
220  if(found != theLayerNames.end()) {
221  layerIndex = found-theLayerNames.begin();
222  }
223  else {
225  throw cms::Exception("Assert") << "Too many layers in " << __FILE__ << ":" << __LINE__ << ", we may have to enlarge the index type from unsigned short to unsigned int";
226  }
227 
228  layerIndex = theLayers.size();
229  theLayers.emplace_back(theLayerNames.size(), layerName, layerConfig(layerName, cfg), iC);
230  theLayerNames.push_back(layerName);
231  }
232  theLayerSetIndices.push_back(layerIndex);
233  }
234  }
235  theLayerDets.resize(theLayers.size());
236  theTTRHBuilders.resize(theLayers.size());
237 
238  // debug printout
239  // The following should not be set to cout
240  //for(const LayerSpec& layer: theLayers) {
241  // std::cout << layer.print(theLayerNames) << std::endl;
242  //}
243 }
T getParameter(std::string const &) const
std::vector< LayerSpec > theLayers
std::vector< std::string > theLayerNames
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
std::vector< const TransientTrackingRecHitBuilder * > theTTRHBuilders
std::vector< LinkConnSpec >::const_iterator IT
std::vector< LayerSetIndex > theLayerSetIndices
edm::ParameterSet layerConfig(const std::string &nameLayer, const edm::ParameterSet &cfg) const
std::vector< const DetLayer * > theLayerDets
static std::vector< std::vector< std::string > > layerNamesInSets(const std::vector< std::string > &namesPSet)
SeedingLayerSetsBuilder::SeedingLayerSetsBuilder ( const edm::ParameterSet cfg,
edm::ConsumesCollector &&  iC 
)

Definition at line 190 of file SeedingLayerSetsBuilder.cc.

190  :
191  SeedingLayerSetsBuilder(cfg, iC)
192 {}
SeedingLayerSetsBuilder()=default
SeedingLayerSetsBuilder::~SeedingLayerSetsBuilder ( )

Definition at line 245 of file SeedingLayerSetsBuilder.cc.

245 {}

Member Function Documentation

bool SeedingLayerSetsBuilder::check ( const edm::EventSetup es)

Definition at line 362 of file SeedingLayerSetsBuilder.cc.

References edm::ESWatcher< T >::check(), geometryWatcher_, and trhWatcher_.

Referenced by SeedingLayersEDProducer::produce().

362  {
363  // We want to evaluate both in the first invocation (to properly
364  // initialize ESWatcher), and this way we avoid one branch compared
365  // to || (should be tiny effect)
366  return geometryWatcher_.check(es) | trhWatcher_.check(es);
367 }
edm::ESWatcher< TrackerRecoGeometryRecord > geometryWatcher_
edm::ESWatcher< TransientRecHitRecord > trhWatcher_
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:57
void SeedingLayerSetsBuilder::hits ( const edm::Event ev,
const edm::EventSetup es,
std::vector< unsigned int > &  indices,
ctfseeding::SeedingLayer::Hits hits 
) const

Definition at line 371 of file SeedingLayerSetsBuilder.cc.

References mps_fire::i, eostools::move(), theLayers, theTTRHBuilders, and tmp.

Referenced by ntupleDataFormat._TrackingParticleMatchAdaptor::bestMatchingTrackingParticle(), and SeedingLayersEDProducer::produce().

372  {
373  indices.reserve(theLayers.size());
374  for(unsigned int i=0; i<theLayers.size(); ++i) {
375  // The index of the first hit of this layer
376  indices.push_back(hits.size());
377 
378  // Obtain and copy the hits
380  std::move(tmp.begin(), tmp.end(), std::back_inserter(hits));
381  }
382 }
std::vector< LayerSpec > theLayers
std::vector< HitPointer > Hits
Definition: SeedingLayer.h:28
std::vector< const TransientTrackingRecHitBuilder * > theTTRHBuilders
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
void hits(const edm::Event &ev, const edm::EventSetup &es, std::vector< unsigned int > &indices, ctfseeding::SeedingLayer::Hits &hits) const
def move(src, dest)
Definition: eostools.py:510
edm::ParameterSet SeedingLayerSetsBuilder::layerConfig ( const std::string &  nameLayer,
const edm::ParameterSet cfg 
) const
private

Definition at line 247 of file SeedingLayerSetsBuilder.cc.

References edm::ParameterSet::exists(), edm::ParameterSet::getParameter(), dataset::name, and mps_fire::result.

Referenced by SeedingLayerSetsBuilder().

248 {
250 
251  for (string::size_type iEnd=nameLayer.size(); iEnd > 0; --iEnd) {
252  string name = nameLayer.substr(0,iEnd);
253  if (cfg.exists(name)) return cfg.getParameter<edm::ParameterSet>(name);
254  }
255  edm::LogError("SeedingLayerSetsBuilder") <<"configuration for layer: "<<nameLayer<<" not found, job will probably crash!";
256  return result;
257 }
T getParameter(std::string const &) const
bool exists(std::string const &parameterName) const
checks if a parameter exists
uint16_t size_type
const std::vector<const DetLayer *>& SeedingLayerSetsBuilder::layerDets ( ) const
inline

Definition at line 44 of file SeedingLayerSetsBuilder.h.

References ev, and hfClusterShapes_cfi::hits.

Referenced by SeedingLayersEDProducer::produce().

44 { return theLayerDets; }
std::vector< const DetLayer * > theLayerDets
const std::vector<std::string>& SeedingLayerSetsBuilder::layerNames ( ) const
inline

Definition at line 43 of file SeedingLayerSetsBuilder.h.

Referenced by SeedingLayersEDProducer::produce().

43 { return theLayerNames; }
std::vector< std::string > theLayerNames
vector< vector< string > > SeedingLayerSetsBuilder::layerNamesInSets ( const std::vector< std::string > &  namesPSet)
static

Definition at line 259 of file SeedingLayerSetsBuilder.cc.

References geometryCSVtoXML::line, and mps_fire::result.

Referenced by MTVHistoProducerAlgoForTracker::MTVHistoProducerAlgoForTracker(), and SeedingLayerSetsBuilder().

260 {
261  std::vector<std::vector<std::string> > result;
262  for (std::vector<std::string>::const_iterator is=namesPSet.begin(); is < namesPSet.end(); ++is) {
263  vector<std::string> layersInSet;
264  string line = *is;
266  while (pos != string::npos ) {
267  pos=line.find("+");
268  string layer = line.substr(0,pos);
269  layersInSet.push_back(layer);
270  line=line.substr(pos+1,string::npos);
271  }
272  result.push_back(layersInSet);
273  }
274  return result;
275 }
uint16_t size_type
SeedingLayerSets SeedingLayerSetsBuilder::layers ( const edm::EventSetup es)

Definition at line 341 of file SeedingLayerSetsBuilder.cc.

References SeedingLayerSetsBuilder::LayerSpec::extractor, mps_fire::i, gen::n, mps_fire::result, theLayerDets, theLayerNames, theLayers, theLayerSetIndices, theNumberOfLayersInSet, theTTRHBuilders, and updateEventSetup().

342 {
343  updateEventSetup(es);
344 
345  typedef std::vector<SeedingLayer> Set;
347 
348  for(size_t i=0, n=theLayerSetIndices.size(); i<n; i += theNumberOfLayersInSet) {
349  Set set;
350  for(size_t j=0; j<theNumberOfLayersInSet; ++j) {
351  const unsigned short layerIndex = theLayerSetIndices[i+j];
352  const LayerSpec& layer = theLayers[layerIndex];
353  const DetLayer *detLayer = theLayerDets[layerIndex];
354 
355  set.push_back( SeedingLayer( theLayerNames[layerIndex], layerIndex, detLayer, theTTRHBuilders[layerIndex], layer.extractor.get()));
356  }
357  result.push_back(set);
358  }
359  return result;
360 }
std::vector< LayerSpec > theLayers
std::vector< std::string > theLayerNames
std::vector< const TransientTrackingRecHitBuilder * > theTTRHBuilders
void updateEventSetup(const edm::EventSetup &es)
std::vector< LayerSetIndex > theLayerSetIndices
std::vector< const DetLayer * > theLayerDets
std::vector< std::vector< SeedingLayer > > SeedingLayerSets
const std::vector<LayerSetIndex>& SeedingLayerSetsBuilder::layerSetIndices ( ) const
inline

Definition at line 40 of file SeedingLayerSetsBuilder.h.

Referenced by SeedingLayersEDProducer::produce().

40 { return theLayerSetIndices; }
std::vector< LayerSetIndex > theLayerSetIndices
std::unique_ptr< SeedingLayerSetsHits > SeedingLayerSetsBuilder::makeSeedingLayerSetsHitsforFastSim ( const edm::Event ev,
const edm::EventSetup es 
)

Definition at line 385 of file SeedingLayerSetsBuilder.cc.

References b, RecoMuonCosmics_cff::Barrel, TrackingRecHit::clone(), fastSimrecHitsToken_, edm::EventSetup::get(), edm::Event::getByToken(), GeomDetEnumerators::invalidDet, PixelSubdetector::PixelBarrel, GeomDetEnumerators::PixelBarrel, PixelSubdetector::PixelEndcap, GeomDetEnumerators::PixelEndcap, edm::ESHandle< T >::product(), TrackerTopology::pxbLayer(), TrackerTopology::pxfDisk(), TrackerTopology::pxfSide(), theLayerDets, theLayerNames, theLayers, theLayerSetIndices, theNumberOfLayersInSet, and updateEventSetup().

385  {
386  updateEventSetup(es);
387 
389  ev.getByToken(fastSimrecHitsToken_,fastSimrechits_); //using FastSim RecHits
390  edm::ESHandle<TrackerTopology> trackerTopology;
391  es.get<TrackerTopologyRcd>().get(trackerTopology);
392  const TrackerTopology* const tTopo = trackerTopology.product();
394 
395  auto ret = std::make_unique<SeedingLayerSetsHits>(theNumberOfLayersInSet,
397  &theLayerNames,
398  theLayerDets);
399 
400  std::vector<unsigned int> indices;
401  indices.reserve(theLayers.size());
402 
403  for(auto& layer: theLayers) {
404  indices.push_back(layerhits_.size());
405  for(auto &rh : *fastSimrechits_){
408  int idLayer = 0;
409  if( (rh.det()->geographicalId()).subdetId() == PixelSubdetector::PixelBarrel){
411  side = SeedingLayer::Barrel;
412  idLayer = tTopo->pxbLayer(rh.det()->geographicalId());
413  }
414  else if ((rh.det()->geographicalId()).subdetId() == PixelSubdetector::PixelEndcap){
416  idLayer = tTopo->pxfDisk(rh.det()->geographicalId());
417  if(tTopo->pxfSide(rh.det()->geographicalId())==1)
418  side = SeedingLayer::NegEndcap;
419  else
420  side = SeedingLayer::PosEndcap;
421  }
422 
423  if(layer.subdet == subdet && layer.side == side && layer.idLayer == idLayer){
424  BaseTrackerRecHit const & b(rh);
425  auto ptrHit = (BaseTrackerRecHit *)(b.clone());
426  layerhits_.emplace_back(ptrHit);
427  }
428  else continue;
429  }
430  }
431  layerhits_.shrink_to_fit();
432  ret->swapHits(indices, layerhits_);
433  return ret;
434 }
std::vector< LayerSpec > theLayers
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:508
edm::EDGetTokenT< FastTrackerRecHitCollection > fastSimrecHitsToken_
std::vector< std::string > theLayerNames
unsigned int pxfDisk(const DetId &id) const
std::vector< HitPointer > Hits
Definition: SeedingLayer.h:28
void updateEventSetup(const edm::EventSetup &es)
unsigned int pxbLayer(const DetId &id) const
std::vector< LayerSetIndex > theLayerSetIndices
const T & get() const
Definition: EventSetup.h:55
double b
Definition: hdecay.h:120
unsigned int pxfSide(const DetId &id) const
T const * product() const
Definition: ESHandle.h:86
std::vector< const DetLayer * > theLayerDets
SeedingLayerSetsBuilder::SeedingLayerId SeedingLayerSetsBuilder::nameToEnumId ( const std::string &  name)
static

Definition at line 33 of file SeedingLayerSetsBuilder.cc.

References ctfseeding::SeedingLayer::Barrel, diffTreeTool::index, GeomDetEnumerators::invalidDet, ctfseeding::SeedingLayer::NegEndcap, GeomDetEnumerators::PixelBarrel, GeomDetEnumerators::PixelEndcap, ctfseeding::SeedingLayer::PosEndcap, GeomDetEnumerators::TEC, GeomDetEnumerators::TIB, GeomDetEnumerators::TID, and GeomDetEnumerators::TOB.

Referenced by SeedingLayerSetsBuilder::LayerSpec::LayerSpec(), and MTVHistoProducerAlgoForTracker::MTVHistoProducerAlgoForTracker().

33  {
36  int idLayer = 0;
37 
38  size_t index;
39  //
40  // BPIX
41  //
42  if ((index = name.find("BPix")) != string::npos) {
44  side = SeedingLayer::Barrel;
45  idLayer = atoi(name.substr(index+4,1).c_str());
46  }
47  //
48  // FPIX
49  //
50  else if ((index = name.find("FPix")) != string::npos) {
52  idLayer = atoi(name.substr(index+4).c_str());
53  if ( name.find("pos") != string::npos ) {
54  side = SeedingLayer::PosEndcap;
55  } else {
56  side = SeedingLayer::NegEndcap;
57  }
58  }
59  //
60  // TIB
61  //
62  else if ((index = name.find("TIB")) != string::npos) {
63  subdet = GeomDetEnumerators::TIB;
64  side = SeedingLayer::Barrel;
65  idLayer = atoi(name.substr(index+3,1).c_str());
66  }
67  //
68  // TID
69  //
70  else if ((index = name.find("TID")) != string::npos) {
71  subdet = GeomDetEnumerators::TID;
72  idLayer = atoi(name.substr(index+3,1).c_str());
73  if ( name.find("pos") != string::npos ) {
74  side = SeedingLayer::PosEndcap;
75  } else {
76  side = SeedingLayer::NegEndcap;
77  }
78  }
79  //
80  // TOB
81  //
82  else if ((index = name.find("TOB")) != string::npos) {
83  subdet = GeomDetEnumerators::TOB;
84  side = SeedingLayer::Barrel;
85  idLayer = atoi(name.substr(index+3,1).c_str());
86  }
87  //
88  // TEC
89  //
90  else if ((index = name.find("TEC")) != string::npos) {
91  subdet = GeomDetEnumerators::TEC;
92  idLayer = atoi(name.substr(index+3,1).c_str());
93  if ( name.find("pos") != string::npos ) {
94  side = SeedingLayer::PosEndcap;
95  } else {
96  side = SeedingLayer::NegEndcap;
97  }
98  }
99  return std::make_tuple(subdet, side, idLayer);
100 }
unsigned short SeedingLayerSetsBuilder::numberOfLayers ( ) const
inline

Definition at line 42 of file SeedingLayerSetsBuilder.h.

42 { return theLayers.size(); }
std::vector< LayerSpec > theLayers
unsigned short SeedingLayerSetsBuilder::numberOfLayersInSet ( ) const
inline

Definition at line 39 of file SeedingLayerSetsBuilder.h.

Referenced by SeedingLayersEDProducer::produce().

39 { return theNumberOfLayersInSet; }
void SeedingLayerSetsBuilder::updateEventSetup ( const edm::EventSetup es)

Definition at line 277 of file SeedingLayerSetsBuilder.cc.

References GeometricSearchTracker::barrelLayers(), Exception, edm::EventSetup::get(), SeedingLayerSetsBuilder::LayerSpec::hitBuilder, mps_fire::i, SeedingLayerSetsBuilder::LayerSpec::idLayer, diffTreeTool::index, gen::n, SeedingLayerSetsBuilder::LayerSpec::nameIndex, GeometricSearchTracker::negForwardLayers(), GeometricSearchTracker::negTecLayers(), GeometricSearchTracker::negTidLayers(), GeomDetEnumerators::PixelBarrel, GeomDetEnumerators::PixelEndcap, GeometricSearchTracker::posForwardLayers(), GeometricSearchTracker::posTecLayers(), GeometricSearchTracker::posTidLayers(), edm::ESHandle< T >::product(), SeedingLayerSetsBuilder::LayerSpec::side, SeedingLayerSetsBuilder::LayerSpec::subdet, GeomDetEnumerators::TEC, theLayerDets, theLayerNames, theLayers, theTTRHBuilders, GeomDetEnumerators::TIB, GeometricSearchTracker::tibLayers(), GeomDetEnumerators::TID, GeomDetEnumerators::TOB, GeometricSearchTracker::tobLayers(), and mixOne_simraw_on_sim_cfi::tracker.

Referenced by layers(), makeSeedingLayerSetsHitsforFastSim(), and SeedingLayersEDProducer::produce().

277  {
279  es.get<TrackerRecoGeometryRecord>().get( htracker );
280  const GeometricSearchTracker& tracker = *htracker;
281 
282  const std::vector<BarrelDetLayer const*>& bpx = tracker.barrelLayers();
283  const std::vector<BarrelDetLayer const*>& tib = tracker.tibLayers();
284  const std::vector<BarrelDetLayer const*>& tob = tracker.tobLayers();
285 
286  const std::vector<ForwardDetLayer const*>& fpx_pos = tracker.posForwardLayers();
287  const std::vector<ForwardDetLayer const*>& tid_pos = tracker.posTidLayers();
288  const std::vector<ForwardDetLayer const*>& tec_pos = tracker.posTecLayers();
289 
290  const std::vector<ForwardDetLayer const*>& fpx_neg = tracker.negForwardLayers();
291  const std::vector<ForwardDetLayer const*>& tid_neg = tracker.negTidLayers();
292  const std::vector<ForwardDetLayer const*>& tec_neg = tracker.negTecLayers();
293 
294  for(size_t i=0, n=theLayers.size(); i<n; ++i) {
295  const LayerSpec& layer = theLayers[i];
296  const DetLayer * detLayer = nullptr;
297  int index = layer.idLayer-1;
298 
299  if (layer.subdet == GeomDetEnumerators::PixelBarrel) {
300  detLayer = bpx[index];
301  }
302  else if (layer.subdet == GeomDetEnumerators::PixelEndcap) {
303  if (layer.side == SeedingLayer::PosEndcap) {
304  detLayer = fpx_pos[index];
305  } else {
306  detLayer = fpx_neg[index];
307  }
308  }
309  else if (layer.subdet == GeomDetEnumerators::TIB) {
310  detLayer = tib[index];
311  }
312  else if (layer.subdet == GeomDetEnumerators::TID) {
313  if (layer.side == SeedingLayer::PosEndcap) {
314  detLayer = tid_pos[index];
315  } else {
316  detLayer = tid_neg[index];
317  }
318  }
319  else if (layer.subdet == GeomDetEnumerators::TOB) {
320  detLayer = tob[index];
321  }
322  else if (layer.subdet == GeomDetEnumerators::TEC) {
323  if (layer.side == SeedingLayer::PosEndcap) {
324  detLayer = tec_pos[index];
325  } else {
326  detLayer = tec_neg[index];
327  }
328  }
329  else {
330  throw cms::Exception("Configuration") << "Did not find DetLayer for layer " << theLayerNames[layer.nameIndex];
331  }
332 
334  es.get<TransientRecHitRecord>().get(layer.hitBuilder, builder);
335 
336  theLayerDets[i] = detLayer;
337  theTTRHBuilders[i] = builder.product();
338  }
339 }
std::vector< ForwardDetLayer const * > const & posForwardLayers() const
std::vector< LayerSpec > theLayers
std::vector< std::string > theLayerNames
std::vector< BarrelDetLayer const * > const & tobLayers() const
std::vector< const TransientTrackingRecHitBuilder * > theTTRHBuilders
std::vector< ForwardDetLayer const * > const & negForwardLayers() const
std::vector< BarrelDetLayer const * > const & tibLayers() const
std::vector< ForwardDetLayer const * > const & posTecLayers() const
const T & get() const
Definition: EventSetup.h:55
std::vector< ForwardDetLayer const * > const & negTidLayers() const
std::vector< ForwardDetLayer const * > const & posTidLayers() const
std::vector< ForwardDetLayer const * > const & negTecLayers() const
T const * product() const
Definition: ESHandle.h:86
std::vector< const DetLayer * > theLayerDets
std::vector< BarrelDetLayer const * > const & barrelLayers() const

Member Data Documentation

edm::EDGetTokenT<FastTrackerRecHitCollection> SeedingLayerSetsBuilder::fastSimrecHitsToken_
private
edm::ESWatcher<TrackerRecoGeometryRecord> SeedingLayerSetsBuilder::geometryWatcher_
private

Definition at line 56 of file SeedingLayerSetsBuilder.h.

Referenced by check().

std::vector<const DetLayer *> SeedingLayerSetsBuilder::theLayerDets
private
std::vector<std::string> SeedingLayerSetsBuilder::theLayerNames
private
std::vector<LayerSpec> SeedingLayerSetsBuilder::theLayers
private
std::vector<LayerSetIndex> SeedingLayerSetsBuilder::theLayerSetIndices
private
unsigned short SeedingLayerSetsBuilder::theNumberOfLayersInSet
private
std::vector<const TransientTrackingRecHitBuilder *> SeedingLayerSetsBuilder::theTTRHBuilders
private

Definition at line 78 of file SeedingLayerSetsBuilder.h.

Referenced by hits(), layers(), SeedingLayerSetsBuilder(), and updateEventSetup().

edm::ESWatcher<TransientRecHitRecord> SeedingLayerSetsBuilder::trhWatcher_
private

Definition at line 57 of file SeedingLayerSetsBuilder.h.

Referenced by check().