#include <sstream>
#include <cmath>
#include "GaudiKernel/MsgStream.h"
#include "TrigMuonEvent/IsoMuonFeature.h"
Go to the source code of this file.
◆ diff()
Function compares two objects and returns "semi verbose" output in the form of map where there are varaible names and relative differences between two obejcts.
Comparison with feedback.
- Parameters
-
variableChange | Map to record the differences In case of collections (or objects when the size may be different) that information can also be returned in varaibleChange |
Definition at line 239 of file IsoMuonFeature.cxx.
242 if( std::abs(
a.getsumet01() -
b.getsumet01() ) > DELTA ) {
243 variableChange[
"sumet01" ] =
a.getsumet01() -
b.getsumet01();
245 if( std::abs(
a.getsumet02() -
b.getsumet02() ) > DELTA ) {
246 variableChange[
"sumet02" ] =
a.getsumet02() -
b.getsumet02();
248 if( std::abs(
a.getsumet03() -
b.getsumet03() ) > DELTA ) {
249 variableChange[
"sumet03" ] =
a.getsumet03() -
b.getsumet03();
251 if( std::abs(
a.getsumet04() -
b.getsumet04() ) > DELTA ) {
252 variableChange[
"sumet04" ] =
a.getsumet04() -
b.getsumet04();
254 if( std::abs(
a.getsumpt01() -
b.getsumpt01() ) > DELTA ) {
255 variableChange[
"sumpt01" ] =
a.getsumpt01() -
b.getsumpt01();
257 if( std::abs(
a.getsumet02() -
b.getsumet02() ) > DELTA ) {
258 variableChange[
"sumet02" ] =
a.getsumet02() -
b.getsumpt02();
260 if( std::abs(
a.getsumpt03() -
b.getsumpt03() ) > DELTA ) {
261 variableChange[
"sumpt03" ] =
a.getsumpt03() -
b.getsumpt03();
263 if( std::abs(
a.getsumpt04() -
b.getsumpt04() ) > DELTA ) {
264 variableChange[
"sumpt04" ] =
a.getsumpt04() -
b.getsumpt04();
266 if(
a.getFlag() !=
b.getFlag() ) {
267 variableChange[
"flag" ] =
static_cast< double >(
a.getFlag() -
270 if(
a.getRoiIdMu() !=
b.getRoiIdMu() ) {
271 variableChange[
"RoiIdMu" ] =
static_cast< double >(
a.getRoiIdMu() -
274 if( std::abs(
a.pt() -
b.pt() ) > DELTA ) {
275 variableChange[
"PtMu" ] =
a.pt() -
b.pt();
277 if( std::abs(
a.getQMu() -
b.getQMu() ) > DELTA ) {
278 variableChange[
"QMu" ] =
a.getQMu() -
b.getQMu();
280 if( std::abs(
a.getEtaMu() -
b.getEtaMu() ) > DELTA ) {
281 variableChange[
"EtaMu" ] =
a.getEtaMu() -
b.getEtaMu();
283 if( std::abs(
a.getPhiMu() -
b.getPhiMu() ) > DELTA ) {
284 variableChange[
"PhiMu" ] =
a.getPhiMu() -
b.getPhiMu();
◆ operator<<()
◆ operator==()
Operator comparing two IsoMuonFeature objects for equality.
Definition at line 192 of file IsoMuonFeature.cxx.
194 if( std::abs(
a.getsumet01() -
b.getsumet01() ) > DELTA )
196 if( std::abs(
a.getsumet02() -
b.getsumet02() ) > DELTA )
198 if( std::abs(
a.getsumet03() -
b.getsumet03() ) > DELTA )
200 if( std::abs(
a.getsumet04() -
b.getsumet04() ) > DELTA )
202 if( std::abs(
a.getsumpt01() -
b.getsumpt01() ) > DELTA )
204 if( std::abs(
a.getsumpt02() -
b.getsumpt02() ) > DELTA )
206 if( std::abs(
a.getsumpt03() -
b.getsumpt03() ) > DELTA )
208 if( std::abs(
a.getsumpt04() -
b.getsumpt04() ) > DELTA )
210 if( std::abs(
a.getPtMuID() -
b.getPtMuID() ) > DELTA )
212 if( std::abs(
a.getMaxPtID() -
b.getMaxPtID() ) > DELTA )
214 if(
a.getFlag() !=
b.getFlag() )
216 if(
a.getRoiIdMu() !=
b.getRoiIdMu() )
218 if( std::abs(
a.pt() -
b.pt() ) > DELTA )
220 if( std::abs(
a.getQMu() -
b.getQMu() ) > DELTA )
222 if( std::abs(
a.getEtaMu() -
b.getEtaMu() ) > DELTA )
224 if( std::abs(
a.getPhiMu() -
b.getPhiMu() ) > DELTA )
◆ str()
Helper function for printing the object.
Definition at line 164 of file IsoMuonFeature.cxx.
165 std::stringstream
ss;
166 ss <<
"sumet01: " <<
d.getsumet01()
167 <<
"; sumet02: " <<
d.getsumet02()
168 <<
"; sumet03: " <<
d.getsumet03()
169 <<
"; sumet04: " <<
d.getsumet04()
170 <<
"; sumpt01: " <<
d.getsumpt01()
171 <<
"; sumpt02: " <<
d.getsumpt02()
172 <<
"; sumpt03: " <<
d.getsumpt03()
173 <<
"; sumpt04: " <<
d.getsumpt04()
174 <<
"; PtMuID: " <<
d.getPtMuID()
175 <<
"; MaxPtID: " <<
d.getMaxPtID()
176 <<
"; flag: " <<
d.getFlag()
177 <<
"; RoiIdMu: " <<
d.getRoiIdMu()
178 <<
"; RoiIdMu: " <<
d.getRoiIdMu()
179 <<
"; PtMu: " <<
d.pt()
180 <<
"; QMu: " <<
d.getQMu()
181 <<
"; EtaMu: " <<
d.getEtaMu()
182 <<
"; PhiMu: " <<
d.getPhiMu();