@@ -106,16 +106,16 @@ class ClusterSummary {
106106 int getClusSizeByIndex (const int mod) const { return clusSize.at (mod); }
107107 float getClusChargeByIndex (const int mod) const { return clusCharge.at (mod); }
108108
109- int getNClus (const CMSTracker mod) const {
110- int pos = getModuleLocation (mod);
109+ int getNClus (const CMSTracker mod, bool warn = true ) const {
110+ int pos = getModuleLocation (mod, warn );
111111 return pos < 0 ? 0 . : nClus[pos];
112112 }
113- int getClusSize (const CMSTracker mod) const {
114- int pos = getModuleLocation (mod);
113+ int getClusSize (const CMSTracker mod, bool warn = true ) const {
114+ int pos = getModuleLocation (mod, warn );
115115 return pos < 0 ? 0 . : clusSize[pos];
116116 }
117- float getClusCharge (const CMSTracker mod) const {
118- int pos = getModuleLocation (mod);
117+ float getClusCharge (const CMSTracker mod, bool warn = true ) const {
118+ int pos = getModuleLocation (mod, warn );
119119 return pos < 0 ? 0 . : clusCharge[pos];
120120 }
121121
@@ -127,9 +127,15 @@ class ClusterSummary {
127127 void addClusSizeByIndex (const int mod, const int val) { clusSize.at (mod) += val; }
128128 void addClusChargeByIndex (const int mod, const float val) { clusCharge.at (mod) += val; }
129129
130- void addNClus (const CMSTracker mod, const int val) { nClus.at (getModuleLocation (mod)) += val; }
131- void addClusSize (const CMSTracker mod, const int val) { clusSize.at (getModuleLocation (mod)) += val; }
132- void addClusCharge (const CMSTracker mod, const float val) { clusCharge.at (getModuleLocation (mod)) += val; }
130+ void addNClus (const CMSTracker mod, const int val, bool warn = true ) {
131+ nClus.at (getModuleLocation (mod, warn)) += val;
132+ }
133+ void addClusSize (const CMSTracker mod, const int val, bool warn = true ) {
134+ clusSize.at (getModuleLocation (mod, warn)) += val;
135+ }
136+ void addClusCharge (const CMSTracker mod, const float val, bool warn = true ) {
137+ clusCharge.at (getModuleLocation (mod, warn)) += val;
138+ }
133139
134140 const std::vector<int >& getModules () const { return modules; }
135141 // Return the location of desired module within modules_. If warn is set to true, a warnign will be outputed in case no module was found
0 commit comments