Index: trunk/MagicSoft/Simulation/Detector/Camera/camera.cxx
===================================================================
--- trunk/MagicSoft/Simulation/Detector/Camera/camera.cxx	(revision 435)
+++ trunk/MagicSoft/Simulation/Detector/Camera/camera.cxx	(revision 436)
@@ -21,7 +21,7 @@
 //
 // $RCSfile: camera.cxx,v $
-// $Revision: 1.11 $
+// $Revision: 1.12 $
 // $Author: harald $ 
-// $Date: 2000-09-21 11:47:33 $
+// $Date: 2000-09-22 17:40:18 $
 //
 ////////////////////////////////////////////////////////////////////////
@@ -692,5 +692,5 @@
   if (Write_McTrig){
 
-    McTrig = new MMcTrig * [icontrigger];
+    McTrig = new MMcTrig* [icontrigger];
   
     for (i=0;i<icontrigger;i++) {
@@ -698,5 +698,5 @@
     }
 
-    HeaderTrig = new MHeaderTrig * [icontrigger];
+    HeaderTrig = new MHeaderTrig* [icontrigger];
   
     for (i=0;i<icontrigger;i++) {
@@ -740,13 +740,17 @@
     
     HeaderTree.Branch("MHeaderTrig","MHeaderTrig", 
-		 &HeaderTrig[0], bsize, split);    
-  }
+		      &HeaderTrig[0], bsize, split);    
+  }
+
   if (Trigger_Loop && Write_McTrig){
     for(char branchname[10],i=0;i<icontrigger;i++){
-      
+      //
+      //   build the name of the branch for the different trigger conditions
+      //
       sprintf(help,"%i",i+1);
       strcpy (branchname, "MHeaderTrig");
-      strcat (branchname, & help[0]);
+      strcat (branchname,  &help[0]);
       strcat (branchname, ".");
+      
       HeaderTree.Branch(branchname,"MHeaderTrig", 
 		     &HeaderTrig[i], bsize, split);
@@ -766,6 +770,7 @@
 
   }
+  
+
   if(Trigger_Loop && Write_McTrig){
-
     for (int iconcount=0,ithrescount=0;ithrescount<=Trigger_loop_uthres-Trigger_loop_lthres;ithrescount++){
       for (imulticount=0;imulticount<=Trigger_loop_umult-Trigger_loop_lmult;imulticount++){
@@ -784,12 +789,11 @@
 
   //  Fill the Header Tree with the current leaves of each branch
+  
   HeaderTree.Fill() ;
-	    
-
+  
   //      create a Tree for the Event data stream 
   TTree EvtTree("EvtTree","Events of Run");
 
   if (Write_McEvt){
-
     EvtTree.Branch("MMcEvt","MMcEvt", 
 		   &McEvt, bsize, split);  
@@ -797,5 +801,4 @@
 
   if(!Trigger_Loop){
-    
     if (Write_RawEvt){
       EvtTree.Branch("MRawEvt","MRawEvt", 
@@ -807,5 +810,5 @@
     }    
   }
-  else{
+  else{                     // trigger lopp 
     if (Write_McTrig){
       for(char branchname[10],i=0;i<icontrigger;i++){
@@ -877,4 +880,5 @@
 			  &cam,
 			  nsbrate_phepns );
+
     if (k != 0){
       cout << "Error when reading starfield... \nExiting.\n";
@@ -888,5 +892,4 @@
 	cam.dpixsizefactor[i] * cam.dpixsizefactor[i];
     }
-
   }
 
@@ -894,11 +897,9 @@
   // Read the reflector file with the Cherenkov data
   //			
-
+  
   // select input file 
 
   if ( Data_From_STDIN ) {
-
     inputfile = stdin;
-
   }
   else{
@@ -908,5 +909,4 @@
     if ( inputfile == NULL ) 
       error( SIGNATURE, "Cannot open input file: %s\n", inname );
-
   }
   
@@ -984,5 +984,6 @@
 
 	++nshow;
-	log(SIGNATURE, "Event %d(+%d)\n", nshow, ntshow);
+        if ( fmod ( nshow, 1000. ) == 0. ) 
+          log(SIGNATURE, "Event %d(+%d)\n", nshow, ntshow);
 	
 	// get MCEventHeader
@@ -1133,7 +1134,8 @@
 	  exit(1);
 	}
-	  
-	log(SIGNATURE, "End of this event: %d cphs(+%d). . .\n",
-	    ncph, ntcph);
+	
+	if ( fmod ( nshow, 1000. ) == 0. )   
+	  log(SIGNATURE, "End of this event: %d cphs(+%d). . .\n",
+	      ncph, ntcph);
 
 	ntcph += ncph;
@@ -1157,5 +1159,6 @@
 	}
 	
-	cout << "Total number of phes: " << inumphe <<endl;
+	if ( fmod ( nshow, 1000. ) == 0. ) 
+	  log(SIGNATURE, "Total number of phe:  %d \n", inumphe ) ; 
 	
 
@@ -1172,5 +1175,4 @@
 	// TRIGGER HERE
 
-
 	//
 	//   now the noise of the electronic 
@@ -1185,10 +1187,11 @@
 	if(Trigger_Loop){
 	  //  Loop over trigger threshold
-	  for (int iconcount=0,ithrescount=Trigger_loop_lthres;ithrescount<=Trigger_loop_uthres;ithrescount++){
+	  for (int iconcount=0,ithrescount=Trigger_loop_lthres;ithrescount<=Trigger_loop_uthres;ithrescount++) {
 	    for (i=0;i<TRIGGER_PIXELS;i++)
 	      fpixelthres[i]=(float) ithrescount;
+
 	    Trigger.SetThreshold(fpixelthres);
-
 	    Trigger.Diskriminate();
+
 	    //
 	    //   look if in all the signals in the trigger signal branch
@@ -1407,13 +1410,13 @@
 			   (UShort_t) ncph) ; 
 	    }
+
 	    //   We don not count photons out of the camera.	
-	    
-	    
+	    	    
 	    //
 	    //    write it out to the file outfile
 	    // 
 	    
-	    EvtTree.Fill() ; 
-	    
+	    //EvtTree.Fill() ; 
+	    // huschel
 	  
 	  
@@ -3066,4 +3069,8 @@
 //
 // $Log: not supported by cvs2svn $
+// Revision 1.11  2000/09/21 11:47:33  harald
+// Oscar found some smaller errors in the calculation of the pixel shape and
+// corrected it.
+//
 // Revision 1.10  2000/07/04 14:10:20  MagicSol
 // Some changes have been done in the root output file. The RawEvt tree is only
