ROOT logo
#ifndef HMDCLAYER_H
#define HMDCLAYER_H

#include "hgeomvector.h"
#include "hmdcgeomobj.h"
#include "TVector2.h"

class HMdcSizesCells;

class HMdcLayer : public TObject {


private:

    //-------------------------------------------------------------------------
    // boundary of MDC layers
    TVector2 layerP    [6][4][6][4];   //  4 corner points for each layer          (layer sys)
    TVector2 layerPcrop[6][4][6][4];   //  4 corner points for each croped layer   (layer sys)
    Double_t           xcrop[4][2];    //  module wise x at lower and upper edge  (symmetric)
    Double_t           ycrop[4][2];    //  module wise y low and up
    //-------------------------------------------------------------------------


    //-------------------------------------------------------------------------
    // RK seglane for pathlength recalulation
    HGeomVector targetMidPoint;        // lab sys
    HMdcPlane   plMdc[6];              // lab sys
    //-------------------------------------------------------------------------
public:

    HMdcLayer();

    //-------------------------------------------------------------------------
    // croped Layer stuff
    void   setMDCCrop         (Int_t m,Double_t xlowcrop,Double_t xupcrop,Double_t ylowcrop,Double_t yupcrop);
    void   fillLayerPoints    (HMdcSizesCells* fSizesCells, Bool_t secsys=kFALSE);
    void   calcCropedLayer    (Int_t s,Int_t m,Int_t l);


    Bool_t getLayersEdge      (TVector2& p,Int_t s,Int_t m,Int_t l,
			       Double_t& xmin ,Double_t& xmax,Double_t& ymin,Double_t& ymax,
			       Double_t& xmincrop ,Double_t& xmaxcrop,Double_t& ymincrop,Double_t& ymaxcrop);
    Bool_t getLayersEdge      (TVector2& p,Int_t s,Int_t m,Int_t l,
			       Double_t& xmin ,Double_t& xmax,Double_t& ymin,Double_t& ymax);
    Bool_t getCropedLayersEdge(TVector2& p,Int_t s,Int_t m,Int_t l,
			       Double_t& xmin ,Double_t& xmax,Double_t& ymin,Double_t& ymax);
    Bool_t isCroped            (TVector2& p,Int_t s,Int_t m,Int_t l);

    void   getLayerPoints      (Int_t s,Int_t m,Int_t l, TVector2& p0,TVector2& p1,TVector2& p2,TVector2& p3);
    void   getCropedLayerPoints(Int_t s,Int_t m,Int_t l, TVector2& p0,TVector2& p1,TVector2& p2,TVector2& p3);
    void printLayer       (Int_t s,Int_t m,Int_t l);
    void printCropedLayer (Int_t s,Int_t m,Int_t l);
    //-------------------------------------------------------------------------

    //-------------------------------------------------------------------------
    // RK stuff
    void   fillRKPlane         (HMdcSizesCells* fSizesCells);
    const HGeomVector&         getTargetMidPoint() { return targetMidPoint; }
    const HMdcPlane&           getMdcPlane(Int_t s){ return plMdc[s]; }
    const HMdcPlane*           getMdcPlanes()      { return &plMdc[0];}
    //-------------------------------------------------------------------------

    ClassDef(HMdcLayer,1)

};

#endif

 hmdclayer.h:1
 hmdclayer.h:2
 hmdclayer.h:3
 hmdclayer.h:4
 hmdclayer.h:5
 hmdclayer.h:6
 hmdclayer.h:7
 hmdclayer.h:8
 hmdclayer.h:9
 hmdclayer.h:10
 hmdclayer.h:11
 hmdclayer.h:12
 hmdclayer.h:13
 hmdclayer.h:14
 hmdclayer.h:15
 hmdclayer.h:16
 hmdclayer.h:17
 hmdclayer.h:18
 hmdclayer.h:19
 hmdclayer.h:20
 hmdclayer.h:21
 hmdclayer.h:22
 hmdclayer.h:23
 hmdclayer.h:24
 hmdclayer.h:25
 hmdclayer.h:26
 hmdclayer.h:27
 hmdclayer.h:28
 hmdclayer.h:29
 hmdclayer.h:30
 hmdclayer.h:31
 hmdclayer.h:32
 hmdclayer.h:33
 hmdclayer.h:34
 hmdclayer.h:35
 hmdclayer.h:36
 hmdclayer.h:37
 hmdclayer.h:38
 hmdclayer.h:39
 hmdclayer.h:40
 hmdclayer.h:41
 hmdclayer.h:42
 hmdclayer.h:43
 hmdclayer.h:44
 hmdclayer.h:45
 hmdclayer.h:46
 hmdclayer.h:47
 hmdclayer.h:48
 hmdclayer.h:49
 hmdclayer.h:50
 hmdclayer.h:51
 hmdclayer.h:52
 hmdclayer.h:53
 hmdclayer.h:54
 hmdclayer.h:55
 hmdclayer.h:56
 hmdclayer.h:57
 hmdclayer.h:58
 hmdclayer.h:59
 hmdclayer.h:60
 hmdclayer.h:61
 hmdclayer.h:62
 hmdclayer.h:63
 hmdclayer.h:64
 hmdclayer.h:65
 hmdclayer.h:66
 hmdclayer.h:67
 hmdclayer.h:68