@@ -97,15 +97,15 @@ TRestDetectorHitsEvent::~TRestDetectorHitsEvent() { delete fHits; }
97
97
// / structure. Additionaly a time delay value in `us` may be added to the hits.
98
98
void TRestDetectorHitsEvent::AddHit (Double_t x, Double_t y, Double_t z, Double_t en, Double_t t,
99
99
REST_HitType type) {
100
- fHits ->AddHit (x, y, z, en, t, type);
100
+ fHits ->AddHit ({ x, y, z} , en, t, type);
101
101
}
102
102
103
103
// /////////////////////////////////////////////
104
104
// / \brief Adds a new hit to this event
105
105
// /
106
106
// / It adds a new hit with position `pos` in mm, and energy `en` in keV, to this TRestDetectorHitsEvent
107
107
// / structure. Additionaly a time delay value in `us` may be added to the hits.
108
- void TRestDetectorHitsEvent::AddHit (TVector3 pos, Double_t en, Double_t t, REST_HitType type) {
108
+ void TRestDetectorHitsEvent::AddHit (const TVector3& pos, Double_t en, Double_t t, REST_HitType type) {
109
109
fHits ->AddHit (pos, en, t, type);
110
110
}
111
111
@@ -172,8 +172,8 @@ TRestHits* TRestDetectorHitsEvent::GetXZHits() {
172
172
173
173
for (unsigned int i = 0 ; i < this ->GetNumberOfHits (); i++)
174
174
if (GetType (i) == XZ)
175
- fXZHits ->AddHit (this ->GetX (i), this ->GetY (i), this ->GetZ (i), this ->GetEnergy (i), this -> GetTime (i),
176
- XZ);
175
+ fXZHits ->AddHit ({ this ->GetX (i), this ->GetY (i), this ->GetZ (i)} , this ->GetEnergy (i),
176
+ this -> GetTime (i), XZ);
177
177
178
178
return fXZHits ;
179
179
}
@@ -190,8 +190,8 @@ TRestHits* TRestDetectorHitsEvent::GetYZHits() {
190
190
191
191
for (unsigned int i = 0 ; i < this ->GetNumberOfHits (); i++)
192
192
if (GetType (i) == YZ)
193
- fYZHits ->AddHit (this ->GetX (i), this ->GetY (i), this ->GetZ (i), this ->GetEnergy (i), this -> GetTime (i),
194
- YZ);
193
+ fYZHits ->AddHit ({ this ->GetX (i), this ->GetY (i), this ->GetZ (i)} , this ->GetEnergy (i),
194
+ this -> GetTime (i), YZ);
195
195
196
196
return fYZHits ;
197
197
}
@@ -208,7 +208,7 @@ TRestHits* TRestDetectorHitsEvent::GetXYZHits() {
208
208
209
209
for (unsigned int i = 0 ; i < this ->GetNumberOfHits (); i++)
210
210
if (GetType (i) == XYZ)
211
- fXYZHits ->AddHit (this ->GetX (i), this ->GetY (i), this ->GetZ (i), this ->GetEnergy (i),
211
+ fXYZHits ->AddHit ({ this ->GetX (i), this ->GetY (i), this ->GetZ (i)} , this ->GetEnergy (i),
212
212
this ->GetTime (i), XYZ);
213
213
214
214
return fXYZHits ;
@@ -948,7 +948,7 @@ void TRestDetectorHitsEvent::DrawHistograms(Int_t& column, const TString& histOp
948
948
void TRestDetectorHitsEvent::PrintEvent (Int_t nHits) const {
949
949
TRestEvent::PrintEvent ();
950
950
951
- cout << " Total energy : " << GetEnergy () << endl;
951
+ cout << " Total energy : " << GetTotalEnergy () << endl;
952
952
cout << " Mean position : ( " << GetMeanPositionX () << " , " << GetMeanPositionY () << " , "
953
953
<< GetMeanPositionZ () << " ) " << endl;
954
954
cout << " Number of hits : " << fHits ->GetNumberOfHits () << endl;
0 commit comments