CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RPCSeedFinder.cc
Go to the documentation of this file.
1 
8 #include <iomanip>
9 
10 using namespace std;
11 using namespace edm;
12 
13 
15 
16  // Initiate the member
17  isrecHitsset = false;
18  isConfigured = false;
19  isOutputset = false;
20  isEventSetupset = false;
21  oneSeed.clear();
22 }
23 
25 
26 }
27 
29 
30  oneSeed.configure(iConfig);
31  isConfigured = true;
32 }
33 
34 void RPCSeedFinder::setOutput(std::vector<weightedTrajectorySeed> *goodweightedRef, std::vector<weightedTrajectorySeed> *candidateweightedRef) {
35 
36  goodweightedSeedsRef = goodweightedRef;
37  candidateweightedSeedsRef = candidateweightedRef;
38  isOutputset = true;
39 }
40 
42 
43  oneSeed.clear();
44  for (ConstMuonRecHitContainer::const_iterator iter = recHits.begin(); iter!= recHits.end(); iter++)
45  oneSeed.add(*iter);
46  isrecHitsset = true;
47 }
48 
50 
51  eSetup = &iSetup;
52  isEventSetupset = true;
53 }
54 
56 
57  cout << "[RPCSeedFinder] --> seeds called" << endl;
58 
59  if(isrecHitsset == false || isOutputset == false || isConfigured == false || isEventSetupset == false)
60  {
61  cout << "Configuration or IO is not set yet" << endl;
62  return;
63  }
64 
65  weightedTrajectorySeed theweightedSeed;
66  int isGoodSeed = 0;
67  const edm::EventSetup &iSetup = *eSetup;
68  theweightedSeed = oneSeed.seed(iSetup, isGoodSeed);
69  // Push back the good seed
70  if(isGoodSeed == 1)
71  {
72  cout << "[RPCSeedFinder] --> Seeds from " << oneSeed.nrhit() << " recHits." << endl;
73  goodweightedSeedsRef->push_back(theweightedSeed);
74  }
75  // Push back cadidate seed but not the fake seed
76  if(isGoodSeed >= 0)
77  {
78  candidateweightedSeedsRef->push_back(theweightedSeed);
79  }
80 
81  // Unset the signal
82  oneSeed.clear();
83  isrecHitsset = false;
84 }
85 
86 
87 
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:29
MuonTransientTrackingRecHit::ConstMuonRecHitContainer ConstMuonRecHitContainer
Definition: RPCSeedFinder.h:28
void configure(const edm::ParameterSet &iConfig)
tuple cout
Definition: gather_cfg.py:121