CMS 3D CMS Logo

RPCSeedFinder.cc
Go to the documentation of this file.
1 
7 #include <iomanip>
8 
9 using namespace std;
10 using namespace edm;
11 
13  // Initiate the member
14  isrecHitsset = false;
15  isConfigured = false;
16  isOutputset = false;
17  isEventSetupset = false;
18  oneSeed.clear();
19 }
20 
22 
24  oneSeed.configure(iConfig);
25  isConfigured = true;
26 }
27 
28 void RPCSeedFinder::setOutput(std::vector<weightedTrajectorySeed> *goodweightedRef,
29  std::vector<weightedTrajectorySeed> *candidateweightedRef) {
30  goodweightedSeedsRef = goodweightedRef;
31  candidateweightedSeedsRef = candidateweightedRef;
32  isOutputset = true;
33 }
34 
36  oneSeed.clear();
37  for (ConstMuonRecHitContainer::const_iterator iter = recHits.begin(); iter != recHits.end(); iter++)
38  oneSeed.add(*iter);
39  isrecHitsset = true;
40 }
41 
43  eSetup = &iSetup;
44  isEventSetupset = true;
45 }
46 
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 }
RPCSeedFinder.h
RPCSeedFinder::RPCSeedFinder
RPCSeedFinder()
Definition: RPCSeedFinder.cc:12
RPCSeedFinder::setrecHits
void setrecHits(ConstMuonRecHitContainer &recHits)
Definition: RPCSeedFinder.cc:35
edm
HLT enums.
Definition: AlignableModifier.h:19
RPCSeedFinder::seed
void seed()
Definition: RPCSeedFinder.cc:47
gather_cfg.cout
cout
Definition: gather_cfg.py:144
RPCSeedFinder::~RPCSeedFinder
~RPCSeedFinder()
Definition: RPCSeedFinder.cc:21
RPCSeedFinder::weightedTrajectorySeed
RPCSeedPattern::weightedTrajectorySeed weightedTrajectorySeed
Definition: RPCSeedFinder.h:28
RPCSeedFinder::configure
void configure(const edm::ParameterSet &iConfig)
Definition: RPCSeedFinder.cc:23
RPCSeedFinder::ConstMuonRecHitContainer
MuonTransientTrackingRecHit::ConstMuonRecHitContainer ConstMuonRecHitContainer
Definition: RPCSeedFinder.h:27
FastTrackerRecHitMaskProducer_cfi.recHits
recHits
Definition: FastTrackerRecHitMaskProducer_cfi.py:8
edm::ParameterSet
Definition: ParameterSet.h:47
RPCSeedFinder::setOutput
void setOutput(std::vector< weightedTrajectorySeed > *goodweightedRef, std::vector< weightedTrajectorySeed > *candidateweightedRef)
Definition: RPCSeedFinder.cc:28
edm::EventSetup
Definition: EventSetup.h:57
std
Definition: JetResolutionObject.h:76
RPCSeedFinder::setEventSetup
void setEventSetup(const edm::EventSetup &iSetup)
Definition: RPCSeedFinder.cc:42