Changeset 4227 for trunk/MagicSoft/Mars/mcalib
- Timestamp:
- 05/27/04 18:54:57 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/mcalib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeBlindPix.cc
r4203 r4227 68 68 const Float_t MCalibrationChargeBlindPix::gkBlindPixelAttUV = 1.95; 69 69 const Float_t MCalibrationChargeBlindPix::gkBlindPixelAttCT1 = 1.95; 70 const Float_t MCalibrationChargeBlindPix::gkBlindPixelQEGreen = 0.154; 71 const Float_t MCalibrationChargeBlindPix::gkBlindPixelQEBlue = 0.226; 72 const Float_t MCalibrationChargeBlindPix::gkBlindPixelQEUV = 0.247; 73 const Float_t MCalibrationChargeBlindPix::gkBlindPixelQECT1 = 0.247; 74 const Float_t MCalibrationChargeBlindPix::gkBlindPixelQEGreenErr = 0.015; 75 const Float_t MCalibrationChargeBlindPix::gkBlindPixelQEBlueErr = 0.02; 76 const Float_t MCalibrationChargeBlindPix::gkBlindPixelQEUVErr = 0.02; 77 const Float_t MCalibrationChargeBlindPix::gkBlindPixelQECT1Err = 0.02; 70 const Float_t MCalibrationChargeBlindPix::gkBlindPixelQEUnCoatedGreen = 0.154; 71 const Float_t MCalibrationChargeBlindPix::gkBlindPixelQEUnCoatedBlue = 0.226; 72 const Float_t MCalibrationChargeBlindPix::gkBlindPixelQEUnCoatedUV = 0.247; 73 const Float_t MCalibrationChargeBlindPix::gkBlindPixelQEUnCoatedCT1 = 0.247; 74 const Float_t MCalibrationChargeBlindPix::gkBlindPixelQEUnCoatedGreenErr = 0.015; 75 const Float_t MCalibrationChargeBlindPix::gkBlindPixelQEUnCoatedBlueErr = 0.02; 76 const Float_t MCalibrationChargeBlindPix::gkBlindPixelQEUnCoatedUVErr = 0.02; 77 const Float_t MCalibrationChargeBlindPix::gkBlindPixelQEUnCoatedCT1Err = 0.02; 78 const Float_t MCalibrationChargeBlindPix::gkBlindPixelQECoatedGreen = 0.192; 79 const Float_t MCalibrationChargeBlindPix::gkBlindPixelQECoatedBlue = 0.27; 80 const Float_t MCalibrationChargeBlindPix::gkBlindPixelQECoatedUV = 0.285; 81 const Float_t MCalibrationChargeBlindPix::gkBlindPixelQECoatedCT1 = 0.285; 82 const Float_t MCalibrationChargeBlindPix::gkBlindPixelQECoatedGreenErr = 0.05; 83 const Float_t MCalibrationChargeBlindPix::gkBlindPixelQECoatedBlueErr = 0.07; 84 const Float_t MCalibrationChargeBlindPix::gkBlindPixelQECoatedUVErr = 0.07; 85 const Float_t MCalibrationChargeBlindPix::gkBlindPixelQECoatedCT1Err = 0.07; 78 86 // -------------------------------------------------------------------------- 79 87 // … … 82 90 // Calls: 83 91 // - Clear() 92 // - SetCoated() 84 93 // 85 94 MCalibrationChargeBlindPix::MCalibrationChargeBlindPix(const char *name, const char *title) … … 89 98 fTitle = title ? title : "Container of the fit results of the blind pixel"; 90 99 100 SetCoated(); 91 101 Clear(); 92 102 } … … 139 149 // -------------------------------------------------------------------------- 140 150 // 151 // Set the Coated Bit from outside 152 // 153 void MCalibrationChargeBlindPix::SetCoated( const Bool_t b) 154 { 155 b ? SETBIT(fFlags,kCoated) : CLRBIT(fFlags,kCoated); 156 } 157 158 // -------------------------------------------------------------------------- 159 // 141 160 // Set the Oscillating Bit from outside 142 161 // … … 239 258 // Return gkBlindPixelQEGreenErr^2 / (gkBlindPixelQEGreen^2 ) 240 259 // 241 const Float_t MCalibrationChargeBlindPix::GetBlindPixelQEGreenRelVar() const 242 { 243 if (gkBlindPixelQEGreenErr < 0.) 244 return -1.; 245 246 if (gkBlindPixelQEGreen == 0.) 247 return -1.; 248 249 return gkBlindPixelQEGreenErr * gkBlindPixelQEGreenErr / gkBlindPixelQEGreen / gkBlindPixelQEGreen ; 260 const Float_t MCalibrationChargeBlindPix::GetBlindPixelQEGreen() const 261 { 262 263 if (IsCoated()) 264 { 265 if (gkBlindPixelQECoatedGreen < 0.) 266 return -1.; 267 268 return gkBlindPixelQECoatedGreen; 269 } 270 else 271 { 272 if (gkBlindPixelQEUnCoatedGreen < 0.) 273 return -1.; 274 275 return gkBlindPixelQEUnCoatedGreen; 276 } 277 250 278 } 251 279 … … 256 284 // Return gkBlindPixelQEBlueErr^2 / gkBlindPixelQEBlue^2 257 285 // 258 const Float_t MCalibrationChargeBlindPix::GetBlindPixelQEBlueRelVar() const 259 { 260 if (gkBlindPixelQEBlueErr < 0.) 261 return -1.; 262 263 if (gkBlindPixelQEBlue == 0.) 264 return -1.; 265 266 return gkBlindPixelQEBlueErr * gkBlindPixelQEBlueErr / gkBlindPixelQEBlue / gkBlindPixelQEBlue ; 286 const Float_t MCalibrationChargeBlindPix::GetBlindPixelQEBlue() const 287 { 288 if (IsCoated()) 289 { 290 if (gkBlindPixelQECoatedBlue < 0.) 291 return -1.; 292 293 return gkBlindPixelQECoatedBlue; 294 } 295 else 296 { 297 if (gkBlindPixelQEUnCoatedBlue < 0.) 298 return -1.; 299 300 return gkBlindPixelQEUnCoatedBlue; 301 } 267 302 } 268 303 … … 273 308 // Return gkBlindPixelQEUVErr ^2 / gkBlindPixelQEUV^2 274 309 // 275 const Float_t MCalibrationChargeBlindPix::GetBlindPixelQEUVRelVar() const 276 { 277 if (gkBlindPixelQEUVErr < 0.) 278 return -1.; 279 280 if (gkBlindPixelQEUV == 0.) 281 return -1.; 282 283 return gkBlindPixelQEUVErr * gkBlindPixelQEUVErr / gkBlindPixelQEUV / gkBlindPixelQEUV ; 310 const Float_t MCalibrationChargeBlindPix::GetBlindPixelQEUV() const 311 { 312 313 if (IsCoated()) 314 { 315 if (gkBlindPixelQECoatedUV < 0.) 316 return -1.; 317 318 return gkBlindPixelQECoatedUV; 319 } 320 else 321 { 322 if (gkBlindPixelQEUnCoatedUV < 0.) 323 return -1.; 324 325 326 return gkBlindPixelQEUnCoatedUV; 327 } 284 328 } 285 329 … … 290 334 // Return gkBlindPixelQECT1Err ^2 / gkBlindPixelQECT1^2 291 335 // 336 const Float_t MCalibrationChargeBlindPix::GetBlindPixelQECT1() const 337 { 338 339 if (IsCoated()) 340 { 341 if (gkBlindPixelQECoatedCT1 < 0.) 342 return -1.; 343 344 return gkBlindPixelQECoatedCT1; 345 } 346 else 347 { 348 if (gkBlindPixelQEUnCoatedCT1 < 0.) 349 return -1.; 350 351 return gkBlindPixelQEUnCoatedCT1; 352 } 353 } 354 355 // -------------------------------------------------------------------------- 356 // 357 // Return -1 if gkBlindPixelQEGreenErr is smaller than 0. 358 // Return -1 if gkBlindPixelQEGreen is 0. 359 // Return gkBlindPixelQEGreenErr^2 / (gkBlindPixelQEGreen^2 ) 360 // 361 const Float_t MCalibrationChargeBlindPix::GetBlindPixelQEGreenRelVar() const 362 { 363 364 if (IsCoated()) 365 { 366 if (gkBlindPixelQECoatedGreenErr < 0.) 367 return -1.; 368 369 if (gkBlindPixelQECoatedGreen == 0.) 370 return -1.; 371 372 return gkBlindPixelQECoatedGreenErr * gkBlindPixelQECoatedGreenErr 373 / gkBlindPixelQECoatedGreen / gkBlindPixelQECoatedGreen ; 374 } 375 else 376 { 377 if (gkBlindPixelQEUnCoatedGreenErr < 0.) 378 return -1.; 379 380 if (gkBlindPixelQEUnCoatedGreen == 0.) 381 return -1.; 382 383 return gkBlindPixelQEUnCoatedGreenErr * gkBlindPixelQEUnCoatedGreenErr 384 / gkBlindPixelQEUnCoatedGreen / gkBlindPixelQEUnCoatedGreen ; 385 } 386 387 } 388 389 // -------------------------------------------------------------------------- 390 // 391 // Return -1 if gkBlindPixelQEBlueErr is smaller than 0. 392 // Return -1 if gkBlindPixelQEBlue is 0. 393 // Return gkBlindPixelQEBlueErr^2 / gkBlindPixelQEBlue^2 394 // 395 const Float_t MCalibrationChargeBlindPix::GetBlindPixelQEBlueRelVar() const 396 { 397 if (IsCoated()) 398 { 399 if (gkBlindPixelQECoatedBlueErr < 0.) 400 return -1.; 401 402 if (gkBlindPixelQECoatedBlue == 0.) 403 return -1.; 404 405 return gkBlindPixelQECoatedBlueErr * gkBlindPixelQECoatedBlueErr 406 / gkBlindPixelQECoatedBlue / gkBlindPixelQECoatedBlue ; 407 } 408 else 409 { 410 if (gkBlindPixelQEUnCoatedBlueErr < 0.) 411 return -1.; 412 413 if (gkBlindPixelQEUnCoatedBlue == 0.) 414 return -1.; 415 416 return gkBlindPixelQEUnCoatedBlueErr * gkBlindPixelQEUnCoatedBlueErr 417 / gkBlindPixelQEUnCoatedBlue / gkBlindPixelQEUnCoatedBlue ; 418 } 419 } 420 421 // -------------------------------------------------------------------------- 422 // 423 // Return -1 if gkBlindPixelQEUVErr is smaller than 0. 424 // Return -1 if gkBlindPixelQEUV is 0. 425 // Return gkBlindPixelQEUVErr ^2 / gkBlindPixelQEUV^2 426 // 427 const Float_t MCalibrationChargeBlindPix::GetBlindPixelQEUVRelVar() const 428 { 429 430 if (IsCoated()) 431 { 432 if (gkBlindPixelQECoatedUVErr < 0.) 433 return -1.; 434 435 if (gkBlindPixelQECoatedUV == 0.) 436 return -1.; 437 438 return gkBlindPixelQECoatedUVErr * gkBlindPixelQECoatedUVErr 439 / gkBlindPixelQECoatedUV / gkBlindPixelQECoatedUV ; 440 } 441 else 442 { 443 if (gkBlindPixelQEUnCoatedUVErr < 0.) 444 return -1.; 445 446 if (gkBlindPixelQEUnCoatedUV == 0.) 447 return -1.; 448 449 return gkBlindPixelQEUnCoatedUVErr * gkBlindPixelQEUnCoatedUVErr 450 / gkBlindPixelQEUnCoatedUV / gkBlindPixelQEUnCoatedUV ; 451 } 452 } 453 454 // -------------------------------------------------------------------------- 455 // 456 // Return -1 if gkBlindPixelQECT1Err is smaller than 0. 457 // Return -1 if gkBlindPixelQECT1 is 0. 458 // Return gkBlindPixelQECT1Err ^2 / gkBlindPixelQECT1^2 459 // 292 460 const Float_t MCalibrationChargeBlindPix::GetBlindPixelQECT1RelVar() const 293 461 { 294 if (gkBlindPixelQECT1Err < 0.) 295 return -1.; 296 297 if (gkBlindPixelQECT1 == 0.) 298 return -1.; 299 300 return gkBlindPixelQECT1Err * gkBlindPixelQECT1Err / gkBlindPixelQECT1 / gkBlindPixelQECT1 ; 462 463 if (IsCoated()) 464 { 465 if (gkBlindPixelQECoatedCT1Err < 0.) 466 return -1.; 467 468 if (gkBlindPixelQECoatedCT1 == 0.) 469 return -1.; 470 471 return gkBlindPixelQECoatedCT1Err * gkBlindPixelQECoatedCT1Err 472 / gkBlindPixelQECoatedCT1 / gkBlindPixelQECoatedCT1 ; 473 } 474 else 475 { 476 if (gkBlindPixelQEUnCoatedCT1Err < 0.) 477 return -1.; 478 479 if (gkBlindPixelQEUnCoatedCT1 == 0.) 480 return -1.; 481 482 return gkBlindPixelQEUnCoatedCT1Err * gkBlindPixelQEUnCoatedCT1Err 483 / gkBlindPixelQEUnCoatedCT1 / gkBlindPixelQEUnCoatedCT1 ; 484 } 301 485 } 302 486 … … 312 496 // -------------------------------------------------------------------------- 313 497 // 498 // Test bit kCoated 499 // 500 Bool_t MCalibrationChargeBlindPix::IsCoated() const 501 { 502 return TESTBIT(fFlags,kCoated); 503 } 504 505 // -------------------------------------------------------------------------- 506 // 314 507 // Test bit kOscillating 315 508 // … … 352 545 // 353 546 // Calculate fFluxInsidePlexiglass with the formula: 354 // - fFluxInsidePlexiglass = fLambda * gkBlindPixelArea / gkBlindPixelQE* 10**gkBlindPixelAtt547 // - fFluxInsidePlexiglass = fLambda * gkBlindPixelArea / GetBlindPixelQE() * 10**gkBlindPixelAtt 355 548 // - fFluxInsidePlexiglassVar = sqrt( fLambdaVar / ( fLambda * fLambda ) 356 549 // + ( gkBlindPixelQEErr * gkBlindPixelQEErr / gkBlindPixelQE / gkBlindPixelQE ) … … 376 569 { 377 570 case MCalibrationCam::kGREEN: 378 fFluxInsidePlexiglass = fLambda / gkBlindPixelQEGreen* TMath::Power(10,gkBlindPixelAttGreen);571 fFluxInsidePlexiglass = fLambda / GetBlindPixelQEGreen() * TMath::Power(10,gkBlindPixelAttGreen); 379 572 // attenuation has negligible error 380 573 fFluxInsidePlexiglassVar = GetLambdaRelVar() + GetBlindPixelQEGreenRelVar(); 381 574 break; 382 575 case MCalibrationCam::kBLUE: 383 fFluxInsidePlexiglass = fLambda / gkBlindPixelQEBlue* TMath::Power(10,gkBlindPixelAttBlue);576 fFluxInsidePlexiglass = fLambda / GetBlindPixelQEBlue() * TMath::Power(10,gkBlindPixelAttBlue); 384 577 // attenuation has negligible error 385 578 fFluxInsidePlexiglassVar = GetLambdaRelVar() + GetBlindPixelQEBlueRelVar(); 386 579 break; 387 580 case MCalibrationCam::kUV: 388 fFluxInsidePlexiglass = fLambda / gkBlindPixelQEUV* TMath::Power(10,gkBlindPixelAttUV);581 fFluxInsidePlexiglass = fLambda / GetBlindPixelQEUV() * TMath::Power(10,gkBlindPixelAttUV); 389 582 // attenuation has negligible error 390 583 fFluxInsidePlexiglassVar = GetLambdaRelVar() + GetBlindPixelQEUVRelVar(); … … 392 585 case MCalibrationCam::kCT1: 393 586 default: 394 fFluxInsidePlexiglass = fLambda / gkBlindPixelQECT1* TMath::Power(10,gkBlindPixelAttCT1);587 fFluxInsidePlexiglass = fLambda / GetBlindPixelQECT1() * TMath::Power(10,gkBlindPixelAttCT1); 395 588 // attenuation has negligible error 396 589 fFluxInsidePlexiglassVar = GetLambdaRelVar() + GetBlindPixelQECT1RelVar(); -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeBlindPix.h
r3699 r4227 14 14 private: 15 15 16 static const Float_t gkBlindPixelArea; //! The Blind Pixel area in mm^2 17 static const Float_t gkBlindPixelAttGreen; //! Attenuation Filter at 520 nm 18 static const Float_t gkBlindPixelAttBlue ; //! Attenuation Filter at 460 nm 19 static const Float_t gkBlindPixelAttUV ; //! Attenuation Filter at 370 nm 20 static const Float_t gkBlindPixelAttCT1 ; //! Attenuation Filter at 370 nm 21 static const Float_t gkBlindPixelQEGreen; //! Quantum Efficiency at 520 nm 22 static const Float_t gkBlindPixelQEBlue ; //! Quantum Efficiency at 460 nm 23 static const Float_t gkBlindPixelQEUV ; //! Quantum Efficiency at 370 nm 24 static const Float_t gkBlindPixelQECT1 ; //! Quantum Efficiency at 370 nm 25 static const Float_t gkBlindPixelQEGreenErr; //! Uncertainty QE at 520 nm 26 static const Float_t gkBlindPixelQEBlueErr ; //! Uncertainty QE at 460 nm 27 static const Float_t gkBlindPixelQEUVErr ; //! Uncertainty QE at 370 nm 28 static const Float_t gkBlindPixelQECT1Err ; //! Uncertainty QE at 370 nmu 16 static const Float_t gkBlindPixelArea; //! The Blind Pixel area in mm^2 17 static const Float_t gkBlindPixelAttGreen; //! Attenuation Filter at 520 nm 18 static const Float_t gkBlindPixelAttBlue ; //! Attenuation Filter at 460 nm 19 static const Float_t gkBlindPixelAttUV ; //! Attenuation Filter at 370 nm 20 static const Float_t gkBlindPixelAttCT1 ; //! Attenuation Filter at 370 nm 21 static const Float_t gkBlindPixelQEUnCoatedGreen; //! Quantum Efficiency at 520 nm 22 static const Float_t gkBlindPixelQEUnCoatedBlue ; //! Quantum Efficiency at 460 nm 23 static const Float_t gkBlindPixelQEUnCoatedUV ; //! Quantum Efficiency at 370 nm 24 static const Float_t gkBlindPixelQEUnCoatedCT1 ; //! Quantum Efficiency at 370 nm 25 static const Float_t gkBlindPixelQEUnCoatedGreenErr; //! Uncertainty QEUnCoated at 520 nm 26 static const Float_t gkBlindPixelQEUnCoatedBlueErr ; //! Uncertainty QEUnCoated at 460 nm 27 static const Float_t gkBlindPixelQEUnCoatedUVErr ; //! Uncertainty QEUnCoated at 370 nm 28 static const Float_t gkBlindPixelQEUnCoatedCT1Err ; //! Uncertainty QEUnCoated at 370 nmu 29 static const Float_t gkBlindPixelQECoatedGreen; //! Quantum Efficiency at 520 nm 30 static const Float_t gkBlindPixelQECoatedBlue ; //! Quantum Efficiency at 460 nm 31 static const Float_t gkBlindPixelQECoatedUV ; //! Quantum Efficiency at 370 nm 32 static const Float_t gkBlindPixelQECoatedCT1 ; //! Quantum Efficiency at 370 nm 33 static const Float_t gkBlindPixelQECoatedGreenErr; //! Uncertainty QECoated at 520 nm 34 static const Float_t gkBlindPixelQECoatedBlueErr ; //! Uncertainty QECoated at 460 nm 35 static const Float_t gkBlindPixelQECoatedUVErr ; //! Uncertainty QECoated at 370 nm 36 static const Float_t gkBlindPixelQECoatedCT1Err ; //! Uncertainty QECoated at 370 nmu 29 37 30 38 Float_t fLambda; // Mean Poisson fit … … 44 52 45 53 enum { kOscillating, kPedestalFitOK, kSinglePheFitOK, kChargeFitValid, 46 kFluxInsidePlexiglassAvailable };54 kFluxInsidePlexiglassAvailable, kCoated }; 47 55 48 MCalibrationCam::PulserColor_t fColor; 56 MCalibrationCam::PulserColor_t fColor; 57 58 const Float_t GetBlindPixelQEGreen() const; 59 const Float_t GetBlindPixelQEBlue () const; 60 const Float_t GetBlindPixelQEUV () const; 61 const Float_t GetBlindPixelQECT1 () const; 49 62 50 63 const Float_t GetBlindPixelQEGreenRelVar() const; … … 80 93 Float_t GetSigma1Err () const { return fSigma1Err; } 81 94 95 Bool_t IsCoated () const; 82 96 Bool_t IsOscillating () const; 83 97 Bool_t IsChargeFitValid () const; … … 101 115 void SetSigma1Err ( const Float_t f ) { fSigma1Err = f; } 102 116 117 void SetCoated ( const Bool_t b=kTRUE ); 103 118 void SetOscillating ( const Bool_t b=kTRUE ); 104 119 void SetChargeFitValid ( const Bool_t b=kTRUE ); … … 107 122 void SetFluxInsidePlexiglassAvailable( const Bool_t b=kTRUE); 108 123 109 ClassDef(MCalibrationChargeBlindPix, 1) // Container Charge Calibration Results Blind Pixel124 ClassDef(MCalibrationChargeBlindPix, 2) // Container Charge Calibration Results Blind Pixel 110 125 }; 111 126
Note:
See TracChangeset
for help on using the changeset viewer.