Changeset 6560 for trunk/MagicSoft
- Timestamp:
- 02/17/05 09:15:28 (20 years ago)
- Location:
- trunk/MagicSoft/Simulation/Detector/Camera
- Files:
-
- 3 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 // -
trunk/MagicSoft/Simulation/Detector/Camera/creadparam.cxx
r6365 r6560 19 19 //= 20 20 //= $RCSfile: creadparam.cxx,v $ 21 //= $Revision: 1.3 6$21 //= $Revision: 1.37 $ 22 22 //= $Author: moralejo $ 23 //= $Date: 2005-02-1 0 19:28:10$23 //= $Date: 2005-02-17 09:15:28 $ 24 24 //= 25 25 //=////////////////////////////////////////////////////////////////////// … … 62 62 static int nSkip=0; 63 63 static int Data_From_STDIN = FALSE; 64 static int Write_All_Event_Headers = FALSE;64 static int Write_All_Event_Headers = TRUE; 65 65 static int Write_McEvt = TRUE; 66 66 static int Write_McTrig = FALSE; … … 424 424 break; 425 425 426 case write_all_event_headers: //@< to write ALL the event headers426 case no_write_all_event_headers: //@< to write ALL the event headers 427 427 428 428 // change boolean value 429 Write_All_Event_Headers = TRUE;429 Write_All_Event_Headers = FALSE; 430 430 431 431 break; … … 1445 1445 // 1446 1446 // $Log: not supported by cvs2svn $ 1447 // Revision 1.36 2005/02/10 19:28:10 moralejo 1448 // 1449 // Substituted input card option "write_all_events" by 1450 // "write_all_event_headers". If set, this will make camera to write out 1451 // the event headers of all the processed events, no matter whether they 1452 // have triggered or not. 1453 // 1447 1454 // Revision 1.35 2004/12/15 01:56:39 MAGIC 1448 1455 // -
trunk/MagicSoft/Simulation/Detector/Camera/creadparam.h
r6365 r6560 19 19 //= 20 20 //= $RCSfile: creadparam.h,v $ 21 //= $Revision: 1.3 2$21 //= $Revision: 1.33 $ 22 22 //= $Author: moralejo $ 23 //= $Date: 2005-02-1 0 19:28:10$23 //= $Date: 2005-02-17 09:15:28 $ 24 24 //= 25 25 //=////////////////////////////////////////////////////////////////////// … … 91 91 T(data_from_stdin), /* to read data from STDIN */ \ 92 92 T(skip), /* skip pathological showers */ \ 93 T(write_all_event_headers),/* write to file .phe ALL event headers (even w.o. trigger)*/ \ 93 T(no_write_all_event_headers),/* do NOT write to output file all event 94 event headers (only those with trigger!)*/ \ 94 95 T(nowrite_McEvt), /* nowrite to file .root McEvt infos */ \ 95 96 T(write_McTrig), /* write to file .root McTrig infos */ \ … … 216 217 /* 217 218 * $Log: not supported by cvs2svn $ 219 * Revision 1.32 2005/02/10 19:28:10 moralejo 220 * 221 * Substituted input card option "write_all_events" by 222 * "write_all_event_headers". If set, this will make camera to write out 223 * the event headers of all the processed events, no matter whether they 224 * have triggered or not. 225 * 218 226 * Revision 1.31 2004/12/15 01:56:39 MAGIC 219 227 *
Note:
See TracChangeset
for help on using the changeset viewer.