PandaRoot
PndEmcMapper.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 // EMC Mapper class. Map crystal index (fDetectorId) to two coordinate index.
16 // Author List:
17 // Dima Melnychuk
18 //
20 
21 //#pragma once
22 #ifndef PNDEMCMAPPER_H
23 #define PNDEMCMAPPER_H
24 
25 #include "PndEmcTwoCoordIndex.h"
26 #include "TObject.h"
27 #include "TString.h"
28 #include <map>
29 
34 class PndEmcMapper: public TObject
35 {
36 
37 public:
38  static PndEmcMapper* Instance();
39  static void Init(Int_t MapVersion);
40  const std::map<Int_t,PndEmcTwoCoordIndex* >& GetTciMap();
41 
43  virtual ~PndEmcMapper();
44 
46  Int_t GetMapVersion() const { return fMapVersion ;};
47 
48  void Add(PndEmcMapper*);
49 
51 protected:
52  std::map<Int_t,PndEmcTwoCoordIndex* > fIntTwoCoordMap;
53  PndEmcMapper();
54 private:
55 
56  static PndEmcMapper* _instance;
57  static Int_t fMapVersion;
58  Int_t GetDetId(Int_t iTheta,Int_t iPhi);
59 
60 
61  ClassDef(PndEmcMapper,1)
62 };
63 
65 {
66  public:
68 };
69 
71 {
72  public:
74 };
75 
77 {
78  public:
80 };
81 
83 {
84  public:
86 };
87 
89 {
90  public:
92 };
93 
95 {
96  public:
98 };
99 
101 {
102  public:
104 };
105 
107 {
108  public:
110 };
111 
113 {
114  public:
116 };
117 
119 {
120  public:
122 };
123 
125 {
126  public:
128 };
129 
131 {
132  public:
134 };
135 
136 #endif //PndEmcMapper_H
Int_t GetMapVersion() const
Definition: PndEmcMapper.h:46
stores crystal index coordinates (x,y) or (theta,phi)
virtual ~PndEmcMapper()
Emc geometry mapper.
Definition: PndEmcMapper.h:34
static void Init(Int_t MapVersion)
std::map< Int_t, PndEmcTwoCoordIndex *> fIntTwoCoordMap
Definition: PndEmcMapper.h:52
static PndEmcMapper * Instance()
void Add(PndEmcMapper *)
PndEmcTwoCoordIndex * GetTCI(Int_t DetectorId)
const std::map< Int_t, PndEmcTwoCoordIndex *> & GetTciMap()
DetectorId