- Timestamp:
- 04/09/04 19:33:44 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/mcalib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc
r3700 r3702 499 499 // Retrieves pedestal and pedestal RMS from MPedestalPix 500 500 // Retrieves total entries from MPedestalCam 501 // Sums up pedestal and pedestalRMS for the average pixel502 501 // Sets pedestal*fNumHiGainSamples and pedestal*fNumLoGainSamples in MCalibrationChargePix 503 502 // Sets pedRMS *fSqrtHiGainSamples and pedRMS *fSqrtLoGainSamples in MCalibrationChargePix 504 503 // 505 void MCalibrationChargeCalc::FinalizePedestals(const MPedestalPix &ped, MCalibrationChargePix &cal, 506 Float_t &avped, Float_t &avrms) 504 void MCalibrationChargeCalc::FinalizePedestals(const MPedestalPix &ped, MCalibrationChargePix &cal) 507 505 { 508 506 … … 514 512 const Float_t num = TMath::Sqrt((Float_t)fPedestals->GetTotalEntries()); 515 513 516 //517 // Calculate the average pedestal518 //519 avped += pedes;520 avrms += prms;521 522 514 // 523 515 // set them in the calibration camera … … 537 529 } 538 530 539 }540 541 void MCalibrationChargeCalc::FinalizeAvPedestals(MCalibrationChargePix &cal,542 Float_t avped, Float_t avrms, Int_t avnum)543 {544 545 //546 // set the pedestans in the calibration camera547 //548 if (cal.IsHiGainSaturation())549 {550 cal.SetPedestal(avped/avnum * fNumLoGainSamples,551 avrms/avnum * fSqrtLoGainSamples,552 avrms/avnum * fSqrtLoGainSamples/avnum);553 cal.CalcLoGainPedestal((Float_t)fNumLoGainSamples);554 }555 else556 {557 cal.SetPedestal(avped/avnum * fNumHiGainSamples,558 avrms/avnum * fSqrtHiGainSamples,559 avrms/avnum * fSqrtHiGainSamples/avnum);560 }561 531 } 562 532 … … 626 596 return kFALSE; 627 597 } 598 628 599 return kTRUE; 629 600 } … … 1134 1105 // 1135 1106 Int_t nvalid = 0; 1136 Float_t avinnerped = 0.;1137 Float_t avinnerprms = 0.;1138 Int_t avinnernum = 0;1139 Float_t avouterped = 0.;1140 Float_t avouterprms = 0.;1141 Int_t avouternum = 0;1142 1107 1143 1108 for (Int_t pixid=0; pixid<fPedestals->GetSize(); pixid++) … … 1154 1119 MBadPixelsPix &bad = (*fBadPixels)[pixid]; 1155 1120 1156 if (fGeom->GetPixRatio(pixid) == 1.) 1157 { 1158 FinalizePedestals(ped,pix,avinnerped,avinnerprms); 1159 avinnernum++; 1160 } 1161 else 1162 { 1163 FinalizePedestals(ped,pix,avouterped,avouterprms); 1164 avouternum++; 1165 } 1121 FinalizePedestals(ped,pix); 1166 1122 1167 1123 if (FinalizeCharges(pix,bad)) 1168 1124 nvalid++; 1169 1125 } 1170 1126 … … 1185 1141 { 1186 1142 1187 FinalizeAvPedestals((MCalibrationChargePix&)fCam->GetAverageArea(aidx), 1188 avinnerped, avinnerprms,avinnernum); 1189 FinalizeCharges((MCalibrationChargePix&)fCam->GetAverageArea(aidx), 1190 fCam->GetAverageBadArea(aidx)); 1143 const MPedestalPix &ped = fPedestals->GetAverageArea(aidx); 1144 MCalibrationChargePix &pix = (MCalibrationChargePix&)fCam->GetAverageArea(aidx); 1145 1146 FinalizePedestals(ped,pix); 1147 FinalizeCharges(pix, fCam->GetAverageBadArea(aidx)); 1191 1148 } 1192 1149 … … 1194 1151 { 1195 1152 1196 FinalizeAvPedestals((MCalibrationChargePix&)fCam->GetAverageSector(sector), 1197 avinnerped, avinnerprms,avinnernum); 1198 FinalizeCharges((MCalibrationChargePix&)fCam->GetAverageSector(sector), 1199 fCam->GetAverageBadSector(sector)); 1153 const MPedestalPix &ped = fPedestals->GetAverageSector(sector); 1154 MCalibrationChargePix &pix = (MCalibrationChargePix&)fCam->GetAverageSector(sector); 1155 1156 FinalizePedestals(ped,pix); 1157 FinalizeCharges(pix, fCam->GetAverageBadSector(sector)); 1200 1158 } 1201 1159 -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.h
r3697 r3702 78 78 79 79 // functions 80 void FinalizePedestals ( const MPedestalPix &ped, MCalibrationChargePix &cal, 81 Float_t &avped, Float_t &avrms ); 82 void FinalizeAvPedestals ( MCalibrationChargePix &cal, 83 Float_t avped, Float_t avrms, Int_t avnum); 80 void FinalizePedestals ( const MPedestalPix &ped, MCalibrationChargePix &cal ); 84 81 Bool_t FinalizeCharges ( MCalibrationChargePix &cal, MBadPixelsPix &bad ); 85 82 Bool_t FinalizePINDiode ();
Note:
See TracChangeset
for help on using the changeset viewer.