BmnRoot
Loading...
Searching...
No Matches
BmnZdcDigi.cxx
Go to the documentation of this file.
1
2/*************************************************************************************
3 *
4 * BmnZdcDigi
5 * Class for digital data taken from BmnZdc detector
6 *
7 * Author: Elena Litvinenko
8 * e-mail: litvin@nf.jinr.ru
9 * Version: 18-11-2015
10 *
11 ************************************************************************************/
12
13#include "BmnZdcDigi.h"
14#include "BmnZdcDigiScheme.h"
15
16#include <iostream>
17using std::cout;
18using std::endl;
19
20// -------------------------------------------------------------------------
21
23{
24 fGroupID = -1;
25 fModuleID = -1;
26 fChannelID = -1;
27 fELoss = 0;
28 fELossDigi = 0;
29}
30
31// -------------------------------------------------------------------------
32
33BmnZdcDigi::BmnZdcDigi(Int_t pfGroupID, Int_t pfModuleID, Int_t pfChannelID, Double_t pfELoss, Double_t pfELossDigi)
34{
35 fGroupID = pfGroupID;
36 fModuleID = pfModuleID;
37 fChannelID = pfChannelID;
38 fELoss = pfELoss;
39 fELossDigi = pfELossDigi;
40
41 // InitStatic();
42}
43
44// -------------------------------------------------------------------------
45
47{
48 fGroupID = -1;
49 fModuleID = -1;
50 fChannelID = -1;
51 fELoss = 0;
52 fELossDigi = 0;
53
55
56 if ((pDigiScheme)&&(p)) {
57
58 Int_t module_groupID, modID, chanID;
59 // pDigiScheme->SplitDigiID(pDigiScheme->GetDigiIdFromCoords(p->GetX(),p->GetY(),p->GetZ()),module_groupID, modID, chanID);
60
61 pDigiScheme->SplitDigiID(pDigiScheme->GetDigiIdFromVolumeData(p->GetDetectorID(),p->GetCopyMother() ),module_groupID, modID, chanID);
62
63
64 fGroupID = module_groupID;
65 fModuleID = modID;
66 fChannelID = chanID;
67
68 fELoss = p->GetEnergyLoss();
69 }
70
71 // InitStatic();
72}
73
74
75// -------------------------------------------------------------------------
76
81
82
83// -------------------------------------------------------------------------
84
86{
87 fELossDigi = 0;
88 fELoss = 0;
89}
90
91
92// -------------------------------------------------------------------------
93// -------------------------------------------------------------------------
94
96{
97 Bool_t do_init = 1;
98 if (do_init) {
99 Clear();
101
102 if (pDigiScheme) {
103 //BmnZdcDigiPar* pZdcDigiPar=0;
104 /*pZdcDigiPar = */pDigiScheme->GetZdcDigiPar();
105 }
106 }
107}
108
109// -------------------------------------------------------------------------
110
111void BmnZdcDigi::Print(const Option_t* opt)
112{
113 cout << " BmnZdcDigi ModuleGroupID:" << fGroupID << " ModuleID:" << fModuleID<< " ChanID:" << fChannelID<<
114 " ELossDigi:" << fELossDigi<< " ELoss: " << fELoss << endl;
115}
116
117// -------------------------------------------------------------------------
118
120{
122
123 if ((pDigiScheme)&&(p)) {
124
125 Int_t module_groupID, modID, chanID;
126 // pDigiScheme->SplitDigiID(pDigiScheme->GetDigiIdFromCoords(p->GetX(),p->GetY(),p->GetZ()),module_groupID, modID, chanID);
127 pDigiScheme->SplitDigiID(pDigiScheme->GetDigiIdFromVolumeData(p->GetDetectorID(),p->GetCopyMother() ),module_groupID, modID, chanID);
128
129 if ((fGroupID == module_groupID)&&(fModuleID == modID)&&(fChannelID == chanID))
130 fELoss += p->GetEnergyLoss();
131 }
132
133 return 0;
134}
void SplitDigiID(BmnZdcDigiId_t digiID, Int_t &module_groupID, Int_t &modID, Int_t &chanID)
BmnZdcDigiId_t GetDigiIdFromVolumeData(Int_t pMcVolumeNumber, Int_t pMotherMotherCopyNumber)
BmnZdcDigiPar * GetZdcDigiPar()
static BmnZdcDigiScheme * Instance()
Int_t fModuleID
Definition BmnZdcDigi.h:49
virtual ~BmnZdcDigi()
Int_t fChannelID
Definition BmnZdcDigi.h:50
Double_t fELossDigi
Definition BmnZdcDigi.h:51
Int_t fGroupID
Definition BmnZdcDigi.h:48
void Clear()
Double_t fELoss
Definition BmnZdcDigi.h:52
virtual void Print(const Option_t *opt="")
UInt_t AddZdcPoint(BmnZdcPoint *p)
void InitStatic()
Short_t GetCopyMother() const
Definition BmnZdcPoint.h:56