Changeset 17067
- Timestamp:
- 09/04/13 16:48:10 (11 years ago)
- Location:
- trunk/Mars/msimcamera
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/msimcamera/MSimAPD.cc
r10093 r17067 79 79 // 80 80 MSimAPD::MSimAPD(const char* name, const char *title) 81 : fGeom(0), fEvt(0), fStat(0), fType(1) 81 : fGeom(0), fEvt(0), fStat(0), fType(1), 82 fNumCells(60), fCrosstalkCoeff(0), fDeadTime(3), 83 fRecoveryTime(8.75), fAfterpulseProb1(0.11), fAfterpulseProb2(0.14) 84 82 85 { 83 86 fName = name ? name : "MSimAPD"; … … 160 163 switch (fType) 161 164 { 165 case 0: 166 ncells = fNumCells; 167 crosstalk = fCrosstalkCoeff; 168 deadtime = fDeadTime; 169 recovery = fRecoveryTime; 170 afterprob1 = fAfterpulseProb1; 171 afterprob2 = fAfterpulseProb2; 172 173 gLog << inf << "Using custom G-APD parameters:" << endl; 174 gLog << " - Num cells: " << fNumCells << endl; 175 gLog << " - Crosstalk coeff.: " << fCrosstalkCoeff << endl; 176 gLog << " - Dead time: " << fDeadTime << " ns" << endl; 177 gLog << " - Recovery time: " << fRecoveryTime << " ns" << endl; 178 gLog << " - Afterpulse 1 prob.: " << fAfterpulseProb1 << endl; 179 gLog << " - Afterpulse 2 prob.: " << fAfterpulseProb2 << endl; 180 break; 181 162 182 case 1: 163 183 ncells = 30; … … 349 369 // Type: 1 350 370 // 371 // Example for a custom made G-APD: 372 // 373 // Type: 0 374 // NumCells: 60 375 // CrosstalkCoefficient: 0.1 // [prob] 376 // DeadTime: 3 // [ns] 377 // RecoveryTime: 8.75 // [ns] 378 // AfterpulseProb1: 0.14 // [prob] 379 // AfterpulseProb2: 0.11 // [prob] 380 // 351 381 Int_t MSimAPD::ReadEnv(const TEnv &env, TString prefix, Bool_t print) 352 382 { … … 364 394 } 365 395 396 if (fType!=0) 397 return rc; 398 399 if (IsEnvDefined(env, prefix, "NumCells", print)) 400 { 401 rc = kTRUE; 402 fNumCells = GetEnvValue(env, prefix, "NumCells", fNumCells); 403 } 404 if (IsEnvDefined(env, prefix, "CrosstalkCoefficient", print)) 405 { 406 rc = kTRUE; 407 fCrosstalkCoeff = GetEnvValue(env, prefix, "CrosstalkCoefficient", fCrosstalkCoeff); 408 } 409 if (IsEnvDefined(env, prefix, "DeadTime", print)) 410 { 411 rc = kTRUE; 412 fDeadTime = GetEnvValue(env, prefix, "DeadTime", fDeadTime); 413 } 414 if (IsEnvDefined(env, prefix, "RecoveryTime", print)) 415 { 416 rc = kTRUE; 417 fRecoveryTime = GetEnvValue(env, prefix, "RecoveryTime", fRecoveryTime); 418 } 419 if (IsEnvDefined(env, prefix, "AfterpulseProb1", print)) 420 { 421 rc = kTRUE; 422 fAfterpulseProb1 = GetEnvValue(env, prefix, "AfterpulseProb1", fAfterpulseProb1); 423 } 424 if (IsEnvDefined(env, prefix, "AfterpulseProb2", print)) 425 { 426 rc = kTRUE; 427 fAfterpulseProb2 = GetEnvValue(env, prefix, "AfterpulseProb2", fAfterpulseProb2); 428 } 429 366 430 return rc; 367 431 } -
trunk/Mars/msimcamera/MSimAPD.h
r9427 r17067 32 32 Int_t fType; 33 33 34 Int_t fNumCells; // Number of cells along one side 35 Float_t fCrosstalkCoeff; // Crosstalk coefficient (P form the formula) 36 Float_t fDeadTime; // Single cell dead time in nano-seconds 37 Float_t fRecoveryTime; // Single cell recovery time in nano-seconds 38 Float_t fAfterpulseProb1; // Early afterpulse probability 39 Float_t fAfterpulseProb2; // Late afterpulse probability 40 34 41 // MParContainer 35 42 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
Note:
See TracChangeset
for help on using the changeset viewer.