Changeset 9318 for trunk/MagicSoft/Mars/msimcamera/MSimReadout.cc
- Timestamp:
- 02/11/09 17:35:54 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/msimcamera/MSimReadout.cc
r9308 r9318 31 31 // system. 32 32 // 33 // You can give a conversion factor from the unitx of your analog signal 34 // to the units of your adc. This is a fixed factor because it is just 35 // a matter of what the meaning of an adc count is, nothing which could 36 // jitter or is a real part of the electronics. Such effects should 37 // be simulated somewhere else. 38 // 33 39 // 34 40 // Input Containers: … … 73 79 // 74 80 MSimReadout::MSimReadout(const char* name, const char *title) 75 : fRunHeader(0), fEvtHeader(0), fCamera(0), fPulsePos(0), fTrigger(0), fData(0) 81 : fRunHeader(0), fEvtHeader(0), fCamera(0), fPulsePos(0), fTrigger(0), fData(0), 82 fConversionFactor(1) 76 83 { 77 84 fName = name ? name : "MSimReadout"; … … 135 142 136 143 fRunHeader->InitPixels(cam->GetNumPixels()); 137 fRunHeader->SetValidMagicNumber();138 fRunHeader->SetSourceInfo("MonteCarlo"); // "Muon" from first event??139 fRunHeader->SetReadyToSave();140 144 141 145 fData->InitRead(fRunHeader); … … 209 213 } 210 214 211 const Float_t gain = 64./1; 212 const Float_t offset = 128; 215 const Float_t offset = 0;//128; 213 216 const UInt_t max = fData->GetMax(); 214 217 … … 230 233 { 231 234 Float_t slice = j+trig>=(Int_t)sig.GetSize() ? offset : 232 sig[j+trig] * gain+ offset;235 sig[j+trig] * fConversionFactor + offset; 233 236 234 237 // FIXME: Handle/Implement saturation! … … 257 260 return kTRUE; 258 261 } 262 263 // -------------------------------------------------------------------------- 264 // 265 // Read the parameters from the resource file. 266 // 267 // ConversionFactor: 1 268 // 269 Int_t MSimReadout::ReadEnv(const TEnv &env, TString prefix, Bool_t print) 270 { 271 Bool_t rc = kFALSE; 272 if (IsEnvDefined(env, prefix, "ConversionFactor", print)) 273 { 274 rc = kTRUE; 275 fConversionFactor = GetEnvValue(env, prefix, "ConversionFactor", fConversionFactor); 276 } 277 278 return rc; 279 }
Note:
See TracChangeset
for help on using the changeset viewer.