CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
CombinedHitPairGeneratorForPhotonConversion Class Reference

#include <CombinedHitPairGeneratorForPhotonConversion.h>

Inheritance diagram for CombinedHitPairGeneratorForPhotonConversion:
HitPairGenerator OrderedHitsGenerator

Public Types

typedef LayerHitMapCache LayerCacheType
 

Public Member Functions

void clearLayerCache ()
 
virtual
CombinedHitPairGeneratorForPhotonConversion
clone () const
 from base class More...
 
 CombinedHitPairGeneratorForPhotonConversion (const edm::ParameterSet &cfg, edm::ConsumesCollector &iC)
 
virtual void hitPairs (const TrackingRegion &, OrderedHitPairs &, const edm::Event &, const edm::EventSetup &)
 form base class More...
 
void hitPairs (const ConversionRegion &convRegion, const TrackingRegion &reg, OrderedHitPairs &result, const edm::Event &ev, const edm::EventSetup &es)
 
const OrderedHitPairsrun (const ConversionRegion &convRegion, const TrackingRegion &region, const edm::Event &ev, const edm::EventSetup &es)
 
void setSeedingLayers (SeedingLayerSetsHits::SeedingLayerSet layers) override
 
virtual ~CombinedHitPairGeneratorForPhotonConversion ()
 
- Public Member Functions inherited from HitPairGenerator
virtual void clear ()
 
virtual HitDoublets doublets (const TrackingRegion &reg, const edm::Event &ev, const edm::EventSetup &es)
 
 HitPairGenerator (unsigned int size=7500)
 
virtual void hitPairs (const TrackingRegion &reg, OrderedHitPairs &prs, const edm::EventSetup &es)
 
virtual const OrderedHitPairsrun (const TrackingRegion &region, const edm::Event &ev, const edm::EventSetup &es)
 
virtual ~HitPairGenerator ()
 
- Public Member Functions inherited from OrderedHitsGenerator
 OrderedHitsGenerator ()
 
virtual ~OrderedHitsGenerator ()
 

Private Member Functions

 CombinedHitPairGeneratorForPhotonConversion (const CombinedHitPairGeneratorForPhotonConversion &cb)
 

Private Attributes

uint32_t maxHitPairsPerTrackAndGenerator
 
std::unique_ptr
< HitPairGeneratorFromLayerPairForPhotonConversion
theGenerator
 
LayerCacheType theLayerCache
 
OrderedHitPairs thePairs
 
edm::EDGetTokenT
< SeedingLayerSetsHits
theSeedingLayerToken
 

Additional Inherited Members

- Public Attributes inherited from OrderedHitsGenerator
unsigned int theMaxElement
 

Detailed Description

Hides set of HitPairGeneratorFromLayerPairForPhotonConversion generators.

Definition at line 24 of file CombinedHitPairGeneratorForPhotonConversion.h.

Member Typedef Documentation

Constructor & Destructor Documentation

CombinedHitPairGeneratorForPhotonConversion::CombinedHitPairGeneratorForPhotonConversion ( const edm::ParameterSet cfg,
edm::ConsumesCollector iC 
)

Definition at line 7 of file CombinedHitPairGeneratorForPhotonConversion.cc.

References edm::ParameterSet::getParameter(), maxHitPairsPerTrackAndGenerator, theGenerator, theLayerCache, and OrderedHitsGenerator::theMaxElement.

Referenced by clone().

7  :
9 {
10  theMaxElement = cfg.getParameter<unsigned int>("maxElement");
11  maxHitPairsPerTrackAndGenerator = cfg.getParameter<unsigned int>("maxHitPairsPerTrackAndGenerator");
12  theGenerator.reset(new HitPairGeneratorFromLayerPairForPhotonConversion(0, 1, &theLayerCache, 0, maxHitPairsPerTrackAndGenerator));
13 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
std::unique_ptr< HitPairGeneratorFromLayerPairForPhotonConversion > theGenerator
CombinedHitPairGeneratorForPhotonConversion::~CombinedHitPairGeneratorForPhotonConversion ( )
virtual

Definition at line 24 of file CombinedHitPairGeneratorForPhotonConversion.cc.

24 {}
CombinedHitPairGeneratorForPhotonConversion::CombinedHitPairGeneratorForPhotonConversion ( const CombinedHitPairGeneratorForPhotonConversion cb)
private

Member Function Documentation

void CombinedHitPairGeneratorForPhotonConversion::clearLayerCache ( )
inline
virtual CombinedHitPairGeneratorForPhotonConversion* CombinedHitPairGeneratorForPhotonConversion::clone ( void  ) const
inlinevirtual

from base class

Implements HitPairGenerator.

Definition at line 38 of file CombinedHitPairGeneratorForPhotonConversion.h.

References CombinedHitPairGeneratorForPhotonConversion().

39  { return new CombinedHitPairGeneratorForPhotonConversion(*this); }
CombinedHitPairGeneratorForPhotonConversion(const edm::ParameterSet &cfg, edm::ConsumesCollector &iC)
virtual void CombinedHitPairGeneratorForPhotonConversion::hitPairs ( const TrackingRegion ,
OrderedHitPairs ,
const edm::Event ,
const edm::EventSetup  
)
inlinevirtual

form base class

Implements HitPairGenerator.

Definition at line 35 of file CombinedHitPairGeneratorForPhotonConversion.h.

Referenced by run().

35 {};
void CombinedHitPairGeneratorForPhotonConversion::hitPairs ( const ConversionRegion convRegion,
const TrackingRegion reg,
OrderedHitPairs result,
const edm::Event ev,
const edm::EventSetup es 
)

Definition at line 40 of file CombinedHitPairGeneratorForPhotonConversion.cc.

References edm::Event::getByToken(), i, maxHitPairsPerTrackAndGenerator, theGenerator, and theSeedingLayerToken.

44 {
46  ev.getByToken(theSeedingLayerToken, hlayers);
47  assert(hlayers->numberOfLayersInSet() == 2);
48 
49  OrderedHitPairs resultTmp; // why is this needed?
50  resultTmp.reserve(maxHitPairsPerTrackAndGenerator);
51  for(SeedingLayerSetsHits::LayerSetIndex i=0; i<hlayers->size(); ++i) {
52  resultTmp.clear();
53  theGenerator->setSeedingLayers((*hlayers)[i]);
54  theGenerator->hitPairs( convRegion, region, resultTmp, ev, es); // why resultTmp and not result?
55  result.insert(result.end(),resultTmp.begin(),resultTmp.end());
56  }
57 
58  //theLayerCache.clear(); //Don't want to clear now, because have to loop on all the tracks. will be cleared later, calling a specific method
59 }
int i
Definition: DBlmapReader.cc:9
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
unsigned short LayerSetIndex
std::unique_ptr< HitPairGeneratorFromLayerPairForPhotonConversion > theGenerator
const OrderedHitPairs & CombinedHitPairGeneratorForPhotonConversion::run ( const ConversionRegion convRegion,
const TrackingRegion region,
const edm::Event ev,
const edm::EventSetup es 
)

Definition at line 30 of file CombinedHitPairGeneratorForPhotonConversion.cc.

References hitPairs(), and thePairs.

33 {
34  thePairs.clear();
35  hitPairs(convRegion, region, thePairs, ev, es);
36  return thePairs;
37 }
virtual void hitPairs(const TrackingRegion &, OrderedHitPairs &, const edm::Event &, const edm::EventSetup &)
form base class
void CombinedHitPairGeneratorForPhotonConversion::setSeedingLayers ( SeedingLayerSetsHits::SeedingLayerSet  layers)
overridevirtual

Implements HitPairGenerator.

Definition at line 26 of file CombinedHitPairGeneratorForPhotonConversion.cc.

26  {
27  assert(0 == "not implemented");
28 }

Member Data Documentation

uint32_t CombinedHitPairGeneratorForPhotonConversion::maxHitPairsPerTrackAndGenerator
private
std::unique_ptr<HitPairGeneratorFromLayerPairForPhotonConversion> CombinedHitPairGeneratorForPhotonConversion::theGenerator
private
LayerCacheType CombinedHitPairGeneratorForPhotonConversion::theLayerCache
private
OrderedHitPairs CombinedHitPairGeneratorForPhotonConversion::thePairs
private

Definition at line 63 of file CombinedHitPairGeneratorForPhotonConversion.h.

Referenced by run().

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

Definition at line 56 of file CombinedHitPairGeneratorForPhotonConversion.h.

Referenced by hitPairs().