ROOT logo
#ifndef HSTART2GEOMPAR_H
#define HSTART2GEOMPAR_H

#include "hdetgeompar.h"
#include "TObjArray.h"

class HGeomShapes;

class HStart2GeomPar : public HDetGeomPar {
private:
  Int_t      maxComponents; // maximum number of Geant diamonds
  Int_t      maxCells;      // maximum number of cells/strips
  TObjArray* labPos;        // lab position of cell center
public:
  HStart2GeomPar(const Char_t* name="Start2GeomPar",
                 const Char_t* title="Start2 geometry parameters",
                 const Char_t* context="GeomProduction");
  ~HStart2GeomPar();
  Bool_t init(HParIo*,Int_t*);
  Int_t write(HParIo*);
  Int_t getModNumInMod(const TString&)  {return 0;}
  Int_t getModNumInComp(const TString&) {return 0;}
  Int_t getMaxComponents(void)          {return maxComponents;}
  Int_t getMaxCells(void)               {return maxCells;}
  inline Int_t getCompNum(const TString&);
  Int_t getCellIndex(Int_t compNum, Float_t xPos, Float_t yPos);  
  inline const HGeomVector* getLabPos(Int_t n) const ;
  void calcLabPositions(void);
  void printLabPositions(void);
  ClassDef(HStart2GeomPar,1) // Container for the Start geometry parameters
};

inline Int_t HStart2GeomPar::getCompNum(const TString& name) {
  // returns the cell index retrieved from the component name VSTDx
  return ((Int_t)(name[4]-'0')-1);
}  

inline const HGeomVector*  HStart2GeomPar::getLabPos(Int_t n) const {
  // returns the lab position of a Start cell/strip
  if (n>=0 && n<maxCells) return (HGeomVector*)(labPos->At(n));
  return NULL;
}

#endif /* !HSTART2GEOMPAR_H */
 hstart2geompar.h:1
 hstart2geompar.h:2
 hstart2geompar.h:3
 hstart2geompar.h:4
 hstart2geompar.h:5
 hstart2geompar.h:6
 hstart2geompar.h:7
 hstart2geompar.h:8
 hstart2geompar.h:9
 hstart2geompar.h:10
 hstart2geompar.h:11
 hstart2geompar.h:12
 hstart2geompar.h:13
 hstart2geompar.h:14
 hstart2geompar.h:15
 hstart2geompar.h:16
 hstart2geompar.h:17
 hstart2geompar.h:18
 hstart2geompar.h:19
 hstart2geompar.h:20
 hstart2geompar.h:21
 hstart2geompar.h:22
 hstart2geompar.h:23
 hstart2geompar.h:24
 hstart2geompar.h:25
 hstart2geompar.h:26
 hstart2geompar.h:27
 hstart2geompar.h:28
 hstart2geompar.h:29
 hstart2geompar.h:30
 hstart2geompar.h:31
 hstart2geompar.h:32
 hstart2geompar.h:33
 hstart2geompar.h:34
 hstart2geompar.h:35
 hstart2geompar.h:36
 hstart2geompar.h:37
 hstart2geompar.h:38
 hstart2geompar.h:39
 hstart2geompar.h:40
 hstart2geompar.h:41
 hstart2geompar.h:42
 hstart2geompar.h:43
 hstart2geompar.h:44