Changeset 2665
- Timestamp:
- 12/12/03 12:49:51 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/manalysis
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/manalysis/MCalibrationCam.cc
r2661 r2665 37 37 #include "MCalibrationCam.h" 38 38 #include "MCalibrationPix.h" 39 #include "MHCalibrationPixel.h" 39 40 #include "MCalibrationBlindPix.h" 40 41 #include "MCalibrationConfig.h" … … 63 64 fMeanNrPhotInnerPixErr(-1.), 64 65 fOffsets(NULL), 65 fSlopes(NULL) 66 fSlopes(NULL), 67 fOffvsSlope(NULL) 66 68 { 67 69 fName = name ? name : "MCalibrationCam"; … … 92 94 if (fSlopes) 93 95 delete fSlopes; 96 if (fOffvsSlope) 97 delete fOffvsSlope; 94 98 95 99 } … … 98 102 { 99 103 100 fOffsets = new TH1D("pp","Offsets of the HiGain LoGain Fit",100,-300.,300.); 101 fSlopes = new TH1D("mm","Slopess of the HiGain LoGain Fit",100,-3.,3.); 104 if (!fOffsets) 105 fOffsets = new TH1D("pp","Offsets of the HiGain LoGain Fit",100,-600.,400.); 106 if (!fSlopes) 107 fSlopes = new TH1D("mm","Slopes of the HiGain LoGain Fit",100,-2.,2.); 108 if (!fOffvsSlope) 109 fOffvsSlope = new TH2D("aa","Slopes vs Offsets of the HiGain LoGain Fit",100,-600.,400.,100,-2.,2.); 102 110 103 111 TIter Next(fPixels); 104 112 MCalibrationPix *pix; 113 MHCalibrationPixel *hist; 105 114 while ((pix=(MCalibrationPix*)Next())) 106 115 { 107 108 fOffsets->Fill(pix->GetHist()->GetOffset()); 109 fSlopes->Fill(pix->GetHist()->GetSlope()); 110 111 } 112 113 TCanvas *c1 = new TCanvas(); 114 c1->Divide(1,2); 115 c1->cd(1); 116 fOffsets->Draw(); 116 hist = pix->GetHist(); 117 hist->FitHiGainvsLoGain(); 118 fOffsets->Fill(hist->GetOffset(),1.); 119 fSlopes->Fill(hist->GetSlope(),1.); 120 fOffvsSlope->Fill(hist->GetOffset(),hist->GetSlope(),1.); 121 } 122 123 TCanvas *c1 = new TCanvas(); 124 125 c1->Divide(1,3); 126 c1->cd(1); 127 fOffsets->Draw(); 128 gPad->Modified(); 129 gPad->Update(); 130 131 c1->cd(2); 132 fSlopes->Draw(); 117 133 gPad->Modified(); 118 134 gPad->Update(); 119 135 120 c1->cd( 2);121 f Slopes->Draw();136 c1->cd(3); 137 fOffvsSlope->Draw("col1"); 122 138 gPad->Modified(); 123 139 gPad->Update(); -
trunk/MagicSoft/Mars/manalysis/MCalibrationCam.h
r2662 r2665 28 28 #ifndef ROOT_TH1D 29 29 #include <TH1D.h> 30 #endif 31 32 #ifndef ROOT_TH2D 33 #include <TH2D.h> 30 34 #endif 31 35 … … 70 74 TH1D* fSlopes; 71 75 76 TH2D* fOffvsSlope; 72 77 73 78 public: -
trunk/MagicSoft/Mars/manalysis/MCalibrationPix.cc
r2661 r2665 69 69 fConversionSigmaPINDiodeMethod(-1.), 70 70 fHiGainSaturation(kFALSE), 71 fElectronicPedRms( 3.67)71 fElectronicPedRms(1.5) 72 72 { 73 73 … … 150 150 if (fHiGainSaturation) 151 151 { 152 153 Float_t logainrms = fElectronicPedRms + (TMath::Sqrt(fPedRms*fPedRms - fElectronicPedRms*fElectronicPedRms)); 152 153 Float_t nsb = TMath::Sqrt(fPedRms*fPedRms - fElectronicPedRms*fElectronicPedRms); 154 155 // Float_t logainrms = fElectronicPedRms + (TMath::Sqrt(fPedRms*fPedRms - fElectronicPedRms*fElectronicPedRms)); 156 Float_t logainrms = (TMath::Sqrt(nsb*nsb + 100.*fElectronicPedRms*fElectronicPedRms)); 154 157 if (logainrms > 0.) 155 158 fRSigmaSquare = (fSigmaCharge*fSigmaCharge) - (logainrms*logainrms); -
trunk/MagicSoft/Mars/manalysis/MExtractSignal.cc
r2662 r2665 230 230 231 231 if (satHi) 232 pix.SetArrivalTimes(( float)(midlo+3),0.,0.);232 pix.SetArrivalTimes((Float_t)(midlo+3),0.,0.); 233 233 else 234 pix.SetArrivalTimes(( float)(midhi+3),0.,0.);234 pix.SetArrivalTimes((Float_t)(midhi+3),0.,0.); 235 235 236 236 } /* while (pixel.Next()) */ 237 237 238 fSignals->SetNumUsedFADCSlices(fNumHiGainSamples, fNumLoGainSamples);238 fSignals->SetNumUsedFADCSlices(fNumHiGainSamples,3,8,fNumLoGainSamples,3,8); 239 239 fSignals->SetReadyToSave(); 240 240 -
trunk/MagicSoft/Mars/manalysis/MExtractedSignalCam.h
r2643 r2665 19 19 Byte_t fNumUsedLoGainFADCSlices; 20 20 21 Byte_t fFirstUsedSliceHiGain; 22 Byte_t fFirstUsedSliceLoGain; 23 24 Byte_t fLastUsedSliceHiGain; 25 Byte_t fLastUsedSliceLoGain; 26 27 21 28 public: 22 29 … … 32 39 Byte_t GetNumUsedHiGainFADCSlices() { return fNumUsedHiGainFADCSlices; } 33 40 Byte_t GetNumUsedLoGainFADCSlices() { return fNumUsedLoGainFADCSlices; } 34 void SetNumUsedFADCSlices(Byte_t numh, Byte_t numl) 41 42 Byte_t GetFirstUsedSliceHiGain() { return fFirstUsedSliceHiGain; } 43 Byte_t GetLastUsedSliceHiGain() { return fLastUsedSliceHiGain; } 44 45 Byte_t GetFirstUsedSliceLoGain() { return fFirstUsedSliceLoGain; } 46 Byte_t GetLastUsedSliceLoGain() { return fLastUsedSliceLoGain; } 47 48 void SetNumUsedFADCSlices(Byte_t numh, Byte_t firsth, Byte_t lasth, 49 Byte_t numl, Byte_t firstl, Byte_t lastl) 35 50 { 36 51 fNumUsedHiGainFADCSlices = numh; 52 fFirstUsedSliceHiGain = firsth; 53 fLastUsedSliceHiGain = lasth; 37 54 fNumUsedLoGainFADCSlices = numl; 55 fFirstUsedSliceLoGain = firstl; 56 fLastUsedSliceLoGain = lastl; 38 57 } 39 58
Note:
See TracChangeset
for help on using the changeset viewer.