ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Event
FourMomUtils
src
ForwardTerm.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include <cmath>
6
#include "
FourMomUtils/ForwardTerm.h
"
7
8
// AthAnalysisBase/ManaCore doesn't currently include the Trigger Service
9
#ifndef XAOD_ANALYSIS
10
11
12
namespace
FourMomUtils
{
13
14
using
std::abs;
15
using
std::exp;
16
17
double
18
forwardTerm
(
const
I4MomIter_t
& iBeg,
19
const
I4MomIter_t
& iEnd,
20
double
central,
bool
useThreeD )
21
{
22
double
Q = 0;
23
double
suppressed = 0;
24
double
eta
= 0;
25
26
// determine average eta for event
27
for
(
I4MomIter_t
itr = iBeg; itr != iEnd; ++itr )
28
{
29
if
(abs((*itr)->eta())<central)
30
{
31
// default : standard definition of z component zero
32
double
z
=0;
33
if
(useThreeD)
34
z
=(*itr)->pz();
35
36
CLHEP::Hep3Vector c( (*itr)->px(), (*itr)->py(),
z
);
37
Q += c.mag();
38
eta
+= (*itr)->eta() * c.mag();
39
}
40
}
41
42
if
(Q <= 0)
43
return
0;
44
const
double
inv_Q = 1. / Q;
45
46
eta
*= inv_Q;
47
48
for
(
I4MomIter_t
itr = iBeg; itr != iEnd; ++itr )
49
{
50
if
(abs((*itr)->eta())>central)
51
{
52
// default : standard definition of z component zero
53
double
z
=0;
54
if
(useThreeD)
55
z
=(*itr)->pz();
56
57
CLHEP::Hep3Vector c( (*itr)->px(), (*itr)->py(),
z
);
58
suppressed += c.mag() * exp( -abs(
eta
- (*itr)->eta() ));
59
}
60
}
61
62
return
suppressed * inv_Q;
63
}
64
65
}
//> end namespace FourMomUtils
66
67
68
#endif
eta
Scalar eta() const
pseudorapidity method
Definition
AmgMatrixBasePlugin.h:83
ForwardTerm.h
z
#define z
FourMomUtils
Definition
ForwardTerm.h:14
FourMomUtils::I4MomIter_t
INavigable4MomentumCollection::const_iterator I4MomIter_t
Definition
ForwardTerm.h:16
FourMomUtils::forwardTerm
double forwardTerm(const I4MomIter_t &iBeg, const I4MomIter_t &iEnd, double m_central, bool useThreeD=false)
Definition
ForwardTerm.cxx:18
Generated on
for ATLAS Offline Software by
1.17.0