Changeset 3637 for trunk/MagicSoft/Mars
- Timestamp:
- 04/03/04 17:35:39 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r3636 r3637 24 24 * mcalib/MHCalibrationChargeHiGainPix.[h,cc] 25 25 * mcalib/MHCalibrationChargeLoGainPix.[h,cc] 26 * mcalib/MHCalibrationRelTimePix.[h,cc] 26 * mcalib/MHCalibrationChargeBlindPix.[h,cc] 27 * mcalib/MHCalibrationChargePINDiode.[h,cc] 27 28 - put fPixId, fPickup, fPickupLimt, CountPickup(), RepeatFit() and 28 29 ChangeHistId() into MHGausEvents (before in the derived classes) 29 30 - put fChargeNbins, fChargeFirst, fChargeLast, 31 * mcalib/MHCalibrationRelTimePix.[h,cc] 30 32 - put fRelTimeNbins, fRelTimeFirst, fRelTimeLast together 31 33 into MHGausEvents as fNbins, fFirst and fLast -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.cc
r3627 r3637 111 111 // 112 112 MCalibrationChargePix::MCalibrationChargePix(const char *name, const char *title) 113 : fPixId(-1), 114 fFlags(0) 113 : fCalibFlags(0) 115 114 { 116 115 … … 138 137 { 139 138 140 SetHiGainSaturation ( kFALSE );141 SetExcluded ( kFALSE );142 139 SetBlindPixelMethodValid ( kFALSE ); 143 140 SetFFactorMethodValid ( kFALSE ); … … 145 142 SetCombinedMethodValid ( kFALSE ); 146 143 147 fHiGainMeanCharge = -1.; 148 fHiGainMeanChargeVar = -1.; 149 fHiGainSigmaCharge = -1.; 150 fHiGainSigmaChargeVar = -1.; 151 fHiGainChargeProb = -1.; 152 153 fLoGainMeanCharge = -1.; 154 fLoGainMeanChargeVar = -1.; 155 fLoGainSigmaCharge = -1.; 156 fLoGainSigmaChargeVar = -1.; 157 fLoGainChargeProb = -1.; 158 159 fRSigmaCharge = -1.; 160 fRSigmaChargeVar = -1.; 161 162 fHiGainNumPickup = -1; 163 fLoGainNumPickup = -1; 164 144 fRSigma = -1.; 145 fRSigmaVar = -1.; 146 165 147 fPed = -1.; 166 148 fPedRms = -1.; … … 196 178 fTotalFFactorCombinedMethod = -1.; 197 179 180 MCalibrationPix::Clear(); 198 181 } 199 182 … … 212 195 213 196 214 void MCalibrationChargePix::SetMeanCharge( const Float_t f )215 {216 if (IsHiGainSaturation())217 fLoGainMeanCharge = f;218 else219 fHiGainMeanCharge = f;220 }221 222 void MCalibrationChargePix::SetMeanChargeErr( const Float_t f )223 {224 if (IsHiGainSaturation())225 fLoGainMeanChargeVar = f*f;226 else227 fHiGainMeanChargeVar = f*f;228 229 }230 231 void MCalibrationChargePix::SetSigmaCharge( const Float_t f )232 {233 if (IsHiGainSaturation())234 fLoGainSigmaCharge = f;235 else236 fHiGainSigmaCharge = f;237 }238 239 240 void MCalibrationChargePix::SetSigmaChargeErr( const Float_t f )241 {242 if (IsHiGainSaturation())243 fLoGainSigmaChargeVar = f*f;244 else245 fHiGainSigmaChargeVar = f*f;246 247 }248 197 249 198 // -------------------------------------------------------------------------- … … 294 243 // -------------------------------------------------------------------------- 295 244 // 296 // Set the Hi Gain Saturation Bit from outside297 //298 void MCalibrationChargePix::SetHiGainSaturation(Bool_t b)299 {300 b ? SETBIT(fFlags, kHiGainSaturation) : CLRBIT(fFlags, kHiGainSaturation);301 }302 303 304 // --------------------------------------------------------------------------305 //306 245 // Set the Excluded Bit from outside 307 246 // 308 void MCalibrationChargePix::SetExcluded(Bool_t b ) 309 { 310 b ? SETBIT(fFlags, kExcluded) : CLRBIT(fFlags, kExcluded); 311 } 312 313 247 void MCalibrationChargePix::SetBlindPixelMethodValid(const Bool_t b ) 248 { 249 b ? SETBIT(fCalibFlags, kBlindPixelMethodValid) : CLRBIT(fCalibFlags, kBlindPixelMethodValid); 250 } 251 314 252 // -------------------------------------------------------------------------- 315 253 // 316 254 // Set the Excluded Bit from outside 317 255 // 318 void MCalibrationChargePix::Set BlindPixelMethodValid(const Bool_t b )319 { 320 b ? SETBIT(f Flags, kBlindPixelMethodValid) : CLRBIT(fFlags, kBlindPixelMethodValid);256 void MCalibrationChargePix::SetFFactorMethodValid(const Bool_t b ) 257 { 258 b ? SETBIT(fCalibFlags, kFFactorMethodValid) : CLRBIT(fCalibFlags, kFFactorMethodValid); 321 259 } 322 260 … … 325 263 // Set the Excluded Bit from outside 326 264 // 327 void MCalibrationChargePix::Set FFactorMethodValid(const Bool_t b )328 { 329 b ? SETBIT(f Flags, kFFactorMethodValid) : CLRBIT(fFlags, kFFactorMethodValid);330 } 265 void MCalibrationChargePix::SetPINDiodeMethodValid(const Bool_t b ) 266 { 267 b ? SETBIT(fCalibFlags, kPINDiodeMethodValid) : CLRBIT(fCalibFlags, kPINDiodeMethodValid); 268 } 331 269 332 270 // -------------------------------------------------------------------------- … … 334 272 // Set the Excluded Bit from outside 335 273 // 336 void MCalibrationChargePix::SetPINDiodeMethodValid(const Bool_t b )337 {338 b ? SETBIT(fFlags, kPINDiodeMethodValid) : CLRBIT(fFlags, kPINDiodeMethodValid);339 }340 341 // --------------------------------------------------------------------------342 //343 // Set the Excluded Bit from outside344 //345 274 void MCalibrationChargePix::SetCombinedMethodValid(const Bool_t b ) 346 275 { 347 b ? SETBIT(f Flags, kCombinedMethodValid) : CLRBIT(fFlags, kCombinedMethodValid);276 b ? SETBIT(fCalibFlags, kCombinedMethodValid) : CLRBIT(fCalibFlags, kCombinedMethodValid); 348 277 } 349 278 … … 364 293 } 365 294 366 Float_t MCalibrationChargePix::GetMeanCharge() const 367 { 368 return IsHiGainSaturation() ? GetLoGainMeanCharge() : GetHiGainMeanCharge() ; 369 } 370 371 Float_t MCalibrationChargePix::GetMeanChargeErr() const 372 { 373 return IsHiGainSaturation() ? GetLoGainMeanChargeErr() : GetHiGainMeanChargeErr() ; 374 } 375 376 Float_t MCalibrationChargePix::GetChargeProb() const 377 { 378 return IsHiGainSaturation() ? fLoGainChargeProb : fHiGainChargeProb ; 379 } 380 381 Float_t MCalibrationChargePix::GetSigmaCharge() const 382 { 383 return IsHiGainSaturation() ? GetLoGainSigmaCharge() : GetHiGainSigmaCharge() ; 384 } 385 386 Float_t MCalibrationChargePix::GetSigmaChargeErr() const 387 { 388 return IsHiGainSaturation() ? GetLoGainSigmaChargeErr() : GetHiGainSigmaChargeErr() ; 389 } 390 391 Float_t MCalibrationChargePix::GetHiGainMeanChargeErr() const 392 { 393 return TMath::Sqrt(fHiGainMeanChargeVar); 394 } 395 396 Float_t MCalibrationChargePix::GetLoGainMeanCharge() const 397 { 398 return fLoGainMeanCharge * fConversionHiLo; 399 } 400 401 Float_t MCalibrationChargePix::GetLoGainMeanChargeErr() const 402 { 403 404 const Float_t chargeRelVar = fLoGainMeanChargeVar 405 /( fLoGainMeanCharge * fLoGainMeanCharge ); 295 296 Float_t MCalibrationChargePix::GetLoGainMean() const 297 { 298 return fLoGainMean * fConversionHiLo; 299 } 300 301 Float_t MCalibrationChargePix::GetLoGainMeanErr() const 302 { 303 304 const Float_t chargeRelVar = fLoGainMeanVar 305 /( fLoGainMean * fLoGainMean ); 406 306 407 307 const Float_t conversionRelVar = fConversionHiLoVar 408 308 /( fConversionHiLo * fConversionHiLo ); 409 309 410 return TMath::Sqrt(chargeRelVar+conversionRelVar) * GetLoGainMean Charge();411 } 412 413 Float_t MCalibrationChargePix::GetLoGainSigma Charge() const414 { 415 return fLoGainSigma Charge* fConversionHiLo;416 } 417 418 Float_t MCalibrationChargePix::GetLoGainSigma ChargeErr() const419 { 420 421 const Float_t sigmaRelVar = fLoGainSigma ChargeVar422 /( fLoGainSigma Charge * fLoGainSigmaCharge);310 return TMath::Sqrt(chargeRelVar+conversionRelVar) * GetLoGainMean(); 311 } 312 313 Float_t MCalibrationChargePix::GetLoGainSigma() const 314 { 315 return fLoGainSigma * fConversionHiLo; 316 } 317 318 Float_t MCalibrationChargePix::GetLoGainSigmaErr() const 319 { 320 321 const Float_t sigmaRelVar = fLoGainSigmaVar 322 /( fLoGainSigma * fLoGainSigma ); 423 323 424 324 const Float_t conversionRelVar = fConversionHiLoVar 425 325 /( fConversionHiLo * fConversionHiLo ); 426 326 427 return TMath::Sqrt(sigmaRelVar+conversionRelVar) * GetLoGainSigmaCharge(); 428 } 429 430 Float_t MCalibrationChargePix::GetHiGainSigmaChargeErr() const 431 { 432 return TMath::Sqrt(fHiGainSigmaChargeVar); 433 } 434 435 Float_t MCalibrationChargePix::GetRSigmaCharge() const 436 { 437 return IsHiGainSaturation() ? fRSigmaCharge*fConversionHiLo : fRSigmaCharge ; 327 return TMath::Sqrt(sigmaRelVar+conversionRelVar) * GetLoGainSigma(); 328 } 329 330 Float_t MCalibrationChargePix::GetRSigma() const 331 { 332 return IsHiGainSaturation() ? fRSigma*fConversionHiLo : fRSigma ; 438 333 } 439 334 440 Float_t MCalibrationChargePix::GetRSigma ChargeErr() const335 Float_t MCalibrationChargePix::GetRSigmaErr() const 441 336 { 442 337 if (IsHiGainSaturation()) 443 338 { 444 const Float_t rsigmaRelVar = fRSigma ChargeVar445 /( fRSigma Charge * fRSigmaCharge);339 const Float_t rsigmaRelVar = fRSigmaVar 340 /( fRSigma * fRSigma ); 446 341 const Float_t conversionRelVar = fConversionHiLoVar 447 342 /( fConversionHiLo * fConversionHiLo ); 448 return TMath::Sqrt(rsigmaRelVar+conversionRelVar) * GetRSigma Charge();343 return TMath::Sqrt(rsigmaRelVar+conversionRelVar) * GetRSigma(); 449 344 } 450 345 else 451 return TMath::Sqrt(fRSigma ChargeVar);346 return TMath::Sqrt(fRSigmaVar); 452 347 453 348 } … … 523 418 } 524 419 525 Bool_t MCalibrationChargePix::IsExcluded() const526 {527 return TESTBIT(fFlags,kExcluded);528 }529 530 Bool_t MCalibrationChargePix::IsHiGainSaturation() const531 {532 return TESTBIT(fFlags,kHiGainSaturation);533 }534 535 420 Bool_t MCalibrationChargePix::IsBlindPixelMethodValid() const 536 421 { 537 return TESTBIT(f Flags, kBlindPixelMethodValid);422 return TESTBIT(fCalibFlags, kBlindPixelMethodValid); 538 423 } 539 424 540 425 Bool_t MCalibrationChargePix::IsFFactorMethodValid() const 541 426 { 542 return TESTBIT(f Flags, kFFactorMethodValid);427 return TESTBIT(fCalibFlags, kFFactorMethodValid); 543 428 } 544 429 545 430 Bool_t MCalibrationChargePix::IsPINDiodeMethodValid() const 546 431 { 547 return TESTBIT(f Flags, kPINDiodeMethodValid);432 return TESTBIT(fCalibFlags, kPINDiodeMethodValid); 548 433 } 549 434 550 435 Bool_t MCalibrationChargePix::IsCombinedMethodValid() const 551 436 { 552 return TESTBIT(f Flags, kCombinedMethodValid);437 return TESTBIT(fCalibFlags, kCombinedMethodValid); 553 438 } 554 439 … … 559 444 { 560 445 561 const Float_t sigma charge = IsHiGainSaturation() ? fLoGainSigmaCharge : fHiGainSigmaCharge;562 const Float_t sigma chargevar = IsHiGainSaturation() ? fLoGainSigmaChargeVar : fHiGainSigmaChargeVar;563 564 const Float_t sigmaSquare = sigma charge * sigmacharge;565 const Float_t sigmaSquareVar = 4.* sigma chargevar * sigmaSquare;446 const Float_t sigma = IsHiGainSaturation() ? fLoGainSigma : fHiGainSigma ; 447 const Float_t sigmavar = IsHiGainSaturation() ? fLoGainSigmaVar : fHiGainSigmaVar; 448 449 const Float_t sigmaSquare = sigma * sigma; 450 const Float_t sigmaSquareVar = 4.* sigmavar * sigmaSquare; 566 451 567 452 Float_t pedRmsSquare ; … … 581 466 // Calculate the reduced sigmas 582 467 // 583 const Float_t rsigma chargesquare = sigmaSquare - pedRmsSquare;584 if (rsigma chargesquare <= 0.)468 const Float_t rsigmasquare = sigmaSquare - pedRmsSquare; 469 if (rsigmasquare <= 0.) 585 470 { 586 471 *fLog << warn … … 591 476 592 477 593 fRSigma Charge = TMath::Sqrt(rsigmachargesquare);594 fRSigma ChargeVar = 0.25 * (sigmaSquareVar + pedRmsSquareVar) / rsigmachargesquare;478 fRSigma = TMath::Sqrt(rsigmasquare); 479 fRSigmaVar = 0.25 * (sigmaSquareVar + pedRmsSquareVar) / rsigmasquare; 595 480 596 481 return kTRUE; … … 604 489 { 605 490 606 if (fRSigma Charge< 0.)491 if (fRSigma < 0.) 607 492 { 608 493 SetFFactorMethodValid(kFALSE); … … 610 495 } 611 496 612 const Float_t charge = IsHiGainSaturation() ? fLoGainMeanCharge : fHiGainMeanCharge;613 const Float_t chargevar = IsHiGainSaturation() ? fLoGainMeanChargeVar : fHiGainMeanChargeVar;497 const Float_t mean = IsHiGainSaturation() ? fLoGainMean : fHiGainMean ; 498 const Float_t var = IsHiGainSaturation() ? fLoGainMeanVar : fHiGainMeanVar; 614 499 615 500 // … … 618 503 // First the relative error squares 619 504 // 620 const Float_t chargeSquare = charge * charge;621 const Float_t chargeSquareRelVar = 4.* chargevar/ chargeSquare;505 const Float_t meanSquare = mean * mean; 506 const Float_t meanSquareRelVar = 4.* var/ meanSquare; 622 507 623 508 const Float_t ffactorsquare = gkFFactor * gkFFactor; 624 509 const Float_t ffactorsquareRelVar = 4.*gkFFactorErr * gkFFactorErr / ffactorsquare; 625 510 626 const Float_t rsigmaSquare = fRSigma Charge * fRSigmaCharge;627 const Float_t rsigmaSquareRelVar = 4.* fRSigma ChargeVar / rsigmaSquare;511 const Float_t rsigmaSquare = fRSigma * fRSigma; 512 const Float_t rsigmaSquareRelVar = 4.* fRSigmaVar / rsigmaSquare; 628 513 629 514 // … … 631 516 // (independent on Hi Gain or Lo Gain) 632 517 // 633 fPheFFactorMethod = ffactorsquare * chargeSquare / rsigmaSquare;518 fPheFFactorMethod = ffactorsquare * meanSquare / rsigmaSquare; 634 519 635 520 if (fPheFFactorMethod < fPheFFactorMethodLimit) … … 642 527 // Calculate the Error of Nphe 643 528 // 644 fPheFFactorMethodVar = (ffactorsquareRelVar + chargeSquareRelVar + rsigmaSquareRelVar)529 fPheFFactorMethodVar = (ffactorsquareRelVar + meanSquareRelVar + rsigmaSquareRelVar) 645 530 * fPheFFactorMethod * fPheFFactorMethod; 646 531 -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.h
r3626 r3637 2 2 #define MARS_MCalibrationChargePix 3 3 4 #ifndef MARS_M ParContainer5 #include "M ParContainer.h"4 #ifndef MARS_MCalibrationPix 5 #include "MCalibrationPix.h" 6 6 #endif 7 7 8 8 class MBadPixelsPix; 9 class MCalibrationChargePix : public M ParContainer9 class MCalibrationChargePix : public MCalibrationPix 10 10 { 11 11 private: … … 27 27 Float_t fPheFFactorMethodLimit; // The minimum number of Photo-electrons for a pixel to be accepted. 28 28 29 Int_t fPixId; // the pixel Id 30 31 UInt_t fFlags; // Flag for the set bits 32 33 Float_t fHiGainMeanCharge; // The mean reduced charge after the fit 34 Float_t fHiGainMeanChargeVar; // The error of reduced mean charge after the fit 35 Float_t fHiGainSigmaCharge; // The sigma of the mean charge after the fit 36 Float_t fHiGainSigmaChargeVar; // The error of the sigma of the mean charge after the fit 37 Float_t fHiGainChargeProb; // The probability of the fit function 38 39 Float_t fLoGainMeanCharge; // The mean reduced charge after the fit 40 Float_t fLoGainMeanChargeVar; // The error of reduced mean charge after the fit 41 Float_t fLoGainSigmaCharge; // The sigma of the mean charge after the fit 42 Float_t fLoGainSigmaChargeVar; // The error of the sigma of the mean charge after the fit 43 Float_t fLoGainChargeProb; // The probability of the fit function 44 45 Float_t fRSigmaCharge; // The reduced squares of sigmas after the fit 46 Float_t fRSigmaChargeVar; // The reduced squares of sigmas after the fit 29 Float_t fRSigma; // The reduced squares of sigmas after the fit 30 Float_t fRSigmaVar; // The reduced squares of sigmas after the fit 47 31 48 32 Float_t fPed; // The mean pedestal (from MPedestalPix) times number of FADC slices … … 90 74 Float_t fConversionHiLoVar; // The error of the conversion factor between Hi Gain and Lo Gain 91 75 92 Float_t fHiGainNumPickup; 93 Float_t fLoGainNumPickup; 76 Byte_t fCalibFlags; 94 77 95 enum { kHiGainSaturation, kExcluded, 96 kBlindPixelMethodValid, kFFactorMethodValid, 78 enum { kBlindPixelMethodValid, kFFactorMethodValid, 97 79 kPINDiodeMethodValid, kCombinedMethodValid }; 98 80 … … 105 87 106 88 // Setter 107 void SetPixId( const Int_t i ) { fPixId = i; }108 109 89 void SetPedestal(const Float_t ped, const Float_t pedrms, const Float_t pederr); 110 90 … … 114 94 void SetPheFFactorMethodLimit ( const Float_t f=fgPheFFactorMethodLimit ) { fPheFFactorMethodLimit = f; } 115 95 116 // Charges117 void SetHiGainMeanCharge ( const Float_t f ) { fHiGainMeanCharge = f; }118 void SetHiGainMeanChargeErr ( const Float_t f ) { fHiGainMeanChargeVar = f*f; }119 void SetHiGainChargeProb ( const Float_t f ) { fHiGainChargeProb = f; }120 void SetHiGainSigmaCharge ( const Float_t f ) { fHiGainSigmaCharge = f; }121 void SetHiGainSigmaChargeErr ( const Float_t f ) { fHiGainSigmaChargeVar = f*f; }122 123 void SetLoGainMeanCharge ( const Float_t f ) { fLoGainMeanCharge = f; }124 void SetLoGainMeanChargeErr ( const Float_t f ) { fLoGainMeanChargeVar = f*f; }125 void SetLoGainChargeProb ( const Float_t f ) { fLoGainChargeProb = f; }126 void SetLoGainSigmaCharge ( const Float_t f ) { fLoGainSigmaCharge = f; }127 void SetLoGainSigmaChargeErr ( const Float_t f ) { fLoGainSigmaChargeVar = f*f; }128 129 void SetMeanCharge ( const Float_t f );130 void SetMeanChargeErr ( const Float_t f );131 void SetSigmaCharge ( const Float_t f );132 void SetSigmaChargeErr ( const Float_t f );133 134 void SetHiGainNumPickup ( const Float_t f ) { fHiGainNumPickup = f; }135 void SetLoGainNumPickup ( const Float_t f ) { fLoGainNumPickup = f; }136 137 96 // Times 138 97 void SetAbsTimeMean ( const Float_t f ) { fAbsTimeMean = f; } … … 154 113 155 114 // Bit Setters 156 void SetHiGainSaturation ( const Bool_t b = kTRUE );157 void SetExcluded ( const Bool_t b = kTRUE );158 115 void SetBlindPixelMethodValid( const Bool_t b = kTRUE ); 159 116 void SetFFactorMethodValid ( const Bool_t b = kTRUE ); … … 161 118 void SetCombinedMethodValid ( const Bool_t b = kTRUE ); 162 119 163 // Charges 164 Float_t GetHiGainMeanCharge() const { return fHiGainMeanCharge; } 165 Float_t GetHiGainMeanChargeErr() const; 166 Float_t GetHiGainChargeProb() const { return fHiGainChargeProb; } 167 Float_t GetHiGainSigmaCharge() const { return fHiGainSigmaCharge; } 168 Float_t GetHiGainSigmaChargeErr() const; 120 Float_t GetLoGainMean () const; 121 Float_t GetLoGainMeanErr () const; 122 Float_t GetLoGainSigma () const; 123 Float_t GetLoGainSigmaErr () const; 169 124 170 Float_t GetLoGainMeanCharge() const; 171 Float_t GetLoGainMeanChargeErr() const; 172 Float_t GetLoGainChargeProb() const { return fLoGainChargeProb; } 173 Float_t GetLoGainSigmaCharge() const; 174 Float_t GetLoGainSigmaChargeErr() const; 175 176 Float_t GetMeanCharge() const; 177 Float_t GetMeanChargeErr() const; 178 Float_t GetChargeProb() const; 179 Float_t GetSigmaCharge() const; 180 Float_t GetSigmaChargeErr() const; 181 182 Float_t GetRSigmaCharge() const; 183 Float_t GetRSigmaChargeErr() const; 184 185 Float_t GetHiGainNumPickup() const { return fHiGainNumPickup; } 186 Float_t GetLoGainNumPickup() const { return fLoGainNumPickup; } 125 Float_t GetRSigma() const; 126 Float_t GetRSigmaErr() const; 187 127 188 128 Float_t GetAbsTimeMean() const { return fAbsTimeMean; } … … 212 152 Float_t GetPheFFactorMethodErr() const; 213 153 214 Int_t GetPixId() const { return fPixId; }215 216 154 Float_t GetPed() const { return fPed; } 217 155 Float_t GetPedErr() const; … … 231 169 Float_t GetTotalFFactorCombinedMethodErr() const; 232 170 233 Bool_t IsExcluded() const;234 Bool_t IsHiGainSaturation() const;235 171 Bool_t IsBlindPixelMethodValid() const; 236 172 Bool_t IsPINDiodeMethodValid() const; -
trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeBlindPix.cc
r3622 r3637 105 105 // 106 106 // Sets: 107 // - the default number for fChargeNbins (fgChargeNbins)108 // - the default number for fChargeFirst (fgChargeFirst)109 // - the default number for fChargeLast (fgChargeLast)107 // - the default number for MHGausEvents::fNbins (fgChargeNbins) 108 // - the default number for MHGausEvents::fFirst (fgChargeFirst) 109 // - the default number for MHGausEvents::fLast (fgChargeLast) 110 110 // - the default number for fSinglePheCut (fgSingePheCut) 111 111 // - the default number for fNumSinglePheLimit (fgNumSinglePheLimit) … … 132 132 fTitle = title ? title : "Fill the accumulated charges and times of all Blind Pixel events and perform fits"; 133 133 134 Set ChargeNbins();135 Set ChargeFirst();136 Set ChargeLast();134 SetNbins( fgChargeNbins ); 135 SetFirst( fgChargeFirst ); 136 SetLast ( fgChargeLast ); 137 137 138 138 SetSinglePheCut(); … … 278 278 // - fAPedestalFADCSlices(0); 279 279 // 280 // Sets Binning of the following histograms: 281 // - fHGausHist.SetBins(fChargeNbins,fChargeFirst,fChargeLast); 280 // Sets Binning of the fHGausHist 282 281 // 283 282 Bool_t MHCalibrationChargeBlindPix::SetupFill(const MParList *pList) … … 301 300 fAPedestalFADCSlices(0); 302 301 303 fHGausHist.SetBins( fChargeNbins, fChargeFirst, fChargeLast);302 InitBins(); 304 303 305 304 return kTRUE; … … 403 402 CreateFourierSpectrum(); 404 403 fBlindPix->SetOscillating ( !IsFourierSpectrumOK() ); 405 404 406 405 fMeanPedestal = fSignal->GetPed(); 407 406 fMeanPedestalErr = fSignal->GetPedErr(); -
trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeBlindPix.h
r3617 r3637 27 27 private: 28 28 29 static const Int_t fgChargeNbins; // Default for fChargeNBins (now set to: 5300 )30 static const Axis_t fgChargeFirst; // Default for fChargeFirst (now set to: -100.5 )31 static const Axis_t fgChargeLast; // Default for fChargeLast (now set to: 5199.5 )32 static const Float_t fgSinglePheCut; // Default for fSinglePheCut (now set to: 200 )33 static const Float_t fgNumSinglePheLimit; // Default for fNumSinglePheLimit (now set to: 50 )29 static const Int_t fgChargeNbins; //! Default for MHGausEvents::fNBins (now set to: 5300 ) 30 static const Axis_t fgChargeFirst; //! Default for MHGausEvents::fFirst (now set to: -100.5 ) 31 static const Axis_t fgChargeLast; //! Default for MHGausEvents::fLast (now set to: 5199.5 ) 32 static const Float_t fgSinglePheCut; //! Default for fSinglePheCut (now set to: 200 ) 33 static const Float_t fgNumSinglePheLimit; //! Default for fNumSinglePheLimit (now set to: 50 ) 34 34 35 35 static const Double_t gkElectronicAmp; // Electronic Amplification after the PMT (in FADC counts/N_e) … … 103 103 104 104 // Setters 105 void SetChargeNbins ( const Int_t bins =fgChargeNbins ) { fChargeNbins = bins; }106 void SetChargeFirst ( const Axis_t first=fgChargeFirst ) { fChargeFirst = first; }107 void SetChargeLast ( const Axis_t last =fgChargeLast ) { fChargeLast = last; }108 105 void SetSinglePheCut ( const Float_t cut =fgSinglePheCut ) { fSinglePheCut = cut; } 109 106 void SetNumSinglePheLimit ( const Float_t lim =fgNumSinglePheLimit ) { fNumSinglePheLimit = lim; } -
trunk/MagicSoft/Mars/mcalib/MHCalibrationChargePINDiode.cc
r3620 r3637 65 65 // 66 66 // Sets: 67 // - the default number for fChargeNbins(fgChargeNbins)68 // - the default number for fChargeFirst(fgChargeFirst)69 // - the default number for fChargeLast(fgChargeLast)70 // - the default number for fRmsChargeNbins (fgRmsChargeNbins)71 // - the default number for fRmsChargeFirst (fgRmsChargeFirst)72 // - the default number for fRmsChargeLast (fgRmsChargeLast)73 // - the default number for fAbsTimeNbins (fgAbsTimeNbins)74 // - the default number for fAbsTimeFirst (fgAbsTimeFirst)75 // - the default number for fAbsTimeLast (fgAbsTimeLast)67 // - the default number for MHGausEvents::fNbins (fgChargeNbins) 68 // - the default number for MHGausEvents::fFirst (fgChargeFirst) 69 // - the default number for MHGausEvents::fLast (fgChargeLast) 70 // - the default number for fRmsChargeNbins (fgRmsChargeNbins) 71 // - the default number for fRmsChargeFirst (fgRmsChargeFirst) 72 // - the default number for fRmsChargeLast (fgRmsChargeLast) 73 // - the default number for fAbsTimeNbins (fgAbsTimeNbins) 74 // - the default number for fAbsTimeFirst (fgAbsTimeFirst) 75 // - the default number for fAbsTimeLast (fgAbsTimeLast) 76 76 // 77 77 // - the default name of the fHGausHist ("HCalibrationChargePINDiode") … … 102 102 fTitle = title ? title : "Fill the FADC sums of the PINDiode events and perform the fits"; 103 103 104 Set ChargeNbins();105 Set ChargeFirst();106 Set ChargeLast();104 SetNbins( fgChargeNbins ); 105 SetFirst( fgChargeFirst ); 106 SetLast ( fgChargeLast ); 107 107 108 108 SetRmsChargeNbins(); … … 137 137 // 138 138 // Initializes Binning of the following histograms: 139 // - fHGausHist.SetBins(f ChargeNbins,fChargeFirst,fChargeLast);139 // - fHGausHist.SetBins(fNbins,fFirst,fLast); 140 140 // - fHAbsTime.SetBins(fAbsTimeNbins,fAbsTimeFirst,fAbsTimeLast); 141 141 // - fHRmsCharge.SetBins(fRmsChargeNbins,fRmsChargeFirst,fRmsChargeLast); … … 144 144 { 145 145 146 fHGausHist.SetBins(fChargeNbins,fChargeFirst,fChargeLast); 146 MHGausEvents::InitBins(); 147 147 148 fHAbsTime.SetBins(fAbsTimeNbins,fAbsTimeFirst,fAbsTimeLast); 148 149 fHRmsCharge.SetBins(fRmsChargeNbins,fRmsChargeFirst,fRmsChargeLast); -
trunk/MagicSoft/Mars/mcalib/MHCalibrationChargePINDiode.h
r3617 r3637 13 13 private: 14 14 15 static const Int_t fgChargeNbins; // Default for fChargeNBins (now set to: 200 )16 static const Axis_t fgChargeFirst; // Default for fChargeFirst (now set to: -0.5 )17 static const Axis_t fgChargeLast; // Default for fChargeLast (now set to: 199.5 )18 static const Int_t fgRmsChargeNbins; // Default for fChargeNBins(now set to: 100 )19 static const Axis_t fgRmsChargeFirst; // Default for fChargeFirst(now set to: 0. )20 static const Axis_t fgRmsChargeLast; // Default for fChargeLast(now set to: 100. )21 static const Int_t fgAbsTimeNbins; // Default for fChargeNBins(now set to: 30 )22 static const Axis_t fgAbsTimeFirst; // Default for fChargeFirst(now set to: -0.5 )23 static const Axis_t fgAbsTimeLast; // Default for fChargeLast(now set to: 29.5 )15 static const Int_t fgChargeNbins; //! Default for MHGausEvents::fNBins (now set to: 200 ) 16 static const Axis_t fgChargeFirst; //! Default for MHGausEvents::fFirst (now set to: -0.5 ) 17 static const Axis_t fgChargeLast; //! Default for MHGausEvents::fLast (now set to: 199.5 ) 18 static const Int_t fgRmsChargeNbins; //! Default for fRmsChargeNBins (now set to: 100 ) 19 static const Axis_t fgRmsChargeFirst; //! Default for fRmsChargeFirst (now set to: 0. ) 20 static const Axis_t fgRmsChargeLast; //! Default for fRmsChargeLast (now set to: 100. ) 21 static const Int_t fgAbsTimeNbins; //! Default for fAbsTimeNBins (now set to: 30 ) 22 static const Axis_t fgAbsTimeFirst; //! Default for fAbsTimeFirst (now set to: -0.5 ) 23 static const Axis_t fgAbsTimeLast; //! Default for fAbsTimeLast (now set to: 29.5 ) 24 24 25 25 MCalibrationChargePINDiode *fPINDiode; //! Storage container of the results … … 47 47 48 48 // Setters 49 void SetChargeNbins(const Int_t bins =fgChargeNbins) { fChargeNbins = bins; }50 void SetChargeFirst(const Axis_t first=fgChargeFirst) { fChargeFirst = first; }51 void SetChargeLast( const Axis_t last =fgChargeLast) { fChargeLast = last; }52 53 49 void SetAbsTimeNbins(const Int_t bins =fgAbsTimeNbins) { fAbsTimeNbins = bins; } 54 50 void SetAbsTimeFirst(const Axis_t first=fgAbsTimeFirst) { fAbsTimeFirst = first; }
Note:
See TracChangeset
for help on using the changeset viewer.