Changeset 17663
- Timestamp:
- 04/07/14 15:05:14 (11 years ago)
- Location:
- trunk/Mars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/mjobs/MJSimulation.cc
r17559 r17663 350 350 Bool_t MJSimulation::Process(const MArgs &args, const MSequence &seq) 351 351 { 352 /*353 if (!fSequence.IsValid())354 {355 *fLog << err << "ERROR - Sequence invalid!" << endl;356 return kFALSE;357 }358 */359 360 // if (!HasWritePermission(CombinePath(fPathOut, GetOutFile(seq))))361 // return kFALSE;362 363 352 *fLog << inf; 364 353 fLog->Separator(GetDescriptor()); … … 381 370 382 371 // -------------------------------------------------------------------------------- 383 384 372 // Setup Parlist 385 373 MParList plist; 386 374 plist.AddToList(this); // take care of fDisplay! 387 388 375 // setup TaskList 389 376 MTaskList tasks; 390 377 plist.AddToList(&tasks); 391 392 378 // -------------------------------------------------------------------------------- 393 379 … … 444 430 header.SetObservation("On", "MonteCarlo"); 445 431 plist.AddToList(&header); 446 // ++++++++ FIXME FIXME FIXME +++++++++++++447 448 /*449 MPedestalCam pedcam;450 pedcam.Init(geomcam.GetNumPixels());451 for (UInt_t i=0; i<geomcam.GetNumPixels(); i++)452 pedcam[i].Set(128./header.GetScale(), 22.5/header.GetScale());453 plist.AddToList(&pedcam);454 */455 456 // -------------------------------------------------------------------457 432 458 433 MCorsikaRead read; … … 677 652 write3af.AddContainer("IntendedPulsePos", "RunHeaders"); 678 653 write3af.AddContainer("MRawEvtData", "Events"); 654 write3af.AddContainer("MTruePhotonsPerPixelCont", "Events"); 679 655 680 656 if (fOperationMode == kModeData){ -
trunk/Mars/msimcamera/MSimCamera.cc
r17643 r17663 47 47 #include "MLogManip.h" 48 48 49 #include "MTruePhotonsPerPixelCont.h" 50 49 51 #include "MSpline3.h" 50 52 #include "MParSpline.h" … … 149 151 { 150 152 *fLog << err << "CrosstalkCoeffParam [MParameterD] not found... aborting." << endl; 153 return kFALSE; 154 } 155 156 fTruePhotons = (MTruePhotonsPerPixelCont*)pList->FindCreateObj("MTruePhotonsPerPixelCont"); 157 if (!fTruePhotons) 158 { 159 *fLog << err << "MTruePhotonsPerPixelCont not found... aborting." << endl; 151 160 return kFALSE; 152 161 } … … 344 353 345 354 if (ph.GetPrimary()!=MMcEvt::kNightSky && ph.GetPrimary()!=MMcEvt::kArtificial) 355 { 346 356 tot += ph.GetWeight(); 357 (*fTruePhotons->cherenkov_photons_weight)[idx] += ph.GetWeight(); 358 (*fTruePhotons->cherenkov_photons_number)[idx] += 1; 359 360 (*fTruePhotons->cherenkov_arrival_time_mean)[idx] += t; 361 (*fTruePhotons->cherenkov_arrival_time_variance)[idx] += t*t; 362 363 if (ph.GetPrimary()==MMcEvt::kMUON) 364 { 365 (*fTruePhotons->muon_cherenkov_photons_weight)[idx] += ph.GetWeight(); 366 (*fTruePhotons->muon_cherenkov_photons_number)[idx] += 1; 367 } 368 369 // find min 370 if (t < (*fTruePhotons->cherenkov_arrival_time_min)[idx] ) 371 { 372 (*fTruePhotons->cherenkov_arrival_time_min)[idx] = t; 373 } 374 // find max 375 if (t > (*fTruePhotons->cherenkov_arrival_time_max)[idx] ) 376 { 377 (*fTruePhotons->cherenkov_arrival_time_max)[idx] = t; 378 } 379 } 380 else 381 { 382 (*fTruePhotons->noise_photons_weight)[idx] += ph.GetWeight(); 383 } 347 384 348 385 // Sorry, the name "pedestal" is misleading here … … 352 389 // === FIXME === FIXME === FIXME === Frequency!!!! 353 390 (*fCamera)[idx].AddPulse(*fSpline, t, ph.GetWeight()*gain); 391 } 392 393 for (unsigned int i=0 ; i < 1440 ; i++) 394 { 395 float number = (*fTruePhotons->cherenkov_photons_number)[i]; 396 (*fTruePhotons->cherenkov_arrival_time_mean)[i] /= number; 397 float mean = (*fTruePhotons->cherenkov_arrival_time_mean)[i]; 398 float sum_tt = (*fTruePhotons->cherenkov_arrival_time_variance)[i]; 399 (*fTruePhotons->cherenkov_arrival_time_variance)[i] = (sum_tt / number - mean*mean) /(number - 1); 354 400 } 355 401 -
trunk/Mars/msimcamera/MSimCamera.h
r17643 r17663 5 5 #include "MTask.h" 6 6 #endif 7 8 #include "MArrayF.h" 7 9 8 10 class MMcEvt; … … 13 15 class MAnalogChannels; 14 16 class MPedestalCam; 17 class MArrayF; 18 class MTruePhotonsPerPixelCont; 15 19 16 20 class MSpline3; … … 31 35 32 36 MParameterD *fCrosstalkCoeffParam; 37 MTruePhotonsPerPixelCont *fTruePhotons; //! Container to store the number of photons per pixel 33 38 34 39 const MSpline3 *fSpline; // Pulse Shape
Note:
See TracChangeset
for help on using the changeset viewer.