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 
42 void RPCSeedFinder::setEventSetup(const MagneticField &field, const RPCGeometry &rpcGeom) {
43  pField = &field;
44  pRPCGeom = &rpcGeom;
45  isEventSetupset = true;
46 }
47 
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 }
void setOutput(std::vector< weightedTrajectorySeed > *goodweightedRef, std::vector< weightedTrajectorySeed > *candidateweightedRef)
void setrecHits(ConstMuonRecHitContainer &recHits)
void setEventSetup(const MagneticField &field, const RPCGeometry &rpcGeom)
RPCSeedPattern::weightedTrajectorySeed weightedTrajectorySeed
Definition: RPCSeedFinder.h:26
MuonTransientTrackingRecHit::ConstMuonRecHitContainer ConstMuonRecHitContainer
Definition: RPCSeedFinder.h:25
void configure(const edm::ParameterSet &iConfig)
HLT enums.