- Timestamp:
- 01/25/09 14:32:11 (16 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/melectronics/MAvalanchePhotoDiode.cc
r9243 r9261 165 165 case 2: if (y<fHist.GetNbinsY()) n += HitCellImp(x, y+1, t); break; 166 166 case 3: if (y>1) n += HitCellImp(x, y-1, t); break; 167 /*168 case 0: x++; if (x>fHist.GetNbinsX()) continue; break;169 case 1: x--; if (x<1) continue; break;170 case 2: y++; if (y>fHist.GetNbinsY()) continue; break;171 case 3: y--; if (y<1) continue; break;*/172 167 } 173 168 174 169 // In the unlikely case the calculated direction is out-of-range, 175 170 // i.e. <0 or >3, we would just try to fill the same cell again which 176 177 //n += HitCellImp(x, y, t);178 171 } 179 172 … … 236 229 for (int i=0; i<n; i++) 237 230 fHist.GetArray()[i] = tm; 231 232 fHist.SetEntries(1); 238 233 } 239 234 -
trunk/MagicSoft/Mars/melectronics/MAvalanchePhotoDiode.h
r9242 r9261 6 6 #endif 7 7 8 class APD : public TObject 8 class APD : public TObject // FIXME: Derive from TH2? 9 9 { 10 10 private: … … 29 29 Int_t CountRecoveringCells(Float_t t=0) const; 30 30 31 Float_t GetCellContent(Int_t x, Int_t y) const { return fHist.GetBinContent(x, y); } 32 Int_t GetNumCellsX() const { return fHist.GetNbinsX(); } 33 34 Float_t GetCrosstalkProb() const { return fCrosstalkProb; } 35 Float_t GetDeadTime() const { return fDeadTime; } 36 Float_t GetRecoveryTime() const { return fRecoveryTime; } 37 38 void Draw(Option_t *o="") { fHist.Draw(o); } 39 void DrawCopy(Option_t *o="") { fHist.DrawCopy(o); } 40 31 41 ClassDef(APD, 1) // An object representing a Geigermode APD 32 42 }; -
trunk/MagicSoft/Mars/mjobs/MJSpectrum.cc
r9181 r9261 49 49 50 50 #include "MMath.h" 51 #include "MString.h" 51 52 #include "MDirIter.h" 52 53 … … 891 892 const Double_t exp = TMath::Power(10, i); 892 893 893 TString str = Form("(%s #pm %s)·10^{%d} ",894 FormFloat(p1/exp).Data(), FormFloat(e1/exp).Data(), i);895 896 str += Form("#left(#frac{E}{%s}#right)^{-%s #pm %s}", unit,897 FormFloat(p0).Data(), FormFloat(e0).Data());894 TString str = MString::Format("(%s #pm %s)·10^{%d} ", 895 FormFloat(p1/exp).Data(), FormFloat(e1/exp).Data(), i); 896 897 str += MString::Format("#left(#frac{E}{%s}#right)^{-%s #pm %s}", unit, 898 FormFloat(p0).Data(), FormFloat(e0).Data()); 898 899 899 900 str += " TeV^{-1} m^{-2} s^{-1}"; … … 909 910 return FormFlux(f, "500GeV"); 910 911 case 1: 911 return Form("\\chi^{2}/NDF=%.2f/%d", f.GetChisquare(),f.GetNDF());912 return MString::Format("\\chi^{2}/NDF=%.2f/%d", f.GetChisquare(),f.GetNDF()); 912 913 case 2: 913 return Form("P=%.0f%%", 100*TMath::Prob(f.GetChisquare(), f.GetNDF()));914 return MString::Format("P=%.0f%%", 100*TMath::Prob(f.GetChisquare(), f.GetNDF())); 914 915 } 915 916 return ""; … … 1492 1493 return kFALSE; 1493 1494 1494 CheckEnv(); 1495 if (!CheckEnv()) 1496 return kFALSE; 1495 1497 1496 1498 // -------------------------------------------------------------------------------- -
trunk/MagicSoft/Mars/mjobs/MJStar.cc
r9230 r9261 140 140 } 141 141 142 //if (!CheckEnv())143 // return kFALSE;144 145 CheckEnv();146 147 142 // -------------------------------------------------------------------------------- 148 143 … … 152 147 *fLog << fSequence.GetFileName() << endl; 153 148 *fLog << endl; 149 150 if (!CheckEnv()) 151 return kFALSE; 154 152 155 153 // -------------------------------------------------------------------------------- -
trunk/MagicSoft/Mars/mjobs/MJob.cc
r9257 r9261 277 277 // For exmaple: 278 278 // RandomNumberGenerator: TRandom3 279 // RandomNumberSee Value: 0279 // RandomNumberSeedValue: 0 280 280 // 281 281 Bool_t MJob::InitRandomNumberGenerator() const … … 301 301 302 302 // Nothing: Keep seed value, 0 set time as seed value, val set seed 303 const TString seed = GetEnv("RandomNumberSeed Number", "");303 const TString seed = GetEnv("RandomNumberSeedValue", ""); 304 304 if (!seed.IsNull()) 305 305 { -
trunk/MagicSoft/Mars/mraw/MRawRunHeader.h
r9239 r9261 162 162 Bool_t IsPedestalRun() const { return (fRunType&0xff)==kRTPedestal; } 163 163 Bool_t IsCalibrationRun() const { return (fRunType&0xff)==kRTCalibration; } 164 Bool_t IsPointRun() const { return (fRunType&0xff)==kRTPointRun; } 164 165 165 166 void Print(Option_t *t=NULL) const; -
trunk/MagicSoft/Mars/msignal/MSignalCalc.cc
r8939 r9261 127 127 Int_t MSignalCalc::Process() 128 128 { 129 if (!fPedestals) 130 return kFALSE; 131 129 132 const Int_t npix = fRawEvt->GetNumPixels(); 130 133 const Int_t nhi = fRunHeader->GetNumSamplesHiGain(); … … 259 262 // Preliminary: Do not overwrite pedestals calculated by 260 263 // MMcPedestalCopy and MMcPedestalNSBAdd 261 if (fPedestals) 262 (*fPedestals)[i].Set(b/fRunHeader->GetScale(), sigb/fRunHeader->GetScale()); 264 (*fPedestals)[i].Set(b/fRunHeader->GetScale(), sigb/fRunHeader->GetScale()); 263 265 } 264 266 … … 266 268 //fCerPhotEvt->SetReadyToSave(); 267 269 268 if (fPedestals) 269 fPedestals->SetReadyToSave(); 270 fPedestals->SetReadyToSave(); 270 271 271 272 return kTRUE; -
trunk/MagicSoft/Mars/msignal/MSignalCam.cc
r9212 r9261 570 570 // 7: arrival time if signa avove 20phe 571 571 // 8: arrival time 572 // 10: a rrival time if extracted from lo-gain573 // 11: a rrival time if extracted from hi-gain (and signal above 20phe)572 // 10: as 0, but returns kFALSE if signal <=0 573 // 11: as 8, but returns kFALSE if signal <=0 574 574 // 575 575 Bool_t MSignalCam::GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type) const … … 648 648 */ 649 649 650 case 10: 651 val = pix.GetNumPhotons()*ratio; 652 return val>0; 653 654 case 11: 655 val = pix.GetArrivalTime(); 656 return pix.GetNumPhotons()>0; 657 650 658 case 9: 651 659 default: -
trunk/MagicSoft/Mars/msim/MHPhotonEvent.cc
r9243 r9261 189 189 break; 190 190 } 191 case 3: 192 case 4: 191 case 3: // The maximum radius 192 case 4: // Two times the pixel-0 traversal size 193 193 { 194 194 MGeomCam *c = (MGeomCam*)pList->FindObject("MGeomCam"); … … 198 198 return kFALSE; 199 199 } 200 xmax = fType==3 ? c->GetMaxRadius()/10 : c->GetMaxRadius()/100;200 xmax = fType==3 ? c->GetMaxRadius()/10 : 2*(*c)[0].GetT()/10; 201 201 num = 50; 202 202 -
trunk/MagicSoft/Mars/msimcamera/MSimSignalCam.cc
r9243 r9261 163 163 pix.SetNumPhotons(fCont[idx]); // gRandom->Uniform(last-first) 164 164 pix.SetArrivalTime(fCont[idx]<=0 ? -1 : fTime[idx]/fCont[idx]-first); 165 pix.Set PixelUsed();165 pix.SetRing(fCont[idx]>0); // Used==1, Unused==0 166 166 pix.SetPixelCore(kFALSE); 167 167 } -
trunk/MagicSoft/Mars/msimcamera/MSimTrigger.cc
r9256 r9261 289 289 return kTRUE; 290 290 } 291 292 // -------------------------------------------------------------------------- 293 // 294 // FileNameRouteac: routeac.txt 295 // FileNameCoincidenceMap: coincidence.txt 296 // DiscriminatorTheshold: 3.5 297 // 298 Int_t MSimTrigger::ReadEnv(const TEnv &env, TString prefix, Bool_t print) 299 { 300 Bool_t rc = kFALSE; 301 if (IsEnvDefined(env, prefix, "FileNameRouteAC", print)) 302 { 303 rc = kTRUE; 304 fNameRouteAC = GetEnvValue(env, prefix, "FileNameRouteAC", fNameRouteAC); 305 } 306 307 if (IsEnvDefined(env, prefix, "FileNameCoincidenceMap", print)) 308 { 309 rc = kTRUE; 310 fNameCoincidenceMap = GetEnvValue(env, prefix, "FileNameCoincidenceMap", fNameCoincidenceMap); 311 } 312 313 if (IsEnvDefined(env, prefix, "DiscriminatorThreshold", print)) 314 { 315 rc = kTRUE; 316 fDiscriminatorThreshold = GetEnvValue(env, prefix, "DiscriminatorThreshold", fDiscriminatorThreshold); 317 } 318 319 return rc; 320 } -
trunk/MagicSoft/Mars/msimcamera/MSimTrigger.h
r9256 r9261 40 40 Int_t Process(); 41 41 42 // MParContainer 43 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print); 44 42 45 public: 43 46 MSimTrigger(const char *name=NULL, const char *title=NULL);
Note:
See TracChangeset
for help on using the changeset viewer.