ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/L1RpcTriggerAnalysis/src/PatternManager.cc
(Generate patch)

Comparing UserCode/L1RpcTriggerAnalysis/src/PatternManager.cc (file contents):
Revision 1.5 by konec, Mon May 20 23:27:11 2013 UTC vs.
Revision 1.6 by konec, Thu May 23 18:24:04 2013 UTC

# Line 100 | Line 100 | L1Obj PatternManager::check(const EventO
100  
101   */
102   //  std::cout <<" ------------------ EVENT: " << std::endl;
103 <  Pattern pattern;
103 >  std::vector<Pattern> vpattern(1);
104    theEvForPatCounter++;
105    for (VDigiSpec::const_iterator is= vDigi.begin(); is!=vDigi.end(); is++) {
106 <    bool isOK = pattern.add(*is);
107 <    if (!isOK) { return candidate; }
106 >    bool isOK = Pattern::add(vpattern,*is);
107    }
108 <  if (pattern.size() == 0) return candidate;
108 >  if (vpattern[0].size() == 0) return candidate;
109   //  std::cout <<" ------------------ END EVENT, COMPARE" << std::endl;
110  
111    GoldenPattern::Key thisKey(detref, ptref, chargeref, phiref );
# Line 115 | Line 114 | L1Obj PatternManager::check(const EventO
114    GoldenPattern::Result bestMatching;
115    GoldenPattern::Key    bestKey;
116    for (std::map< GoldenPattern::Key, GoldenPattern>::iterator igps = theGPs.begin(); igps != theGPs.end(); igps++) {
117 +  for (auto ip=vpattern.begin(); ip!= vpattern.end();++ip) {
118 +    const Pattern & pattern = *ip;
119   //    if (!(thisKey==igps->first)) continue;
120   //    std::cout << " HAS PATTERN "<<pattern << std::endl;
121      GoldenPattern & gp = igps->second;
122      GoldenPattern::Result result = gp.compare(pattern);
123   //    if (!result.hasRpcDet(637602109) && !result.hasRpcDet(637634877) && !result.hasRpcDet(637599914) && !result.hasRpcDet(637632682)) continue;
124 <    if (!result.hasRpcDet(igps->first.theDet)) continue;
125 <    if (result.nMatchedTot() < 5 )continue;
126 <    if (!result) continue;
124 > //   if (!result.hasRpcDet(igps->first.theDet)) continue;
125 > //   if (result.nMatchedTot() < 5 )continue;
126 > //   if (!result) continue;
127   //    std::cout <<"PATT KEY: "<<igps->first<<" "<<result<<" is Less: "<<(result<bestMatching)<<" isBetter: "<<(result>bestMatching)<<" isBerres: "<<(bestMatching<result)  ; //<<std::endl;
128      if (bestMatching < result) {
129        bestMatching = result;
# Line 131 | Line 132 | L1Obj PatternManager::check(const EventO
132      }
133   //else std::cout <<std::endl;
134    }
135 +  }
136  
137   //  std::cout <<" ------------------ END COMPARE: " << std::endl;
138   //  std::cout <<"BEST KEY: "<<bestKey<<" "<< bestMatching<<std::cout <<" ######"<<" pt: "<< bestKey.ptValue()<<std::endl;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines