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

Comparing UserCode/L1RpcTriggerAnalysis/interface/GoldenPattern.h (file contents):
Revision 1.5 by akalinow, Tue Jun 25 11:06:02 2013 UTC vs.
Revision 1.6 by akalinow, Fri Jun 28 08:31:12 2013 UTC

# Line 21 | Line 21 | public:
21    // Key
22    //
23    struct Key {
24 <    Key(uint32_t det=0, double pt=0, int charge= 0, double phi=0) : theDet(det), theCharge(charge) {
24 >    Key(uint32_t det=0, float pt=0, int charge= 0, float phi=0) : theDet(det), theCharge(charge) {
25        thePtCode = L1RpcTriggerAnalysisEfficiencyUtilities::PtScale().ptCode(pt);
26 <      while  (phi < 0) { phi+=2*M_PI; }
27 <      thePhiCode = int( phi * 3000.);
28 <    }
26 >      //while  (phi < 0) { phi+=2*M_PI; }
27 >      //thePhiCode = int( phi * 3000.);
28 >      thePhiCode = phi;
29 >    }
30      inline bool operator< (const Key & o) const {
31        if (theCharge*thePtCode < o.theCharge*o.thePtCode) return true;
32        else if (theCharge*thePtCode==o.theCharge*o.thePtCode && thePhiCode < o.thePhiCode) return true;
# Line 35 | Line 36 | public:
36      bool operator==(const Key& o) const {
37        return !(theDet!=o.theDet || thePtCode!=o.thePtCode || thePhiCode!=o.thePhiCode || theCharge!=o.theCharge);
38      }
39 <    double ptValue() const { return  L1RpcTriggerAnalysisEfficiencyUtilities::PtScale().ptValue( thePtCode); }
40 <    double phiValue() const { return (double)thePhiCode/3000.; }
41 <    double etaValue() const { return 6*(theDet==637602109) +
39 >    float ptValue() const { return  L1RpcTriggerAnalysisEfficiencyUtilities::PtScale().ptValue( thePtCode); }
40 >    float phiValue() const { return thePhiCode;}//(float)thePhiCode/3000.; }
41 >    float etaValue() const { return 6*(theDet==637602109) +
42                                              7*(theDet==637634877) +
43                                              8*(theDet==637599914) +
44                                              9*(theDet==637632682); }
# Line 66 | Line 67 | public:
67      }
68      bool operator<( const Result & o) const;
69      operator bool() const;
70 <    double value() const;
70 >    float value() const;
71      unsigned int nMatchedTot() const;
72      bool hasRpcDet(uint32_t rawId) {
73        for (auto it=myResults[GoldenPattern::POSRPC].cbegin();
# Line 78 | Line 79 | public:
79    private:
80      void run() const { if (checkMe) {checkMe=false; runNoCheck(); } }
81      void runNoCheck() const;
82 <    double norm(PosBenCase where, double whereInDist) const;
82 >    float norm(PosBenCase where, float whereInDist) const;
83    private:
84      mutable bool checkMe;
85 <    mutable double theValue;
85 <    //mutable unsigned int nMatchedPosRpc, nMatchedPosCsc, nMatchedPosDt, nMatchedBenCsc, nMatchedBenDt;
85 >    mutable float theValue;
86      mutable std::map<GoldenPattern::PosBenCase, unsigned int> nMatchedPoints;
87    
88      bool hasStation1, hasStation2;
89 <    mutable std::map<GoldenPattern::PosBenCase, std::vector< std::pair<uint32_t, double > > > myResults;
90 <    /*
91 <    std::vector< std::pair<uint32_t, double > > posRpcResult;
92 <    std::vector< std::pair<uint32_t, double > > posCscResult;
93 <    std::vector< std::pair<uint32_t, double > > benCscResult;
94 <    std::vector< std::pair<uint32_t, double > > posDtResult;
95 <    std::vector< std::pair<uint32_t, double > > benDtResult;
96 <    */
89 >    mutable std::map<GoldenPattern::PosBenCase, std::vector< std::pair<uint32_t, float > > > myResults;
90      friend std::ostream & operator << (std::ostream &out, const Result& o);
91      friend class GoldenPattern;
92    };
# Line 127 | Line 120 | private:
120  
121   private:
122  
123 <  void purge();
124 <  double whereInDistribution(int obj, const MFreq & m) const;
123 >  bool purge();
124 >  float whereInDistribution(int obj, const MFreq & m) const;
125    friend std::ostream & operator << (std::ostream &out, const GoldenPattern & o);
126    friend class PatternManager;
127   };

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines