PandaRoot
PndEmcStructure.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 //======================================================================
14 // Description:
15 // Class PndEmcStructure
16 //------------------------------------------------------------------------
17 //#pragma once
18 #ifndef PNDEMCSTRUCTURE_H
19 #define PNDEMCSTRUCTURE_H
20 
21 //#include <map>
22 //#include <string>
23 #include "TObject.h"
24 #include "TString.h"
25 #include "PndEmcDataTypes.h"
26 
27 class PndEmcXtal;
29 class TGeoManager;
30 
31 using std::string;
32 
37 class PndEmcStructure : public TObject {
38 
39  public:
40  typedef std::map<Int_t, Float_t> mapper;
41  static PndEmcStructure *Instance();
42  static PndEmcStructure *Instance(TGeoManager *);
43 
44  virtual ~PndEmcStructure();
45 
46  const mapper &GetEmcX() const { return emcX; };
47  const mapper &GetEmcY() const { return emcY; };
48  const mapper &GetEmcZ() const { return emcZ; };
49  // const std::map<PndEmcTwoCoordIndex*, PndEmcXtal*>& GetTciXtalMap() const { return fTciXtalMap ;};
50 
51  const PndEmcTciXtalMap &GetTciXtalMap() const { return fTciXtalMap; };
52  PndEmcTwoCoordIndex *locateIndex(double theta, double phi) const;
53  void Print(string, Int_t option = 1) const;
54 
55  private:
56  bool crystal_name_analysis(TString, int &module, int &copy, int &row, int &crystal);
57 
58  protected:
59  PndEmcStructure(TGeoManager *);
60 
61  private:
62  static PndEmcStructure *_instance;
63 
64  mapper emcX;
65  mapper emcY;
66  mapper emcZ;
67 
68  // std::map<PndEmcTwoCoordIndex*, PndEmcXtal*> fTciXtalMap;
69  PndEmcTciXtalMap fTciXtalMap;
70  ClassDef(PndEmcStructure, 1)
71 };
72 
73 #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:47
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