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

Comparing UserCode/L1RpcTriggerAnalysis/src/GoldenPattern.cc (file contents):
Revision 1.2 by konec, Mon May 20 23:27:11 2013 UTC vs.
Revision 1.4 by konec, Tue May 28 13:48:09 2013 UTC

# Line 20 | Line 20 | void GoldenPattern::Result::runNoCheck()
20    for (auto i=benCscResult.begin(); i!=benCscResult.end();i++) fract *= norm(BENCSC,i->second);
21    for (auto i=benDtResult.begin();  i!=benDtResult.end();i++)  fract *= norm(BENDT, i->second);
22    unsigned int nTot = nMatchedPosRpc+nMatchedPosCsc+nMatchedPosDt+nMatchedBenCsc+nMatchedBenDt;
23 <  theValue = ( nTot > 2) ? pow(fract, 1./((double) nTot)) : 0.;
23 >  theValue = ( nTot > 4) ? pow(fract, 1./((double) nTot)) : 0.;
24    if (posRpcResult.size() != nMatchedPosRpc) theValue = 0.;
25    if (posCscResult.size() != nMatchedPosCsc) theValue = 0.;
26    if (posDtResult.size()  != nMatchedPosDt)  theValue = 0.;
# Line 58 | Line 58 | bool GoldenPattern::Result::operator < (
58   }
59  
60   GoldenPattern::Result::operator bool() const {
61 <  return (value() > 0.1);
61 >  return (value() > 0.1); // && hasStation1 && hasStation2);
62   }
63  
64   double GoldenPattern::Result::value() const {
# Line 139 | Line 139 | GoldenPattern::Result GoldenPattern::com
139        RPCDigiSpec digi(rawId, is->second);
140        DetFreq::const_iterator idm = posRpc.find(rawId);
141        if (idm != posRpc.end() ) {
142 <          double f = whereInDistribution(digi.halfStrip(), idm->second);
143 <          result.posRpcResult.push_back( std::make_pair(rawId, f) );
142 >        double f = whereInDistribution(digi.halfStrip(), idm->second);
143 >        result.posRpcResult.push_back( std::make_pair(rawId, f) );
144 >        RPCDetId rpc(rawId);
145 >        if(rpc.station()==1) result.hasStation1 = true;
146 >        if(rpc.station()==2) result.hasStation2 = true;
147        }
148      } else if (detId.subdetId() == MuonSubdetId::DT) {
149        DTphDigiSpec digi(rawId, is->second);
# Line 148 | Line 151 | GoldenPattern::Result GoldenPattern::com
151        if (idm != posDt.end() ) {
152          double f = whereInDistribution(digi.phi(), idm->second);
153          result.posDtResult.push_back( std::make_pair(rawId, f) );
154 +        DTChamberId dt(rawId);
155 +        if(dt.station()==1) result.hasStation1 = true;
156 +        if(dt.station()==2) result.hasStation2 = true;
157        }
158        idm = bendingDt.find(rawId);
159        if (idm != bendingDt.end() ) {
# Line 160 | Line 166 | GoldenPattern::Result GoldenPattern::com
166        if (idm != posCsc.end() ) {
167          double f = whereInDistribution(digi.strip(), idm->second);
168          result.posCscResult.push_back( std::make_pair(rawId, f) );
169 +        CSCDetId csc(rawId);
170 +        if (csc.station()==1) result.hasStation1 = true;
171 +        if (csc.station()==2) result.hasStation1 = true;
172        }
173        idm = bendingCsc.find(rawId);
174        if (idm != bendingCsc.end() ) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines