- Timestamp:
- 05/05/04 17:26:14 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r3980 r3982 21 21 2004/05/05: Markus Gaug 22 22 23 * mjobs/MJExtractCalibTest.[h,cc] 24 - included setters for the time extractor 25 23 26 * mcalib/MCalibrationChargeCalc.cc 24 27 - set default of fgPheErrLimit from 4 sigma to 5. -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc
r3936 r3982 228 228 const Float_t MCalibrationChargeCalc::fgLambdaErrLimit = 0.2; 229 229 const Float_t MCalibrationChargeCalc::fgLambdaCheckLimit = 0.2; 230 const Float_t MCalibrationChargeCalc::fgPheErrLimit = 4.;230 const Float_t MCalibrationChargeCalc::fgPheErrLimit = 5.; 231 231 const Float_t MCalibrationChargeCalc::fgFFactorErrLimit = 3.; 232 232 // -------------------------------------------------------------------------- -
trunk/MagicSoft/Mars/mcalib/MCalibrationRelTimeCalc.cc
r3960 r3982 72 72 using namespace std; 73 73 74 const Float_t MCalibrationRelTimeCalc::fgRelTimeRelErrLimit = 7.5;74 const Float_t MCalibrationRelTimeCalc::fgRelTimeRelErrLimit = 10.; 75 75 // -------------------------------------------------------------------------- 76 76 // … … 343 343 areasum2[aidx] /= (numareavalid[aidx]-1.); 344 344 areasum [aidx] /= numareavalid[aidx]; 345 lowlim [aidx] = areasum [aidx] - fRelTimeRelErrLimit*areasum2[aidx];345 lowlim [aidx] = 0.; 346 346 upplim [aidx] = areasum [aidx] + fRelTimeRelErrLimit*areasum2[aidx]; 347 347 -
trunk/MagicSoft/Mars/mcalib/MHCalibrationTestCam.cc
r3855 r3982 115 115 fTitle = title ? title : "Histogram class for testing the calibration"; 116 116 117 SetAverageNbins(5000); 117 118 } 118 119 … … 165 166 (*fHiGainArray)[i] = new MHCalibrationTestPix("Calibrated Events", 166 167 "Test Calibration Pixel"); 167 if (!(*fBadPixels)[i].IsOK()) 168 (*this)[i].SetExcluded(); 169 170 (*this)[i].InitBins(); 171 (*this)[i].ChangeHistId(i); 172 (*this)[i].SetEventFrequency(fPulserFrequency); 168 InitHists((*this)[i],(*fBadPixels)[i],i); 173 169 } 174 170 } … … 181 177 (*fLoGainArray)[i] = new MHCalibrationTestPix("Calibrated Events", 182 178 "Test Calibration Pixel"); 183 if (!(*fBadPixels)[i].IsOK()) 184 (*this)[i].SetExcluded(); 185 186 (*this)[i].InitBins(); 187 (*this)[i].ChangeHistId(i); 188 (*this)[i].SetEventFrequency(fPulserFrequency); 179 InitHists((*this)(i),(*fBadPixels)[i],i); 189 180 } 190 181 } … … 207 198 GetAverageHiGainArea(j).SetEventFrequency(fPulserFrequency); 208 199 200 TH1F *h = GetAverageHiGainArea(j).GetHGausHist(); 201 h->SetTitle( Form("%s%s", h->GetTitle()," Runs: ")); 209 202 } 210 203 } … … 245 238 GetAverageHiGainSector(j).ChangeHistId(j); 246 239 GetAverageHiGainSector(j).SetEventFrequency(fPulserFrequency); 240 241 TH1F *h = GetAverageHiGainSector(j).GetHGausHist(); 242 h->SetTitle( Form("%s%s", h->GetTitle()," Runs: ")); 243 247 244 } 248 245 } … … 307 304 memset(sumareahi, 0, nareas * sizeof(Float_t)); 308 305 memset(sumsectorhi, 0, nsectors*sizeof(Float_t)); 306 memset(numareahi, 0, nareas * sizeof(Int_t)); 307 memset(numsectorhi, 0, nsectors*sizeof(Int_t)); 309 308 310 309 for (Int_t i=0; i<npixels; i++) -
trunk/MagicSoft/Mars/mcalib/MHCalibrationTestPix.cc
r3851 r3982 81 81 82 82 fHGausHist.SetName("HCalibrationTest"); 83 fHGausHist.SetTitle("Distribution of calibrated Summed FADC slices Pixel");84 fHGausHist.SetXTitle(" Sum FADC Slices");83 fHGausHist.SetTitle("Distribution of calibrated Photons Pixel"); 84 fHGausHist.SetXTitle("Nr. Photons"); 85 85 fHGausHist.SetYTitle("Nr. of events"); 86 86 -
trunk/MagicSoft/Mars/mcalib/MHCalibrationTestTimeCam.cc
r3980 r3982 113 113 fName = name ? name : "MHCalibrationTestTimeCam"; 114 114 fTitle = title ? title : "Histogram class for testing the calibration of arrival times"; 115 115 116 SetAverageNbins(5000); 116 117 } 117 118 … … 195 196 GetAverageHiGainArea(j).SetEventFrequency(fPulserFrequency); 196 197 198 TH1F *h = GetAverageHiGainArea(j).GetHGausHist(); 199 h->SetTitle( Form("%s%s", h->GetTitle()," Runs: ")); 200 201 197 202 } 198 203 } … … 233 238 GetAverageHiGainSector(j).ChangeHistId(j); 234 239 GetAverageHiGainSector(j).SetEventFrequency(fPulserFrequency); 240 TH1F *h = GetAverageHiGainSector(j).GetHGausHist(); 241 h->SetTitle( Form("%s%s", h->GetTitle()," Runs: ")); 242 243 235 244 } 236 245 } … … 295 304 memset(sumareahi, 0, nareas * sizeof(Float_t)); 296 305 memset(sumsectorhi, 0, nsectors*sizeof(Float_t)); 306 memset(numareahi, 0, nareas * sizeof(Int_t)); 307 memset(numsectorhi, 0, nsectors*sizeof(Int_t)); 297 308 298 309 for (Int_t i=0; i<npixels; i++) -
trunk/MagicSoft/Mars/mjobs/MJExtractCalibTest.cc
r3862 r3982 48 48 #include "MBadPixelsCam.h" 49 49 #include "MCerPhotEvt.h" 50 #include "MArrivalTime.h" 50 51 #include "MCalibrationChargeCam.h" 52 #include "MCalibrationRelTimeCam.h" 51 53 #include "MCalibrationQECam.h" 52 54 #include "MHCamEvent.h" … … 56 58 #include "MExtractSlidingWindow.h" 57 59 #include "MExtractor.h" 60 #include "MExtractTime.h" 61 #include "MExtractTimeFastSpline.h" 58 62 #include "MFillH.h" 59 63 #include "MCalibrate.h" 64 #include "MCalibrateRelTimes.h" 60 65 #include "MPedPhotCalc.h" 61 66 #include "MWriteRootFile.h" … … 70 75 // Default constructor. 71 76 // 72 // Sets fRuns to 0, fExtractor to NULL 77 // Sets fRuns to 0, fExtractor to NULL, fTimeExtractor to NULL 73 78 // 74 79 MJExtractCalibTest::MJExtractCalibTest(const char *name, const char *title) 75 : fRuns(NULL), fExtractor(NULL) 80 : fRuns(NULL), fExtractor(NULL), fTimeExtractor(NULL) 76 81 { 77 82 fName = name ? name : "MJExtractCalibTest"; … … 151 156 } 152 157 158 TString MJExtractCalibTest::GetOutputFileT() const 159 { 160 if (!fRuns) 161 return ""; 162 163 return Form("%s/%s-F4.root", (const char*)fOutputPath, (const char*)fRuns->GetRunsAsFileName()); 164 } 165 153 166 TString MJExtractCalibTest::GetOutputFileP() const 154 167 { … … 240 253 } 241 254 242 if (TestBit(kEnableGraphicalOutput))255 // if (TestBit(kEnableGraphicalOutput)) 243 256 tlist.AddToList(&fill); 244 257 tlist.AddToList(&photcalc); 245 258 tlist.AddToList(&fillcam); 246 // tlist.AddToList(&write);247 259 248 260 // Create and setup the eventloop … … 267 279 return kTRUE; 268 280 } 281 282 Bool_t MJExtractCalibTest::ProcessT(MPedestalCam &pedcam, MCalibrationRelTimeCam &relcam) 283 { 284 const TString fname = GetOutputFileT(); 285 286 if (gSystem->AccessPathName(fname, kFileExists)) 287 return ProcessFileT(pedcam,relcam); 288 289 return kTRUE; 290 } 291 292 Bool_t MJExtractCalibTest::ProcessFileT(MPedestalCam &pedcam, MCalibrationRelTimeCam &relcam) 293 { 294 295 if (!fRuns) 296 { 297 *fLog << err << "No Runs choosen... abort." << endl; 298 return kFALSE; 299 } 300 if (fRuns->GetNumRuns() != fRuns->GetNumEntries()) 301 { 302 *fLog << err << "Number of files found doesn't match number of runs... abort." << endl; 303 return kFALSE; 304 } 305 306 *fLog << inf; 307 fLog->Separator(GetDescriptor()); 308 *fLog << "Calculate MExtractedSignalCam from Runs " << fRuns->GetRunsAsString() << endl; 309 *fLog << endl; 310 311 MArrivalTime arrtime; 312 313 // Setup Lists 314 MParList plist; 315 plist.AddToList(&pedcam); 316 plist.AddToList(&relcam); 317 plist.AddToList(&arrtime); 318 plist.AddToList(&fTestCam); 319 plist.AddToList(&fBadPixels); 320 321 MTaskList tlist; 322 plist.AddToList(&tlist); 323 324 // Setup Task-lists 325 MReadMarsFile read("Events"); 326 read.DisableAutoScheme(); 327 static_cast<MRead&>(read).AddFiles(*fRuns); 328 329 MGeomApply apply; // Only necessary to craete geometry 330 MExtractTimeFastSpline extract; 331 MCalibrateRelTimes timecalc; 332 333 MHCamEvent evt("ExtTimes"); 334 evt.SetType(0); 335 MFillH fill(&evt, "MArrivalTimeCam"); 336 337 MFillH fillcam("MHCalibrationTestTimeCam", "MArrivalTime"); 338 fillcam.SetNameTab("TestTime"); 339 340 /* 341 MWriteRootFile write(GetOutputFileD(), "RECREATE", fRuns->GetRunsAsString(), 2); 342 write.AddContainer("MExtractedSignalCam", "Events"); 343 write.AddContainer("MTime", "Events"); 344 write.AddContainer("MRawEvtHeader", "Events"); 345 write.AddContainer("MPedestalCam", "RunHeaders"); 346 write.AddContainer("MRawRunHeader", "RunHeaders"); 347 write.AddContainer("MBadPixelsCam", "RunHeaders"); 348 */ 349 350 tlist.AddToList(&read); 351 tlist.AddToList(&apply); 352 353 if (fTimeExtractor) 354 tlist.AddToList(fTimeExtractor); 355 else 356 { 357 *fLog << warn << GetDescriptor() 358 << ": No extractor has been chosen, take default MExtractSlidingWindow " << endl; 359 tlist.AddToList(&extract); 360 } 361 362 // if (TestBit(kEnableGraphicalOutput)) 363 tlist.AddToList(&fill); 364 tlist.AddToList(&timecalc); 365 tlist.AddToList(&fillcam); 366 367 // Create and setup the eventloop 368 MEvtLoop evtloop(fName); 369 evtloop.SetParList(&plist); 370 evtloop.SetDisplay(fDisplay); 371 evtloop.SetLogStream(fLog); 372 373 // Execute first analysis 374 if (!evtloop.Eventloop()) 375 { 376 *fLog << err << GetDescriptor() << ": Failed." << endl; 377 return kFALSE; 378 } 379 380 tlist.PrintStatistics(); 381 382 DisplayResult(plist); 383 384 *fLog << inf << GetDescriptor() << ": Done." << endl; 385 386 return kTRUE; 387 } 388 269 389 270 390 Bool_t MJExtractCalibTest::ReadPedPhotCam() -
trunk/MagicSoft/Mars/mjobs/MJExtractCalibTest.h
r3862 r3982 18 18 class MParList; 19 19 class MPedestalCam; 20 class MCalibrationRelTimeCam; 20 21 class MCalibrationChargeCam; 21 22 class MCalibrationQECam; 22 23 class MExtractor; 24 class MExtractTime; 23 25 class MJExtractCalibTest : public MParContainer, public MGCamDisplays 24 26 { … … 27 29 TString fOutputPath; 28 30 29 MRunIter *fRuns; // Data files 30 MExtractor *fExtractor; // Signal extractor 31 MRunIter *fRuns; // Data files 32 MExtractor *fExtractor; // Signal extractor 33 MExtractTime *fTimeExtractor; // Arrival time extractor 31 34 32 35 MBadPixelsCam fBadPixels; … … 40 43 Bool_t ProcessFileD(MPedestalCam &pedcam, MCalibrationChargeCam &calcam, MCalibrationQECam &qecam); 41 44 Bool_t ProcessFileP(MPedestalCam &pedcam, MCalibrationChargeCam &calcam, MCalibrationQECam &qecam); 45 Bool_t ProcessFileT(MPedestalCam &pedcam, MCalibrationRelTimeCam &relcam); 42 46 43 47 public: … … 49 53 TString GetOutputFileP() const; 50 54 TString GetOutputFileD() const; 55 TString GetOutputFileT() const; 51 56 52 57 MHCalibrationTestCam &GetTestCam() { return fTestCam; } … … 55 60 56 61 void SetExtractor(MExtractor* ext) { fExtractor = ext; } 62 void SetTimeExtractor(MExtractTime* ext) { fTimeExtractor = ext; } 57 63 void SetBadPixels(const MBadPixelsCam &bad) { bad.Copy(fBadPixels); } 58 64 59 65 Bool_t ProcessD(MPedestalCam &pedcam, MCalibrationChargeCam &calcam, MCalibrationQECam &qecam); 60 66 Bool_t ProcessP(MPedestalCam &pedcam, MCalibrationChargeCam &calcam, MCalibrationQECam &qecam); 67 Bool_t ProcessT(MPedestalCam &pedcam, MCalibrationRelTimeCam &relcam); 61 68 62 69 ClassDef(MJExtractCalibTest, 0) // Tool to extract, calibrate and test the signal -
trunk/MagicSoft/Mars/mjobs/MJPedestal.cc
r3889 r3982 258 258 MGeomApply geomapl; 259 259 // MBadPixelsMerge merge(&fBadPixels); 260 //MExtractSignal sigcalc;261 260 MPedCalcPedRun pedcalc; 262 261 -
trunk/MagicSoft/Mars/mjobs/Makefile
r3927 r3982 21 21 INCLUDES = -I. -I../mbase -I../mgui -I../mgeom -I../mdata -I../mhbase \ 22 22 -I../mfileio -I../mfilter -I../manalysis -I../mhist -I../mcalib \ 23 -I../mbadpixels -I../msignal -I../mraw -I../mpedestal 23 -I../mbadpixels -I../msignal -I../mraw -I../mpedestal -I../mtools 24 24 25 25 #manalysis: MChisqEval (MParameters)
Note:
See TracChangeset
for help on using the changeset viewer.