ATLAS Offline Software
Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 
3 /*
4  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 
26 #ifndef TRIG_PHOTON
27 #define TRIG_PHOTON
28 
29 #include <vector>
30 #include <iostream>
31 #include <string>
32 
33 #include "FourMom/P4PtEtaPhiM.h"
34 #include "Navigation/Navigable.h"
36 
37 #include "AthLinks/ElementLink.h"
38 
40 
41 
42 class TrigPhoton : public P4PtEtaPhiM,
43  public NavigableTerminalNode ,
44  virtual public INavigable4Momentum {
45 
46  public:
47 
49  TrigPhoton();
50 
51  // Oct. 2009 - Valerio Dao replace previous constructor to set dEta and dPhi
52  //TrigPhoton(int roi,
53  // const TrigEMClusterContainer* cluster_cont,
54  // unsigned int cluster_index );
55 
56 
57  TrigPhoton(int roi, float dphi, float deta,
58  const TrigEMClusterContainer* cluster_cont,
59  unsigned int cluster_index );
60 
62  TrigPhoton(float pt,
63  float eta,
64  float phi,
65 
66  // roi word
67  unsigned int roi,
68  bool valid,
69 
70  // Cluster
72  float HadEt,
73  float energyRatio,
74  float rCore,
75  float deta,
76  float dphi,
77  float Fside,
78  float Weta2,
79  float F0,
80  float F1,
81  float F2,
82  float F3);
83 
84 
85 
86  TrigPhoton(const TrigPhoton& te);
87 
88  TrigPhoton& operator=(const TrigPhoton& te) = default;
89 
90  ~TrigPhoton() = default;
91 
92  void validate(bool v) { m_valid = v; } // OBSOLETE!: to disappear in next iteration
93  bool isValid() const { return m_valid; }
94 
96  int roiId() const { return m_roiID; }// OBSOLETE!: to disappear in next iteration
97  int roiWord() const { return m_roiID; }
98 
100  float Et() const { return this->pt(); }// OBSOLETE!: to disappear in next iteration
101 
103  float HadEt() const { return m_HadEt; }// OBSOLETE!: to disappear in next iteration
104  float HadEt1() const { return m_HadEt; }
105 
107  float energyRatio() const { return m_energyRatio; }// OBSOLETE!: to disappear in next iteration
108  float Eratio() const { return m_energyRatio; }
109 
111  float rCore() const { return m_rCore; }// OBSOLETE!: to disappear in next iteration
112  float Reta() const { return m_rCore; }
113 
116  float Fside() const { return m_Fside; }
117 
119  float Weta2() const { return m_Weta2; }
120 
122  float dPhi() const { return m_dPhi; }
123 
125  float dEta() const { return m_dEta; }
126 
128  // float E() const;
129  float F0() const { return m_cl_e_frac_S0; }
130  float F1() const { return m_cl_e_frac_S1; }
131  float F2() const { return m_cl_e_frac_S2; }
132  float F3() const { return m_cl_e_frac_S2; }
133 
137  const TrigEMCluster* cluster() const;
139  { return m_cluster; }
140 
141  private:
142  // private data members
143  int m_roiID;
144  float m_HadEt;
146  float m_rCore;
147  float m_dPhi;
148  float m_dEta;
149  // float m_cl_energy;
150  float m_cl_e_frac_S0; // Calibrated energy per-sampling
154  float m_Fside; // fracs1 from TrigEMCluster
155  float m_Weta2; // weta2 from TrigEMCluster
156  bool m_valid;
157 
159 
160 };
161 
163 bool operator==( const TrigPhoton& tp1, const TrigPhoton& tp2 );
164 
165 inline bool operator!=( const TrigPhoton& tp1, const TrigPhoton& tp2 ) {
166  return !( tp1 == tp2 );
167 }
168 
169 void diff( const TrigPhoton& tp1, const TrigPhoton& tp2, std::map<std::string, double>& v_diff );
170 
172 MsgStream& operator<< ( MsgStream& msg, const TrigPhoton& tp );
173 
174 CLASS_DEF( TrigPhoton , 203968502 , 1 )
175 
176 #endif // TRIG_PHOTON
TrigPhoton::Fside
float Fside() const
energy in a 7 strips (around hottest strip) minus energy in 3 strips divided by energy in 3 strips
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h:116
TrigPhoton::m_cl_e_frac_S0
float m_cl_e_frac_S0
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h:150
TrigPhoton::m_cl_e_frac_S2
float m_cl_e_frac_S2
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h:152
TrigPhoton::Et
float Et() const
accessor EM cluster et
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h:100
TrigPhoton::F0
float F0() const
accessors for calibrated energy and energy fraction in calo samples
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h:129
TrigPhoton::m_Weta2
float m_Weta2
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h:155
INavigable4Momentum.h
TrigPhoton::roiId
int roiId() const
accessor to get RoI ID (should also introduce roiWord
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h:96
TrigEMClusterContainer.h
TrigPhoton::m_dPhi
float m_dPhi
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h:147
TrigPhoton::m_energyRatio
float m_energyRatio
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h:145
NavigableTerminalNode
Dummy type needed fro specialized implementation.
Definition: NavigableTerminalNode.h:19
ParticleTest.tp
tp
Definition: ParticleTest.py:25
TrigPhoton::m_roiID
int m_roiID
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h:143
TrigEMCluster
Class with calibrated variables for egamma clustering.
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigEMCluster.h:31
TrigPhoton::m_cl_e_frac_S3
float m_cl_e_frac_S3
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h:153
TrigEMClusterContainer
Container from TrigEMCluster type objects.
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigEMClusterContainer.h:32
TrigPhoton::m_cluster
ElementLink< TrigEMClusterContainer > m_cluster
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h:158
TrigPhoton::dPhi
float dPhi() const
accessor for difference between cluster and Roi phi
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h:122
calibdata.valid
list valid
Definition: calibdata.py:45
P4PtEtaPhiM::phi
virtual double phi() const
get phi data member
Definition: P4PtEtaPhiM.h:109
TrigPhoton::F1
float F1() const
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h:130
TrigPhoton::roiWord
int roiWord() const
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h:97
TrigPhoton::m_dEta
float m_dEta
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h:148
TrigPhoton::Eratio
float Eratio() const
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h:108
TrigPhoton::F2
float F2() const
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h:131
TrigPhoton::~TrigPhoton
~TrigPhoton()=default
TrigPhoton::m_cl_e_frac_S1
float m_cl_e_frac_S1
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h:151
TrigPhoton::dEta
float dEta() const
accessor for difference between cluster and Roi eta
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h:125
TrigPhoton::m_Fside
float m_Fside
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h:154
TrigPhoton::m_rCore
float m_rCore
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h:146
TrigPhoton::HadEt
float HadEt() const
accessor for hadronic energy in 1st hadronic sampling behind cluster
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h:103
operator!=
bool operator!=(const TrigPhoton &tp1, const TrigPhoton &tp2)
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h:165
TrigPhoton::validate
void validate(bool v)
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h:92
P4PtEtaPhiM::pt
virtual double pt() const
get pt data member
Definition: P4PtEtaPhiM.h:103
operator==
bool operator==(const TrigPhoton &tp1, const TrigPhoton &tp2)
comparison operators
Definition: TrigPhoton.cxx:250
TrigPhoton::m_HadEt
float m_HadEt
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h:144
TrigPhoton::TrigPhoton
TrigPhoton()
constructors; note: default constructor needed by POOL
Definition: TrigPhoton.cxx:31
TrigPhoton::F3
float F3() const
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h:132
TrigPhoton::HadEt1
float HadEt1() const
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h:104
P4PtEtaPhiM::eta
virtual double eta() const
get eta data member
Definition: P4PtEtaPhiM.h:106
TrigPhoton::cluster
const TrigEMCluster * cluster() const
other accessors for shower shapes
Definition: TrigPhoton.cxx:237
TrigPhoton::m_valid
bool m_valid
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h:156
python.PyAthena.v
v
Definition: PyAthena.py:154
TrigPhoton::clusterLink
const ElementLink< TrigEMClusterContainer > & clusterLink() const
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h:138
operator<<
MsgStream & operator<<(MsgStream &msg, const TrigPhoton &tp)
overloaded << opetrator to print TrigPhoton quantities
Definition: TrigPhoton.cxx:284
Navigable.h
TrigPhoton::isValid
bool isValid() const
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h:93
P4PtEtaPhiM.h
TrigPhoton::energyRatio
float energyRatio() const
accessor for fraction difference of EM cluster emaxs1 and e2tsts1
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h:107
INavigable4Momentum
Definition: INavigable4Momentum.h:21
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:64
TrigPhoton::rCore
float rCore() const
cluster energy in 3x7 cells / energy in 7x7 cells in 2nd sampling
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h:111
TrigPhoton::operator=
TrigPhoton & operator=(const TrigPhoton &te)=default
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 varai...
Definition: TrigPhoton.cxx:260
TrigPhoton::Weta2
float Weta2() const
cluster width (based on a 3x5 cluster - 2nd layer)
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h:119
P4PtEtaPhiM
Definition: P4PtEtaPhiM.h:25
TrigPhoton
File: TrigPhoton.h.
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h:44
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
TrigPhoton::Reta
float Reta() const
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h:112