Changeset 436 for trunk/MagicSoft/Simulation/Detector/Camera/camera.cxx
- Timestamp:
- 09/22/00 18:40:18 (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Simulation/Detector/Camera/camera.cxx
r435 r436 21 21 // 22 22 // $RCSfile: camera.cxx,v $ 23 // $Revision: 1.1 1$23 // $Revision: 1.12 $ 24 24 // $Author: harald $ 25 // $Date: 2000-09-2 1 11:47:33$25 // $Date: 2000-09-22 17:40:18 $ 26 26 // 27 27 //////////////////////////////////////////////////////////////////////// … … 692 692 if (Write_McTrig){ 693 693 694 McTrig = new MMcTrig 694 McTrig = new MMcTrig* [icontrigger]; 695 695 696 696 for (i=0;i<icontrigger;i++) { … … 698 698 } 699 699 700 HeaderTrig = new MHeaderTrig 700 HeaderTrig = new MHeaderTrig* [icontrigger]; 701 701 702 702 for (i=0;i<icontrigger;i++) { … … 740 740 741 741 HeaderTree.Branch("MHeaderTrig","MHeaderTrig", 742 &HeaderTrig[0], bsize, split); 743 } 742 &HeaderTrig[0], bsize, split); 743 } 744 744 745 if (Trigger_Loop && Write_McTrig){ 745 746 for(char branchname[10],i=0;i<icontrigger;i++){ 746 747 // 748 // build the name of the branch for the different trigger conditions 749 // 747 750 sprintf(help,"%i",i+1); 748 751 strcpy (branchname, "MHeaderTrig"); 749 strcat (branchname, &help[0]);752 strcat (branchname, &help[0]); 750 753 strcat (branchname, "."); 754 751 755 HeaderTree.Branch(branchname,"MHeaderTrig", 752 756 &HeaderTrig[i], bsize, split); … … 766 770 767 771 } 772 773 768 774 if(Trigger_Loop && Write_McTrig){ 769 770 775 for (int iconcount=0,ithrescount=0;ithrescount<=Trigger_loop_uthres-Trigger_loop_lthres;ithrescount++){ 771 776 for (imulticount=0;imulticount<=Trigger_loop_umult-Trigger_loop_lmult;imulticount++){ … … 784 789 785 790 // Fill the Header Tree with the current leaves of each branch 791 786 792 HeaderTree.Fill() ; 787 788 793 789 794 // create a Tree for the Event data stream 790 795 TTree EvtTree("EvtTree","Events of Run"); 791 796 792 797 if (Write_McEvt){ 793 794 798 EvtTree.Branch("MMcEvt","MMcEvt", 795 799 &McEvt, bsize, split); … … 797 801 798 802 if(!Trigger_Loop){ 799 800 803 if (Write_RawEvt){ 801 804 EvtTree.Branch("MRawEvt","MRawEvt", … … 807 810 } 808 811 } 809 else{ 812 else{ // trigger lopp 810 813 if (Write_McTrig){ 811 814 for(char branchname[10],i=0;i<icontrigger;i++){ … … 877 880 &cam, 878 881 nsbrate_phepns ); 882 879 883 if (k != 0){ 880 884 cout << "Error when reading starfield... \nExiting.\n"; … … 888 892 cam.dpixsizefactor[i] * cam.dpixsizefactor[i]; 889 893 } 890 891 894 } 892 895 … … 894 897 // Read the reflector file with the Cherenkov data 895 898 // 896 899 897 900 // select input file 898 901 899 902 if ( Data_From_STDIN ) { 900 901 903 inputfile = stdin; 902 903 904 } 904 905 else{ … … 908 909 if ( inputfile == NULL ) 909 910 error( SIGNATURE, "Cannot open input file: %s\n", inname ); 910 911 911 } 912 912 … … 984 984 985 985 ++nshow; 986 log(SIGNATURE, "Event %d(+%d)\n", nshow, ntshow); 986 if ( fmod ( nshow, 1000. ) == 0. ) 987 log(SIGNATURE, "Event %d(+%d)\n", nshow, ntshow); 987 988 988 989 // get MCEventHeader … … 1133 1134 exit(1); 1134 1135 } 1135 1136 log(SIGNATURE, "End of this event: %d cphs(+%d). . .\n", 1137 ncph, ntcph); 1136 1137 if ( fmod ( nshow, 1000. ) == 0. ) 1138 log(SIGNATURE, "End of this event: %d cphs(+%d). . .\n", 1139 ncph, ntcph); 1138 1140 1139 1141 ntcph += ncph; … … 1157 1159 } 1158 1160 1159 cout << "Total number of phes: " << inumphe <<endl; 1161 if ( fmod ( nshow, 1000. ) == 0. ) 1162 log(SIGNATURE, "Total number of phe: %d \n", inumphe ) ; 1160 1163 1161 1164 … … 1172 1175 // TRIGGER HERE 1173 1176 1174 1175 1177 // 1176 1178 // now the noise of the electronic … … 1185 1187 if(Trigger_Loop){ 1186 1188 // Loop over trigger threshold 1187 for (int iconcount=0,ithrescount=Trigger_loop_lthres;ithrescount<=Trigger_loop_uthres;ithrescount++) {1189 for (int iconcount=0,ithrescount=Trigger_loop_lthres;ithrescount<=Trigger_loop_uthres;ithrescount++) { 1188 1190 for (i=0;i<TRIGGER_PIXELS;i++) 1189 1191 fpixelthres[i]=(float) ithrescount; 1192 1190 1193 Trigger.SetThreshold(fpixelthres); 1191 1192 1194 Trigger.Diskriminate(); 1195 1193 1196 // 1194 1197 // look if in all the signals in the trigger signal branch … … 1407 1410 (UShort_t) ncph) ; 1408 1411 } 1412 1409 1413 // We don not count photons out of the camera. 1410 1411 1414 1412 1415 // 1413 1416 // write it out to the file outfile 1414 1417 // 1415 1418 1416 EvtTree.Fill() ;1417 1419 //EvtTree.Fill() ; 1420 // huschel 1418 1421 1419 1422 … … 3066 3069 // 3067 3070 // $Log: not supported by cvs2svn $ 3071 // Revision 1.11 2000/09/21 11:47:33 harald 3072 // Oscar found some smaller errors in the calculation of the pixel shape and 3073 // corrected it. 3074 // 3068 3075 // Revision 1.10 2000/07/04 14:10:20 MagicSol 3069 3076 // Some changes have been done in the root output file. The RawEvt tree is only
Note:
See TracChangeset
for help on using the changeset viewer.