/[PAMELA software]/DarthVader/CalorimeterLevel2/src/CaloLevel1.cpp
ViewVC logotype

Diff of /DarthVader/CalorimeterLevel2/src/CaloLevel1.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by mocchiut, Tue Nov 28 10:20:27 2006 UTC revision 1.3 by mocchiut, Thu Jan 11 16:08:02 2007 UTC
# Line 300  Float_t CaloLevel1::DecodeEstrip(Int_t e Line 300  Float_t CaloLevel1::DecodeEstrip(Int_t e
300    return(0.);      return(0.);  
301  }  }
302    
303    /*
304     * Returns energy released on plane nplane (where 0<= nplane <= 43, 0 = 1Y, 1 = 1X, 2 = 2Y, 3 = 2X, etc. etc.).
305     */
306    Float_t CaloLevel1::qtotpl(Int_t nplane){
307      //
308      Int_t sview = 1;
309      if ( nplane%2 ) sview = 0;
310      //
311      Int_t splane = nplane-(sview+1)/2;
312      //
313      Float_t totmip = qtotpl(sview,splane);
314      //
315      return(totmip);
316      //
317    };
318    
319    /*
320     * Returns energy released on view "view" (0 = X, 1 = Y) and plane "plane" ( 0 <= plane <= 21 ).
321     */
322    Float_t CaloLevel1::qtotpl(Int_t sview, Int_t splane){
323      //
324      Int_t view = -1;
325      Int_t plane = -1;
326      Int_t strip = -1;
327      //
328      Float_t mip = 0.;
329      Float_t totmip = 0.;
330      //
331      if ( istrip == 0 ) return(0.);
332      //
333      for (Int_t i = 0; i<istrip; i++ ){
334        //
335        mip = DecodeEstrip(i,view,plane,strip);
336        //
337        if ( view == sview && splane == plane ) totmip += mip;
338        //
339        // entry are ordered by strip, plane and view number. Go out if you pass the input strip
340        //
341        if ( view == sview && plane > splane ) return(totmip);
342        if ( view > sview ) return(totmip);
343        //
344      };
345      //
346      return(totmip);
347      //
348    };

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.23