Changeset 3199 for trunk/MagicSoft/Mars
- Timestamp:
- 02/16/04 15:37:25 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r3196 r3199 30 30 31 31 32 32 33 2004/02/16: Thomas Bretz 33 34 … … 97 98 - fixed usage of logging stream output levels 98 99 100 * manalysis/MPedCalcPedRun.[h,cc]: 101 - removed obsolete fSignals 102 103 - removed obsolete fNumPixels 104 105 * manalysis/MPedestalCam.h: 106 - added '->' to fArray 107 108 * mfileio/MWriteRootFile.cc: 109 - changed some output to make debugging easier 110 111 * mjobs/MJCalibration.cc: 112 - fixed a bug in drawing 113 114 * mjobs/MJExtractSignal.cc: 115 - removed MPedestalCam from MWriteRootFile output. 116 When creating the branch it crashes - reason unknown I'll 117 investigate further 118 119 99 120 100 121 2004/02/16: Markus Gaug … … 115 136 - changed function GetNumPixels to GetSize 116 137 117 * macros/bootcampstandardanalysis.C 118 * macros/pedphotcalc.C 138 * macros/bootcampstandardanalysis.C, macros/pedphotcalc.C 119 139 - included cosmics rejection which was in MCalibrationCalc before 140 120 141 121 142 -
trunk/MagicSoft/Mars/manalysis/MPedCalcPedRun.cc
r3039 r3199 108 108 // 109 109 MPedCalcPedRun::MPedCalcPedRun(const char *name, const char *title) 110 : fRawEvt(NULL), fPedestals(NULL) , fSignals(NULL)110 : fRawEvt(NULL), fPedestals(NULL) 111 111 { 112 112 fName = name ? name : "MPedCalcPedRun"; … … 121 121 void MPedCalcPedRun::Clear(const Option_t *o) 122 122 { 123 124 fNumHiGainSamples = 0; 125 fNumPixels = 0; 126 fNumSamplesTot = 0; 127 128 fRawEvt = NULL; 129 fPedestals = NULL; 130 fSignals = NULL; 131 132 return; 133 123 fNumHiGainSamples = 0; 124 fNumSamplesTot = 0; 125 126 fRawEvt = NULL; 127 fPedestals = NULL; 134 128 } 135 129 … … 148 142 Int_t MPedCalcPedRun::PreProcess( MParList *pList ) 149 143 { 144 Clear(); 145 150 146 fRawEvt = (MRawEvtData*)pList->FindObject("MRawEvtData"); 151 147 if (!fRawEvt) … … 159 155 return kFALSE; 160 156 161 fSignals = (MExtractedSignalCam*)pList->FindObject("MExtractedSignalCam");162 163 fNumSamplesTot=0;164 165 157 return kTRUE; 166 158 } … … 186 178 return kTRUE; 187 179 188 fNumPixels= fPedestals->GetSize();189 190 if (fSumx.GetSize()==0)191 192 fSumx.Set( fNumPixels);193 fSumx2.Set( fNumPixels);180 Int_t n = fPedestals->GetSize(); 181 182 if (fSumx.GetSize()==0) 183 { 184 fSumx.Set(n); 185 fSumx2.Set(n); 194 186 195 187 fSumx.Reset(); 196 188 fSumx2.Reset(); 197 189 } 198 190 199 191 // Calculate an even number for the hi gain samples to avoid -
trunk/MagicSoft/Mars/manalysis/MPedCalcPedRun.h
r3190 r3199 1 1 #ifndef MARS_MPedCalcPedRun 2 2 #define MARS_MPedCalcPedRun 3 4 /////////////////////////////////////////////////////////////////////////////5 // //6 // MPedCalcPedRun //7 // //8 // Evaluate the pedestals from pedestal runs //9 // //10 /////////////////////////////////////////////////////////////////////////////11 3 12 4 #ifndef MARS_MTask … … 14 6 #endif 15 7 8 #ifndef ROOT_TArrayF 16 9 #include <TArrayF.h> 10 #endif 17 11 18 12 class MRawEvtData; 19 13 class MPedestalCam; 20 class MExtractedSignalCam;21 14 22 15 class MPedCalcPedRun : public MTask 23 16 { 24 Byte_t fNumHiGainSamples; 25 UShort_t fNumPixels; 26 UInt_t fNumSamplesTot; 17 Byte_t fNumHiGainSamples; 18 UInt_t fNumSamplesTot; 27 19 28 MRawEvtData *fRawEvt; // raw event data (time slices) 29 MPedestalCam *fPedestals; // Pedestals of all pixels in the camera 30 MExtractedSignalCam *fSignals; // Signals of all pixels in the camera 20 MRawEvtData *fRawEvt; // raw event data (time slices) 21 MPedestalCam *fPedestals; // Pedestals of all pixels in the camera 31 22 32 23 TArrayF fSumx; // sum of values -
trunk/MagicSoft/Mars/manalysis/MPedestalCam.h
r3190 r3199 13 13 class MGeomCam; 14 14 class MPedestalPix; 15 15 16 class MPedestalCam : public MCamEvent, public MParContainer 16 17 { 17 18 private: 19 TClonesArray *fArray; //-> FIXME: Change TClonesArray away from a pointer? 20 UInt_t fTotalEntries; // Total number of times, the Process was executed (to estimate the error of pedestal) 18 21 19 TClonesArray *fArray; // FIXME: Change TClonesArray away from a pointer?20 UInt_t fTotalEntries; // Total number of times, the Process was executed (to estimate the error of pedestal)21 22 22 public: 23 MPedestalCam(const char *name=NULL, const char *title=NULL); 24 ~MPedestalCam(); 25 26 void Clear(Option_t *o=""); 27 28 void InitSize(const UInt_t i); 29 30 MPedestalPix &operator[](Int_t i); 31 const MPedestalPix &operator[](Int_t i) const; 23 MPedestalCam(const char *name=NULL, const char *title=NULL); 24 ~MPedestalCam(); 32 25 33 // Setters 34 void SetTotalEntries(const UInt_t n) { fTotalEntries = n; } 26 void Clear(Option_t *o=""); 35 27 36 // Getters 37 UInt_t GetSize() const; 38 UInt_t GetTotalEntries() const { return fTotalEntries; } 28 void InitSize(const UInt_t i); 39 29 40 Float_t GetPedestalMin(const MGeomCam *cam) const; 41 Float_t GetPedestalMax(const MGeomCam *cam) const; 42 43 void Print(Option_t *o="") const; 44 45 Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const; 46 void DrawPixelContent(Int_t idx) const; 47 48 ClassDef(MPedestalCam, 1) // Storage Container for all pedestal information of the camera 30 MPedestalPix &operator[](Int_t i); 31 const MPedestalPix &operator[](Int_t i) const; 32 33 // Setters 34 void SetTotalEntries(const ULong_t n) { fTotalEntries = n; } 35 36 // Getters 37 Int_t GetSize() const; 38 ULong_t GetTotalEntries() const { return fTotalEntries; } 39 40 Float_t GetPedestalMin(const MGeomCam *cam) const; 41 Float_t GetPedestalMax(const MGeomCam *cam) const; 42 43 void Print(Option_t *o="") const; 44 45 Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const; 46 void DrawPixelContent(Int_t idx) const; 47 48 ClassDef(MPedestalCam, 1) // Storage Container for all pedestal information of the camera 49 49 }; 50 50 51 51 #endif 52 -
trunk/MagicSoft/Mars/mfileio/MWriteRootFile.cc
r2604 r3199 357 357 // The containers should be written in Splitlevel=1 358 358 // 359 *fLog << inf << "Creating Branch " << cname << " of " << cont->ClassName() << "... " << flush; 360 359 361 TString branchname(cname); 360 362 branchname.Append("."); … … 366 368 if (!branch) 367 369 { 370 *fLog << endl; 368 371 *fLog << err << "Unable to create branch '" << cname << "'." << endl; 369 372 return kFALSE; 370 373 } 371 374 375 *fLog << "done." << endl; 376 372 377 // 373 378 // Tell the entry also which branch belongs to it (this is necessary … … 375 380 // 376 381 entry->SetBranch(branch); 377 *fLog << inf << "Created Branch " << cname << " of " << cont->ClassName() << "." << endl;378 382 } 379 383 return kTRUE; -
trunk/MagicSoft/Mars/mjobs/MJCalibration.cc
r3143 r3199 204 204 205 205 // Create histograms to display 206 MHCamera disp1 (geomcam, "Cal;Charge", "Fitted Mean Charges"); 207 MHCamera disp2 (geomcam, "Cal;SigmaCharge", "Sigma of Fitted Charges"); 208 MHCamera disp3 (geomcam, "Cal;FitProb", "Probability of Fit"); 209 MHCamera disp4 (geomcam, "Cal;RSigma", "Reduced Sigmas"); 210 MHCamera disp5 (geomcam, "Cal;RSigma/Charge", "Reduced Sigma per Charge"); 211 MHCamera disp6 (geomcam, "Cal;FFactorPhe", "Nr. of Phe's (F-Factor Method)"); 212 MHCamera disp7 (geomcam, "Cal;FFactorConv", "Conversion Factor (F-Factor Method)"); 213 MHCamera disp8 (geomcam, "Cal;FFactorFFactor", "Total F-Factor (F-Factor Method)"); 214 MHCamera disp9 (geomcam, "Cal;BlindPixPh", "Photon flux inside plexiglass (Blind Pixel Method)"); 215 MHCamera disp10 (geomcam, "Cal;BlindPixConv", "Conversion Factor (Blind Pixel Method)"); 216 MHCamera disp11 (geomcam, "Cal;BlindPixFFactor","Total F-Factor (Blind Pixel Method)"); 217 MHCamera disp12 (geomcam, "Cal;PINDiodePh", "Photons flux outside plexiglass (PIN Diode Method)"); 218 MHCamera disp13 (geomcam, "Cal;PINDiodeConv", "Conversion Factor (PIN Diode Method)"); 219 MHCamera disp14 (geomcam, "Cal;PINDiodeFFactor","Total F-Factor (PIN Diode Method)"); 220 MHCamera disp15 (geomcam, "Cal;Excluded", "Pixels previously excluded"); 221 MHCamera disp16 (geomcam, "Cal;NotFitted", "Pixels that could not be fitted"); 222 MHCamera disp17 (geomcam, "Cal;NotFitValid", "Pixels with not valid fit results"); 223 MHCamera disp18 (geomcam, "Cal;Oscillation", "Oscillating Pixels"); 224 MHCamera disp19 (geomcam, "Cal;Saturation", "Pixels with saturated Hi Gain"); 225 206 MHCamera disp1 (geomcam, "Cal;Charge", "Fitted Mean Charges"); 207 MHCamera disp2 (geomcam, "Cal;SigmaCharge", "Sigma of Fitted Charges"); 208 MHCamera disp3 (geomcam, "Cal;FitProb", "Probability of Fit"); 209 MHCamera disp4 (geomcam, "Cal;RSigma", "Reduced Sigmas"); 210 MHCamera disp5 (geomcam, "Cal;RSigma/Charge", "Reduced Sigma per Charge"); 211 MHCamera disp6 (geomcam, "Cal;FFactorPhe", "Nr. of Phe's (F-Factor Method)"); 212 MHCamera disp7 (geomcam, "Cal;FFactorConv", "Conversion Factor (F-Factor Method)"); 213 MHCamera disp8 (geomcam, "Cal;FFactorFFactor", "Total F-Factor (F-Factor Method)"); 214 MHCamera disp9 (geomcam, "Cal;BlindPixPh", "Photon flux inside plexiglass (Blind Pixel Method)"); 215 MHCamera disp10(geomcam, "Cal;BlindPixConv", "Conversion Factor (Blind Pixel Method)"); 216 MHCamera disp11(geomcam, "Cal;BlindPixFFactor","Total F-Factor (Blind Pixel Method)"); 217 MHCamera disp12(geomcam, "Cal;PINDiodePh", "Photons flux outside plexiglass (PIN Diode Method)"); 218 MHCamera disp13(geomcam, "Cal;PINDiodeConv", "Conversion Factor (PIN Diode Method)"); 219 MHCamera disp14(geomcam, "Cal;PINDiodeFFactor","Total F-Factor (PIN Diode Method)"); 220 MHCamera disp15(geomcam, "Cal;Excluded", "Pixels previously excluded"); 221 MHCamera disp16(geomcam, "Cal;NotFitted", "Pixels that could not be fitted"); 222 MHCamera disp17(geomcam, "Cal;NotFitValid", "Pixels with not valid fit results"); 223 MHCamera disp18(geomcam, "Cal;Oscillation", "Oscillating Pixels"); 224 MHCamera disp19(geomcam, "Cal;Saturation", "Pixels with saturated Hi Gain"); 226 225 227 226 // Fitted charge means and sigmas … … 272 271 disp19.SetCamContent(fCalibrationCam,31); 273 272 274 275 disp1.SetYTitle("Charge [FADC units]"); 276 disp2.SetYTitle("\\sigma_{Charge} [FADC units]"); 277 disp3.SetYTitle("P_{Charge} [1]"); 278 279 disp4.SetYTitle("\\sqrt{\\sigma^{2}_{Charge} - RMS^{2}_{Ped}} [FADC Counts]"); 280 disp5.SetYTitle("Reduced Sigma / Mean Charge [1]"); 281 282 disp6.SetYTitle("Nr. Photo-Electrons [1]"); 283 disp7.SetYTitle("Conversion Factor [PhE/FADC Count]"); 284 disp8.SetYTitle("\\sqrt{N_{PhE}}*\\sigma_{Charge}/\\mu_{Charge} [1]"); 285 286 disp9.SetYTitle("Photon flux [ph/mm^2]"); 287 disp10.SetYTitle("Conversion Factor [Phot/FADC Count]"); 288 disp11.SetYTitle("\\sqrt{N_{Ph}}*\\sigma_{Charge}/\\mu_{Charge} [1]"); 289 290 disp12.SetYTitle("Photon flux [ph/mm^2]"); 291 disp13.SetYTitle("Conversion Factor [Phot/FADC Count]"); 292 disp14.SetYTitle("\\sqrt{N_{Ph}}*\\sigma_{Charge}/\\mu_{Charge} [1]"); 273 disp1.SetYTitle("Q [FADC units]"); 274 disp2.SetYTitle("\\sigma_{Q} [FADC units]"); 275 disp3.SetYTitle("P_{Q} [1]"); 276 277 disp4.SetYTitle("\\sqrt{\\sigma^{2}_{Q} - RMS^{2}_{Ped}} [FADC Counts]"); 278 disp5.SetYTitle("Red.Sigma/<Q> [1]"); 279 280 disp6.SetYTitle("PhE [#]"); 281 disp7.SetYTitle("Conv.Factor [PhE/FADC units]"); 282 disp8.SetYTitle("\\sqrt{N_{PhE}}*\\sigma_{Q}/\\mu_{Q} [1]"); 283 284 disp9.SetYTitle("Phot.flux [ph/mm^{2}]"); 285 disp10.SetYTitle("Conv.Factor [Phot/FADC Count]"); 286 disp11.SetYTitle("\\sqrt{N_{Ph}}*\\sigma_{Q}/\\mu_{Q} [1]"); 287 288 disp12.SetYTitle("Phot.flux [ph/mm^{2}]"); 289 disp13.SetYTitle("Conv.Factor [Phot/FADC Count]"); 290 disp14.SetYTitle("\\sqrt{N_{Ph}}*\\sigma_{Q}/\\mu_{Q} [1]"); 293 291 294 292 disp15.SetYTitle("[1]"); … … 357 355 c8.Divide(1,3); 358 356 359 CamDraw(c8, 1, 4, disp19, 0); 360 357 CamDraw(c8, 1, 1, disp19, 0); 361 358 } 362 359 … … 495 492 // when the calibration hardware-trigger is working) 496 493 // 497 MFCosmics 498 MContinue 494 MFCosmics cosmics; 495 MContinue cont(&cosmics); 499 496 500 497 // -
trunk/MagicSoft/Mars/mjobs/MJExtractSignal.cc
r3069 r3199 298 298 *fLog << endl; 299 299 300 // Setup Lists 301 MParList plist; 302 plist.AddToList(&pedcam); 303 304 MTaskList tlist; 305 plist.AddToList(&tlist); 306 307 // Setup Parameters 308 309 // Make sure, that at least an empty MBadPixelsCam is available 310 // This is necessary for input which don't contain a MBadPixelsCam 311 MBadPixelsCam badcam; 312 plist.AddToList(&badcam); 313 314 // Setup Task-lists 300 315 MReadMarsFile read("Events"); 301 316 read.DisableAutoScheme(); 302 317 static_cast<MRead&>(read).AddFiles(*fRuns); 303 318 304 // Setup Tasklist305 MParList plist;306 plist.AddToList(&pedcam);307 308 MTaskList tlist;309 plist.AddToList(&tlist);310 311 319 MGeomApply apply; // Only necessary to craete geometry 312 320 MBadPixelsMerge merge(&fBadPixels); … … 320 328 write.AddContainer("MExtractedSignalCam", "Events"); 321 329 write.AddContainer("MTime", "Events"); 330 // FIXME: CRAHSES! write.AddContainer("MPedestalCam", "RunHeaders"); 322 331 write.AddContainer("MRawRunHeader", "RunHeaders"); 323 write.AddContainer("MPedestalCam", "RunHeaders");324 332 write.AddContainer("MBadPixelsCam", "RunHeaders"); 325 333
Note:
See TracChangeset
for help on using the changeset viewer.