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 MagneticField &field, const RPCGeometry &rpcGeom)
 
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
 
std::vector< weightedTrajectorySeed > * goodweightedSeedsRef
 
bool isConfigured
 
bool isEventSetupset
 
bool isOutputset
 
bool isrecHitsset
 
RPCSeedPattern oneSeed
 
const MagneticFieldpField = nullptr
 
const RPCGeometrypRPCGeom = nullptr
 

Detailed Description

Author
Haiyun.Teng - Peking University

Definition at line 21 of file RPCSeedFinder.h.

Member Typedef Documentation

◆ ConstMuonRecHitContainer

Definition at line 25 of file RPCSeedFinder.h.

◆ ConstMuonRecHitPointer

Definition at line 23 of file RPCSeedFinder.h.

◆ MuonRecHitContainer

Definition at line 24 of file RPCSeedFinder.h.

◆ MuonRecHitPointer

Definition at line 22 of file RPCSeedFinder.h.

◆ weightedTrajectorySeed

Definition at line 26 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:46
bool isEventSetupset
Definition: RPCSeedFinder.h:43

◆ ~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.

Referenced by RPCSeedGenerator::RPCSeedGenerator().

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

◆ seed()

void RPCSeedFinder::seed ( )

Definition at line 48 of file RPCSeedFinder.cc.

References gather_cfg::cout.

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

◆ setEventSetup()

void RPCSeedFinder::setEventSetup ( const MagneticField field,
const RPCGeometry rpcGeom 
)

Definition at line 42 of file RPCSeedFinder.cc.

Referenced by RPCSeedGenerator::produce().

42  {
43  pField = &field;
44  pRPCGeom = &rpcGeom;
45  isEventSetupset = true;
46 }
const MagneticField * pField
Definition: RPCSeedFinder.h:44
bool isEventSetupset
Definition: RPCSeedFinder.h:43
const RPCGeometry * pRPCGeom
Definition: RPCSeedFinder.h:45

◆ setOutput()

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

Definition at line 28 of file RPCSeedFinder.cc.

Referenced by RPCSeedGenerator::beginStream().

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

◆ 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:46
void add(const ConstMuonRecHitPointer &hit)

Member Data Documentation

◆ candidateweightedSeedsRef

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

Definition at line 49 of file RPCSeedFinder.h.

◆ goodweightedSeedsRef

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

Definition at line 48 of file RPCSeedFinder.h.

◆ isConfigured

bool RPCSeedFinder::isConfigured
private

◆ isEventSetupset

bool RPCSeedFinder::isEventSetupset
private

Definition at line 43 of file RPCSeedFinder.h.

◆ isOutputset

bool RPCSeedFinder::isOutputset
private

◆ isrecHitsset

bool RPCSeedFinder::isrecHitsset
private

Definition at line 40 of file RPCSeedFinder.h.

◆ oneSeed

RPCSeedPattern RPCSeedFinder::oneSeed
private

Definition at line 46 of file RPCSeedFinder.h.

◆ pField

const MagneticField* RPCSeedFinder::pField = nullptr
private

Definition at line 44 of file RPCSeedFinder.h.

◆ pRPCGeom

const RPCGeometry* RPCSeedFinder::pRPCGeom = nullptr
private

Definition at line 45 of file RPCSeedFinder.h.