Changeset 9369 for trunk/MagicSoft/Mars/msimcamera
- Timestamp:
- 03/01/09 21:54:27 (16 years ago)
- Location:
- trunk/MagicSoft/Mars/msimcamera
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/msimcamera/MSimAPD.cc
r9356 r9369 77 77 // 78 78 MSimAPD::MSimAPD(const char* name, const char *title) 79 : fGeom(0), fEvt(0), fStat(0) 79 : fGeom(0), fEvt(0), fStat(0), fType(1) 80 80 { 81 81 fName = name ? name : "MSimAPD"; … … 131 131 Bool_t MSimAPD::ReInit(MParList *plist) 132 132 { 133 if (UInt_t(fAPDs.GetEntriesFast())!=fGeom->GetNumPixels()) 134 { 135 fAPDs.Delete(); 136 137 // FIXME: 138 // * initialize an empty APD and read the APD setup from a file to 139 // allow different APDs. 140 // * Make the arguments a data member of MSimAPD 141 142 for (UInt_t i=0; i<fGeom->GetNumPixels(); i++) 143 //fAPDs.Add(new APD(60, 0.2, 3, 8.75)); 144 //fAPDs.Add(new APD(60/2, 0.2, 3e-9, 8.75e-9*4)); 145 fAPDs.Add(new APD(60/2, 0.2, 3, 8.75*4)); 146 } 133 if (UInt_t(fAPDs.GetEntriesFast())==fGeom->GetNumPixels()) 134 return kTRUE; 135 136 fAPDs.Delete(); 137 138 // FIXME: 139 // * initialize an empty APD and read the APD setup from a file to 140 // allow different APDs. 141 // * Make the arguments a data member of MSimAPD 142 143 Int_t ncells = 0; 144 Float_t crosstalk = 0; 145 Float_t deadtime = 0; 146 Float_t recovery = 0; 147 148 switch (fType) 149 { 150 case 1: 151 ncells = 30; 152 crosstalk = 0.2; 153 deadtime = 3; 154 recovery = 8.75*4; 155 break; 156 157 case 2: 158 ncells = 60; 159 crosstalk = 0.2; 160 deadtime = 3; 161 recovery = 8.75; 162 break; 163 164 default: 165 *fLog << err << "ERROR - APD type " << fType << " undefined." << endl; 166 return kFALSE; 167 } 168 169 for (UInt_t i=0; i<fGeom->GetNumPixels(); i++) 170 fAPDs.Add(new APD(ncells, crosstalk, deadtime, recovery)); 147 171 148 172 return kTRUE; … … 216 240 // 217 241 // NameGeomCam 242 // Type: 1 218 243 // 219 244 Int_t MSimAPD::ReadEnv(const TEnv &env, TString prefix, Bool_t print) … … 226 251 } 227 252 253 if (IsEnvDefined(env, prefix, "Type", print)) 254 { 255 rc = kTRUE; 256 fType = GetEnvValue(env, prefix, "Type", fType); 257 } 258 228 259 return rc; 229 260 } -
trunk/MagicSoft/Mars/msimcamera/MSimAPD.h
r9328 r9369 28 28 Double_t fFreq; // Frequency of random phtons which hit the APDs 29 29 30 Int_t fType; 31 30 32 // MParContainer 31 33 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
Note:
See TracChangeset
for help on using the changeset viewer.