ATLAS Offline Software
Loading...
Searching...
No Matches
TrigPhoton.h File Reference
#include <vector>
#include <iostream>
#include <string>
#include "FourMom/P4PtEtaPhiM.h"
#include "Navigation/Navigable.h"
#include "EventKernel/INavigable4Momentum.h"
#include "AthLinks/ElementLink.h"
#include "TrigCaloEvent/TrigEMClusterContainer.h"
Include dependency graph for Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  TrigPhoton
 File: TrigPhoton.h. More...

Functions

bool operator== (const TrigPhoton &tp1, const TrigPhoton &tp2)
 comparison operators
bool operator!= (const TrigPhoton &tp1, const TrigPhoton &tp2)
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)
 overloaded << opetrator to print TrigPhoton quantities

Function Documentation

◆ 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;
267 if(fabs(tp1.HadEt1())+fabs(tp2.HadEt1()) !=0)
268 v_diff["HadEt1"] = 2 * fabs( ( fabs(tp1.HadEt1()) - fabs(tp2.HadEt1() )) / ( fabs(tp1.HadEt1())+fabs(tp2.HadEt1()) ) );
269 v_diff["Eratio"] = fabs(tp1.Eratio() - tp2.Eratio());
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 // v_diff["E"] = fabs(tp1.E() - tp2.E());
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}
#define M_PI
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

◆ operator!=()

bool operator!= ( const TrigPhoton & tp1,
const TrigPhoton & tp2 )
inline

Definition at line 165 of file Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h.

165 {
166 return !( tp1 == tp2 );
167}

◆ operator<<()

MsgStream & operator<< ( MsgStream & msg,
const TrigPhoton & tp )

overloaded << opetrator to 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)")
286 << ": RoI = " << tp.roiWord()
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 // << "; E = "<<tp.E()
293 <<"; F0 = "<<tp.F0()<<"; F1 = "<<tp.F1()<<"; F2 = "<<tp.F2()<<"; F3 = "<<tp.F3() );
294}
MsgStream & msg
Definition testRead.cxx:32

◆ operator==()

bool operator== ( const TrigPhoton & tp1,
const TrigPhoton & tp2 )

comparison operators

comparison operators

Definition at line 250 of file TrigPhoton.cxx.

250 {
251 return ( tp1.isValid() && tp2.isValid() && tp1.cluster() == tp2.cluster());
252}
const TrigEMCluster * cluster() const
other accessors for shower shapes