HYDRA_development_version
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
hstart2geompar.h
Go to the documentation of this file.
1 #ifndef HSTART2GEOMPAR_H
2 #define HSTART2GEOMPAR_H
3 
4 #include "hdetgeompar.h"
5 #include "TObjArray.h"
6 
7 class HGeomShapes;
8 
9 class HStart2GeomPar : public HDetGeomPar {
10 private:
11  Int_t maxComponents; // maximum number of Geant diamonds
12  Int_t maxCells; // maximum number of cells/strips
13  TObjArray* labPos; // lab position of cell center
14 public:
15  HStart2GeomPar(const Char_t* name="Start2GeomPar",
16  const Char_t* title="Start2 geometry parameters",
17  const Char_t* context="GeomProduction");
19  Bool_t init(HParIo*,Int_t*);
20  Int_t write(HParIo*);
21  Int_t getModNumInMod(const TString&) {return 0;}
22  Int_t getModNumInComp(const TString&) {return 0;}
23  Int_t getMaxComponents(void) {return maxComponents;}
24  Int_t getMaxCells(void) {return maxCells;}
25  inline Int_t getCompNum(const TString&);
26  Int_t getCellIndex(Int_t compNum, Float_t xPos, Float_t yPos);
27  inline const HGeomVector* getLabPos(Int_t n) const ;
28  void calcLabPositions(void);
29  void printLabPositions(void);
30  ClassDef(HStart2GeomPar,1) // Container for the Start geometry parameters
31 };
32 
33 inline Int_t HStart2GeomPar::getCompNum(const TString& name) {
34  // returns the cell index retrieved from the component name VSTDx
35  return ((Int_t)(name[4]-'0')-1);
36 }
37 
38 inline const HGeomVector* HStart2GeomPar::getLabPos(Int_t n) const {
39  // returns the lab position of a Start cell/strip
40  if (n>=0 && n<maxCells) return (HGeomVector*)(labPos->At(n));
41  return NULL;
42 }
43 
44 #endif /* !HSTART2GEOMPAR_H */
void calcLabPositions(void)
Int_t getCellIndex(Int_t compNum, Float_t xPos, Float_t yPos)
Int_t getMaxComponents(void)
void printLabPositions(void)
Int_t n
Definition: hpario.h:11
virtual Int_t write()
Definition: hparset.cc:119
TObjArray * labPos
HStart2GeomPar(const Char_t *name="Start2GeomPar", const Char_t *title="Start2 geometry parameters", const Char_t *context="GeomProduction")
Int_t getModNumInComp(const TString &)
Int_t getMaxCells(void)
Int_t getCompNum(const TString &)
const HGeomVector * getLabPos(Int_t n) const
Int_t getModNumInMod(const TString &)
virtual Bool_t init(void)
Definition: hparset.h:21