The structure of the HitWriteEngine:

    struct
    {
         int   iEvt;
      int   nHits;
      int   nLayers;                  // number of layers < MAXLAYERS !
      float energySum;
      float cogX;      // center of gravity weighted by energy on whole calo
      float cogY;
      float cogZ;
      float radius;    // shower radius (in x,y plane) calculated w.r.t. the cog
      float radiusEw;  // shower radius (in x,y plane) calculated w.r.t. the cog Energy weighted
      
      int   cellID[MAXCELLS];
      float hitEnergy[MAXCELLS];
      float hitPos[MAXCELLS][3];


      int   lNHits[MAXLAYERS];        // layer by layer number of hits 
      float lEnergy[MAXLAYERS];       // layer by layer Energy 
      float lEnergy_err[MAXLAYERS];   // layer by layer Energy error (not yet filled in CalorimeterHit class)

      float lCogX[MAXLAYERS];         // center of gravity weighted by energy in one layer
      float lCogY[MAXLAYERS];
      float lRadius[MAXLAYERS];       // shower radius (in x,y plane) in one layer calculated w.r.t. the cog
      float lRadiusEw[MAXLAYERS];     // Energy weighted shower radius (in x,y plane) in one layer calculated w.r.t. the cog
   
     } _hitsFill;

Note: the center of gravity is calculated according to the formula

cogx = Sum(x_i * E_i)/Sum(E_i)

the radius is the geometrical radius NON-energy weighted according to

radius =  Sum( sqrt(pow((cogx-x_i),2)+pow((cogy-y_i),2))) )/totalNhits

HitWriteEngine (last edited 2009-06-16 18:32:16 by localhost)