CMS 3D CMS Logo

Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes

CombinedHitPairGeneratorForPhotonConversion Class Reference

#include <CombinedHitPairGeneratorForPhotonConversion.h>

Inheritance diagram for CombinedHitPairGeneratorForPhotonConversion:
HitPairGenerator OrderedHitsGenerator

List of all members.

Public Types

typedef LayerHitMapCache LayerCacheType

Public Member Functions

void add (const ctfseeding::SeedingLayer &inner, const ctfseeding::SeedingLayer &outer)
void clearLayerCache ()
virtual
CombinedHitPairGeneratorForPhotonConversion
clone () const
 from base class
 CombinedHitPairGeneratorForPhotonConversion (const edm::ParameterSet &cfg)
virtual void hitPairs (const TrackingRegion &, OrderedHitPairs &, const edm::Event &, const edm::EventSetup &)
 form base class
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)
virtual ~CombinedHitPairGeneratorForPhotonConversion ()

Private Types

typedef std::vector
< HitPairGeneratorFromLayerPairForPhotonConversion * > 
Container

Private Member Functions

void cleanup ()
 CombinedHitPairGeneratorForPhotonConversion (const CombinedHitPairGeneratorForPhotonConversion &cb)
void init (const edm::ParameterSet &cfg, const edm::EventSetup &es)
void init (const ctfseeding::SeedingLayerSets &layerSets)

Private Attributes

bool initialised
uint32_t maxHitPairsPerTrackAndGenerator
edm::ParameterSet theConfig
edm::ESWatcher
< TrackerDigiGeometryRecord
theESWatcher
Container theGenerators
LayerCacheType theLayerCache
OrderedHitPairs thePairs

Detailed Description

Hides set of HitPairGeneratorFromLayerPairForPhotonConversion generators.

Definition at line 26 of file CombinedHitPairGeneratorForPhotonConversion.h.


Member Typedef Documentation


Constructor & Destructor Documentation

CombinedHitPairGeneratorForPhotonConversion::CombinedHitPairGeneratorForPhotonConversion ( const edm::ParameterSet cfg)

Definition at line 14 of file CombinedHitPairGeneratorForPhotonConversion.cc.

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

Referenced by clone().

  : initialised(false), theConfig(cfg)
{
  theMaxElement = cfg.getParameter<unsigned int>("maxElement");
  maxHitPairsPerTrackAndGenerator = cfg.getParameter<unsigned int>("maxHitPairsPerTrackAndGenerator");

}
CombinedHitPairGeneratorForPhotonConversion::~CombinedHitPairGeneratorForPhotonConversion ( ) [virtual]

Definition at line 55 of file CombinedHitPairGeneratorForPhotonConversion.cc.

References cleanup().

{ cleanup(); }
CombinedHitPairGeneratorForPhotonConversion::CombinedHitPairGeneratorForPhotonConversion ( const CombinedHitPairGeneratorForPhotonConversion cb) [private]

Member Function Documentation

void CombinedHitPairGeneratorForPhotonConversion::add ( const ctfseeding::SeedingLayer inner,
const ctfseeding::SeedingLayer outer 
)
void CombinedHitPairGeneratorForPhotonConversion::cleanup ( void  ) [private]

Definition at line 46 of file CombinedHitPairGeneratorForPhotonConversion.cc.

References theGenerators.

Referenced by hitPairs(), and ~CombinedHitPairGeneratorForPhotonConversion().

{
  Container::const_iterator it;
  for (it = theGenerators.begin(); it!= theGenerators.end(); it++) {
    delete (*it);
  }
  theGenerators.clear();
}
void CombinedHitPairGeneratorForPhotonConversion::clearLayerCache ( ) [inline]
virtual CombinedHitPairGeneratorForPhotonConversion* CombinedHitPairGeneratorForPhotonConversion::clone ( void  ) const [inline, virtual]
virtual void CombinedHitPairGeneratorForPhotonConversion::hitPairs ( const TrackingRegion ,
OrderedHitPairs ,
const edm::Event ,
const edm::EventSetup  
) [inline, virtual]

form base class

Implements HitPairGenerator.

Definition at line 38 of file CombinedHitPairGeneratorForPhotonConversion.h.

Referenced by run().

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

Definition at line 72 of file CombinedHitPairGeneratorForPhotonConversion.cc.

References edm::ESWatcher< T >::check(), cleanup(), i, init(), initialised, maxHitPairsPerTrackAndGenerator, OrderedHitPairs::size(), theConfig, theESWatcher, theGenerators, and OrderedHitsGenerator::theMaxElement.

{
  if (theESWatcher.check(es) || !initialised ) {
    cleanup();
    init(theConfig,es);
  }

  Container::const_iterator i;
  OrderedHitPairs  resultTmp;
  resultTmp.reserve(maxHitPairsPerTrackAndGenerator);

  for (i=theGenerators.begin(); i!=theGenerators.end() && result.size() < theMaxElement; i++) {
    resultTmp.clear();
    (**i).hitPairs(convRegion, region, resultTmp, ev, es); 
    result.insert(result.end(),resultTmp.begin(),resultTmp.end());
  }
  //theLayerCache.clear(); //Don't want to clear now, because have to loop on all the tracks. will be cleared later, calling a specific method
}
void CombinedHitPairGeneratorForPhotonConversion::init ( const edm::ParameterSet cfg,
const edm::EventSetup es 
) [private]

Definition at line 22 of file CombinedHitPairGeneratorForPhotonConversion.cc.

References edm::EventSetup::get(), edm::ParameterSet::getParameter(), init(), maxHitPairsPerTrackAndGenerator, and OrderedHitsGenerator::theMaxElement.

{
  theMaxElement = cfg.getParameter<unsigned int>("maxElement");
  maxHitPairsPerTrackAndGenerator = cfg.getParameter<unsigned int>("maxHitPairsPerTrackAndGenerator");

  std::string layerBuilderName = cfg.getParameter<std::string>("SeedingLayers");
  edm::ESHandle<SeedingLayerSetsBuilder> layerBuilder;
  es.get<TrackerDigiGeometryRecord>().get(layerBuilderName, layerBuilder);

  SeedingLayerSets layerSets  =  layerBuilder->layers(es); 
  init(layerSets);
}
void CombinedHitPairGeneratorForPhotonConversion::init ( const ctfseeding::SeedingLayerSets layerSets) [private]

Definition at line 35 of file CombinedHitPairGeneratorForPhotonConversion.cc.

References add(), initialised, and findQualityFiles::size.

Referenced by hitPairs(), and init().

{
  initialised = true;
  typedef SeedingLayerSets::const_iterator IL;
  for (IL il=layerSets.begin(), ilEnd=layerSets.end(); il != ilEnd; ++il) {
    const SeedingLayers & set = *il;
    if (set.size() != 2) continue;
    add( set[0], set[1] );
  }
}
const OrderedHitPairs & CombinedHitPairGeneratorForPhotonConversion::run ( const ConversionRegion convRegion,
const TrackingRegion region,
const edm::Event ev,
const edm::EventSetup es 
)

Definition at line 62 of file CombinedHitPairGeneratorForPhotonConversion.cc.

References hitPairs(), and thePairs.

Referenced by PhotonConversionTrajectorySeedProducerFromSingleLegAlgo::inspectTrack().

{
  thePairs.clear();
  hitPairs(convRegion, region, thePairs, ev, es);
  return thePairs;
}

Member Data Documentation

Definition at line 63 of file CombinedHitPairGeneratorForPhotonConversion.h.

Referenced by hitPairs(), and init().

Definition at line 64 of file CombinedHitPairGeneratorForPhotonConversion.h.

Referenced by clone(), and hitPairs().

Definition at line 69 of file CombinedHitPairGeneratorForPhotonConversion.h.

Referenced by hitPairs().

Definition at line 72 of file CombinedHitPairGeneratorForPhotonConversion.h.

Referenced by add(), cleanup(), and hitPairs().

Definition at line 67 of file CombinedHitPairGeneratorForPhotonConversion.h.

Referenced by add(), and clearLayerCache().

Reimplemented from HitPairGenerator.

Definition at line 74 of file CombinedHitPairGeneratorForPhotonConversion.h.

Referenced by run().