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

Comparing UserCode/OSUT3Analysis/AnaTools/src/SFWeight.cc (file contents):
Revision 1.1 by ahart, Tue Mar 12 20:43:04 2013 UTC vs.
Revision 1.2 by lantonel, Tue Apr 30 22:22:08 2013 UTC

# Line 2 | Line 2
2  
3   MuonSFWeight::MuonSFWeight (const string &sfFile, const string &dataOverMC)
4   {
5 +
6    TFile *fin = TFile::Open (sfFile.c_str ());
7    TGraphAsymmErrors *data = (TGraphAsymmErrors *) fin->Get (dataOverMC.c_str ());
8  
# Line 81 | Line 82 | ElectronSFWeight::ElectronSFWeight (cons
82   double
83   ElectronSFWeight::at (const double &eta, const double &pt)
84   {
85 +  cout << eta << " " << pt << endl;
86 +  cout << "doing it\n";
87    if (cmsswRelease_ == "53X")
88      {
89        if (id_ == "tight")
# Line 161 | Line 164 | ElectronSFWeight::at (const double &eta,
164                  return 0.995;
165              }
166          }
167 +      if (id_ == "mvaNonTrig")
168 +        {
169 +          cout << "mvaNonTrig\n";
170 +          if (fabs (eta) < 0.8)
171 +            {
172 +              if (pt < 20.0)
173 +                return 1.0;
174 +              if (pt < 30.0 && pt >= 20.0)
175 +                return 0.994;
176 +              if (pt < 40.0 && pt >= 30.0)
177 +                return 0.974;
178 +              if (pt < 50.0 && pt >= 40.0)
179 +                return 0.988;
180 +              if (pt < 200.0 && pt >= 50.0)
181 +                return 0.999;
182 +            }
183 +          if (fabs (eta) < 1.478 && fabs (eta) >= 0.8)
184 +            {
185 +              if (pt < 20.0)
186 +                return 1.0;
187 +              if (pt < 30.0 && pt >= 20.0)
188 +                return 0.971;
189 +              if (pt < 40.0 && pt >= 30.0)
190 +                return 0.967;
191 +              if (pt < 50.0 && pt >= 40.0)
192 +                return 0.984;
193 +              if (pt < 200.0 && pt >= 50.0)
194 +                return 0.998;
195 +            }
196 +          if (fabs (eta) <= 2.5 && fabs (eta) >= 1.478)
197 +            {
198 +              if (pt < 20.0)
199 +                return 1.0;
200 +              if (pt < 30.0 && pt >= 20.0)
201 +                return 0.921;
202 +              if (pt < 40.0 && pt >= 30.0)
203 +                return 0.932;
204 +              if (pt < 50.0 && pt >= 40.0)
205 +                return 0.968;
206 +              if (pt < 200.0 && pt >= 50.0)
207 +                return 0.983;
208 +            }
209 +        }
210      }
211  
212    return 0.0;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines