Changeset 4939 for trunk/MagicSoft/Mars/mhcalib
- Timestamp:
- 09/10/04 20:47:26 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mhcalib
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhcalib/HCalibLinkDef.h
r4938 r4939 14 14 #pragma link C++ class MHCalibrationRelTimeCam+; 15 15 #pragma link C++ class MHCalibrationTestCam+; 16 #pragma link C++ class MHCalibrationTestPix+;17 16 #pragma link C++ class MHCalibrationTestTimeCam+; 18 17 #pragma link C++ class MHCalibrationTestTimePix+; -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationRelTimeCam.cc
r4938 r4939 168 168 // - MHCalibrationCam::fAverageHiGainSectors 169 169 // 170 // Sets number of bins to MHCalibrationCam::fAverageNbins for:171 // - MHCalibrationCam::fAverageHiGainAreas, MHCalibrationCam::fAverageLoGainAreas172 // - MHCalibrationCam::fAverageHiGainSectors, MHCalibrationCam::fAverageLoGainSectors173 //174 170 Bool_t MHCalibrationRelTimeCam::ReInitHists(MParList *pList) 175 171 { … … 217 213 pix.SetLast (fRelTimeLast); 218 214 219 pix.GetHGausHist()->SetName ("HRelTimeHiGainPix"); 220 pix.GetHGausHist()->SetTitle("Rel. Times High Gain Pixel "); 215 TH1F *h = pix.GetHGausHist(); 216 217 h->SetName ("HRelTimeHiGainPix"); 218 h->SetTitle("Rel. Times High Gain Pixel "); 219 h->SetXTitle("Rel. Arr. Time [FADC slices]"); 220 h->SetYTitle("Nr. of events"); 221 221 222 222 InitHists(pix,(*fBadPixels)[i],i); … … 237 237 pix.SetLast (fRelTimeLast); 238 238 239 pix.GetHGausHist()->SetName ("HRelTimeLoGainPix"); 240 pix.GetHGausHist()->SetTitle("Rel. Times Low Gain Pixel "); 239 TH1F *h = pix.GetHGausHist(); 240 241 h->SetName ("HRelTimeLoGainPix"); 242 h->SetTitle("Rel. Times Low Gain Pixel "); 243 h->SetXTitle("Rel. Arr. Time [FADC slices]"); 244 h->SetYTitle("Nr. of events"); 241 245 242 246 InitHists((*this)(i),(*fBadPixels)[i],i); … … 261 265 pix.SetLast (fRelTimeLast); 262 266 263 pix.GetHGausHist()->SetName ("HRelTimeHiGainPix"); 264 pix.GetHGausHist()->SetTitle("Rel. Times average High Gain Area Idx "); 267 TH1F *h = pix.GetHGausHist(); 268 269 h->SetName ("HRelTimeHiGainArea"); 270 h->SetXTitle("Rel. Arr. Time [FADC slices]"); 271 h->SetYTitle("Nr. of events"); 265 272 266 273 if (fGeom->InheritsFrom("MGeomCamMagic")) 267 274 { 268 pix.GetHGausHist()->SetTitle(Form("%s%s%s","Rel. Times averaged on event-by-event basis ",269 275 h->SetTitle(Form("%s%s%s","Rel. Times averaged on event-by-event basis ", 276 j==0 ? "Inner Pixels " : "Outer Pixels ","High Gain Runs: ")); 270 277 pix.InitBins(); 271 278 pix.SetEventFrequency(fPulserFrequency); … … 273 280 else 274 281 { 275 pix.GetHGausHist()->SetTitle("Signal averaged on event-by-event basis High Gain Area Idx ");282 h->SetTitle("Signal averaged on event-by-event basis High Gain Area Idx "); 276 283 InitHists(pix,fIntensCam ? fIntensCam->GetAverageBadArea(j) : fCam->GetAverageBadArea(j),j); 277 284 } … … 295 302 pix.SetLast (fRelTimeLast); 296 303 297 pix.GetHGausHist()->SetName ("HRelTimeLoGainPix"); 298 pix.GetHGausHist()->SetTitle("Rel. Times average Low Gain Area Idx "); 304 TH1F *h = pix.GetHGausHist(); 305 306 h->SetName ("HRelTimeLoGainArea"); 307 h->SetXTitle("Rel. Arr. Time [FADC slices]"); 308 h->SetYTitle("Nr. of events"); 299 309 300 310 if (fGeom->InheritsFrom("MGeomCamMagic")) 301 311 { 302 pix.GetHGausHist()->SetTitle(Form("%s%s%s","Rel. Times averaged on event-by-event basis ",303 312 h->SetTitle(Form("%s%s%s","Rel. Times averaged on event-by-event basis ", 313 j==0 ? "Inner Pixels " : "Outer Pixels ","Low Gain Runs: ")); 304 314 pix.InitBins(); 305 315 pix.SetEventFrequency(fPulserFrequency); … … 307 317 else 308 318 { 309 pix.GetHGausHist()->SetTitle("Rel. Times averaged on event-by-event basis Low Gain Area Idx ");319 h->SetTitle("Rel. Times averaged on event-by-event basis Low Gain Area Idx "); 310 320 InitHists(pix,fIntensCam ? fIntensCam->GetAverageBadArea(j) : fCam->GetAverageBadArea(j),j); 311 321 } … … 329 339 pix.SetLast (fRelTimeLast); 330 340 331 pix.GetHGausHist()->SetName ("HRelTimeHiGainPix"); 332 pix.GetHGausHist()->SetTitle("Rel. Times average High Gain Sector "); 341 TH1F *h = pix.GetHGausHist(); 342 343 h->SetName ("HRelTimeHiGainSector"); 344 h->SetTitle("Rel. Times average High Gain Sector "); 345 h->SetXTitle("Rel. Arr. Time [FADC slices]"); 346 h->SetYTitle("Nr. of events"); 333 347 334 348 InitHists(pix,fIntensCam ? fIntensCam->GetAverageBadSector(j) : fCam->GetAverageBadSector(j),j); … … 352 366 pix.SetLast (fRelTimeLast); 353 367 354 pix.GetHGausHist()->SetName ("HRelTimeLoGainPix"); 355 pix.GetHGausHist()->SetTitle("Rel. Times average Low Gain Sector "); 368 TH1F *h = pix.GetHGausHist(); 369 370 h->SetName ("HRelTimeLoGainSector"); 371 h->SetTitle("Rel. Times average Low Gain Sector "); 372 h->SetXTitle("Rel. Arr. Time [FADC slices]"); 373 h->SetYTitle("Nr. of events"); 356 374 357 375 InitHists(pix,fIntensCam ? fIntensCam->GetAverageBadSector(j) : fCam->GetAverageBadSector(j),j); -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationTestCam.cc
r4929 r4939 27 27 // 28 28 // Fills the calibrated signal from an MCerPhotEvt into 29 // MHCalibration TestPix for every:29 // MHCalibrationPix for every: 30 30 // 31 31 // - Pixel, stored in the TObjArray's MHCalibrationCam::fHiGainArray … … 83 83 ///////////////////////////////////////////////////////////////////////////// 84 84 #include "MHCalibrationTestCam.h" 85 #include "MHCalibrationTestPix.h"86 85 87 86 #include "MHCalibrationPix.h" … … 109 108 110 109 using namespace std; 110 111 const Int_t MHCalibrationTestCam::fgTestNbins = 900; 112 const Axis_t MHCalibrationTestCam::fgTestFirst = -5.; 113 const Axis_t MHCalibrationTestCam::fgTestLast = 5.; 111 114 // -------------------------------------------------------------------------- 112 115 // 113 116 // Default Constructor. 117 // 118 // Sets: 119 // - fTestNbins to fgTestNbins 120 // - fTestFirst to fgTestFirst 121 // - fTestLast to fgTestLast 114 122 // 115 123 MHCalibrationTestCam::MHCalibrationTestCam(const char *name, const char *title) … … 119 127 fTitle = title ? title : "Histogram class for testing the calibration"; 120 128 121 SetAverageNbins(5000); 122 129 SetTestNbins(); 130 SetTestFirst(); 131 SetTestLast (); 123 132 } 124 133 … … 146 155 // - MHCalibrationCam::fAverageHiGainSectors 147 156 // 148 // Sets number of bins to MHCalibrationCam::fAverageNbins for:149 // - MHCalibrationCam::fAverageHiGainAreas150 // - MHCalibrationCam::fAverageHiGainSectors151 //152 157 Bool_t MHCalibrationTestCam::ReInitHists(MParList *pList) 153 158 { … … 170 175 for (Int_t i=0; i<npixels; i++) 171 176 { 172 (*fHiGainArray)[i] = new MHCalibration TestPix("Calibrated Events",177 (*fHiGainArray)[i] = new MHCalibrationPix("Calibrated Events", 173 178 "Test Calibration Pixel"); 179 180 MHCalibrationPix &pix = (*this)[i]; 181 182 pix.SetNbins(fTestNbins); 183 pix.SetFirst(fTestFirst); 184 pix.SetLast (fTestLast); 185 186 TH1F *h = pix.GetHGausHist(); 187 188 h->SetName ("HTestHiGainPix"); 189 h->SetTitle("Distribution of calibrated Photons Pixel "); 190 h->SetXTitle("Nr. Photons"); 191 h->SetYTitle("Nr. of events"); 192 174 193 InitHists((*this)[i],(*fBadPixels)[i],i); 175 194 } … … 184 203 { 185 204 (*fAverageHiGainAreas)[j] = 186 new MHCalibration TestPix("MHCalibrationTestAverageArea",205 new MHCalibrationPix("MHCalibrationTestAverageArea", 187 206 "Average Test Calibrations Area Idx "); 188 207 189 GetAverageHiGainArea(j).GetHGausHist()->SetTitle("Test Calibrations Area Idx "); 190 GetAverageHiGainArea(j).SetNbins(fAverageNbins); 191 GetAverageHiGainArea(j).InitBins(); 192 GetAverageHiGainArea(j).ChangeHistId(j); 193 GetAverageHiGainArea(j).SetEventFrequency(fPulserFrequency); 194 195 TH1F *h = GetAverageHiGainArea(j).GetHGausHist(); 208 MHCalibrationPix &pix = GetAverageHiGainArea(j); 209 210 pix.SetNbins(fTestNbins*3); 211 pix.SetFirst(fTestFirst); 212 pix.SetLast (fTestLast); 213 214 TH1F *h = pix.GetHGausHist(); 215 216 h->SetName ("HTestPix"); 217 h->SetTitle("Test Calibrations Area Idx "); 218 h->SetXTitle("Nr. Photons"); 219 h->SetYTitle("Nr. of events"); 220 221 pix.InitBins(); 222 pix.ChangeHistId(j); 223 pix.SetEventFrequency(fPulserFrequency); 224 196 225 h->SetTitle( Form("%s%s", h->GetTitle()," Runs: ")); 197 226 } … … 206 235 { 207 236 (*fAverageHiGainSectors)[j] = 208 new MHCalibrationTestPix("MHCalibrationTestAverageSector", 209 "Average Test Calibrations Sector "); 210 211 GetAverageHiGainSector(j).GetHGausHist()->SetTitle("Test Calibrations Sector "); 212 GetAverageHiGainSector(j).SetNbins(fAverageNbins); 213 GetAverageHiGainSector(j).InitBins(); 214 GetAverageHiGainSector(j).ChangeHistId(j); 215 GetAverageHiGainSector(j).SetEventFrequency(fPulserFrequency); 216 217 TH1F *h = GetAverageHiGainSector(j).GetHGausHist(); 218 h->SetTitle( Form("%s%s", h->GetTitle()," Runs: ")); 219 237 new MHCalibrationPix("MHCalibrationTestAverageSector", 238 "Average Test Calibrations Sector "); 239 240 MHCalibrationPix &pix = GetAverageHiGainSector(j); 241 242 pix.SetNbins(fTestNbins*3); 243 pix.SetFirst(fTestFirst); 244 pix.SetLast (fTestLast); 245 246 TH1F *h = pix.GetHGausHist(); 247 248 h->SetName ("HTestPix"); 249 h->SetTitle("Test Calibrations Sector "); 250 h->SetXTitle("Nr. Photons"); 251 h->SetYTitle("Nr. of events"); 252 253 pix.InitBins(); 254 pix.ChangeHistId(j); 255 pix.SetEventFrequency(fPulserFrequency); 256 257 h->SetTitle( Form("%s%s", h->GetTitle()," Runs: ")); 220 258 } 221 259 } -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationTestCam.h
r4929 r4939 18 18 private: 19 19 20 static const Int_t fgTestNbins; // Default for fNBins (now set to: 2000 ) 21 static const Axis_t fgTestFirst; // Default for fFirst (now set to: -0.5 ) 22 static const Axis_t fgTestLast; // Default for fLast (now set to: 1999.5) 23 24 Int_t fTestNbins; // Number of bins (now set to: 2000 ) 25 Axis_t fTestFirst; // Lower histogram limit (now set to: -0.5 ) 26 Axis_t fTestLast; // Upper histogram limit (now set to: 1999.5) 27 20 28 TArrayF fMeanMeanPhotPerArea; 21 29 TArrayF fRmsMeanPhotPerArea ; … … 42 50 void CalcAverageSigma(); 43 51 52 void SetTestNbins ( const Int_t i=fgTestNbins ) { fTestNbins = i; } 53 void SetTestFirst ( const Axis_t f=fgTestFirst ) { fTestFirst = f; } 54 void SetTestLast ( const Axis_t f=fgTestLast ) { fTestLast = f; } 55 44 56 ClassDef(MHCalibrationTestCam, 1) // Histogram class for Relative Time Camera Calibration 45 57 }; -
trunk/MagicSoft/Mars/mhcalib/Makefile
r4938 r4939 41 41 MHCalibrationRelTimeCam.cc \ 42 42 MHCalibrationTestCam.cc \ 43 MHCalibrationTestPix.cc \44 43 MHCalibrationTestTimeCam.cc \ 45 44 MHCalibrationTestTimePix.cc \
Note:
See TracChangeset
for help on using the changeset viewer.