ROOT logo
#ifndef HMDCLAYERGEOMPAR_H
#define HMDCLAYERGEOMPAR_H

#include "TObject.h"
#include "TObjArray.h"
#include "TArrayI.h"
#include "TNtuple.h"
#include "hparset.h"
#include "hgeomtransform.h"

class HMdcLayerGeomParLay : public TObject {
protected:
  Float_t pitch;          // Distance bitween sense wires
  Int_t numWires;         //! Number of wires
  Float_t catDist;        // Cell thickness
  Float_t wireOrient;     // Inclination angle
  Float_t centralWireNr;  // Number of wire which goes through geometrical center of MDC
  Float_t cathodeWireThickness; // Thickness of cathode wires
  HGeomTransform layerPos;      //! Position of layer in MDC coordinate system
public:
  HMdcLayerGeomParLay() : pitch(0.F), numWires(0), catDist(0.F), 
    wireOrient(0.F), centralWireNr(-1.F) {;}
  ~HMdcLayerGeomParLay() {;}
  Float_t getPitch() {return pitch;}
  Int_t getNumWires() {return numWires;}
  Float_t getCatDist() {return catDist;}
  Float_t getWireOrient() {return wireOrient;}
  Float_t getCentralWireNr() {return centralWireNr;}
  Float_t getCathodeWireThickness() {return cathodeWireThickness;}
  HGeomTransform& getLayerPos() {return layerPos;}
  void fill(Float_t a, Float_t c, Float_t d, Float_t e, Float_t t) {
    pitch=a;
    catDist=c;
    wireOrient=d;
    centralWireNr=e;
    cathodeWireThickness=t;
  }
  void fill(HMdcLayerGeomParLay&);
  void setPitch(Float_t a) {pitch=a;}
  void setNumWires(Int_t b) {numWires=b;}
  void setCatDist(Float_t c) {catDist=c;}
  void setWireOrient(Float_t d) {wireOrient=d;}
  void setCentralWireNr(Float_t e) {centralWireNr=e;}
  void setCathodeWireThickness(Float_t t) {cathodeWireThickness=t;}
  void clear() {
    pitch=0.F;
    catDist=0.F;
    wireOrient=0.F;
    centralWireNr=-1.F;
    cathodeWireThickness=0.F;
  }
  ClassDef(HMdcLayerGeomParLay,2) // Layer level of Parameter container HMdcLayerGeomPar
}; 
   

class HMdcLayerGeomParMod : public TObject {
protected:
  TObjArray* array; 
public:
  HMdcLayerGeomParMod();
  ~HMdcLayerGeomParMod();
  HMdcLayerGeomParLay& operator[](Int_t i) {
      return *static_cast<HMdcLayerGeomParLay*>((*array)[i]);
  }
  Int_t getSize();
  ClassDef(HMdcLayerGeomParMod,1) // Module level of Parameter container HMdcLayerGeomPar
};


class HMdcLayerGeomParSec : public TObject {
protected:
    TObjArray* array;
public:
    HMdcLayerGeomParSec();
    ~HMdcLayerGeomParSec();
    HMdcLayerGeomParMod& operator[](Int_t i) {
      return *static_cast<HMdcLayerGeomParMod*>((*array)[i]);
    }
  Int_t getSize();
  ClassDef(HMdcLayerGeomParSec,1) // Sector level of Parameter container HMdcLayerGeomPar
};


class HMdcLayerGeomPar : public HParSet {
protected:
    TObjArray* array;     // array of pointers of type HMdcLayerGeomParSec 
    TNtuple* ntuple;      //! Ntuple with all parameters 
public:
    HMdcLayerGeomPar(const Char_t* name="MdcLayerGeomPar",
                     const Char_t* title="geometry parameters for Mdc layers",
                     const Char_t* context="MdcLayerGeomParProduction");
    ~HMdcLayerGeomPar();
    HMdcLayerGeomParSec& operator[](Int_t i) {
      return *static_cast<HMdcLayerGeomParSec*>((*array)[i]);
    }
    Int_t  getSize();
    Bool_t init(HParIo* input,Int_t* set);
    Int_t  write(HParIo* output);
    void readline(const Char_t*, Int_t*);
    void putAsciiHeader(TString&);
    Bool_t writeline(Char_t *, Int_t, Int_t, Int_t);
    void clear();
    TNtuple* getNtuple();
    void printParam();
    void calcLayerTransformations();
    ClassDef(HMdcLayerGeomPar,1) // Parameter container for the geometry of MDC layers
};

#endif  /*!HMDCLAYERGEOMPAR_H*/
 hmdclayergeompar.h:1
 hmdclayergeompar.h:2
 hmdclayergeompar.h:3
 hmdclayergeompar.h:4
 hmdclayergeompar.h:5
 hmdclayergeompar.h:6
 hmdclayergeompar.h:7
 hmdclayergeompar.h:8
 hmdclayergeompar.h:9
 hmdclayergeompar.h:10
 hmdclayergeompar.h:11
 hmdclayergeompar.h:12
 hmdclayergeompar.h:13
 hmdclayergeompar.h:14
 hmdclayergeompar.h:15
 hmdclayergeompar.h:16
 hmdclayergeompar.h:17
 hmdclayergeompar.h:18
 hmdclayergeompar.h:19
 hmdclayergeompar.h:20
 hmdclayergeompar.h:21
 hmdclayergeompar.h:22
 hmdclayergeompar.h:23
 hmdclayergeompar.h:24
 hmdclayergeompar.h:25
 hmdclayergeompar.h:26
 hmdclayergeompar.h:27
 hmdclayergeompar.h:28
 hmdclayergeompar.h:29
 hmdclayergeompar.h:30
 hmdclayergeompar.h:31
 hmdclayergeompar.h:32
 hmdclayergeompar.h:33
 hmdclayergeompar.h:34
 hmdclayergeompar.h:35
 hmdclayergeompar.h:36
 hmdclayergeompar.h:37
 hmdclayergeompar.h:38
 hmdclayergeompar.h:39
 hmdclayergeompar.h:40
 hmdclayergeompar.h:41
 hmdclayergeompar.h:42
 hmdclayergeompar.h:43
 hmdclayergeompar.h:44
 hmdclayergeompar.h:45
 hmdclayergeompar.h:46
 hmdclayergeompar.h:47
 hmdclayergeompar.h:48
 hmdclayergeompar.h:49
 hmdclayergeompar.h:50
 hmdclayergeompar.h:51
 hmdclayergeompar.h:52
 hmdclayergeompar.h:53
 hmdclayergeompar.h:54
 hmdclayergeompar.h:55
 hmdclayergeompar.h:56
 hmdclayergeompar.h:57
 hmdclayergeompar.h:58
 hmdclayergeompar.h:59
 hmdclayergeompar.h:60
 hmdclayergeompar.h:61
 hmdclayergeompar.h:62
 hmdclayergeompar.h:63
 hmdclayergeompar.h:64
 hmdclayergeompar.h:65
 hmdclayergeompar.h:66
 hmdclayergeompar.h:67
 hmdclayergeompar.h:68
 hmdclayergeompar.h:69
 hmdclayergeompar.h:70
 hmdclayergeompar.h:71
 hmdclayergeompar.h:72
 hmdclayergeompar.h:73
 hmdclayergeompar.h:74
 hmdclayergeompar.h:75
 hmdclayergeompar.h:76
 hmdclayergeompar.h:77
 hmdclayergeompar.h:78
 hmdclayergeompar.h:79
 hmdclayergeompar.h:80
 hmdclayergeompar.h:81
 hmdclayergeompar.h:82
 hmdclayergeompar.h:83
 hmdclayergeompar.h:84
 hmdclayergeompar.h:85
 hmdclayergeompar.h:86
 hmdclayergeompar.h:87
 hmdclayergeompar.h:88
 hmdclayergeompar.h:89
 hmdclayergeompar.h:90
 hmdclayergeompar.h:91
 hmdclayergeompar.h:92
 hmdclayergeompar.h:93
 hmdclayergeompar.h:94
 hmdclayergeompar.h:95
 hmdclayergeompar.h:96
 hmdclayergeompar.h:97
 hmdclayergeompar.h:98
 hmdclayergeompar.h:99
 hmdclayergeompar.h:100
 hmdclayergeompar.h:101
 hmdclayergeompar.h:102
 hmdclayergeompar.h:103
 hmdclayergeompar.h:104
 hmdclayergeompar.h:105
 hmdclayergeompar.h:106
 hmdclayergeompar.h:107
 hmdclayergeompar.h:108
 hmdclayergeompar.h:109