Changeset 7202 for trunk/MagicSoft/Mars/mhflux
- Timestamp:
- 07/21/05 11:44:05 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhflux/MHDisp.cc
r7193 r7202 213 213 } 214 214 215 if (fSmearing<=0)216 {217 fHist.Fill(pos1.X(), pos1.Y(), 0.0, w*w0);218 return kTRUE;219 }220 221 215 // ------------------------------------------------- 222 216 // The following algorithm may look complicated... … … 241 235 const Int_t bz = fHist.GetZaxis()->FindFixBin(0); 242 236 243 TH1 &bg = fHalf ? fHistBg1 : fHistBg2; 237 TH2 &bg = fHalf ? fHistBg1 : fHistBg2; 238 239 const Bool_t smear = fSmearing>0; 240 if (!smear) 241 { 242 if (!fHistOff) 243 bg.Fill(pos1.X(), pos1.Y(), w*w0); 244 else 245 fHist.Fill(pos1.X(), pos1.Y(), 0.0, w*w0); 246 } 244 247 245 248 // To calculate significance map smear with 2*theta-cut and … … 254 257 const Double_t cy = axey.GetBinCenter(y); 255 258 const Double_t sp = Sq(px, cy-pos1.Y()); 256 const Double_t dp = sp/psf; 257 258 // Values below 1e-3 (>3.5sigma) are not filled into the histogram 259 if (dp<4) 259 if (smear) 260 260 { 261 const Double_t rc = TMath::Exp(-dp)/normg; 262 if (!fHistOff) 263 bg.AddBinContent(bg.GetBin(x, y), rc); 264 else 265 fHist.AddBinContent(fHist.GetBin(x, y, bz), rc); 261 const Double_t dp = sp/psf; 262 263 // Values below 1e-3 (>3.5sigma) are not filled into the histogram 264 if (dp<4) 265 { 266 const Double_t rc = TMath::Exp(-dp)/normg; 267 if (!fHistOff) 268 bg.AddBinContent(bg.GetBin(x, y), rc); 269 else 270 fHist.AddBinContent(fHist.GetBin(x, y, bz), rc); 271 } 266 272 } 267 273 … … 285 291 } 286 292 } 287 fHist.SetEntries(fHist.GetEntries()+1); 293 294 if (fHistOff) 295 fHistBg.SetEntries(fHistBg.GetEntries()+1); 296 297 if (!smear) 298 return kTRUE; 288 299 289 300 if (!fHistOff) 290 bg.SetEntries(fHistBg1.GetEntries()+1); 301 bg.SetEntries(bg.GetEntries()+1); 302 else 303 fHist.SetEntries(fHist.GetEntries()+1); 291 304 292 305 return kTRUE;
Note:
See TracChangeset
for help on using the changeset viewer.