CbmRoot
Loading...
Searching...
No Matches
CbmClusteringGeometry.h
Go to the documentation of this file.
1/* Copyright (C) 2012-2016 FIAS/JINR-LIT, Frankfurt/Dubna
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Grigory Kozlov [committer] */
4
5/*
6 * CbmClusteringGeometry.h
7 *
8 * Created on: Feb 22, 2012
9 * Author: kozlov
10 */
11
12#ifndef CBMCLUSTERINGGEOMETRY_H_
13#define CBMCLUSTERINGGEOMETRY_H_
14
15#include "CbmMuchGeoScheme.h"
16#include "FairTask.h"
17
18#include <map>
19#include <vector>
20
22 public:
24 CbmClusteringGeometry(Int_t nStation, Int_t nLayer, Bool_t nSide, Int_t nModule, CbmMuchGeoScheme* scheme);
25 void CbmClusteringSetPad(Int_t nPad, Float_t x, Float_t y, Float_t dx, Float_t dy, Double_t phi1, Double_t phi2,
26 Float_t r1, Float_t r2, Int_t digiNum, UInt_t charge,
27 Long64_t chID); //Addition of a single pad
28 virtual ~CbmClusteringGeometry();
29
30 //void SetMuchModuleGeometryRectangular(Int_t nStation, Int_t nLayer, Bool_t nSide, Int_t nModule, CbmMuchGeoScheme* scheme); //Old geometry version
31 void SetMuchModuleGeometryRadial(Int_t nStation, Int_t nLayer, Bool_t nSide, Int_t nModule, CbmMuchGeoScheme* scheme);
32 void SetMuchModuleGeometryRadialFast(Int_t nStation, Int_t nLayer, Bool_t nSide, Int_t nModule,
33 CbmMuchGeoScheme* scheme);
34
35 Int_t GetDetId() const { return fDetId; }
36 Int_t GetNPads() const { return fNofPads; }
37 Int_t GetAPadsNom() const { return fNofActivePads; }
38 void SetAPadsNom(Int_t nPads);
39 void SetAPadsPlusOne();
40
41 Float_t GetDx(Int_t iPad);
42 Float_t GetDy(Int_t iPad);
43 Float_t GetX0(Int_t iPad);
44 Float_t GetY0(Int_t iPad);
45
46 Int_t GetDigiNum(Int_t iPad);
47 void SetDigiNum(Int_t iPad, Int_t iDigi);
48 Int_t GetNeighborsNum(Int_t iPad);
49 Int_t GetGoodNeighborsNum(Int_t iPad);
50 Int_t GetNeighbor(Int_t iPad, Int_t iNeighbor);
51 Long64_t GetPadID(Int_t iPad);
52 UInt_t GetPadCharge(Int_t iPad);
53 void SetPadCharge(Int_t iPad, UInt_t iCharge);
54 Int_t GetPadByChannelId(Long64_t chId);
55 Double_t GetPhi1(Int_t iPad);
56 Double_t GetPhi2(Int_t iPad);
57 Float_t GetR1(Int_t iPad);
58 Float_t GetR2(Int_t iPad);
59 std::vector<Int_t> GetNeighbors(Int_t iPad);
60 Long64_t GetChannelID(Int_t iPad);
61
62 private:
63 template<typename T1>
64 T1 GetMin(T1& a, T1& b);
65 template<typename T2>
66 T2 GetMax(T2& a, T2& b);
67 Bool_t SubEqual(Double_t x1, Double_t x2, Double_t l);
68
69 Long64_t fNofPads; //Number of pads in module
70 Int_t fDetId; //Detector Id of MuchModule
71 Int_t fNofActivePads; //Number of charged pads in module
72
73 std::map<Long64_t, Int_t> fPadByChannelId;
74 struct PadInformation { //Description of single pad
75 Float_t fX, fY;
76 Float_t fDx, fDy;
77 Double_t fPhi1, fPhi2;
78 Float_t fR1, fR2;
79 Int_t fDigiNum;
80 UInt_t fCharge;
83 std::vector<Int_t> fNeighbors;
84 Long64_t channelID;
85 Int_t nSector;
86 };
88
91};
92
93#endif
CbmClusteringGeometry & operator=(const CbmClusteringGeometry &)
CbmClusteringGeometry(const CbmClusteringGeometry &)
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)
Long64_t GetChannelID(Int_t iPad)
Int_t GetPadByChannelId(Long64_t chId)
void SetDigiNum(Int_t iPad, Int_t iDigi)
std::map< Long64_t, Int_t > fPadByChannelId
void SetPadCharge(Int_t iPad, UInt_t iCharge)
Int_t GetGoodNeighborsNum(Int_t iPad)
Bool_t SubEqual(Double_t x1, Double_t x2, Double_t l)
void SetMuchModuleGeometryRadial(Int_t nStation, Int_t nLayer, Bool_t nSide, Int_t nModule, CbmMuchGeoScheme *scheme)
void SetMuchModuleGeometryRadialFast(Int_t nStation, Int_t nLayer, Bool_t nSide, Int_t nModule, CbmMuchGeoScheme *scheme)
std::vector< Int_t > GetNeighbors(Int_t iPad)
Int_t GetNeighbor(Int_t iPad, Int_t iNeighbor)
Long64_t GetPadID(Int_t iPad)