#include "CaloGeoHelpers/CaloSampling.h"
#include "TrigParticle/TrigPhoton.h"
Go to the source code of this file.
|
| bool | operator== (const TrigPhoton &tp1, const TrigPhoton &tp2) |
| | Two TrigPhoton are the same if they have the same cluster (and if valid)
|
| void | diff (const TrigPhoton &tp1, const TrigPhoton &tp2, std::map< std::string, double > &v_diff) |
| | Function compares two objects and returns "semi verbose" output in the form of map v_diff where varaible names and relative differences between two objects are returned.
|
| MsgStream & | operator<< (MsgStream &msg, const TrigPhoton &tp) |
| | print TrigPhoton quantities
|
◆ diff()
| void diff |
( |
const TrigPhoton & | tp1, |
|
|
const TrigPhoton & | tp2, |
|
|
std::map< std::string, double > & | v_diff ) |
Function compares two objects and returns "semi verbose" output in the form of map v_diff where varaible names and relative differences between two objects are returned.
Definition at line 260 of file TrigPhoton.cxx.
260 {
261
262 v_diff[
"RoIword"] = tp1.
roiId() - tp2.
roiId();
263 v_diff["Et"] = 0;
264 if(fabs(tp1.
Et())+fabs(tp2.
Et()) !=0)
265 v_diff[
"Et"] = 2 * fabs( ( fabs(tp1.
Et()) - fabs(tp2.
Et() )) / ( fabs(tp1.
Et())+fabs(tp2.
Et()) ) );
266 v_diff["HadEt1"] = 0;
268 v_diff[
"HadEt1"] = 2 * fabs( ( fabs(tp1.
HadEt1()) - fabs(tp2.
HadEt1() )) / ( fabs(tp1.
HadEt1())+fabs(tp2.
HadEt1()) ) );
270 v_diff[
"rCore"] = fabs(tp1.
Reta() - tp2.
Reta());
271 v_diff[
"Eta"] = fabs( tp1.
eta() - tp2.
eta() );
272 double d_phi = fabs( tp1.
phi() - tp2.
phi() );
273 v_diff[
"Phi"] = (d_phi <
M_PI ? d_phi : 2*
M_PI - d_phi);
274
275 v_diff[
"F0"] = fabs(tp1.
F0() - tp2.
F0());
276 v_diff[
"F1"] = fabs(tp1.
F1() - tp2.
F1());
277 v_diff[
"F2"] = fabs(tp1.
F2() - tp2.
F2());
278 v_diff[
"F3"] = fabs(tp1.
F3() - tp2.
F3());
279 return;
280}
virtual double eta() const
get eta data member
virtual double phi() const
get phi data member
float F0() const
accessors for calibrated energy and energy fraction in calo samples
int roiId() const
accessor to get RoI ID (should also introduce roiWord
float Et() const
accessor EM cluster et
◆ operator<<()
| MsgStream & operator<< |
( |
MsgStream & | msg, |
|
|
const TrigPhoton & | tp ) |
print TrigPhoton quantities
overloaded << opetrator to print TrigPhoton quantities
Definition at line 284 of file TrigPhoton.cxx.
284 {
285 return (
msg <<
"TrigPhoton " << (tp.
isValid() ?
"(valid)" :
"(not valid)")
287 <<
"; Et = " << tp.
Et()
288 <<
"; eta = " << tp.
eta()
289 <<
"; phi = " << tp.
phi()
290 <<
"; Delta_eta = " << tp.
dEta() <<
"; Delta_phi = " << tp.
dPhi()
291 <<
"; Eratio = " << tp.
Eratio() <<
"; Rcore = " << tp.
Reta()
292
293 <<
"; F0 = "<<tp.
F0()<<
"; F1 = "<<tp.
F1()<<
"; F2 = "<<tp.
F2()<<
"; F3 = "<<tp.
F3() );
294}
float dEta() const
accessor for difference between cluster and Roi eta
float dPhi() const
accessor for difference between cluster and Roi phi
◆ operator==()
Two TrigPhoton are the same if they have the same cluster (and if valid)
comparison operators
Definition at line 250 of file TrigPhoton.cxx.
250 {
252}
const TrigEMCluster * cluster() const
other accessors for shower shapes