Changeset 6560 for trunk/MagicSoft/Simulation/Detector/Camera/camera.cxx
- Timestamp:
- 02/17/05 09:15:28 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Simulation/Detector/Camera/camera.cxx
r6386 r6560 141 141 //@: flag: TRUE: write the event headers of all events to output; 142 142 //@: FALSE: only triggered showers 143 static int Write_All_Event_Headers = FALSE;143 static int Write_All_Event_Headers = TRUE; 144 144 145 145 static int Write_McEvt = TRUE; … … 2011 2011 fadc_jitter[ict]); 2012 2012 2013 inumphe=(inumphe<inumphe_CT[ict])?inumphe_CT[ict]:inumphe; 2013 inumphe = (inumphe < inumphe_CT[ict])? inumphe_CT[ict] : inumphe; 2014 // inumphe will be the maximum number of phe in any of the telescopes 2015 2014 2016 2015 2017 if( k != 0 ){ // non-zero return value means error … … 2021 2023 // NSB simulation 2022 2024 2023 if(simulateNSB && nphe2NSB<=inumphe)2025 if(simulateNSB && inumphe >= nphe2NSB) 2024 2026 { 2025 2027 … … 2083 2085 } 2084 2086 2085 }// end if(simulateNSB && nphe2NSB<=inumphe_CT[0]) ...2087 }// end if(simulateNSB && inumphe_CT[0] >= nphe2NSB) ... 2086 2088 2087 2089 … … 2151 2153 for(int ict=0;ict<ct_Number;ict++) 2152 2154 { 2153 if (addElecNoise && nphe2NSB<=inumphe)2155 if (addElecNoise && inumphe >= nphe2NSB) 2154 2156 { 2155 Trigger_CT[ict]->ElecNoise(Trigger_noise) 2156 Fadc_CT[ict]->ElecNoise() 2157 Trigger_CT[ict]->ElecNoise(Trigger_noise); 2158 Fadc_CT[ict]->ElecNoise(); 2157 2159 } 2158 2160 } … … 2187 2189 // Rise the discrimnator threshold to avoid huge rates 2188 2190 2189 if(riseDiskThres>0.0 && simulateNSB && nphe2NSB<=inumphe)2191 if(riseDiskThres>0.0 && simulateNSB && inumphe >= nphe2NSB) 2190 2192 for(int ii=0;ii<ct_NPixels;ii++) 2191 2193 if( nsb_phepns_rotated[0][ii]>riseDiskThres) … … 2471 2473 2472 2474 // Rise the discrimnator threshold to avoid huge rates 2473 if(riseDiskThres>0.0 && simulateNSB && nphe2NSB<=inumphe)2475 if(riseDiskThres>0.0 && simulateNSB && inumphe >= nphe2NSB) 2474 2476 for(int ii=0;ii<ct_NPixels;ii++) 2475 2477 { … … 2564 2566 EvtHeader[ict]->SetTriggerPattern((UInt_t)MTriggerPattern::kTriggerLvl1); 2565 2567 2566 // fill pixel information 2567 2568 if (Lev1MT[ict] /* || Write_All_Event_Headers */){ 2569 if (addElecNoise) Fadc_CT[ict]->DigitalNoise(); 2570 for(UInt_t i=0; 2571 i<((MGeomCam*)(camgeom.UncheckedAt(ict)))->GetNumPixels(); 2572 i++){ 2568 // Fill pixel information 2569 // AM 17/2/2005: added condition on inumphe. Noise is not generated for 2570 // events with less than phe2NSB photoelectrons, and then it is better not 2571 // to write the images of those events to the output, so that we avoid them 2572 // to be processed (with no noise) later in the chain. 2573 2574 if (Lev1MT[ict] && inumphe >= nphe2NSB) 2575 { 2576 if (addElecNoise) 2577 Fadc_CT[ict]->DigitalNoise(); 2578 for(UInt_t i=0; 2579 i<((MGeomCam*)(camgeom.UncheckedAt(ict)))->GetNumPixels(); 2580 i++){ 2573 2581 // 2574 2582 // AM 15 01 2004 Commented out "continue" statement, so that also pixels 2575 2583 // containing no C-photons will be written to the output in case of running 2576 // camera with no noise added to the signal. 2584 // camera with no noise added to the signal. 2577 2585 // if(!Fadc_CT[ict]->IsPixelUsed(i)) continue; 2578 2586 // 2579 for (j = 0; j < FADC_slices_written; j++) 2580 { 2581 fadcValues->AddAt(Fadc_CT[ict]->GetFadcSignal(i,j),j); 2582 fadcValuesLow->AddAt(Fadc_CT[ict]->GetFadcLowGainSignal(i,j),j); 2583 } 2584 EvtData[ict]->AddPixel(i,fadcValues,0); 2585 EvtData[ict]->AddPixel(i,fadcValuesLow,kTRUE); 2587 for (j = 0; j < FADC_slices_written; j++) 2588 { 2589 fadcValues->AddAt(Fadc_CT[ict]->GetFadcSignal(i,j),j); 2590 fadcValuesLow->AddAt(Fadc_CT[ict]->GetFadcLowGainSignal(i,j),j); 2591 } 2592 EvtData[ict]->AddPixel(i,fadcValues,0); 2593 EvtData[ict]->AddPixel(i,fadcValuesLow,kTRUE); 2594 } 2586 2595 } 2587 }2588 2596 } 2589 2597 } … … 5023 5031 // 5024 5032 // $Log: not supported by cvs2svn $ 5033 // Revision 1.88 2005/02/11 20:00:01 moralejo 5034 // 5035 // Added to output container "MMcEvtBasic" with the most important MC 5036 // parameters, to be kept for all events (triggered or not) through 5037 // the whole analysis chain in order to allow the calculation of effective 5038 // areas. 5039 // 5040 // Updated version of MRawRunHeader from 4 to 5. This means the trigger and 5041 // calibration patterns are correctly set and can be decoded. 5042 // 5025 5043 // Revision 1.87 2005/02/10 19:28:10 moralejo 5026 5044 //
Note:
See TracChangeset
for help on using the changeset viewer.