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 }
void setEventSetup(const edm::EventSetup &iSetup)
void setOutput(std::vector< weightedTrajectorySeed > *goodweightedRef, std::vector< weightedTrajectorySeed > *candidateweightedRef)
void setrecHits(ConstMuonRecHitContainer &recHits)
RPCSeedPattern::weightedTrajectorySeed weightedTrajectorySeed
Definition: RPCSeedFinder.h:28
MuonTransientTrackingRecHit::ConstMuonRecHitContainer ConstMuonRecHitContainer
Definition: RPCSeedFinder.h:27
void configure(const edm::ParameterSet &iConfig)
HLT enums.