PandaRoot
PndEmcStructure.h
Go to the documentation of this file.
1 //======================================================================
2 // Description:
3 // Class PndEmcStructure
4 //------------------------------------------------------------------------
5 //#pragma once
6 #ifndef PNDEMCSTRUCTURE_H
7 #define PNDEMCSTRUCTURE_H
8 
9 //#include <map>
10 //#include <string>
11 #include "TObject.h"
12 #include "TString.h"
13 #include "PndEmcDataTypes.h"
14 
15 class PndEmcXtal;
17 class TGeoManager;
18 
19 using std::string;
20 
25 class PndEmcStructure : public TObject {
26 
27  public:
28  typedef std::map<Int_t, Float_t> mapper;
29  static PndEmcStructure *Instance();
30  static PndEmcStructure *Instance(TGeoManager *);
31 
32  virtual ~PndEmcStructure();
33 
34  const mapper &GetEmcX() const { return emcX; };
35  const mapper &GetEmcY() const { return emcY; };
36  const mapper &GetEmcZ() const { return emcZ; };
37  // const std::map<PndEmcTwoCoordIndex*, PndEmcXtal*>& GetTciXtalMap() const { return fTciXtalMap ;};
38 
39  const PndEmcTciXtalMap &GetTciXtalMap() const { return fTciXtalMap; };
40  PndEmcTwoCoordIndex *locateIndex(double theta, double phi) const;
41  void Print(string, Int_t option = 1) const;
42 
43  private:
44  bool crystal_name_analysis(TString, int &module, int &copy, int &row, int &crystal);
45 
46  protected:
47  PndEmcStructure(TGeoManager *);
48 
49  private:
50  static PndEmcStructure *_instance;
51 
52  mapper emcX;
53  mapper emcY;
54  mapper emcZ;
55 
56  // std::map<PndEmcTwoCoordIndex*, PndEmcXtal*> fTciXtalMap;
57  PndEmcTciXtalMap fTciXtalMap;
58  ClassDef(PndEmcStructure, 1)
59 };
60 
61 #endif // PNDEMCSTRUCTURE_HH
const mapper & GetEmcZ() const
static PndEmcStructure * Instance()
void Print(string, Int_t option=1) const
PndEmcStructure(TGeoManager *)
const PndEmcTciXtalMap & GetTciXtalMap() const
represents coordinates of one crystal
Definition: PndEmcXtal.h:35
stores crystal index coordinates (x,y) or (theta,phi)
PndEmcTwoCoordIndex * locateIndex(double theta, double phi) const
geometry helper class
virtual ~PndEmcStructure()
const mapper & GetEmcY() const
std::map< PndEmcTwoCoordIndex *, PndEmcXtal * > PndEmcTciXtalMap
std::map< Int_t, Float_t > mapper
const mapper & GetEmcX() const