Changeset 2666
- Timestamp:
- 12/12/03 14:27:05 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r2663 r2666 4 4 5 5 -*-*- END OF LINE -*-*- 6 7 2003/12/12: Markus Gaug 8 9 * manalysis/MExtractSignal.[h,cc] 10 - now with constructor allowing to set the first and last used time slice 11 - (default like before) 12 - extract number of pixels from MGeomCam 13 6 14 7 15 2003/12/12: Sabrina Stark -
trunk/MagicSoft/Mars/manalysis/MCalibrationCalc.cc
r2660 r2666 83 83 #include "MPedestalPix.h" 84 84 85 #include "MGeomCam.h" 86 85 87 #include "MLog.h" 86 88 #include "MLogManip.h" … … 220 222 } 221 223 222 // fNumHiGainSamples = fRunHeader->GetNumSamplesHiGain(); 223 // fNumLoGainSamples = fRunHeader->GetNumSamplesLoGain(); 224 fNumHiGainSamples = 6; 225 fNumLoGainSamples = 6; 226 227 // 228 // FIXME: The next statement simply does not work: 229 // fRawEvt->GetNumPixels() returns always 0 230 // fCalibrations->InitSize(fRawEvt->GetNumPixels()); 231 // 232 233 fCalibrations->InitSize(577); 234 235 for (Int_t i=0;i<577;i++) 224 225 MGeomCam *cam = (MGeomCam*)pList->FindObject("MGeomCam"); 226 if (!cam) 227 { 228 *fLog << err << GetDescriptor() << ": No MGeomCam found... aborting." << endl; 229 return kFALSE; 230 } 231 232 233 fNumHiGainSamples = fSignals->GetNumUsedHiGainFADCSlices(); 234 fNumLoGainSamples = fSignals->GetNumUsedLoGainFADCSlices(); 235 236 fCalibrations->InitSize(cam->GetNumPixels()); 237 238 for (UInt_t i=0;i<cam->GetNumPixels();i++) 236 239 { 237 240 MCalibrationPix &pix = (*fCalibrations)[i]; -
trunk/MagicSoft/Mars/manalysis/MCalibrationPix.cc
r2665 r2666 152 152 153 153 Float_t nsb = TMath::Sqrt(fPedRms*fPedRms - fElectronicPedRms*fElectronicPedRms); 154 155 154 // Float_t logainrms = fElectronicPedRms + (TMath::Sqrt(fPedRms*fPedRms - fElectronicPedRms*fElectronicPedRms)); 156 Float_t logainrms = (TMath::Sqrt(nsb*nsb + 100.*fElectronicPedRms*fElectronicPedRms)); 157 if (logainrms > 0.) 158 fRSigmaSquare = (fSigmaCharge*fSigmaCharge) - (logainrms*logainrms); 155 156 if (nsb > 0.) 157 { 158 Float_t logainrms = (TMath::Sqrt(nsb*nsb + 100.*fElectronicPedRms*fElectronicPedRms)); 159 fRSigmaSquare = (fSigmaCharge*fSigmaCharge) - (logainrms*logainrms); 160 } 159 161 else 160 fRSigmaSquare = fSigmaCharge*fSigmaCharge; 161 162 fRSigmaSquare = fSigmaCharge*fSigmaCharge - (100.*fElectronicPedRms*fElectronicPedRms); 162 163 } 163 164 else … … 167 168 { 168 169 fPheFFactorMethod = fFactor * fCharge*fCharge / fRSigmaSquare; 169 fConversionFFactorMethod = fPheFFactorMethod / 170 fConversionFFactorMethod = fPheFFactorMethod / fCharge ; 170 171 } 171 172 else -
trunk/MagicSoft/Mars/manalysis/MCalibrationPix.h
r2661 r2666 94 94 } 95 95 96 Float_t GetMeanConversionBlindPixelMethod() 97 Float_t GetErrorConversionBlindPixelMethod() 98 Float_t GetSigmaConversionBlindPixelMethod() 96 Float_t GetMeanConversionBlindPixelMethod() const { return fConversionBlindPixelMethod ; } 97 Float_t GetErrorConversionBlindPixelMethod() const { return fConversionErrorBlindPixelMethod ; } 98 Float_t GetSigmaConversionBlindPixelMethod() const { return fConversionSigmaBlindPixelMethod ; } 99 99 100 Float_t GetMeanConversionFFactorMethod() { return fConversionFFactorMethod ; } 101 Float_t GetErrorConversionFFactorMethod() { return fConversionErrorFFactorMethod ; } 102 Float_t GetSigmaConversionFFactorMethod() { return fConversionSigmaFFactorMethod ; } 100 Float_t GetMeanConversionFFactorMethod() const { return fConversionFFactorMethod ; } 101 Float_t GetErrorConversionFFactorMethod() const { return fConversionErrorFFactorMethod ; } 102 Float_t GetSigmaConversionFFactorMethod() const { return fConversionSigmaFFactorMethod ; } 103 Float_t GetPheFFactorMethod() const { return fPheFFactorMethod; } 103 104 104 Float_t GetMeanConversionPINDiodeMethod() 105 Float_t GetErrorConversionPINDiodeMethod() 106 Float_t GetSigmaConversionPINDiodeMethod() 105 Float_t GetMeanConversionPINDiodeMethod() const { return fConversionPINDiodeMethod ; } 106 Float_t GetErrorConversionPINDiodeMethod() const { return fConversionErrorPINDiodeMethod ; } 107 Float_t GetSigmaConversionPINDiodeMethod() const { return fConversionSigmaPINDiodeMethod ; } 107 108 108 109 void SetChargesInGraph(Float_t qhi,Float_t qlo) { fHist->SetPointInGraph(qhi,qlo); } … … 126 127 void Draw(Option_t *opt="") { fHist->Draw(opt); } 127 128 128 Float_t GetPheFFactorMethod() const { return fPheFFactorMethod; }129 Float_t GetConversionFFactorMethod() const { return fConversionFFactorMethod; }130 129 131 130 ClassDef(MCalibrationPix, 1) // Storage Container for Calibration information of one pixel -
trunk/MagicSoft/Mars/manalysis/MExtractSignal.cc
r2665 r2666 37 37 #include "MPedestalPix.h" 38 38 39 #include "MGeomCam.h" 40 39 41 #include "MLog.h" 40 42 #include "MLogManip.h" … … 56 58 // Default constructor. 57 59 // 58 MExtractSignal::MExtractSignal(const char *name, const char *title) 59 : fNumHiGainSamples(0), fNumLoGainSamples(0), 60 fSqrtHiGainSamples(0), fSqrtLoGainSamples(0), 61 fBefore(2), fAfter(4), 60 MExtractSignal::MExtractSignal(const Byte_t first, const Byte_t last, const char *name, const char *title) 61 : fNumHiGainSamples(last-first+1), fNumLoGainSamples(last-first+1), 62 62 fSaturationLimit(254), fConversionHiLo(10.) 63 63 { … … 67 67 68 68 AddToBranchList("MRawEvtData.*"); 69 70 fFirst = first; 71 72 fSqrtHiGainSamples = TMath::Sqrt((Float_t)fNumHiGainSamples); 73 fSqrtLoGainSamples = TMath::Sqrt((Float_t)fNumLoGainSamples); 69 74 } 70 75 … … 125 130 } 126 131 127 //fNumHiGainSamples = fRunHeader->GetNumSamplesHiGain(); 128 //fNumLoGainSamples = fRunHeader->GetNumSamplesLoGain(); 129 fNumHiGainSamples = 6; 130 fNumLoGainSamples = 6; 131 132 fSqrtHiGainSamples = TMath::Sqrt((float)fNumHiGainSamples); 133 fSqrtLoGainSamples = TMath::Sqrt((float)fNumLoGainSamples); 134 135 // 136 // FIXME: The next statement simply does not work: 137 // fRawEvt->GetNumPixels() returns always 0 138 // 139 140 fSignals->InitSize(577); 141 // fExtractedSignals->InitSize(fRawEvt->GetNumPixels()); 132 133 MGeomCam *cam = (MGeomCam*)pList->FindObject(AddSerialNumber("MGeomCam")); 134 if (!cam) 135 { 136 *fLog << err << GetDescriptor() << ": No MGeomCam found... aborting." << endl; 137 return kFALSE; 138 } 139 140 fSignals->InitSize(cam->GetNumPixels()); 142 141 143 142 return kTRUE; … … 163 162 164 163 Byte_t *ptr = pixel.GetHiGainSamples(); 165 Byte_t *first = ptr + 3;166 Byte_t *last = ptr + 9;164 Byte_t *first = ptr + fFirst; 165 Byte_t *last = ptr + fFirst + fNumHiGainSamples; 167 166 168 167 UInt_t sumHi = 0; … … 196 195 197 196 ptr = pixel.GetLoGainSamples(); 198 first = ptr + 3;199 last = ptr + 9;197 first = ptr + fFirst; 198 last = ptr + fFirst + fNumLoGainSamples; 200 199 Byte_t maxlo = 0; 201 200 Byte_t midlo = 0; … … 230 229 231 230 if (satHi) 232 pix.SetArrivalTimes((Float_t)(midlo+ 3),0.,0.);231 pix.SetArrivalTimes((Float_t)(midlo+fFirst),0.,0.); 233 232 else 234 pix.SetArrivalTimes((Float_t)(midhi+ 3),0.,0.);233 pix.SetArrivalTimes((Float_t)(midhi+fFirst),0.,0.); 235 234 236 235 } /* while (pixel.Next()) */ 237 236 238 fSignals->SetNumUsedFADCSlices(fNumHiGainSamples,3,8,fNumLoGainSamples,3,8); 237 fSignals->SetNumUsedFADCSlices(fNumHiGainSamples,fFirst,fFirst+fNumHiGainSamples-1, 238 fNumLoGainSamples,fFirst,fFirst+fNumLoGainSamples-1); 239 239 fSignals->SetReadyToSave(); 240 240 -
trunk/MagicSoft/Mars/manalysis/MExtractSignal.h
r2640 r2666 31 31 MRawRunHeader *fRunHeader; // RunHeader information 32 32 33 Byte_t fFirst; 34 33 35 Byte_t fNumHiGainSamples; 34 36 Byte_t fNumLoGainSamples; … … 36 38 Float_t fSqrtHiGainSamples; 37 39 Float_t fSqrtLoGainSamples; 38 39 Byte_t fBefore;40 Byte_t fAfter;41 40 42 41 Byte_t fSaturationLimit; … … 50 49 public: 51 50 52 MExtractSignal(const char *name=NULL, const char *title=NULL);51 MExtractSignal(const Byte_t first=4, const Byte_t last=9, const char *name=NULL, const char *title=NULL); 53 52 54 53 void SetSaturationLimit(Byte_t lim) { fSaturationLimit = lim; } -
trunk/MagicSoft/Mars/mhist/MHCalibrationPixel.cc
r2662 r2666 547 547 fHivsLoGain->GetXaxis()->SetTitle("Sum of Charges High Gain"); 548 548 fHivsLoGain->GetYaxis()->SetTitle("Sum of Charges Low Gain"); 549 550 TString titleHiLoGain = TString(fHivsLoGain->GetName()); 551 titleHiLoGain += fPixId; 552 fHivsLoGain->SetName(titleHiLoGain.Data()); 553 549 554 550 555 for (Int_t i=0;i<fTotalEntries;i++)
Note:
See TracChangeset
for help on using the changeset viewer.