File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ class Clusters
5555
5656 void reset ();
5757
58- void merge (const Clusters& clusters);
58+ void merge (Clusters& clusters);
5959
6060 void dumpToFile (std::string filename, int type = 0 );
6161
Original file line number Diff line number Diff line change @@ -134,12 +134,17 @@ void Clusters::reset()
134134}
135135
136136// ______________________________________________________________________________
137- void Clusters::merge (const Clusters& clusters)
137+ void Clusters::merge (Clusters& clusters)
138138{
139- const bool isNormalized = mIsNormalized ;
140- if (isNormalized) {
139+ const bool isThisNormalized = mIsNormalized ;
140+ const bool isOtherNormalized = clusters.mIsNormalized ;
141+
142+ if (isThisNormalized) {
141143 denormalize ();
142144 }
145+ if (isOtherNormalized) {
146+ clusters.denormalize ();
147+ }
143148
144149 mNClusters += clusters.mNClusters ;
145150 mQMax += clusters.mQMax ;
@@ -148,9 +153,12 @@ void Clusters::merge(const Clusters& clusters)
148153 mSigmaPad += clusters.mSigmaPad ;
149154 mTimeBin += clusters.mTimeBin ;
150155
151- if (isNormalized ) {
156+ if (isThisNormalized ) {
152157 normalize ();
153158 }
159+ if (isOtherNormalized) {
160+ clusters.normalize ();
161+ }
154162}
155163
156164// ______________________________________________________________________________
You can’t perform that action at this time.
0 commit comments