Changeset 9574 for trunk/MagicSoft/Mars/msimcamera
- Timestamp:
- 04/21/10 16:46:18 (15 years ago)
- Location:
- trunk/MagicSoft/Mars/msimcamera
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/msimcamera/MSimRandomPhotons.cc
r9525 r9574 363 363 // *fLog << 1.75e6/(600-300) * f2 * eff->GetSpline()->Integral() << " MHz" << endl; 364 364 365 *fLog << "Conversion factor Fnu: " << f << endl;366 *fLog << "Total reflective area: " << Form("%.2f", Ar) << " m" << UTF8::kSquare << endl;367 *fLog << "Acceptance area of cone 0: " << Form("%.2f", A0*1e6) << " mm" << UTF8::kSquare << " = ";365 *fLog << "Conversion factor Fnu: " << f << endl; 366 *fLog << "Total reflective area: " << Form("%.2f", Ar) << " m" << UTF8::kSquare << endl; 367 *fLog << "Acceptance area of cone 0: " << Form("%.2f", A0*1e6) << " mm" << UTF8::kSquare << " = "; 368 368 *fLog << A0*conv*conv << " sr" << endl; 369 *fLog << "Cones angular acceptance: " << sr << " sr" << endl;370 *fLog << "ConeArea* MirrorAngle (f1): " << f1 << " m^2 sr" << endl;371 *fLog << "MirrorArea*Cone Angle (f2): " << f2 << " m^2 sr" << endl;372 *fLog << "Effective. transmission: " << Form("%.1f", nm) << " nm" << endl;369 *fLog << "Cones angular acceptance: " << sr << " sr" << endl; 370 *fLog << "ConeArea*ConeSolidAngle (f1): " << f1 << " m^2 sr" << endl; 371 *fLog << "MirrorArea*ConeSkyAngle (f2): " << f2 << " m^2 sr" << endl; 372 *fLog << "Effective. transmission: " << Form("%.1f", nm) << " nm" << endl; 373 373 *fLog << "NSB freq. in " << fNameGeomCam << "[0] (f1): " << Form("%.2f", rate * f1) << " MHz" << endl; 374 374 *fLog << "NSB freq. in " << fNameGeomCam << "[0] (f2): " << Form("%.2f", rate * f2) << " MHz" << endl; 375 *fLog << "Using f 1." << endl;375 *fLog << "Using f2." << endl; 376 376 377 377 // Scale the rate per mm^2 and to GHz 378 fScale = rate * f 1/ (*fGeom)[0].GetA() / 1000;378 fScale = rate * f2 / (*fGeom)[0].GetA() / 1000; 379 379 380 380 // FIXME: Scale with the number of pixels 381 if (rate*f 1>1000)381 if (rate*f2>1000) 382 382 { 383 383 *fLog << err << "ERROR - Frequency exceeds 1GHz, this might leed to too much memory consumption." << endl; -
trunk/MagicSoft/Mars/msimcamera/MSimTrigger.cc
r9518 r9574 422 422 return sig ? sig->GetStart() : -1; 423 423 } 424 Int_t GetFirstIndex() const 425 { 426 MDigitalSignal *sig = static_cast<MDigitalSignal*>(fSignals[0]); 427 return sig ? sig->GetIndex() : -1; 428 } 424 429 Bool_t GetPixelContent(Double_t&, Int_t, const MGeomCam&, Int_t) const 425 430 { … … 441 446 442 447 443 void MSimTrigger::SetTrigger(Double_t pos )448 void MSimTrigger::SetTrigger(Double_t pos, Int_t idx) 444 449 { 445 450 // FIXME: Jitter! (Own class?) … … 453 458 // Flag this event as triggered by the lvl1 trigger (FIXME?) 454 459 fEvtHeader->SetTriggerPattern(pos<0 ? 0 : pat); 460 fEvtHeader->SetNumTrigLvl1((UInt_t)idx); 455 461 fEvtHeader->SetReadyToSave(); 456 462 } … … 473 479 if (!fSimulateElectronics) 474 480 { 475 SetTrigger(min );481 SetTrigger(min, -1); 476 482 return kTRUE; 477 483 } … … 611 617 } 612 618 613 // Set trigger channel index614 ttl->SetIndex(j);619 // Set trigger-channel index to keep this information 620 //ttl->SetIndex(j); 615 621 } 616 622 … … 623 629 // FIXME: Simulate trigger dead-time! 624 630 if (arr->GetEntriesFast()>0) 625 triggers.Add(static_cast<MDigitalSignal*>(arr->RemoveAt(0))); 631 { 632 ttl = static_cast<MDigitalSignal*>(arr->RemoveAt(0)); 633 // Set trigger-channel index to keep this information 634 ttl->SetIndex(j); 635 triggers.Add(ttl); 636 } 626 637 627 638 // delete the allocated space … … 636 647 // FIXME: Store triggers! (+ Reversed pixels?) 637 648 638 SetTrigger(triggers.GetFirstTrigger() );649 SetTrigger(triggers.GetFirstTrigger(), triggers.GetFirstIndex()); 639 650 640 651 // No trigger issued. Go on. -
trunk/MagicSoft/Mars/msimcamera/MSimTrigger.h
r9462 r9574 48 48 TObjArray *CalcMinMultiplicity(const MArrayI &idx, const TObjArray &ttls, Int_t threshold) const; 49 49 TObjArray *CalcCoincidences(const MArrayI &idx, const TObjArray &ttls) const; 50 void SetTrigger(Double_t pos );50 void SetTrigger(Double_t pos, Int_t idx); 51 51 52 52 // MTask
Note:
See TracChangeset
for help on using the changeset viewer.