Changeset 8585 for trunk/MagicSoft
- Timestamp:
- 06/19/07 12:17:36 (17 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r8584 r8585 72 72 - changed the GetScale from a calculation to a switch 73 73 (faster and easier to understand) 74 75 * callisto_mux.rc: 76 - replaced saturation and lower signal limit in 77 MJPedestalY2.MHCalibrationPulseTimeCam by the defaults 78 79 * mbase/MMath.[h,cc]: 80 - added a function to do a InterpolParab assuming that the 81 x-coordinates are -1, 0, 1 74 82 75 83 -
trunk/MagicSoft/Mars/callisto_mux.rc
r8577 r8585 335 335 # Define the Pulse Position check parameters: 336 336 # ------------------------------------------------------------------------- 337 MJPedestalY2.MHCalibrationPulseTimeCam.SaturationLimit: 252 338 MJPedestalY2.MHCalibrationPulseTimeCam.LowerSignalLimit: 35339 #MJPedestalY2.MHCalibrationPulseTimeCam.NumPixelsRequired: 2337 #MJPedestalY2.MHCalibrationPulseTimeCam.SaturationLimit: 245 338 #MJPedestalY2.MHCalibrationPulseTimeCam.LowerSignalLimit: 85 339 #MJPedestalY2.MHCalibrationPulseTimeCam.NumPixelsRequired: 2 340 340 #MJPedestalY2.PixelCheck: no 341 341 -
trunk/MagicSoft/Mars/mbase/MMath.cc
r8581 r8585 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MMath.cc,v 1.3 5 2007-06-18 14:42:32tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MMath.cc,v 1.36 2007-06-19 11:14:33 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 308 308 TVector3 MMath::GetParab(const TVector3 &x, const TVector3 &y) 309 309 { 310 Double_t x1 = x(0);311 Double_t x2 = x(1);312 Double_t x3 = x(2);313 314 Double_t y1 = y(0);315 Double_t y2 = y(1);316 Double_t y3 = y(2);310 const Double_t x1 = x(0); 311 const Double_t x2 = x(1); 312 const Double_t x3 = x(2); 313 314 const Double_t y1 = y(0); 315 const Double_t y2 = y(1); 316 const Double_t y3 = y(2); 317 317 318 318 const double det = … … 343 343 } 344 344 345 // -------------------------------------------------------------------------- 346 // 347 // Interpolate the points with x-coordinates vx and y-coordinates vy 348 // by a parabola (second order polynomial) and return the value at x. 349 // 345 350 Double_t MMath::InterpolParabLin(const TVector3 &vx, const TVector3 &vy, Double_t x) 346 351 { 347 352 const TVector3 c = GetParab(vx, vy); 353 return c(0) + c(1)*x + c(2)*x*x; 354 } 355 356 // -------------------------------------------------------------------------- 357 // 358 // Interpolate the points with x-coordinates vx=(-1,0,1) and 359 // y-coordinates vy by a parabola (second order polynomial) and return 360 // the value at x. 361 // 362 Double_t MMath::InterpolParabLin(const TVector3 &vy, Double_t x) 363 { 364 const TVector3 c(vy(1), (vy(2)-vy(0))/2, vy(0)/2 - vy(1) + vy(2)/2); 348 365 return c(0) + c(1)*x + c(2)*x*x; 349 366 } -
trunk/MagicSoft/Mars/mbase/MMath.h
r8544 r8585 39 39 TVector3 GetParab(const TVector3 &x, const TVector3 &y); 40 40 Double_t InterpolParabLin(const TVector3 &vx, const TVector3 &vy, Double_t x); 41 Double_t InterpolParabLin(const TVector3 &vy, Double_t x); 41 42 Double_t InterpolParabLog(const TVector3 &vx, const TVector3 &vy, Double_t x); 42 43 Double_t InterpolParabCos(const TVector3 &vx, const TVector3 &vy, Double_t x); -
trunk/MagicSoft/Mars/mjobs/MJStar.cc
r8582 r8585 110 110 111 111 const TString oname = Form("%s/star%08d.root", (const char*)fPathOut, fSequence.GetSequence()); 112 return WriteContainer(cont, oname, " UPDATE");112 return WriteContainer(cont, oname, "RECREATE"); 113 113 } 114 114 -
trunk/MagicSoft/Mars/msignal/MExtractor.cc
r8582 r8585 136 136 : fResolutionPerPheHiGain(0), fResolutionPerPheLoGain(0), 137 137 fSignals(NULL), fRawEvt(NULL), fRunHeader(NULL), fSignal(NULL), 138 /*fHiLoLast(0),*/fNumHiGainSamples(0), fNumLoGainSamples(0)138 fNumHiGainSamples(0), fNumLoGainSamples(0) 139 139 { 140 140 fName = name ? name : "MExtractor"; … … 251 251 fLoGainFirst=0; 252 252 fLoGainLast =0; 253 if (fSaturationLimit>fRunHeader->GetMax())254 {255 *fLog << " and saturation limit to " << fRunHeader->GetMax();256 fSaturationLimit=fRunHeader->GetMax();257 }258 253 *fLog << "." << endl; 259 254 } 260 255 261 /*262 const Int_t logainsamples = fRunHeader->GetNumSamplesLoGain();263 264 Int_t lastdesired;265 Int_t lastavailable;266 267 if (logainsamples)268 {269 270 lastdesired = (Int_t)(fLoGainLast);271 lastavailable = logainsamples-1;272 273 if (lastavailable < 0)274 *fLog << warn << GetDescriptor() << " - WARNING: Number of available Low-Gain Slices is smaller than or equal zero!" << endl;275 276 if (lastdesired > lastavailable)277 {278 const Int_t diff = lastdesired - lastavailable;279 280 *fLog << endl;281 *fLog << warn << GetDescriptor() << ": Selected Lo Gain FADC Window [";282 *fLog << Form("%2i,%2i", (int)fLoGainFirst, lastdesired);283 *fLog << "] ranges out of the available limits: [0," << Form("%2i", lastavailable) << "]" << endl;284 *fLog << GetDescriptor() << ": Will reduce the upper edge to " << (int)(fLoGainLast - diff) << endl;285 SetRange(fHiGainFirst, fHiGainLast, fLoGainFirst, fLoGainLast-diff);286 }287 }288 else289 SetRange(fHiGainFirst, fHiGainLast, 0,0);290 291 const Int_t higainsamples = fRunHeader->GetNumSamplesHiGain();292 293 if (higainsamples <= 0)294 {295 *fLog << err << GetDescriptor();296 *fLog << " - ERROR: Number of available High-Gain Slices is smaller than or equal zero!" << endl;297 return kFALSE;298 }299 300 lastdesired = (Int_t)fHiGainLast;301 lastavailable = higainsamples-1;302 303 if (lastdesired > lastavailable)304 {305 const Int_t diff = lastdesired - lastavailable;306 307 *fLog << endl;308 *fLog << inf << GetDescriptor() << ": Selected Hi Gain FADC Window [";309 *fLog << Form("%2i,%2i", (int)fHiGainFirst,lastdesired);310 *fLog << "] ranges out of the available limits: [0," << Form("%2i", lastavailable) << "]" << endl;311 *fLog << inf << GetDescriptor() << ": Will use ";312 *fLog << Form("%2i", diff) << " samples from the Low-Gain for the High-Gain extraction";313 *fLog << endl;314 315 fHiGainLast -= diff;316 fHiLoLast = diff;317 }318 319 */320 256 return kTRUE; 321 257 } … … 329 265 { 330 266 return kERROR; 331 /*332 MRawEvtPixelIter pixel(fRawEvt);333 334 while (pixel.Next())335 {336 Float_t sumhi = 0.;337 Byte_t sathi = 0;338 339 FindSignalHiGain(pixel.GetHiGainSamples()+fHiGainFirst, pixel.GetLoGainSamples(), sumhi, sathi);340 341 Float_t sumlo = 0.;342 Byte_t satlo = 0;343 344 if (pixel.HasLoGain())345 FindSignalLoGain(pixel.GetLoGainSamples()+fLoGainFirst, sumlo, satlo);346 347 const Int_t pixid = pixel.GetPixelId();348 349 const MPedestalPix &ped = (*fPedestals)[pixid];350 MExtractedSignalPix &pix = (*fSignals)[pixid];351 352 const Float_t pedes = ped.GetPedestal();353 const Float_t pedrms = ped.GetPedestalRms();354 355 pix.SetExtractedSignal(sumhi - pedes*fNumHiGainSamples, pedrms*fSqrtHiGainSamples,356 sumlo - pedes*fNumLoGainSamples, pedrms*fSqrtLoGainSamples);357 358 pix.SetGainSaturation(sathi, satlo);359 360 }361 362 fSignals->SetReadyToSave();363 364 return kTRUE;365 */366 267 } 367 268 … … 461 362 462 363 *fLog << " Hi Gain Range: " << Form("%2d %2d", fHiGainFirst, fHiGainLast) << endl; 364 *fLog << " Saturation Lim: " << Form("%3d", fSaturationLimit) << endl; 463 365 if (HasLoGain()) 464 366 { 465 367 *fLog << " Lo Gain Range: " << Form("%2d %2d", fLoGainFirst, fLoGainLast) << endl; 466 *fLog << " Saturation Lim: " << Form("%3d", fSaturationLimit) << endl;467 368 *fLog << " Num Samples Hi/Lo: " << Form("%2.1f %2.1f", fNumHiGainSamples, fNumLoGainSamples) << endl; 468 369 }
Note:
See TracChangeset
for help on using the changeset viewer.