BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnZdcDigiScheme.h
Go to the documentation of this file.
1/*************************************************************************************
2 *
3 * Class BmnZdcDigiScheme
4 *
5 * Author: Elena Litvinenko
6 * e-mail: litvin@nf.jinr.ru
7 * Version: 18-11-2015
8 *
9 ************************************************************************************/
10
11#ifndef BMNZDCDIGISCHEME_H
12#define BMNZDCDIGISCHEME_H
13
14#include "BmnZdcDigiPar.h"
15#include "BmnZdcGeoPar.h"
16#include "FairGeoNode.h"
17#include "TObject.h"
18
19#include <map>
20#include <vector>
21
22using std::pair;
23using std::vector;
24
25typedef std::vector<Int_t> BmnZdcVolId_t; // now - { VolumeId, MotherMotherCopyNo}
26typedef std::vector<Int_t> BmnZdcDigiId_t; // now - {GroupID, ModuleID, ChannelID}
27typedef std::vector<Double_t> BmnZdcVolInfo_t; // now - Center X,Y,Z; and Dx,Dy,Dz from center to the corner
28
29class BmnZdcDigiScheme : public TObject
30{
31 public:
34
36 Bool_t Init(BmnZdcGeoPar* geoPar, BmnZdcDigiPar* digiPar, Int_t pVerbose = 0);
37
38 Bool_t AddNodes(TObjArray* sensNodes, Int_t pVerbose = 0);
39 Bool_t CalcDimensions(Int_t pGlobalDetectorNumber, Int_t& nx, Int_t& ny, Int_t& nz);
40
41 BmnZdcVolId_t* CreateVolElement(FairGeoNode* nod, Int_t nodeNumber, BmnZdcDigiId_t* right, Int_t pVerbose);
43 BmnZdcVolInfo_t* CreateVolInfoElement(FairGeoNode* nod, Int_t pVerbose);
45
51 Int_t pMcCopyNumber,
52 Int_t pMotherCopyNumber,
53 Int_t pMotherMotherCopyNumber,
54 Int_t& pGroupId,
55 Int_t& pChanId,
56 Int_t& pModId);
57
61
62 void Print();
63 void PrintVolume(Int_t volID, Int_t copyNoMotherMother = 1);
64
65 void GetZdcDimensions(Int_t& nx, Int_t& ny, Int_t& nz);
66
68 BmnZdcDigiId_t GetDigiIdFromVolumeData(Int_t pMcVolumeNumber, Int_t pMotherMotherCopyNumber);
69 void SplitDigiID(BmnZdcDigiId_t digiID, Int_t& module_groupID, Int_t& modID, Int_t& chanID);
70
72
73 protected:
74 static BmnZdcDigiScheme* fInstance; // Instance of singleton object
75 static Int_t fRefcount; // Counter of references on this
76 static Bool_t fInitialized; // Defines whether was initialized
77
78 private:
79 std::map<BmnZdcVolId_t, BmnZdcDigiId_t> fVolToDigiIdMap; //! correspondence for all active volumes (Zdc+ZdcPsd)
80 std::map<BmnZdcDigiId_t, BmnZdcVolInfo_t*> fDigiToVolInfoMap; //! correspondence for active volumes
81
82 Int_t Nx;
83 Int_t Ny;
84 Int_t Nz;
85
88
90};
91
92#endif // BMNZDCDIGISCHEME_H
bool Bool_t
int Int_t
double Double_t
#define ClassDef(name, id)
BmnZdcDigiPar * fZdcDigiPar
Bool_t CreateVolCopyElements(BmnZdcVolId_t *left, BmnZdcDigiId_t *right)
static Int_t fRefcount
BmnZdcVolInfo_t * GetVolInfo(BmnZdcVolId_t *pVolId)
Bool_t GetVolCenterXYZ(BmnZdcDigiId_t *pDigiId, Double_t &x, Double_t &y, Double_t &z)
virtual ~BmnZdcDigiScheme()
Bool_t AddNodes(TObjArray *sensNodes, Int_t pVerbose=0)
static BmnZdcDigiScheme * Instance()
Bool_t Init(BmnZdcGeoPar *geoPar, BmnZdcDigiPar *digiPar, Int_t pVerbose=0)
void PrintVolume(Int_t volID, Int_t copyNoMotherMother=1)
void SplitDigiID(BmnZdcDigiId_t digiID, Int_t &module_groupID, Int_t &modID, Int_t &chanID)
static BmnZdcDigiScheme * fInstance
BmnZdcDigiId_t GetDigiId(BmnZdcVolId_t *pVolId)
std::map< BmnZdcDigiId_t, BmnZdcVolInfo_t * > fDigiToVolInfoMap
correspondence for all active volumes (Zdc+ZdcPsd)
Bool_t CreateVolInfoCopyElements(BmnZdcDigiId_t *right, BmnZdcVolInfo_t *volInfo)
Bool_t CalcDimensions(Int_t pGlobalDetectorNumber, Int_t &nx, Int_t &ny, Int_t &nz)
Bool_t GetVolDxDyDz(BmnZdcDigiId_t *pDigiId, Double_t &Dx, Double_t &Dy, Double_t &Dz)
BmnZdcDigiId_t GetDigiIdFromVolumeData(Int_t pMcVolumeNumber, Int_t pMotherMotherCopyNumber)
BmnZdcDigiId_t GetDigiIdFromCoords(Double_t x, Double_t y, Double_t z)
Bool_t IsVolumeExist(BmnZdcVolId_t *pVolId)
Int_t GetChannelID(BmnZdcVolId_t *pVolId)
BmnZdcDigiPar * GetZdcDigiPar()
BmnZdcVolInfo_t * CreateVolInfoElement(FairGeoNode *nod, Int_t pVerbose)
Int_t GetGroupID(BmnZdcVolId_t *pVolId)
Bool_t GetGroupIdModIdChanId(Int_t pMcVolumeNumber, Int_t pMcCopyNumber, Int_t pMotherCopyNumber, Int_t pMotherMotherCopyNumber, Int_t &pGroupId, Int_t &pChanId, Int_t &pModId)
void GetZdcDimensions(Int_t &nx, Int_t &ny, Int_t &nz)
TObjArray * fPasNodes
std::map< BmnZdcVolId_t, BmnZdcDigiId_t > fVolToDigiIdMap
static Bool_t fInitialized
Int_t Nx
correspondence for active volumes
BmnZdcVolId_t * CreateVolElement(FairGeoNode *nod, Int_t nodeNumber, BmnZdcDigiId_t *right, Int_t pVerbose)
std::vector< Double_t > BmnZdcVolInfo_t
std::vector< Int_t > BmnZdcVolId_t
std::vector< Int_t > BmnZdcDigiId_t
std::vector< Double_t > BmnZdcVolInfo_t
std::vector< Int_t > BmnZdcVolId_t
std::vector< Int_t > BmnZdcDigiId_t