Changeset 7122
- Timestamp:
- 06/01/05 18:13:13 (19 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r7121 r7122 33 33 - added MJOptimizeCuts 34 34 - added MJOptimizeEnergy 35 36 * showplot.cc: 37 - set window name to input file name 38 39 * mcalib/MCalibColorSet.cc: 40 - changed order of checks so that an explicit color is 41 prior to any automatic detection. 42 43 * mcalib/MCalibrateData.[h,cc]: 44 - implemented setting a possible additional scale factor 45 (for MC it is always reset to 1) 46 47 * mfilter/MFCosmics.cc: 48 - don't count saturated hi-gain pixels at all. It should 49 not be necessary, because such pixels should have a value 50 high enough in the high-gains but it seems sometimes they don't 51 52 * mhflux/MHAlpha.[h,cc]: 53 - changed some orders in header 54 - made some private data members protected 55 - Call GetVal() if fMap[0]<0. This is necessary if the fill 56 value is calculated on-the-fly (like ThetaSq) 57 - made InitMapping virtual 58 59 * mhflux/MHDisp.cc: 60 - removed 'Get-Entries' workarund 61 - changed the function integartion for the significance 62 63 * mhflux/MHThetaSq.[h,cc]: 64 - overwrite InitMapping because ThetaSq should be read from 65 the parlist always 66 67 * mimage/MHHillas.cc: 68 - set histogram minimum of Delta to 0 69 70 * mpedestal/MPedPhotCam.cc: 71 - check for unsuitable pixels when calculating the means not 72 only for the UnsuitableRun ones 73 74 * msignal/MExtractor.cc: 75 - replaced wrong %2d by %2f 35 76 36 77 -
trunk/MagicSoft/Mars/NEWS
r7121 r7122 15 15 correctly. 16 16 17 - shoplot now displays the filename in the title bar of the window 18 17 19 - merpp: new options: --auto-time-start --auto-time-stop which 18 20 allow to cut updating with slow-control at the start- or … … 32 34 Wrongly the calibration_UV weights were used instead 33 35 of the cosmics weights set in callisto.rc. 36 37 - callisto: should allow ct1 pulser data when the color is 38 explicitly set also for pretty new runs 39 40 - callisto: a new option (MCalibrateData.ScaleFactor) allows 41 to introduce an additional scale factor (should be around 1) 42 to adapt for slight deviations in different extractors from 43 the MC calibration. For MC calibrations the scale factor 44 is fixed to 1 45 46 - callisto: MFCosmics should handle very high signals a bit 47 more accurate now 48 49 - callisto: when calculating the mean pedestal rms for different 50 pixel sizes or sectors also kUnsuitableEvt is now taken into 51 account - not only kUnsuitableRun 34 52 35 53 - star: fixed a bug which caused the first bin of the histograms -
trunk/MagicSoft/Mars/mcalib/MCalibColorSet.cc
r7095 r7122 157 157 } 158 158 159 if (header->IsMonteCarloRun())160 return kTRUE;161 162 if (header->GetRunNumber() > gkFirstRunWithFinalBits)163 return kTRUE;164 165 159 // 166 160 // Consider the case that a pedestal run is interleaved in the calibration run sequence ... prepare … … 176 170 } 177 171 172 // 173 // Check if the color was set explicitly from outside 174 // 178 175 if (fIsExplicitColor) 179 176 { … … 182 179 return kTRUE; 183 180 } 181 182 // 183 // 1) Do nothing if this is a MC run. Correct settings of all flags is assumed 184 // 2) Skip the rest if the run already contains the correct color information 185 // 186 if (header->IsMonteCarloRun() || header->GetRunNumber()>gkFirstRunWithFinalBits) 187 return kTRUE; 184 188 185 189 const Int_t num = header->GetRunNumber(); -
trunk/MagicSoft/Mars/mcalib/MCalibrateData.cc
r7099 r7122 107 107 108 108 #include "MGeomCam.h" 109 #include "MRawRunHeader.h" 109 110 110 111 #include "MPedestalCam.h" … … 153 154 : fGeomCam(NULL), fBadPixels(NULL), fCalibrations(NULL), 154 155 fQEs(NULL), fSignals(NULL), fCerPhotEvt(NULL), fCalibConstCam(NULL), 155 fPedestalFlag(kNo), fSignalType(kPhot), fRenormFactor(1.) 156 fPedestalFlag(kNo), fSignalType(kPhot), fRenormFactor(1.), fScaleFactor(1.) 156 157 { 157 158 … … 318 319 Bool_t MCalibrateData::ReInit(MParList *pList) 319 320 { 321 MRawRunHeader *header = (MRawRunHeader*)pList->FindObject("MRawRunHeader"); 322 if (!header) 323 { 324 *fLog << err << "MRawRunHeader not found... abort." << endl; 325 return kFALSE; 326 } 327 320 328 fGeomCam = (MGeomCam*)pList->FindObject(AddSerialNumber("MGeomCam")); 321 329 if (!fGeomCam) … … 399 407 break; 400 408 } 401 409 410 if (header->IsMonteCarloRun()) 411 { 412 *fLog << "Additional scale factor: 1 (MonteCarloRun)" << endl; 413 fScaleFactor = 1; 414 } 415 else 416 *fLog << "Additional scale factor: " << fScaleFactor << endl; 417 402 418 const Int_t npixels = fGeomCam->GetNumPixels(); 403 419 … … 603 619 } 604 620 605 calibConv *= fRenormFactor * calibUpdate;606 calibFFactor *= TMath::Sqrt(fRenormFactor );621 calibConv *= fRenormFactor*fScaleFactor * calibUpdate; 622 calibFFactor *= TMath::Sqrt(fRenormFactor*fScaleFactor); 607 623 608 624 fHiLoConv [pixidx] = hiloconv; … … 861 877 } 862 878 879 if (IsEnvDefined(env, prefix, "ScaleFactor", print)) 880 { 881 fScaleFactor = GetEnvValue(env, prefix, "ScaleFactor", fScaleFactor); 882 rc = kTRUE; 883 } 884 863 885 return rc; 864 886 } -
trunk/MagicSoft/Mars/mcalib/MCalibrateData.h
r7099 r7122 71 71 72 72 Float_t fRenormFactor; // Possible renormalization factor for signals (-> phes) 73 Float_t fScaleFactor; // Possible scale factor for signals 73 74 74 75 TList fNamesPedestal; // Names of input and output pedestal conatainer … … 110 111 void SetCalibConvMinLimit( const Float_t f=gkCalibConvMinLimit ) { fCalibConvMinLimit = f; } 111 112 void SetCalibConvMaxLimit( const Float_t f=gkCalibConvMaxLimit ) { fCalibConvMaxLimit = f; } 112 113 114 void SetScaleFactor(const Float_t f=1) { fScaleFactor=1; } 115 113 116 Bool_t UpdateConversionFactors( const MCalibrationChargeCam *updatecam=NULL); 114 117 -
trunk/MagicSoft/Mars/mfilter/MFCosmics.cc
r7046 r7122 185 185 continue; 186 186 187 const MExtractedSignalPix &sig = (*fSignals)[idx]; 188 const MPedestalPix &ped = (*fPedestals)[idx]; 187 const MExtractedSignalPix &sig = (*fSignals)[idx]; 188 189 // 190 // Check whether the pixel has a saturating hi-gain. In 191 // this case the extracted hi-gain might be empty. 192 // 193 if (sig.GetNumHiGainSaturated()>0) 194 continue; 195 196 const MPedestalPix &ped = (*fPedestals)[idx]; 189 197 190 198 const Float_t pedrms = ped.GetPedestalRms()*fSqrtHiGainSamples; -
trunk/MagicSoft/Mars/mhflux/MHAlpha.cc
r7064 r7122 83 83 : fNameParameter("MHillasSrc"), fParameter(0), 84 84 fOffData(0), fResult(0), /*fExcess(0),*/ fEnergy(0), fHillas(0), 85 fPointPos(0), fTimeEffOn(0), fTime(0), 86 fSkipHistTime(kFALSE), fSkipHistTheta(kFALSE), fSkipHistEnergy(kFALSE), 87 fForceUsingSize(kFALSE), fNumTimeBins(10), fMatrix(0) 88 85 fPointPos(0), fTimeEffOn(0), fTime(0), fNumTimeBins(10), 86 fMatrix(0), fSkipHistTime(kFALSE), fSkipHistTheta(kFALSE), 87 fSkipHistEnergy(kFALSE), fForceUsingSize(kFALSE) 89 88 { 90 89 // … … 449 448 if (fMatrix) 450 449 { 451 alpha = (*fMatrix)[fMap[0]];450 alpha = fMap[0]<0 ? GetVal() : (*fMatrix)[fMap[0]]; 452 451 energy = fMap[1]<0 ? -1 : (*fMatrix)[fMap[1]]; 453 452 size = fMap[2]<0 ? -1 : (*fMatrix)[fMap[2]]; -
trunk/MagicSoft/Mars/mhflux/MHAlpha.h
r7064 r7122 52 52 MTime fLastTime; //! Last fTimeEffOn 53 53 54 UShort_t fNumTimeBins; // Number of time bins to fill together 55 UShort_t fNumRebin; //! 56 57 //const TString fNameProjAlpha; //! This should make sure, that gROOT doen't confuse the projection with something else 58 protected: 59 MHMatrix *fMatrix; //! 60 Int_t fMap[5]; //! 61 54 62 Bool_t fSkipHistTime; 55 63 Bool_t fSkipHistTheta; … … 57 65 Bool_t fForceUsingSize; 58 66 59 UShort_t fNumTimeBins; // Number of time bins to fill together 60 UShort_t fNumRebin; //! 61 62 //const TString fNameProjAlpha; //! This should make sure, that gROOT doen't confuse the projection with something else 63 64 MHMatrix *fMatrix; //! 65 Int_t fMap[5]; //! 66 67 Float_t FitEnergyBins(Bool_t paint=kFALSE); 67 private: 68 Float_t FitEnergyBins(Bool_t paint=kFALSE); 68 69 void FitThetaBins(Bool_t paint=kFALSE); 69 70 … … 127 128 void DrawAll(); //*MENU* 128 129 129 v oid InitMapping(MHMatrix *mat, Int_t type=0);130 virtual void InitMapping(MHMatrix *mat, Int_t type=0); 130 131 void StopMapping(); 131 132 -
trunk/MagicSoft/Mars/mhflux/MHDisp.cc
r7115 r7122 197 197 return kFALSE; 198 198 } 199 const Double_t m3l = fHilExt->GetM3Long()*TMath::Sign( 1.0f, hsrc.GetCosDeltaAlpha())*fMm2Deg;199 const Double_t m3l = fHilExt->GetM3Long()*TMath::Sign(fMm2Deg, hsrc.GetCosDeltaAlpha()); 200 200 201 201 gweight = m3l>fM3lCut ? 1 : 0; … … 217 217 } 218 218 219 // Workaround: Number-of-entries 220 if (gweight>0.25) 221 fHist.Fill(pos1.X(), pos1.Y(), 0.0, w*gweight); 222 if (gweight<0.75) 223 fHist.Fill(pos2.X(), pos2.Y(), 0.0, w*(1-gweight)); 219 fHist.Fill(pos1.X(), pos1.Y(), 0.0, w*gweight); 220 fHist.Fill(pos2.X(), pos2.Y(), 0.0, w*(1-gweight)); 224 221 225 222 return kTRUE; … … 273 270 const Double_t x0 = h1->GetXaxis()->GetBinCenter(ix); 274 271 const Double_t y0 = h1->GetYaxis()->GetBinCenter(iy); 272 const Double_t w0 = h1->GetXaxis()->GetBinWidth(1); 275 273 276 274 for (int x=0; x<h1->GetNbinsX(); x++) … … 294 292 h2->Fit(&func, "IMQ", "", 0, 1.0); 295 293 296 const Double_t r0 = 2*func.GetParameter(2); 297 const Double_t e = func.Integral(0, r0)/h1->GetBinWidth(1); 298 func.SetParameter(0, 0); 299 const Double_t b = func.Integral(0, r0)/h1->GetBinWidth(1); 294 // No wintegrate the function f(x) per Delta Area 295 // which is f(x)/(pi*delta r*(2*r+delta r)) 296 TF1 func2("fcn2", Form("(gaus + [3]*x*x + [4])/(2*x+%.5f)", w0)); 297 for (int i=0; i<5; i++) 298 func2.SetParameter(i, func.GetParameter(i)); 299 300 const Double_t r0 = 2*func2.GetParameter(2); 301 const Double_t e = func2.Integral(0, r0)/(w0*TMath::Pi()); 302 func2.SetParameter(0, 0); 303 const Double_t b = func2.Integral(0, r0)/(w0*TMath::Pi()); 300 304 const Double_t s = MMath::SignificanceLiMa(e, b); 301 305 -
trunk/MagicSoft/Mars/mimage/MHHillas.cc
r6977 r7122 90 90 fDistC->SetYTitle("Counts"); 91 91 fDelta->SetYTitle("Counts"); 92 93 fDistC->SetMinimum(0); 92 94 93 95 MBinning bins; -
trunk/MagicSoft/Mars/mjobs/MJOptimizeCuts.cc
r7121 r7122 315 315 Bool_t MJOptimizeCuts::RunOnOff(const char *fname, MFilter *filter, MAlphaFitter *fit, const char *tree) 316 316 { 317 MHAlpha *histon = CreateNewHist( );318 MHAlpha *histof = CreateNewHist(" MHAlphaOff");317 MHAlpha *histon = CreateNewHist("Hist"); 318 MHAlpha *histof = CreateNewHist("HistOff"); 319 319 320 320 const Bool_t rc = RunOnOffCore(*histon, *histof, fname, filter, fit, tree); -
trunk/MagicSoft/Mars/mpedestal/MPedPhotCam.cc
r7109 r7122 273 273 for (int i=0; i<np; i++) 274 274 { 275 if (bad && (*bad)[i].IsUnsuitable( MBadPixelsPix::kUnsuitableRun))276 continue; //was: .IsBad()275 if (bad && (*bad)[i].IsUnsuitable()) 276 continue; 277 277 278 278 // Create sums for areas and sectors -
trunk/MagicSoft/Mars/msignal/MExtractor.cc
r7070 r7122 433 433 *fLog << " Gain Overlap to Lo: " << Form("%2d", fHiLoLast) << endl; 434 434 *fLog << " Saturation Lim: " << Form("%3d", fSaturationLimit) << endl; 435 *fLog << " Num Samples Hi/Lo: " << Form("%2 d %2d", fNumHiGainSamples, fNumLoGainSamples) << endl;435 *fLog << " Num Samples Hi/Lo: " << Form("%2.1f %2.1f", fNumHiGainSamples, fNumLoGainSamples) << endl; 436 436 if (fPedestals) 437 437 *fLog << " Pedestals: " << fPedestals->GetName() << ", " << fPedestals << endl; -
trunk/MagicSoft/Mars/showplot.cc
r7001 r7122 177 177 // From now on each 'Exit' means: Terminate the application 178 178 d->SetTitle(kInput); 179 d->SetWindowName(kInput); 180 179 181 d->Open(kInput); 180 182
Note:
See TracChangeset
for help on using the changeset viewer.