- Timestamp:
- 05/19/06 18:33:04 (18 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r7720 r7721 47 47 - implemented fitting of the off-data for background determination 48 48 - the result values are not yet accessible 49 - increased class version by 1 49 50 50 51 * mhflux/MHThetaSqN.[h,cc]: -
trunk/MagicSoft/Mars/mhflux/MHThetaSqN.cc
r7720 r7721 189 189 } 190 190 191 // -------------------------------------------------------------------------- 192 // 193 // Abbreviation to set the value used by MHAlpha to fill the histogram 194 // 191 195 void MHThetaSqN::SetVal(Double_t val) 192 196 { … … 194 198 } 195 199 200 // -------------------------------------------------------------------------- 201 // 202 // Abbreviation to set the value used by MHAlpha to fill the histogram 203 // 196 204 TVector2 MHThetaSqN::GetVec(const TVector2 &v, Int_t n1) const 197 205 { … … 216 224 const UInt_t n = fNumOffSourcePos+1; 217 225 const Float_t rad = TMath::TwoPi()/n; 218 219 /*220 for (UInt_t i=0; i<n; i++)221 {222 // off: is in src region on: is in off regions223 /// if (!fOffData && i==0) || (fOffData && i!=0)224 if ((bool)fOffData ^ (i==0) )225 continue;226 227 const TVector2 src = const_cast<TVector2&>(src0).Rotate(i*rad);228 SetVal((src-org).Mod2());229 230 if (!MHAlpha::Fill(NULL, weight))231 return kFALSE;232 }233 */234 226 235 227 // Calculate distance (theta-sq) to all (off-)source regions … … 279 271 } 280 272 281 /*282 283 // Calculate distance (theta-sq) to all (off-)source regions284 TArrayD dist(n);285 for (UInt_t i=0; i<n; i++)286 {287 const TVector2 src = const_cast<TVector2&>(src0).Rotate(i*rad);288 dist[i] = (src-org).Mod2();289 }290 291 for (UInt_t i=0; i<n; i++)292 {293 // off: is in src region on: is in off regions294 /// if (!fOffData && i==0) || (fOffData && i!=0)295 if ((bool)fOffData ^ (i==0) )296 continue;297 298 if (fDoOffCut)299 {300 UInt_t j;301 for (j=0; j<n; j++)302 {303 if (i==j)304 continue;305 306 // *1.5: 99%307 // *1.4: 98%308 // *1.3: 97%309 // *1.2: 96%310 // *1.1: 94%311 // *1.0: 91%312 313 if (dist[j]<fThetaSqCut)314 break;315 }316 if (j<n)317 continue;318 }319 320 SetVal(dist[i]);321 322 if (!MHAlpha::Fill(NULL, weight))323 return kFALSE;324 }325 */326 /*327 for (UInt_t i=0; i<n; i++)328 {329 // off: is in src region on: is in off regions330 /// if (!fOffData && i==0) || (fOffData && i!=0)331 if ((bool)fOffData ^ (i==0) )332 continue;333 334 if (fDoOffCut)335 {336 const TVector2 src1 = const_cast<TVector2&>(src0).Rotate(i*rad+TMath::Pi());337 const Double_t d1 = (src1-org).Mod2();338 339 if (d1<fFit.GetSignalIntegralMax())340 continue;341 }342 343 const TVector2 src = const_cast<TVector2&>(src0).Rotate(i*rad);344 const Double_t d0 = (src-org).Mod2();345 346 SetVal(d0);347 348 if (!MHAlpha::Fill(NULL, weight))349 return kFALSE;350 }351 */352 353 /*354 for (UInt_t i=0; i<n; i++)355 {356 const TVector2 src = const_cast<TVector2&>(src0).Rotate(i*rad);357 const Double_t d = (src-org).Mod2();358 359 // off: is in src region on: is in off regions360 /// if (!fOffData && i==0) || (fOffData && i!=0)361 if ((bool)fOffData ^ (i==0) )362 {363 if (d<fFit.GetSignalIntegralMax() && fDoOffCut)364 return kTRUE;365 366 // do not fill off data when aiming for on and vice versa367 continue;368 }369 370 SetVal(d);371 372 if (!MHAlpha::Fill(NULL, weight))373 return kFALSE;374 }375 */376 273 if (!fOffData) 377 274 {
Note:
See TracChangeset
for help on using the changeset viewer.