CMS 3D CMS Logo

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

#include <RPCSeedFinder.h>

Public Member Functions

void configure (const edm::ParameterSet &iConfig)
 
 RPCSeedFinder ()
 
void seed ()
 
void setEventSetup (const edm::EventSetup &iSetup)
 
void setOutput (std::vector< weightedTrajectorySeed > *goodweightedRef, std::vector< weightedTrajectorySeed > *candidateweightedRef)
 
void setrecHits (ConstMuonRecHitContainer &recHits)
 
 ~RPCSeedFinder ()
 

Private Types

typedef MuonTransientTrackingRecHit::ConstMuonRecHitContainer ConstMuonRecHitContainer
 
typedef MuonTransientTrackingRecHit::ConstMuonRecHitPointer ConstMuonRecHitPointer
 
typedef MuonTransientTrackingRecHit::MuonRecHitContainer MuonRecHitContainer
 
typedef MuonTransientTrackingRecHit::MuonRecHitPointer MuonRecHitPointer
 
typedef RPCSeedPattern::weightedTrajectorySeed weightedTrajectorySeed
 

Private Attributes

std::vector< weightedTrajectorySeed > * candidateweightedSeedsRef
 
const edm::EventSetupeSetup
 
std::vector< weightedTrajectorySeed > * goodweightedSeedsRef
 
bool isConfigured
 
bool isEventSetupset
 
bool isOutputset
 
bool isrecHitsset
 
RPCSeedPattern oneSeed
 

Detailed Description

Author
Haiyun.Teng - Peking University

Definition at line 23 of file RPCSeedFinder.h.

Member Typedef Documentation

◆ ConstMuonRecHitContainer

Definition at line 27 of file RPCSeedFinder.h.

◆ ConstMuonRecHitPointer

Definition at line 25 of file RPCSeedFinder.h.

◆ MuonRecHitContainer

Definition at line 26 of file RPCSeedFinder.h.

◆ MuonRecHitPointer

Definition at line 24 of file RPCSeedFinder.h.

◆ weightedTrajectorySeed

Definition at line 28 of file RPCSeedFinder.h.

Constructor & Destructor Documentation

◆ RPCSeedFinder()

RPCSeedFinder::RPCSeedFinder ( )

Definition at line 12 of file RPCSeedFinder.cc.

12  {
13  // Initiate the member
14  isrecHitsset = false;
15  isConfigured = false;
16  isOutputset = false;
17  isEventSetupset = false;
18  oneSeed.clear();
19 }
RPCSeedPattern oneSeed
Definition: RPCSeedFinder.h:47
bool isEventSetupset
Definition: RPCSeedFinder.h:45

◆ ~RPCSeedFinder()

RPCSeedFinder::~RPCSeedFinder ( )

Definition at line 21 of file RPCSeedFinder.cc.

21 {}

Member Function Documentation

◆ configure()

void RPCSeedFinder::configure ( const edm::ParameterSet iConfig)

Definition at line 23 of file RPCSeedFinder.cc.

23  {
24  oneSeed.configure(iConfig);
25  isConfigured = true;
26 }
void configure(const edm::ParameterSet &iConfig)
RPCSeedPattern oneSeed
Definition: RPCSeedFinder.h:47

◆ seed()

void RPCSeedFinder::seed ( )

Definition at line 47 of file RPCSeedFinder.cc.

References gather_cfg::cout.

47  {
48  cout << "[RPCSeedFinder] --> seeds called" << endl;
49 
50  if (isrecHitsset == false || isOutputset == false || isConfigured == false || isEventSetupset == false) {
51  cout << "Configuration or IO is not set yet" << endl;
52  return;
53  }
54 
55  weightedTrajectorySeed theweightedSeed;
56  int isGoodSeed = 0;
57  const edm::EventSetup &iSetup = *eSetup;
58  theweightedSeed = oneSeed.seed(iSetup, isGoodSeed);
59  // Push back the good seed
60  if (isGoodSeed == 1) {
61  cout << "[RPCSeedFinder] --> Seeds from " << oneSeed.nrhit() << " recHits." << endl;
62  goodweightedSeedsRef->push_back(theweightedSeed);
63  }
64  // Push back cadidate seed but not the fake seed
65  if (isGoodSeed >= 0) {
66  candidateweightedSeedsRef->push_back(theweightedSeed);
67  }
68 
69  // Unset the signal
70  oneSeed.clear();
71  isrecHitsset = false;
72 }
std::vector< weightedTrajectorySeed > * candidateweightedSeedsRef
Definition: RPCSeedFinder.h:50
weightedTrajectorySeed seed(const edm::EventSetup &eSetup, int &isGoodSeed)
const edm::EventSetup * eSetup
Definition: RPCSeedFinder.h:46
std::vector< weightedTrajectorySeed > * goodweightedSeedsRef
Definition: RPCSeedFinder.h:49
RPCSeedPattern oneSeed
Definition: RPCSeedFinder.h:47
RPCSeedPattern::weightedTrajectorySeed weightedTrajectorySeed
bool isEventSetupset
Definition: RPCSeedFinder.h:45
unsigned int nrhit() const

◆ setEventSetup()

void RPCSeedFinder::setEventSetup ( const edm::EventSetup iSetup)

Definition at line 42 of file RPCSeedFinder.cc.

42  {
43  eSetup = &iSetup;
44  isEventSetupset = true;
45 }
const edm::EventSetup * eSetup
Definition: RPCSeedFinder.h:46
bool isEventSetupset
Definition: RPCSeedFinder.h:45

◆ setOutput()

void RPCSeedFinder::setOutput ( std::vector< weightedTrajectorySeed > *  goodweightedRef,
std::vector< weightedTrajectorySeed > *  candidateweightedRef 
)

Definition at line 28 of file RPCSeedFinder.cc.

29  {
30  goodweightedSeedsRef = goodweightedRef;
31  candidateweightedSeedsRef = candidateweightedRef;
32  isOutputset = true;
33 }
std::vector< weightedTrajectorySeed > * candidateweightedSeedsRef
Definition: RPCSeedFinder.h:50
std::vector< weightedTrajectorySeed > * goodweightedSeedsRef
Definition: RPCSeedFinder.h:49

◆ setrecHits()

void RPCSeedFinder::setrecHits ( ConstMuonRecHitContainer recHits)

Definition at line 35 of file RPCSeedFinder.cc.

References FastTrackerRecHitMaskProducer_cfi::recHits.

35  {
36  oneSeed.clear();
37  for (ConstMuonRecHitContainer::const_iterator iter = recHits.begin(); iter != recHits.end(); iter++)
38  oneSeed.add(*iter);
39  isrecHitsset = true;
40 }
RPCSeedPattern oneSeed
Definition: RPCSeedFinder.h:47
void add(const ConstMuonRecHitPointer &hit)

Member Data Documentation

◆ candidateweightedSeedsRef

std::vector<weightedTrajectorySeed>* RPCSeedFinder::candidateweightedSeedsRef
private

Definition at line 50 of file RPCSeedFinder.h.

◆ eSetup

const edm::EventSetup* RPCSeedFinder::eSetup
private

Definition at line 46 of file RPCSeedFinder.h.

◆ goodweightedSeedsRef

std::vector<weightedTrajectorySeed>* RPCSeedFinder::goodweightedSeedsRef
private

Definition at line 49 of file RPCSeedFinder.h.

◆ isConfigured

bool RPCSeedFinder::isConfigured
private

◆ isEventSetupset

bool RPCSeedFinder::isEventSetupset
private

Definition at line 45 of file RPCSeedFinder.h.

◆ isOutputset

bool RPCSeedFinder::isOutputset
private

◆ isrecHitsset

bool RPCSeedFinder::isrecHitsset
private

Definition at line 42 of file RPCSeedFinder.h.

◆ oneSeed

RPCSeedPattern RPCSeedFinder::oneSeed
private

Definition at line 47 of file RPCSeedFinder.h.