23#include "GaudiKernel/MsgStream.h"
29static const double DELTA = 0.001;
31static const double IDELTA = 0.00000001;
107 if (
this != &rhs ) {
108 P4IPtCotThPhiM::operator=( rhs );
147 std::stringstream
ss;
148 ss <<
" inverse pt: " << d.iPt()
149 <<
"; cot(theta): " << d.cotTh()
150 <<
"; phi: " << d.phi()
151 <<
"; mass: " << d.m()
152 <<
"; charge: " << d.charge()
153 <<
"; NCscHitsPhi: " << d.NCscHitsPhi()
154 <<
"; NCscHitsEta: " << d.NCscHitsEta()
155 <<
"; NTgcHitsPhi: " << d.NTgcHitsPhi()
156 <<
"; NTgcHitsEta: " << d.NTgcHitsEta()
157 <<
"; NRpcHitsPhi: " << d.NRpcHitsPhi()
158 <<
"; NRpcHitsEta: " << d.NRpcHitsEta()
159 <<
"; NMdtHits: " << d.NMdtHits();
166 return ( m <<
str( d ) );
171 if( std::abs(
a.charge() - b.charge() ) >
DELTA )
173 if( std::abs(
a.iPt() - b.iPt() ) >
IDELTA )
175 if( std::abs(
a.eta() - b.eta() ) >
DELTA )
177 if( std::abs(
a.phi() - b.phi() ) >
DELTA )
179 if( std::abs(
a.m() - b.m() ) >
DELTA )
181 if( std::abs(
a.d0() - b.d0() ) >
DELTA )
183 if( std::abs(
a.z0() - b.z0() ) >
DELTA )
185 if( std::abs(
a.chi2() - b.chi2() ) >
DELTA )
187 if( std::abs(
a.chi2prob() - b.chi2prob() ) >
DELTA )
189 if( std::abs(
a.posX() - b.posX() ) >
DELTA )
191 if( std::abs(
a.posY() - b.posY() ) >
DELTA )
193 if( std::abs(
a.posZ() - b.posZ() ) >
DELTA )
195 if(
a.NRpcHitsPhi() != b.NRpcHitsPhi() )
197 if(
a.NTgcHitsPhi() != b.NTgcHitsPhi() )
199 if(
a.NCscHitsPhi() != b.NCscHitsPhi() )
201 if(
a.NRpcHitsEta() != b.NRpcHitsEta() )
203 if(
a.NTgcHitsEta() != b.NTgcHitsEta() )
205 if(
a.NCscHitsEta() != b.NCscHitsEta() )
207 if(
a.NMdtHits() != b.NMdtHits() )
223 std::map< std::string, double >& variableChange ) {
225 if( std::abs(
a.charge() - b.charge() ) >
DELTA ) {
226 variableChange[
"Charge" ] =
a.charge() - b.charge();
228 if( std::abs(
a.iPt() - b.iPt() ) >
IDELTA ) {
229 variableChange[
"iPt" ] =
a.iPt() - b.iPt();
231 if( std::abs(
a.eta() - b.eta() ) >
DELTA ) {
232 variableChange[
"Eta" ] =
a.eta() - b.eta();
234 if( std::abs(
a.phi() - b.phi() ) >
DELTA ) {
235 variableChange[
"Phi" ] =
a.phi() - b.phi();
237 if( std::abs(
a.m() - b.m() ) >
DELTA ) {
238 variableChange[
"Mass" ] =
a.m() - b.m();
240 if( std::abs(
a.d0() - b.d0() ) >
DELTA ) {
241 variableChange[
"d0" ] =
a.d0() - b.d0();
243 if( std::abs(
a.z0() - b.z0() ) >
DELTA ) {
244 variableChange[
"z0" ] =
a.z0() - b.z0();
246 if( std::abs(
a.chi2() - b.chi2() ) >
DELTA ) {
247 variableChange[
"chi2" ] =
a.chi2() - b.chi2();
249 if( std::abs(
a.chi2prob() - b.chi2prob() ) >
DELTA ) {
250 variableChange[
"chi2prob" ] =
a.chi2prob() - b.chi2prob();
252 if( std::abs(
a.posX() - b.posX() ) >
DELTA ) {
253 variableChange[
"posX" ] =
a.posX() - b.posX();
255 if( std::abs(
a.posY() - b.posY() ) >
DELTA ) {
256 variableChange[
"posY" ] =
a.posY() - b.posY();
258 if( std::abs(
a.posZ() - b.posZ() ) >
DELTA ) {
259 variableChange[
"posZ" ] =
a.posZ() - b.posZ();
261 if(
a.NRpcHitsPhi() != b.NRpcHitsPhi() ) {
262 variableChange[
"NRpcHitsPhi" ] =
static_cast< double >(
a.NRpcHitsPhi() -
265 if(
a.NTgcHitsPhi() != b.NTgcHitsPhi() ) {
266 variableChange[
"NTgcHitsPhi" ] =
static_cast< double >(
a.NTgcHitsPhi() -
269 if(
a.NCscHitsPhi() != b.NCscHitsPhi() ) {
270 variableChange[
"NCscHitsPhi" ] =
static_cast< double >(
a.NCscHitsPhi() -
273 if(
a.NRpcHitsEta() != b.NRpcHitsEta() ) {
274 variableChange[
"NRpcHitsEta" ] =
static_cast< double >(
a.NRpcHitsEta() -
277 if(
a.NTgcHitsEta() != b.NTgcHitsEta() ) {
278 variableChange[
"NTgcHitsEta" ] =
static_cast< double >(
a.NTgcHitsEta() -
281 if(
a.NCscHitsEta() != b.NCscHitsEta() ) {
282 variableChange[
"NCscHitsEta" ] =
static_cast< double >(
a.NCscHitsEta() -
285 if(
a.NMdtHits() != b.NMdtHits() ) {
286 variableChange[
"NMdtHits" ] =
static_cast< double >(
a.NMdtHits() -
static const double DELTA
static const double IDELTA
MsgStream & operator<<(MsgStream &m, const TrigMuonEFTrack &d)
Helper operator for printing the object.
bool operator==(const TrigMuonEFTrack &a, const TrigMuonEFTrack &b)
Operator comparing two TrigMuonEFTrack objects for equality.
void diff(const TrigMuonEFTrack &a, const TrigMuonEFTrack &b, std::map< std::string, double > &variableChange)
Function compares two objects and returns "semi verbose" output in the form of map where there are va...
I4Momentum is an abstract base class providing 4-momentum behavior.
P4IPtCotThPhiMBase is a base class for classes with 4-momentum behavior, for which 1/Pt,...
P4IPtCotThPhiM(const double iPt, const double cotTh, const double phi, const double m)
constructor with all data members
virtual double cotTh() const
get cot(theta) data member
virtual double phi() const
get phi data member
virtual double iPt() const
get inverse pT data member
unsigned short int m_nMdtHitsEta
unsigned short int m_nRpcHitsPhi
unsigned short int m_nCscHitsEta
unsigned short int m_nMdtHitsPhi
TrigMuonEFTrack()
Default constructor.
void setPerigee(double iPt, double cotTh, double phi, double mass)
set data member
unsigned short int m_nMdtHits
TrigMuonEFTrack & operator=(const TrigMuonEFTrack &rhs)
Assignement operator.
unsigned short int m_nRpcHitsEta
~TrigMuonEFTrack()
Destructor.
unsigned short int m_nTgcHitsEta
static const int CHARGE_NA
unsigned short int m_nCscHitsPhi
unsigned short int m_nTgcHitsPhi