CbmRoot
CbmClusteringGeometry.h
Go to the documentation of this file.
1 /*
2  * CbmClusteringGeometry.h
3  *
4  * Created on: Feb 22, 2012
5  * Author: kozlov
6  */
7 
8 #ifndef CBMCLUSTERINGGEOMETRY_H_
9 #define CBMCLUSTERINGGEOMETRY_H_
10 
11 #include "CbmMuchGeoScheme.h"
12 #include "FairTask.h"
13 
14 #include <map>
15 #include <vector>
16 
18 public:
20  CbmClusteringGeometry(Int_t nStation,
21  Int_t nLayer,
22  Bool_t nSide,
23  Int_t nModule,
24  CbmMuchGeoScheme* scheme);
25  void CbmClusteringSetPad(Int_t nPad,
26  Float_t x,
27  Float_t y,
28  Float_t dx,
29  Float_t dy,
30  Double_t phi1,
31  Double_t phi2,
32  Float_t r1,
33  Float_t r2,
34  Int_t digiNum,
35  UInt_t charge,
36  Long64_t chID); //Addition of a single pad
37  virtual ~CbmClusteringGeometry();
38 
39  //void SetMuchModuleGeometryRectangular(Int_t nStation, Int_t nLayer, Bool_t nSide, Int_t nModule, CbmMuchGeoScheme* scheme); //Old geometry version
40  void SetMuchModuleGeometryRadial(Int_t nStation,
41  Int_t nLayer,
42  Bool_t nSide,
43  Int_t nModule,
44  CbmMuchGeoScheme* scheme);
45  void SetMuchModuleGeometryRadialFast(Int_t nStation,
46  Int_t nLayer,
47  Bool_t nSide,
48  Int_t nModule,
49  CbmMuchGeoScheme* scheme);
50 
51  Int_t GetDetId() const { return fDetId; }
52  Int_t GetNPads() const { return fNofPads; }
53  Int_t GetAPadsNom() const { return fNofActivePads; }
54  void SetAPadsNom(Int_t nPads);
55  void SetAPadsPlusOne();
56 
57  Float_t GetDx(Int_t iPad);
58  Float_t GetDy(Int_t iPad);
59  Float_t GetX0(Int_t iPad);
60  Float_t GetY0(Int_t iPad);
61 
62  Int_t GetDigiNum(Int_t iPad);
63  void SetDigiNum(Int_t iPad, Int_t iDigi);
64  Int_t GetNeighborsNum(Int_t iPad);
65  Int_t GetGoodNeighborsNum(Int_t iPad);
66  Int_t GetNeighbor(Int_t iPad, Int_t iNeighbor);
67  Long64_t GetPadID(Int_t iPad);
68  UInt_t GetPadCharge(Int_t iPad);
69  void SetPadCharge(Int_t iPad, UInt_t iCharge);
70  Int_t GetPadByChannelId(Long64_t chId);
71  Double_t GetPhi1(Int_t iPad);
72  Double_t GetPhi2(Int_t iPad);
73  Float_t GetR1(Int_t iPad);
74  Float_t GetR2(Int_t iPad);
75  std::vector<Int_t> GetNeighbors(Int_t iPad);
76  Long64_t GetChannelID(Int_t iPad);
77 
78 private:
79  template<typename T1>
80  T1 GetMin(T1& a, T1& b);
81  template<typename T2>
82  T2 GetMax(T2& a, T2& b);
83  Bool_t SubEqual(Double_t x1, Double_t x2, Double_t l);
84 
85  Long64_t fNofPads; //Number of pads in module
86  Int_t fDetId; //Detector Id of MuchModule
87  Int_t fNofActivePads; //Number of charged pads in module
88 
89  std::map<Long64_t, Int_t> fPadByChannelId;
90  struct PadInformation { //Description of single pad
91  Float_t fX, fY;
92  Float_t fDx, fDy;
93  Double_t fPhi1, fPhi2;
94  Float_t fR1, fR2;
95  Int_t fDigiNum;
96  UInt_t fCharge;
99  std::vector<Int_t> fNeighbors;
100  Long64_t channelID;
101  Int_t nSector;
102  };
104 
107 };
108 
109 #endif
CbmClusteringGeometry::SetPadCharge
void SetPadCharge(Int_t iPad, UInt_t iCharge)
Definition: CbmClusteringGeometry.cxx:401
CbmClusteringGeometry::PadInformation::fY
Float_t fY
Definition: CbmClusteringGeometry.h:91
CbmClusteringGeometry::PadInformation::fDigiNum
Int_t fDigiNum
Definition: CbmClusteringGeometry.h:95
CbmMuchGeoScheme
Definition: CbmMuchGeoScheme.h:43
CbmClusteringGeometry::PadInformation::fCharge
UInt_t fCharge
Definition: CbmClusteringGeometry.h:96
CbmClusteringGeometry::GetPhi1
Double_t GetPhi1(Int_t iPad)
Definition: CbmClusteringGeometry.cxx:440
CbmClusteringGeometry::fNofPads
Long64_t fNofPads
Definition: CbmClusteringGeometry.h:85
CbmClusteringGeometry::CbmClusteringGeometry
CbmClusteringGeometry(const CbmClusteringGeometry &)
CbmClusteringGeometry::GetX0
Float_t GetX0(Int_t iPad)
Definition: CbmClusteringGeometry.cxx:365
CbmClusteringGeometry::fNofActivePads
Int_t fNofActivePads
Definition: CbmClusteringGeometry.h:87
CbmClusteringGeometry::PadInformation::fPhi2
Double_t fPhi2
Definition: CbmClusteringGeometry.h:93
CbmClusteringGeometry::GetR1
Float_t GetR1(Int_t iPad)
Definition: CbmClusteringGeometry.cxx:448
CbmClusteringGeometry::GetGoodNeighborsNum
Int_t GetGoodNeighborsNum(Int_t iPad)
Definition: CbmClusteringGeometry.cxx:385
CbmClusteringGeometry::GetNeighbor
Int_t GetNeighbor(Int_t iPad, Int_t iNeighbor)
Definition: CbmClusteringGeometry.cxx:389
CbmClusteringGeometry::GetR2
Float_t GetR2(Int_t iPad)
Definition: CbmClusteringGeometry.cxx:450
CbmClusteringGeometry::GetDetId
Int_t GetDetId() const
Definition: CbmClusteringGeometry.h:51
CbmClusteringGeometry::PadInformation::fNofGoodNeighbors
Int_t fNofGoodNeighbors
Definition: CbmClusteringGeometry.h:98
CbmClusteringGeometry::SetDigiNum
void SetDigiNum(Int_t iPad, Int_t iDigi)
Definition: CbmClusteringGeometry.cxx:377
CbmClusteringGeometry::CbmClusteringGeometry
CbmClusteringGeometry()
Definition: CbmClusteringGeometry.cxx:39
CbmClusteringGeometry::PadInformation::fX
Float_t fX
Definition: CbmClusteringGeometry.h:91
CbmClusteringGeometry::PadInformation::fDx
Float_t fDx
Definition: CbmClusteringGeometry.h:92
CbmClusteringGeometry::GetNeighborsNum
Int_t GetNeighborsNum(Int_t iPad)
Definition: CbmClusteringGeometry.cxx:381
CbmClusteringGeometry::PadInformation::fR1
Float_t fR1
Definition: CbmClusteringGeometry.h:94
CbmClusteringGeometry::SetAPadsNom
void SetAPadsNom(Int_t nPads)
Definition: CbmClusteringGeometry.cxx:405
CbmClusteringGeometry::PadInformation::fPhi1
Double_t fPhi1
Definition: CbmClusteringGeometry.h:93
CbmClusteringGeometry::operator=
CbmClusteringGeometry & operator=(const CbmClusteringGeometry &)
CbmClusteringGeometry::GetPhi2
Double_t GetPhi2(Int_t iPad)
Definition: CbmClusteringGeometry.cxx:444
CbmClusteringGeometry::GetChannelID
Long64_t GetChannelID(Int_t iPad)
Definition: CbmClusteringGeometry.cxx:456
CbmClusteringGeometry::fDetId
Int_t fDetId
Definition: CbmClusteringGeometry.h:86
CbmClusteringGeometry::PadInformation::fR2
Float_t fR2
Definition: CbmClusteringGeometry.h:94
CbmClusteringGeometry::SetMuchModuleGeometryRadial
void SetMuchModuleGeometryRadial(Int_t nStation, Int_t nLayer, Bool_t nSide, Int_t nModule, CbmMuchGeoScheme *scheme)
Definition: CbmClusteringGeometry.cxx:172
CbmClusteringGeometry::GetPadCharge
UInt_t GetPadCharge(Int_t iPad)
Definition: CbmClusteringGeometry.cxx:397
CbmClusteringGeometry::GetMin
T1 GetMin(T1 &a, T1 &b)
Definition: CbmClusteringGeometry.cxx:410
CbmClusteringGeometry::~CbmClusteringGeometry
virtual ~CbmClusteringGeometry()
Definition: CbmClusteringGeometry.cxx:98
CbmClusteringGeometry::PadInformation::fNeighbors
std::vector< Int_t > fNeighbors
Definition: CbmClusteringGeometry.h:99
CbmClusteringGeometry::PadInformation::fDy
Float_t fDy
Definition: CbmClusteringGeometry.h:92
CbmClusteringGeometry::GetMax
T2 GetMax(T2 &a, T2 &b)
Definition: CbmClusteringGeometry.cxx:419
CbmClusteringGeometry::GetDx
Float_t GetDx(Int_t iPad)
Definition: CbmClusteringGeometry.cxx:367
CbmClusteringGeometry::GetNPads
Int_t GetNPads() const
Definition: CbmClusteringGeometry.h:52
x
Double_t x
Definition: CbmMvdSensorDigiToHitTask.cxx:68
CbmClusteringGeometry::GetDy
Float_t GetDy(Int_t iPad)
Definition: CbmClusteringGeometry.cxx:369
CbmClusteringGeometry::GetY0
Float_t GetY0(Int_t iPad)
Definition: CbmClusteringGeometry.cxx:371
CbmClusteringGeometry::GetNeighbors
std::vector< Int_t > GetNeighbors(Int_t iPad)
Definition: CbmClusteringGeometry.cxx:452
y
Double_t y
Definition: CbmMvdSensorDigiToHitTask.cxx:68
CbmClusteringGeometry::GetDigiNum
Int_t GetDigiNum(Int_t iPad)
Definition: CbmClusteringGeometry.cxx:373
CbmClusteringGeometry::GetPadID
Long64_t GetPadID(Int_t iPad)
Definition: CbmClusteringGeometry.cxx:393
CbmClusteringGeometry::PadInformation::fNofNeighbors
Int_t fNofNeighbors
Definition: CbmClusteringGeometry.h:97
CbmClusteringGeometry::fPadList
PadInformation * fPadList
Definition: CbmClusteringGeometry.h:103
CbmClusteringGeometry::SetAPadsPlusOne
void SetAPadsPlusOne()
Definition: CbmClusteringGeometry.cxx:407
CbmClusteringGeometry
Definition: CbmClusteringGeometry.h:17
CbmMuchGeoScheme.h
CbmClusteringGeometry::PadInformation::nSector
Int_t nSector
Definition: CbmClusteringGeometry.h:101
CbmClusteringGeometry::GetPadByChannelId
Int_t GetPadByChannelId(Long64_t chId)
Definition: CbmClusteringGeometry.cxx:436
CbmClusteringGeometry::SetMuchModuleGeometryRadialFast
void SetMuchModuleGeometryRadialFast(Int_t nStation, Int_t nLayer, Bool_t nSide, Int_t nModule, CbmMuchGeoScheme *scheme)
Definition: CbmClusteringGeometry.cxx:268
CbmClusteringGeometry::PadInformation::channelID
Long64_t channelID
Definition: CbmClusteringGeometry.h:100
CbmClusteringGeometry::fPadByChannelId
std::map< Long64_t, Int_t > fPadByChannelId
Definition: CbmClusteringGeometry.h:89
CbmClusteringGeometry::GetAPadsNom
Int_t GetAPadsNom() const
Definition: CbmClusteringGeometry.h:53
CbmClusteringGeometry::SubEqual
Bool_t SubEqual(Double_t x1, Double_t x2, Double_t l)
Definition: CbmClusteringGeometry.cxx:427
CbmClusteringGeometry::PadInformation
Definition: CbmClusteringGeometry.h:90
CbmClusteringGeometry::CbmClusteringSetPad
void CbmClusteringSetPad(Int_t nPad, Float_t x, Float_t y, Float_t dx, Float_t dy, Double_t phi1, Double_t phi2, Float_t r1, Float_t r2, Int_t digiNum, UInt_t charge, Long64_t chID)
Definition: CbmClusteringGeometry.cxx:70