Changeset 1195
- Timestamp:
- 01/18/02 17:41:02 (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Simulation/Detector/Camera/camera.cxx
r1089 r1195 21 21 // 22 22 // $RCSfile: camera.cxx,v $ 23 // $Revision: 1.3 0$23 // $Revision: 1.31 $ 24 24 // $Author: blanch $ 25 // $Date: 200 1-11-27 09:49:54$25 // $Date: 2002-01-18 17:41:02 $ 26 26 // 27 27 //////////////////////////////////////////////////////////////////////// … … 240 240 static float Trigger_response_fwhm = 2.0; 241 241 static float Trigger_overlaping_time= 0.25; 242 static float Trigger_noise= 0.3; 242 243 243 244 //@: Properties of the FADC 244 245 static float FADC_response_ampl = MFADC_RESPONSE_AMPLITUDE; 245 246 static float FADC_response_fwhm = MFADC_RESPONSE_FWHM; 247 static float FADC_noise = 2.0; 246 248 247 249 //@: Trigger conditions for a single trigger mode … … 431 433 int i, j, k; //@< simple counters 432 434 435 int addElecNoise; //@< Will we add ElecNoise? 436 433 437 int simulateNSB; //@< Will we simulate NSB? 434 438 int nphe2NSB; //@< From how many phe will we simulate NSB? … … 621 625 622 626 qTailCut = get_tail_cut(); 623 simulateNSB = get_nsb( &meanNSB, &nphe2NSB ); 627 addElecNoise = add_elec_noise(&FADC_noise, &Trigger_noise); 628 simulateNSB = get_nsb( &meanNSB, &nphe2NSB ); 624 629 countIslands = get_islands_cut( &nIslandsCut ); 625 630 … … 950 955 951 956 for(i=0;i<CAMERA_PIXELS;i++){ 952 fadc_elecnoise[i]=2.0; 953 } 957 fadc_elecnoise[i]=FADC_noise; 958 } 959 954 960 fadc.GetPedestals(&fadc_pedestals[0]); 955 961 … … 1380 1386 // This is done inside the class MTrigger by the method ElecNoise. 1381 1387 // 1382 Trigger.ElecNoise() ; 1383 1384 fadc.ElecNoise() ; 1388 if (addElecNoise){ 1389 Trigger.ElecNoise(Trigger_noise) ; 1390 1391 fadc.ElecNoise(FADC_noise) ; 1392 } 1385 1393 1386 1394 // We should simulate the AC coupling behaviour: … … 1441 1449 if(Lev0!=0) 1442 1450 Lev1=Trigger.FirstLevel(); 1443 if (Write_McTrig)1444 McTrig[iconcount]->SetFirstLevel (Lev1);1445 1451 if(Lev1>0) { 1446 1452 btrigger= 1; … … 1448 1454 } 1449 1455 1456 Lev0=1; 1450 1457 if(Lev1==0 && (Write_All_Images || btrigger)){ 1451 1458 btrigger= 1; 1452 1459 Lev1=1; 1460 Lev0=0; 1453 1461 } 1454 1462 numPix=0; 1455 1463 for (Int_t ii=0;ii<Lev1;ii++){ 1456 if (Write_McTrig)1457 McTrig[iconcount]->SetTime(Trigger.GetFirstLevelTime(ii),ii+1);1458 if (Write_McTrig){1459 1460 1461 }1464 if (Write_McTrig){ 1465 McTrig[iconcount]->SetFirstLevel ((ii+1)*Lev0); 1466 McTrig[iconcount]->SetTime(Trigger.GetFirstLevelTime(ii),ii+1); 1467 Trigger.GetMapDiskriminator(trigger_map); 1468 McTrig[iconcount]->SetMapPixels(trigger_map,ii); 1469 } 1462 1470 // 1463 1471 // fill inside the class fadc the member output … … 1477 1485 fadcValues->AddAt(fadc.GetFadcSignal(i,j),j); 1478 1486 } 1479 EvtData[iconcount]->AddPixel(i +1000*ii,fadcValues,0);1487 EvtData[iconcount]->AddPixel(i,fadcValues,0); 1480 1488 } 1481 1489 } … … 1565 1573 if ( Lev0 > 0 || Write_All_Images) { 1566 1574 Lev1= Trigger.FirstLevel(); 1567 if (Write_McTrig)1568 McTrig[0]->SetFirstLevel (Lev1);1569 1575 } 1570 1576 if (Lev1>0){ 1571 1577 ++ntrigger; 1572 1578 } 1579 Lev0=1; 1573 1580 if (Lev1==0 && Write_All_Images){ 1574 1581 Lev1=1; 1582 Lev0=0; 1575 1583 } 1576 1584 … … 1584 1592 fadc.TriggeredFadc(Trigger.GetFirstLevelTime(ii)); 1585 1593 1586 if (Write_McTrig) 1594 if (Write_McTrig){ 1595 McTrig[0]->SetFirstLevel ((ii+1)*Lev0); 1587 1596 McTrig[0]->SetTime(Trigger.GetFirstLevelTime(ii),ii+1); 1588 1589 if (Write_McTrig){1590 1597 Trigger.GetMapDiskriminator(trigger_map); 1591 1598 McTrig[0]->SetMapPixels(trigger_map,ii); … … 1608 1615 fadcValues->AddAt(fadc.GetFadcSignal(i,j),j); 1609 1616 } 1610 EvtData[0]->AddPixel(i +ii*1000,fadcValues,0);1617 EvtData[0]->AddPixel(i,fadcValues,0); 1611 1618 } 1612 1619 } … … 3310 3317 // 3311 3318 // $Log: not supported by cvs2svn $ 3319 // Revision 1.30 2001/11/27 09:49:54 blanch 3320 // Fixing bug which was treating wrongly the extension of star photons. 3321 // 3312 3322 // Revision 1.29 2001/11/14 17:38:23 blanch 3313 3323 // Sveral changes have been done: … … 3390 3400 // 3391 3401 // $Log: not supported by cvs2svn $ 3402 // Revision 1.30 2001/11/27 09:49:54 blanch 3403 // Fixing bug which was treating wrongly the extension of star photons. 3404 // 3392 3405 // Revision 1.29 2001/11/14 17:38:23 blanch 3393 3406 // Sveral changes have been done:
Note:
See TracChangeset
for help on using the changeset viewer.