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.1 by konec, Fri May 17 13:04:54 2013 UTC vs.
Revision 1.3 by konec, Mon May 20 15:47:23 2013 UTC

# Line 55 | Line 55 | void PatternManager::run(const EventObj*
55    double ptref  = simu->pt();
56    int    chargeref = simu->charge();
57    unsigned int detref =  hitSpec->rawId();
58 + /*
59    if (detref != 637602109 && detref != 637634877 &&
60        detref != 637599914 && detref != 637632682 ) return;
61  
62    bool precisePos = ( fabs(hitSpec->position().phi()-1.025) < 0.001);
63    if (!precisePos) return;
64    if ( simu->pt() < 16.) return;
65 + */
66  
67  
68    GoldenPattern::Key key( detref, ptref, chargeref, phiref);
# Line 83 | Line 85 | L1Obj PatternManager::check(const EventO
85   {
86    L1Obj candidate;
87    if (!hitSpec) return candidate;
88 + /*
89    if (hitSpec->rawId() == 0 ) return candidate;
90    double phiref = hitSpec->position().phi();
91    double ptref  = simu->pt();
# Line 96 | Line 99 | L1Obj PatternManager::check(const EventO
99    if ( simu->pt() < 26. || simu->pt() > 27.  ) return candidate;
100  
101    std::cout <<" ------------------ EVENT: " << std::endl;
102 + */
103    Pattern pattern;
104    theEvForPatCounter++;
105    for (VDigiSpec::const_iterator is= vDigi.begin(); is!=vDigi.end(); is++) {
# Line 103 | Line 107 | L1Obj PatternManager::check(const EventO
107      if (!isOK) { return candidate; }
108    }
109    if (pattern.size() == 0) return candidate;
110 <  std::cout <<" ------------------ END EVENT, COMPARE" << std::endl;
110 > //  std::cout <<" ------------------ END EVENT, COMPARE" << std::endl;
111  
112   //  GoldenPattern::Key thisKey(detref, ptref, chargeref, phiref );
113   //  std::cout << thisKey << std::endl;
# Line 115 | Line 119 | L1Obj PatternManager::check(const EventO
119   //    std::cout << " HAS PATTERN "<<pattern << std::endl;
120      GoldenPattern & gp = igps->second;
121      GoldenPattern::Result result = gp.compare(pattern);
122 +    if (!result.hasRpcDet(637602109) && !result.hasRpcDet(637634877) && !result.hasRpcDet(637599914) && !result.hasRpcDet(637632682)) continue;
123      if (result > bestMatching) {
124        bestMatching = result;
125        bestKey =  igps->first;
126      }
127   //    std::cout <<result << std::endl;
128    }
129 <  std::cout <<" ------------------ END COMPARE: " << std::endl;
130 <  std::cout <<"BEST: "<< bestMatching<<" pt: "<<bestKey.ptValue()<<std::endl;
129 > //  std::cout <<" ------------------ END COMPARE: " << std::endl;
130 > //  std::cout <<"BEST: "<< bestMatching<<" pt: "<<bestKey.ptValue()<<std::endl;
131    if (bestMatching) {
132      candidate.pt = bestKey.ptValue();
133      candidate.eta = 1.;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines