CMS 3D CMS Logo

Classes | Functions

helper Namespace Reference

Classes

struct  BFieldIsolationAlgorithmSetup
class  CandDecayStoreManager
class  ClusterStorer
struct  CollectionFilter
struct  CollectionFilter< C, S, MinNumberSelector >
struct  CollectionFilterTrait
struct  CollectionFilterTrait< C, AnySelector, N >
struct  CollectionSizeFilter
struct  CollectionStoreManager
struct  GetDetId
struct  GsfElectronCollectionStoreManager
class  GsfElectronSelectorBase
struct  IsolationAlgorithmSetup
struct  IsolationAlgorithmSetup< CalIsolationAlgo< T1, C2 > >
struct  IteratorToObjectConverter
struct  IteratorToObjectConverter< edm::OwnVector< T > >
struct  IteratorToObjectConverter< edm::PtrVector< T > >
struct  IteratorToObjectConverter< edm::RefToBaseVector< T > >
struct  IteratorToObjectConverter< edm::RefVector< C > >
struct  MasterCollection
struct  MasterCollection< edm::View< T > >
struct  MuonCollectionStoreManager
class  MuonSelectorBase
struct  NullIsolationAlgorithmSetup
struct  NullPostProcessor
struct  ObjectSelectorBase
class  Parser
struct  PhotonCollectionStoreManager
class  PhotonSelectorBase
class  ScannerBase
struct  SelectCode
struct  SelectedOutputCollectionTrait
struct  SelectedOutputCollectionTrait< edm::AssociationVector< edm::RefProd< K >, C > >
struct  SelectedOutputCollectionTrait< edm::AssociationVector< edm::RefToBaseProd< T >, C > >
struct  SelectedOutputCollectionTrait< edm::RefToBaseVector< T > >
struct  SelectedOutputCollectionTrait< edm::RefVector< C > >
struct  SelectedOutputCollectionTrait< edm::View< T > >
struct  SelectionAdderTrait
struct  SelectionAdderTrait< edm::AssociationVector< edm::RefProd< K >, C >, edm::RefVector< K > >
struct  SelectionAdderTrait< edm::AssociationVector< edm::RefProd< K >, C >, std::vector< const T * > >
struct  SelectionAdderTrait< edm::AssociationVector< edm::RefToBaseProd< T >, C >, edm::RefToBaseVector< T > >
struct  SelectionAdderTrait< edm::AssociationVector< edm::RefToBaseProd< T >, C >, std::vector< const T * > >
struct  SelectionAdderTrait< edm::RefToBaseVector< T >, edm::RefToBaseVector< T > >
struct  SelectionAdderTrait< edm::RefToBaseVector< T >, std::vector< const T * > >
struct  SelectionAdderTrait< edm::RefVector< C >, edm::RefVector< C > >
struct  SelectionAdderTrait< edm::RefVector< C >, std::vector< const T * > >
struct  SelectionAdderTrait< edm::View< T >, edm::PtrVector< T > >
struct  SelectionAdderTrait< edm::View< T >, edm::RefToBaseVector< T > >
struct  SelectionAdderTrait< InputCollection, edm::RefVector< C > >
struct  SelectionAdderTrait< InputCollection, std::vector< const T * > >
struct  SelectionCopyAdder
struct  SelectionFirstPointerAdder
struct  SelectionFirstRefAdder
struct  SelectionPointerAdder
struct  SelectionPointerDerefAdder
struct  SelectionPtrViewAdder
struct  SelectionRefAdder
struct  SelectionRefViewAdder
class  SimpleJetTrackAssociator
struct  StoreContainerTrait
struct  StoreContainerTrait< edm::AssociationVector< R, C > >
struct  StoreContainerTrait< edm::PtrVector< T > >
struct  StoreContainerTrait< edm::RefToBaseVector< T > >
struct  StoreContainerTrait< edm::RefVector< C > >
struct  StoreManagerTrait
struct  StoreManagerTrait< reco::CandidateCollection >
struct  StoreManagerTrait< reco::GsfElectronCollection >
struct  StoreManagerTrait< reco::MuonCollection >
struct  StoreManagerTrait< reco::PhotonCollection >
struct  StoreManagerTrait< reco::TrackCollection >
class  ThirdHitRZPredictionTraits
struct  TrackCollectionStoreManager
 Class to manage copying of RecHits and Clusters from Tracks. More...
class  TrackSelectorBase

Functions

template<typename RecHitType >
void ClusterStorer::ClusterHitRecord< SiStripRecHit2D::ClusterRef >rekey (const SiStripRecHit2D::ClusterRef &newRef) const
def findEDAnalyzers
def findEDFilters
def findEDProducers
def findModules
template<typename T >
std::pair< typename
T::DetSet::const_iterator,
typename
T::DetSet::const_iterator > 
getRange (const T &detset, const DetId &id)

Detailed Description

Helper functions to extract the dictionary with
 - all EDFilters
 - all EDProducers
 - all EDAnalyzers
 - all modules
either from a dictionary (either a cms.Process.__dict__ or from the locals() inside a _cff.py fragment)

predicts a range in r-z for the position of third hit. the predicted reange is defined by the template argument, which is a straight line extrapolation/interpolation if PixelRecoLineRZ is used.


Function Documentation

template<typename RecHitType >
void helper::ClusterStorer::ClusterHitRecord< SiStripRecHit2D::ClusterRef >rekey ( const SiStripRecHit2D::ClusterRef newRef) const

Definition at line 158 of file ClusterStorer.cc.

References SiStripRecHit1D::cluster(), SiStripRecHit2D::cluster(), SiStripMatchedRecHit2D::monoHit(), ProjectedSiStripRecHit2D::originalHit(), SiStripRecHit2D::setClusterRef(), SiStripRecHit1D::setClusterRef(), SiStripDetId::stereo(), and SiStripMatchedRecHit2D::stereoHit().

  {
    TrackingRecHit &genericHit = (*hits_)[index_];
    const std::type_info &hit_type = typeid(genericHit);

    if (typeid(SiStripRecHit1D) == hit_type) {
      // case of SiStripRecHit1D 
      SiStripRecHit1D *hit = &static_cast<SiStripRecHit1D&>(genericHit);
      assert(hit->cluster() == ref_); // otherwise something went wrong
      hit->setClusterRef(newRef);
    } else {
      // various cases resolving to SiStripRecHit2D 
      SiStripRecHit2D *hit = 0;
      if (typeid(SiStripRecHit2D) == hit_type) {
        hit = &static_cast<SiStripRecHit2D&>(genericHit);
      } else if (typeid(SiStripMatchedRecHit2D) == hit_type) {
        SiStripMatchedRecHit2D &mhit = static_cast<SiStripMatchedRecHit2D&>(genericHit);
        hit = (SiStripDetId(detid_).stereo() ? mhit.stereoHit() : mhit.monoHit());
      } else if (typeid(ProjectedSiStripRecHit2D) == hit_type) {
        ProjectedSiStripRecHit2D &phit = static_cast<ProjectedSiStripRecHit2D&>(genericHit);
        hit = &phit.originalHit();
      }
      assert(hit != 0); // to catch missing RecHit types
      assert(hit->cluster() == ref_); // otherwise something went wrong
      hit->setClusterRef(newRef);
    }

  }
def helper::findEDAnalyzers (   holder)

Definition at line 26 of file helper.py.

00027                            :
00028   if isinstance(holder, cms.Process):
00029     return process.analyzers_()
00030   else:
00031     return dict( (name, module) for name, module in holder.iteritems() if isinstance(module, cms.EDAnalyzer) )
00032 

def helper::findEDFilters (   holder)

Definition at line 12 of file helper.py.

00013                          :
00014   if isinstance(holder, cms.Process):
00015     return process.filters_()
00016   else:
00017     return dict( (name, module) for name, module in holder.iteritems() if isinstance(module, cms.EDFilter) )
00018 

def helper::findEDProducers (   holder)

Definition at line 19 of file helper.py.

00020                            :
00021   if isinstance(holder, cms.Process):
00022     return process.producers_()
00023   else:
00024     return dict( (name, module) for name, module in holder.iteritems() if isinstance(module, cms.EDProducer) )
00025 

def helper::findModules (   holder)

Definition at line 33 of file helper.py.

00034                        :
00035   if isinstance(holder, cms.Process):
00036     modules = dict()
00037     modules.upate(process.analyzers_())
00038     modules.upate(process.producers_())
00039     modules.upate(process.filters_())
00040     return modules
00041   else:
00042     return dict( (name, module) for name, module in holder.iteritems() if isinstance(module, (cms.EDAnalyzer, _cms.EDProducer, _cms.EDFilter)) )
00043 
00044 
template<typename T >
std::pair<typename T::DetSet::const_iterator, typename T::DetSet::const_iterator> helper::getRange ( const T detset,
const DetId id 
)

Definition at line 40 of file SiStripRecHitsValid.cc.

References match().

Referenced by SiStripRecHitsValid::analyze(), reco::TaggingVariableList::get(), and reco::TaggingVariableList::getList().

                                               {
        typedef std::pair<typename T::DetSet::const_iterator, typename T::DetSet::const_iterator> return_type;
        typename T::const_iterator match = detset.find(id);
        if (match == detset.end()) return return_type();
        typename T::DetSet hits = *match;
        return return_type(hits.begin(), hits.end());
    }