Changeset 9625 for trunk/MagicSoft/Mars/msimcamera
- Timestamp:
- 08/06/10 11:47:39 (14 years ago)
- Location:
- trunk/MagicSoft/Mars/msimcamera
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/msimcamera/MSimCamera.cc
r9425 r9625 74 74 MSimCamera::MSimCamera(const char* name, const char *title) 75 75 : fEvt(0), fStat(0), fRunHeader(0), fElectronicNoise(0), fGain(0), 76 fCamera(0), fMcEvt(0), fSpline(0), fBaselineGain(kFALSE) 76 fCamera(0), fMcEvt(0), fSpline(0), fBaselineGain(kFALSE), 77 fDefaultOffset(-1), fDefaultNoise(-1), fDefaultGain(-1) 78 77 79 { 78 80 fName = name ? name : "MSimCamera"; … … 171 173 for (int i=0; i<fElectronicNoise->GetSize(); i++) 172 174 { 173 // 64 -> Dynamic range 12 bit left174 175 MPedestalPix &ped = (*fElectronicNoise)[i]; 175 ped.SetPedestal(15*64); // Baseline at 15 like in MAGIC 176 ped.SetPedestalRms(1.5*64); //2.0); // 1.5 bit noise for a gain of 64 176 if (fDefaultOffset>0) 177 ped.SetPedestal(fDefaultOffset); 178 if (fDefaultNoise>0) 179 ped.SetPedestalRms(fDefaultNoise); 180 177 181 ped.SetPedestalABoffset(0); 178 182 ped.SetNumEvents(0); 179 183 180 // 256 scale from 8bit to 16bit 181 // 8 signal height of one phe 184 182 185 MPedestalPix &gain = (*fGain)[i]; 183 gain.SetPedestal(4*64); // This allows a maximum of 200phe/pix 186 if (fDefaultGain>0) 187 gain.SetPedestal(fDefaultGain); 188 184 189 gain.SetPedestalRms(0); 185 190 gain.SetPedestalABoffset(0); 186 191 gain.SetNumEvents(0); 187 192 } 193 188 194 return kTRUE; 189 195 } … … 302 308 } 303 309 310 if (IsEnvDefined(env, prefix, "DefaultOffset", print)) 311 { 312 rc = kTRUE; 313 fDefaultOffset = GetEnvValue(env, prefix, "DefaultOffset", fDefaultOffset); 314 } 315 if (IsEnvDefined(env, prefix, "DefaultNoise", print)) 316 { 317 rc = kTRUE; 318 fDefaultNoise = GetEnvValue(env, prefix, "DefaultNoise", fDefaultNoise); 319 } 320 if (IsEnvDefined(env, prefix, "DefaultGain", print)) 321 { 322 rc = kTRUE; 323 fDefaultGain = GetEnvValue(env, prefix, "DefaultGain", fDefaultGain); 324 } 325 304 326 return rc; 305 327 } -
trunk/MagicSoft/Mars/msimcamera/MSimCamera.h
r9525 r9625 32 32 Bool_t fBaselineGain; // Should the gain be applied to baseline and electronic noise? 33 33 34 Double_t fDefaultOffset; // Default offset added to all channels 35 Double_t fDefaultNoise; // Default noise (RMS) added to all samples 36 Double_t fDefaultGain; // Default gain (multiplication factor to the given/used pulse shape) 37 34 38 // MParContainer 35 39 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
Note:
See TracChangeset
for help on using the changeset viewer.