Index: trunk/MagicSoft/Simulation/Detector/include-MTrigger/MTrigger.hxx
===================================================================
--- trunk/MagicSoft/Simulation/Detector/include-MTrigger/MTrigger.hxx	(revision 2341)
+++ trunk/MagicSoft/Simulation/Detector/include-MTrigger/MTrigger.hxx	(revision 2342)
@@ -25,4 +25,6 @@
 #include "Mdefine.h"
 #include "MMcEvt.hxx"
+
+#include "MGeomCam.h"
 
 #include "MTriggerDefine.h"
@@ -80,21 +82,22 @@
 
  private:
+  Int_t   pixnum;
   //
   //    then for all pixels the shape of all the analog signals
   //
-  Bool_t   used [TRIGGER_PIXELS] ;  //  a boolean to indicated if the pixels is used in this event
-  Int_t    nphotshow[TRIGGER_PIXELS];   //  count the photo electrons per pixel coming from showers 
-  Int_t    nphotnsb[TRIGGER_PIXELS];   //  count the photo electrons per pixel  coming from NSB 
-  Int_t    nphotstar[TRIGGER_PIXELS];   //  count the photo electrons per pixel coming from stars
- 
-  Float_t  *a_sig[TRIGGER_PIXELS] ; //  the analog signal for pixels
-
-  Float_t  baseline[TRIGGER_PIXELS] ; //  for the baseline shift
+  Bool_t   *used;  //  a boolean to indicated if the pixels is used in this event
+  Int_t    *nphotshow;   //  count the photo electrons per pixel coming from showers 
+  Int_t    *nphotnsb;   //  count the photo electrons per pixel  coming from NSB 
+  Int_t    *nphotstar;   //  count the photo electrons per pixel coming from stars
+ 
+  Float_t  **a_sig ; //  the analog signal for pixels
+
+  Float_t  *baseline; //  for the baseline shift
 
   //
   //    then for all pixels the shape of the digital signal
   //
-  Bool_t  dknt [TRIGGER_PIXELS] ;  //  a boolean to indicated if the pixels has passed the diskrminator 
-  Float_t *d_sig[TRIGGER_PIXELS] ; //  the digital signal for all pixels
+  Bool_t  *dknt ;  //  a boolean to indicated if the pixels has passed the diskrminator 
+  Float_t **d_sig ; //  the digital signal for all pixels
 
   //
@@ -115,5 +118,5 @@
   TRandom  *GenElec  ;   // RandomGenerator for the Electronic Noise
 
-  Float_t noise[TRIGGER_PIXELS*TRIGGER_TIME_SLICES*101];
+  Float_t *noise;
 
   //
@@ -121,5 +124,5 @@
   //
   
-  Float_t chan_thres[TRIGGER_PIXELS] ; // the threshold (in mV) for each individuel pixels
+  Float_t *chan_thres ; // the threshold (in mV) for each individuel pixels
   Float_t gate_leng  ; // the length of the digital signal if analog signal is above threshold
 
@@ -134,5 +137,5 @@
   // 
 
-  Int_t NN[TRIGGER_PIXELS][6] ; 
+  Int_t *NN[6] ; 
  
   //
@@ -140,5 +143,5 @@
   // 
 
-  Int_t TC[TRIGGER_CELLS][TRIGGER_PIXELS] ; 
+  Int_t *TC[TRIGGER_CELLS] ; 
  
   //
@@ -168,7 +171,8 @@
 public:
 
-  MTrigger() ; 
-
-  MTrigger(float gate, float overt, float ampl, float fwhm) ; 
+  MTrigger(int pix=577) ; 
+
+  MTrigger(int pix, MGeomCam *camgeom,
+	   float gate, float overt, float ampl, float fwhm) ; 
   
   ~MTrigger() ; 
@@ -206,5 +210,5 @@
   }
 
-  void CheckThreshold (float *thres);
+  void CheckThreshold (float *thres, int cells);
 
   void ReadThreshold (char name[]);
