CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
GenericPairGenerator Class Reference

#include <GenericPairGenerator.h>

Inheritance diagram for GenericPairGenerator:
OrderedHitsGenerator

Public Member Functions

void clear () override
 
 GenericPairGenerator (const edm::ParameterSet &conf, edm::ConsumesCollector &iC)
 
const OrderedSeedingHitsrun (const TrackingRegion &region, const edm::Event &ev, const edm::EventSetup &es) override
 
 ~GenericPairGenerator () override
 
- Public Member Functions inherited from OrderedHitsGenerator
 OrderedHitsGenerator ()
 
virtual ~OrderedHitsGenerator ()
 

Private Attributes

OrderedHitPairs hitPairs
 
edm::EDGetTokenT< SeedingLayerSetsHitstheSeedingLayerToken
 

Additional Inherited Members

- Public Attributes inherited from OrderedHitsGenerator
unsigned int theMaxElement
 

Detailed Description

Definition at line 16 of file GenericPairGenerator.h.

Constructor & Destructor Documentation

◆ GenericPairGenerator()

GenericPairGenerator::GenericPairGenerator ( const edm::ParameterSet conf,
edm::ConsumesCollector iC 
)

Definition at line 9 of file GenericPairGenerator.cc.

11  edm::LogInfo("CtfSpecialSeedGenerator|GenericPairGenerator") << "Constructing GenericPairGenerator";
12 }

◆ ~GenericPairGenerator()

GenericPairGenerator::~GenericPairGenerator ( )
inlineoverride

Definition at line 19 of file GenericPairGenerator.h.

19 {};

Member Function Documentation

◆ clear()

void GenericPairGenerator::clear ( void  )
inlineoverridevirtual

Reimplemented from OrderedHitsGenerator.

Definition at line 21 of file GenericPairGenerator.h.

21 { hitPairs.clear(); }

References hitPairs.

◆ run()

const OrderedSeedingHits & GenericPairGenerator::run ( const TrackingRegion region,
const edm::Event ev,
const edm::EventSetup es 
)
overridevirtual

Implements OrderedHitsGenerator.

Definition at line 14 of file GenericPairGenerator.cc.

16  {
17  hitPairs.clear();
18  hitPairs.reserve(0);
20  e.getByToken(theSeedingLayerToken, hlayers);
21  const SeedingLayerSetsHits& layers = *hlayers;
22  if (layers.numberOfLayersInSet() != 2)
23  throw cms::Exception("CtfSpecialSeedGenerator")
24  << "You are using " << layers.numberOfLayersInSet() << " layers in set instead of 2 ";
25 
27  auto innerHits = region.hits(es, ls[0]);
28  auto outerHits = region.hits(es, ls[1]);
29  for (auto iOuterHit = outerHits.begin(); iOuterHit != outerHits.end(); iOuterHit++) {
30  for (auto iInnerHit = innerHits.begin(); iInnerHit != innerHits.end(); iInnerHit++) {
31  hitPairs.push_back(OrderedHitPair(&(**iInnerHit), &(**iOuterHit)));
32  }
33  }
34  }
35  return hitPairs;
36 }

References MillePedeFileConverter_cfg::e, hitPairs, hgcalTopologyTester_cfi::layers, eostools::ls(), HLT_FULL_cff::region, and theSeedingLayerToken.

Member Data Documentation

◆ hitPairs

OrderedHitPairs GenericPairGenerator::hitPairs
private

Definition at line 25 of file GenericPairGenerator.h.

Referenced by clear(), and run().

◆ theSeedingLayerToken

edm::EDGetTokenT<SeedingLayerSetsHits> GenericPairGenerator::theSeedingLayerToken
private

Definition at line 24 of file GenericPairGenerator.h.

Referenced by run().

eostools.ls
def ls(path, rec=False)
Definition: eostools.py:349
SeedingLayerSetsHits
Definition: SeedingLayerSetsHits.h:18
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
edm::Handle
Definition: AssociativeIterator.h:50
GenericPairGenerator::theSeedingLayerToken
edm::EDGetTokenT< SeedingLayerSetsHits > theSeedingLayerToken
Definition: GenericPairGenerator.h:24
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:55
GenericPairGenerator::hitPairs
OrderedHitPairs hitPairs
Definition: GenericPairGenerator.h:25
HLT_FULL_cff.region
region
Definition: HLT_FULL_cff.py:88286
SeedingLayerSetsHits::SeedingLayerSet
Definition: SeedingLayerSetsHits.h:65
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
cms::Exception
Definition: Exception.h:70
OrderedHitPair
Definition: OrderedHitPair.h:6
edm::InputTag
Definition: InputTag.h:15
hgcalTopologyTester_cfi.layers
layers
Definition: hgcalTopologyTester_cfi.py:8
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37