ATLAS Offline Software
Classes | Functions
Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h File Reference
#include <vector>
#include <iostream>
#include <string>
#include <cmath>
#include "FourMom/P4PtEtaPhiM.h"
#include "Navigation/Navigable.h"
#include "EventKernel/INavigable4Momentum.h"
#include "AthLinks/ElementLink.h"
#include "TrigCaloEvent/TrigEMClusterContainer.h"
#include "TrigInDetEvent/TrigInDetTrackCollection.h"

Go to the source code of this file.

Classes

class  TrigElectron
 File: TrigElectron.h. More...
 

Functions

bool operator== (const TrigElectron &te1, const TrigElectron &te2)
 Two TrigElectron are the same if they have the same cluster and the same track (and if valid, i.e. More...
 
bool operator!= (const TrigElectron &te1, const TrigElectron &te2)
 
void diff (const TrigElectron &te1, const TrigElectron &te2, 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. More...
 
MsgStream & operator<< (MsgStream &msg, const TrigElectron &te)
 

Function Documentation

◆ diff()

void diff ( const TrigElectron te1,
const TrigElectron te2,
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 327 of file TrigElectron.cxx.

327  {
328 
329  v_diff["RoI"] = te1.roiId() - te2.roiId();
330  v_diff["Charge"] = std::abs( te1.charge() - te2.charge() );
331  v_diff["Eta"] = fabs( te1.eta() - te2.eta() );
332  double d_phi = fabs( te1.phi() - te2.phi() );
333  v_diff["Phi"] = (d_phi < M_PI ? d_phi : 2*M_PI - d_phi);
334  v_diff["Pt"] = 2 * fabs( (fabs(te1.pt()) - fabs(te2.pt())) / (fabs(te1.pt())+fabs(te2.pt())) );
335  v_diff["Zvtx"] = fabs( te1.Zvtx() - te2.Zvtx() );
336  v_diff["trkEtaEtCalo"] = fabs( te1.trkEtaAtCalo() - te2.trkEtaAtCalo() );
337  double d_phi_extrapol = fabs( te1.trkPhiAtCalo() - te2.trkPhiAtCalo() );
338  v_diff["trkPhiEtCalo"] = (d_phi_extrapol < M_PI ? d_phi_extrapol : 2*M_PI - d_phi_extrapol);
339  v_diff["TRThits"] = abs(te1.nTRTHits() - te2.nTRTHits());
340  v_diff["TRThitsHiThres"] = abs(te1.nTRTHiThresholdHits() - te2.nTRTHiThresholdHits());
341  // v_diff["E"] = fabs(te1.E() - te2.E());
342  v_diff["F0"] = fabs(te1.F0() - te2.F0());
343  v_diff["F1"] = fabs(te1.F1() - te2.F1());
344  v_diff["F2"] = fabs(te1.F2() - te2.F2());
345  v_diff["F3"] = fabs(te1.F3() - te2.F3());
346 
347  return;
348 }

◆ operator!=()

bool operator!= ( const TrigElectron te1,
const TrigElectron te2 
)
inline

Definition at line 255 of file Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h.

255  {
256  return !( te1 == te2 );
257 }

◆ operator<<()

MsgStream& operator<< ( MsgStream &  msg,
const TrigElectron te 
)

Definition at line 352 of file TrigElectron.cxx.

352  {
353  return ( msg << "TrigElectron " << (te.isValid() ? "(valid)" : "(not valid)")
354  << ": RoI = " << te.roiId() << "; Q = " << te.charge()
355  << "; Et/Pt = " << te.EtOverPt() << "; Pt = " << te.pt()
356  << "; TRT hits = " << te.nTRTHits() << "; TRT HiThreshold hits = " << te.nTRTHiThresholdHits()
357  << "; trkPt = " << te.trkPt() << " +- " << te.err_Pt()
358  << "; eta = " << te.eta() << " +- " << te.err_eta()
359  << "; phi = " << te.phi() << " +- " << te.err_phi()
360  << "; Zvt = " << te.Zvtx() << " +- " << te.err_Zvtx()
361  << "; DeltaEta1 = " << te.DeltaEta1() << "; DeltaPhi2 = " << te.DeltaPhi2()
362  // << "; E = "<<te.E()
363  <<"; F0 = "<<te.F0()<<"; F1 = "<<te.F1()<<"; F2 = "<<te.F2()<<"; F3 = "<<te.F3() );
364 }

◆ operator==()

bool operator== ( const TrigElectron te1,
const TrigElectron te2 
)

Two TrigElectron are the same if they have the same cluster and the same track (and if valid, i.e.

well built)

Definition at line 316 of file TrigElectron.cxx.

316  {
317  return ( te1.isValid() && te2.isValid()
318  && te1.cluster() == te2.cluster() && te1.track() == te2.track());
319 }
TrigElectron::EtOverPt
float EtOverPt() const
accessor to ratio of cluster Et to track Pt
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h:159
TrigElectron::trkPt
float trkPt() const
accessor to get pT of electron candidate track
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h:133
TrigElectron::F3
float F3() const
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h:176
TrigElectron::trkPhiAtCalo
float trkPhiAtCalo() const
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h:147
TrigElectron::roiId
int roiId() const
accessor methods:
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h:114
M_PI
#define M_PI
Definition: ActiveFraction.h:11
TrigElectron::err_Pt
float err_Pt() const
accessors to get uncertainty in track parameters: Pt, eta, phi and Z of track perigee (Zvtx)
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h:139
TrigElectron::F1
float F1() const
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h:174
TrigElectron::trkEtaAtCalo
float trkEtaAtCalo() const
accessor to get eta and phi of electron candidate track extrapolated the calorimeter
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h:146
TrigElectron::cluster
const TrigEMCluster * cluster() const
accessor to get pointer to cluster (TrigEMCluster)
Definition: TrigElectron.cxx:292
P4PtEtaPhiM::phi
virtual double phi() const
get phi data member
Definition: P4PtEtaPhiM.h:109
TrigElectron::track
const TrigInDetTrack * track() const
accessor to get pointer to track (TrigInDetTrack)
Definition: TrigElectron.cxx:303
TrigElectron::err_Zvtx
float err_Zvtx() const
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h:143
TrigElectron::nTRTHits
int nTRTHits() const
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h:123
TrigElectron::F0
float F0() const
accessors for calibrated energy fractions in each sampling - to reject noise
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h:173
P4PtEtaPhiM::pt
virtual double pt() const
get pt data member
Definition: P4PtEtaPhiM.h:103
TrigElectron::Zvtx
float Zvtx() const
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h:122
TrigElectron::nTRTHiThresholdHits
int nTRTHiThresholdHits() const
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h:124
TrigElectron::err_eta
float err_eta() const
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h:141
TrigElectron::isValid
bool isValid() const
accessor to get TrigElectron valid flag
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h:118
TrigElectron::F2
float F2() const
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h:175
TrigElectron::DeltaPhi2
float DeltaPhi2() const
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h:154
P4PtEtaPhiM::eta
virtual double eta() const
get eta data member
Definition: P4PtEtaPhiM.h:106
TrigElectron::DeltaEta1
float DeltaEta1() const
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h:153
TrigElectron::err_phi
float err_phi() const
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h:142
TrigElectron::charge
int charge() const
accessor to return the track charge (sign of TrigInDetTrack pT)
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h:136
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7