Changeset 2699 for trunk/MagicSoft/Mars/manalysis
- Timestamp:
- 12/17/03 18:41:32 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/manalysis
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/manalysis/MCalibrationBlindPix.cc
r2642 r2699 45 45 // 46 46 MCalibrationBlindPix::MCalibrationBlindPix(const char *name, const char *title) 47 : fHist(NULL) 47 : fHist(NULL), 48 fLambda(-1.), 49 fMu0 (-1.), 50 fMu1 (-1.), 51 fSigma0(-1.), 52 fSigma1(-1.), 53 fErrLambda(-1.), 54 fErrMu0 (-1.), 55 fErrMu1 (-1.), 56 fErrSigma0(-1.), 57 fErrSigma1(-1.), 58 fTime (-1.), 59 fErrTime (-1.) 48 60 { 49 61 -
trunk/MagicSoft/Mars/manalysis/MCalibrationCalc.cc
r2679 r2699 1 /* ======================================================================== *\1 /* ======================================================================== *\ 2 2 ! 3 3 ! * … … 279 279 MExtractedSignalPix &sig = (*fSignals)[pixid]; 280 280 MPedestalPix &ped = (*fPedestals)[pixid]; 281 Float_t pedrms = ped.GetPedestalRms();282 Float_t sumhi = sig.GetExtractedSignalHiGain();281 Float_t pedrms = ped.GetPedestalRms(); 282 Float_t sumhi = sig.GetExtractedSignalHiGain(); 283 283 284 284 if (sumhi < 15.*pedrms ) // cut at 3.5 sigma … … 320 320 321 321 if (!blindpixel.FillCharge(sumhi)) 322 *fLog << warn<<322 *fLog << err << 323 323 "Overflow or Underflow occurred filling Blind Pixel sum = " << sumhi << endl; 324 324 325 325 if (!blindpixel.FillTime((int)mtime)) 326 *fLog << warn<<326 *fLog << err << 327 327 "Overflow or Underflow occurred filling Blind Pixel time = " << mtime << endl; 328 328 … … 412 412 if (TESTBIT(fFlags,kUseBlindPixelFit)) 413 413 { 414 if (blindpixel.FitCharge()) 415 *fLog << err << dbginf << "Could not fit the blind pixel " << endl; 416 else 417 *fLog << err << dbginf << "Could not fit the blind pixel " << endl; 418 419 if (!blindpixel.FitTime()) 420 *fLog << warn << "Could not the Times of the blind pixel " << endl; 414 415 if (!blindpixel.FitCharge()) 416 *fLog << err << dbginf << "Could not fit the blind pixel " << endl; 421 417 422 418 blindpixel.Draw(); -
trunk/MagicSoft/Mars/manalysis/MCalibrationCalc.h
r2628 r2699 47 47 48 48 49 enum 50 { 51 kUseTimeFits = 1, 52 kUseBlindPixelFit = 2, 53 kUsePinDiodeFit = 3 54 }; 49 enum { kUseTimeFits, kUseBlindPixelFit, kUsePinDiodeFit }; 55 50 56 51 public: -
trunk/MagicSoft/Mars/manalysis/MCalibrationCam.cc
r2679 r2699 232 232 void MCalibrationCam::Print(Option_t *o) const 233 233 { 234 234 235 *fLog << all << GetDescriptor() << ":" << endl; 235 236 int id = 0; … … 243 244 { 244 245 245 if (pix->GetCharge() >= 0.) 246 if (pix->GetCharge() >= 0.) 246 247 { 247 248 *fLog << pix->GetPixId() << " Pedestals: " << pix->GetPed() << " +- " << pix->GetPedRms() … … 321 322 break; 322 323 case 15: 323 val = ((*this)[idx].GetSigmaCharge()/(*this)[idx].GetCharge())* 324 ((*this)[idx].GetSigmaCharge()/(*this)[idx].GetCharge()); 324 if ((*this)[idx].GetCharge() != 0.) 325 val = ((*this)[idx].GetSigmaCharge()/(*this)[idx].GetCharge())* 326 ((*this)[idx].GetSigmaCharge()/(*this)[idx].GetCharge()); 327 else 328 val = -1.; 325 329 break; 326 330 case 11: … … 337 341 break; 338 342 case 14: 339 if ((fMeanPhotInsidePlexiglass > 0. ) && ((*this)[idx].GetCharge() != -1.)) 340 { 341 if (idx < 397) 342 val = fMeanPhotInsidePlexiglass / (*this)[idx].GetCharge(); 343 else 344 val = fMeanPhotInsidePlexiglass*gkCalibrationOutervsInnerPixelArea / (*this)[idx].GetCharge(); 345 } 346 else 347 { 348 val = -1.; 349 } 343 if (idx < 397) 344 val = (*this)[idx].GetMeanConversionBlindPixelMethod(); 345 else 346 val = (*this)[idx].GetMeanConversionBlindPixelMethod()*gkCalibrationOutervsInnerPixelArea; 350 347 break; 351 348 default: … … 398 395 fNumPhotInsidePlexiglassAvailable = kTRUE; 399 396 397 *fLog << endl; 398 *fLog << mean << " Mean number of Photons for an Inner Pixel: " << fMeanPhotInsidePlexiglass << endl; 399 *fLog << endl; 400 400 401 TIter Next(fPixels); 401 402 MCalibrationPix *pix; 402 403 while ((pix=(MCalibrationPix*)Next())) 403 404 { 404 405 405 if((pix->GetCharge() > 0.) && (fMeanPhotInsidePlexiglass > 0.)) 406 406 pix->SetConversionBlindPixelMethod(fMeanPhotInsidePlexiglass/pix->GetCharge(), 0., 0.); -
trunk/MagicSoft/Mars/manalysis/MCalibrationPix.cc
r2679 r2699 112 112 fHist->SetLowerFitRange(1.5*fPedRms); 113 113 else 114 *fLog << warn << "Cannot set lower fit range to suppress cosmics: Pedestals not available" << endl;114 *fLog << warn << "Cannot set lower fit range: Pedestals not available" << endl; 115 115 116 116 if (fHist->UseLoGain()) … … 145 145 if ((fPed > 0.) && (fPedRms > 0.)) 146 146 { 147 148 Float_t pedrmssquare = fPedRms*fPedRms; 149 Float_t sigmasquare = fSigmaCharge*fSigmaCharge; 147 150 148 151 if (fHiGainSaturation) 149 152 { 150 151 Float_t nsb = TMath::Sqrt(fPedRms*fPedRms - fElectronicPedRms*fElectronicPedRms); 153 154 Float_t logainrmssquare = fElectronicPedRms*fElectronicPedRms; 155 Float_t nsbsquare = pedrmssquare - logainrmssquare; 152 156 // Float_t logainrms = fElectronicPedRms + (TMath::Sqrt(fPedRms*fPedRms - fElectronicPedRms*fElectronicPedRms)); 153 157 154 if (nsb > 0.) 155 { 156 Float_t logainrms = (TMath::Sqrt(nsb*nsb + 100.*fElectronicPedRms*fElectronicPedRms)); 157 fRSigmaSquare = (fSigmaCharge*fSigmaCharge) - (logainrms*logainrms); 158 } 159 else 160 fRSigmaSquare = fSigmaCharge*fSigmaCharge - (100.*fElectronicPedRms*fElectronicPedRms); 161 } 162 else 163 fRSigmaSquare = (fSigmaCharge*fSigmaCharge) - (fPedRms*fPedRms); 164 165 if (fRSigmaSquare > 0. ) 166 { 167 fPheFFactorMethod = fFactor * fCharge*fCharge / fRSigmaSquare; 158 if (nsbsquare > 0.) 159 logainrmssquare = nsbsquare/100. + logainrmssquare; 160 161 fRSigmaSquare = sigmasquare - logainrmssquare; 162 163 if (fRSigmaSquare > 0.) 164 fPheFFactorMethod = fFactor*(fCharge*fCharge/100.) / fRSigmaSquare; 165 166 } 167 else /* if (fHiGainSaturation) */ 168 { 169 fRSigmaSquare = sigmasquare - pedrmssquare; 170 fPheFFactorMethod = fFactor * fCharge*fCharge / fRSigmaSquare; 171 } 172 173 174 if (fCharge > 0.) 168 175 fConversionFFactorMethod = fPheFFactorMethod / fCharge ; 169 } 170 else 171 { 176 177 else 172 178 *fLog << warn << "Cannot apply F-Factor method: Reduced Sigmas are smaller than 0 in pixel: " 173 179 << fPixId << endl; 174 } 175 176 } 180 181 } /* if ((fPed > 0.) && (fPedRms > 0.)) */ 177 182 178 183 return kTRUE; -
trunk/MagicSoft/Mars/manalysis/MCalibrationPix.h
r2679 r2699 68 68 Float_t GetTimeChiSquare() const { return fTimeChiSquare; } 69 69 70 Float_t GetPed() const { return fPed; }70 Float_t GetPed() const { return fPed; } 71 71 Float_t GetPedRms() const { return fPedRms; } 72 72 … … 109 109 void SetChargesInGraph(Float_t qhi,Float_t qlo) { fHist->SetPointInGraph(qhi,qlo); } 110 110 111 Bool_t FillChargeHiGain(Float_t q) { return fHist->FillChargeHiGain(q); }112 Bool_t FillTimeHiGain(Int_t t) { return fHist->FillTimeHiGain(t); }113 Bool_t FillRChargevsTimeHiGain(Float_t rq, Int_t t) { return fHist->FillChargevsNHiGain(rq,t); }111 Bool_t FillChargeHiGain(Float_t q) { return fHist->FillChargeHiGain(q); } 112 Bool_t FillTimeHiGain(Int_t t) { return fHist->FillTimeHiGain(t); } 113 Bool_t FillRChargevsTimeHiGain(Float_t rq, Int_t t) { return fHist->FillChargevsNHiGain(rq,t); } 114 114 115 Bool_t FillChargeLoGain(Float_t q) { return fHist->FillChargeLoGain(q); }116 Bool_t FillTimeLoGain(Int_t t) { return fHist->FillTimeLoGain(t); }117 Bool_t FillRChargevsTimeLoGain(Float_t rq, Int_t t) { return fHist->FillChargevsNLoGain(rq,t); }115 Bool_t FillChargeLoGain(Float_t q) { return fHist->FillChargeLoGain(q); } 116 Bool_t FillTimeLoGain(Int_t t) { return fHist->FillTimeLoGain(t); } 117 Bool_t FillRChargevsTimeLoGain(Float_t rq, Int_t t) { return fHist->FillChargevsNLoGain(rq,t); } 118 118 119 Bool_t IsValid() const { return fCharge >=0|| fErrCharge >= 0; }120 Int_t GetPixId() const{ return fPixId; }119 Bool_t IsValid() const { return fCharge >= 3.*GetPedRms() || fErrCharge >= 0; } 120 Int_t GetPixId() const { return fPixId; } 121 121 void DefinePixId(Int_t i); 122 122 -
trunk/MagicSoft/Mars/manalysis/MExtractSignal.cc
r2667 r2699 127 127 fSignals->InitSize(cam->GetNumPixels()); 128 128 129 130 fSignals->SetNumUsedFADCSlices(fNumHiGainSamples,fFirst,fFirst+fNumHiGainSamples-1, 131 fNumLoGainSamples,fFirst,fFirst+fNumLoGainSamples-1); 132 129 133 return kTRUE; 130 134 } … … 182 186 183 187 ptr = pixel.GetLoGainSamples(); 184 first = ptr + fFirst ;185 last = ptr + fFirst + fNumLoGainSamples ;188 first = ptr + fFirst + 1; 189 last = ptr + fFirst + fNumLoGainSamples +1; 186 190 Byte_t maxlo = 0; 187 191 Byte_t midlo = 0; … … 222 226 } /* while (pixel.Next()) */ 223 227 224 fSignals->SetNumUsedFADCSlices(fNumHiGainSamples,fFirst,fFirst+fNumHiGainSamples-1, 225 fNumLoGainSamples,fFirst,fFirst+fNumLoGainSamples-1); 228 226 229 fSignals->SetReadyToSave(); 227 230 -
trunk/MagicSoft/Mars/manalysis/MExtractedSignalCam.h
r2665 r2699 47 47 48 48 void SetNumUsedFADCSlices(Byte_t numh, Byte_t firsth, Byte_t lasth, 49 49 Byte_t numl, Byte_t firstl, Byte_t lastl) 50 50 { 51 51 fNumUsedHiGainFADCSlices = numh;
Note:
See TracChangeset
for help on using the changeset viewer.