master
a Code for the Combination of Indirect and Direct Constraints on High Energy Physics Models
TransverseMomentumCut.hpp
Go to the documentation of this file.
1
/*
2
* TransverseMomentumCut.hpp
3
*
4
* Created on: Jan 26, 2012
5
* Author: Ben O'Leary (benjamin.oleary@gmail.com)
6
* Copyright 2012 Ben O'Leary
7
*
8
* This file is part of LesHouchesParserClasses, released under the
9
* GNU General Public License. Please see the accompanying
10
* README.LHPC_CPP.txt file for a full list of files, brief documentation
11
* on how to use these classes, and further details on the license.
12
*/
13
14
#ifndef TRANSVERSEMOMENTUMCUT_HPP_
15
#define TRANSVERSEMOMENTUMCUT_HPP_
16
17
#include "../FilterRule.hpp"
18
19
namespace
LHPC
20
{
21
namespace
LHEF
22
{
23
namespace
FilterRuleClass
24
{
25
// this class returns acceptRatherThanReject if it finds that the
26
// transverse momentum from lineToCheck is less than momentumCut.
27
class
TransverseMomentumCut
:
public
FilterRule
28
{
29
public
:
30
TransverseMomentumCut
(
double
const
momentumCut,
31
bool
const
acceptRatherThanReject
=
true
);
32
virtual
33
~TransverseMomentumCut
();
34
35
virtual
bool
36
operator()
(
ParticleLine
const
& lineToCheck )
const
;
37
38
39
protected
:
40
double
momentumCutSquared
;
41
};
42
43
44
45
inline
bool
46
TransverseMomentumCut::operator()
(
47
ParticleLine
const
& lineToCheck )
const
48
{
49
if
(
momentumCutSquared
<= lineToCheck.
getTransverseMomentumSquared
() )
50
{
51
return
acceptRatherThanReject
;
52
}
53
else
54
{
55
return
!
acceptRatherThanReject
;
56
}
57
}
58
59
}
60
typedef
FilterRuleClass::TransverseMomentumCut
FilterOnTransverseMomentum
;
61
62
}
63
64
}
65
66
#endif
/* TRANSVERSEMOMENTUMCUT_HPP_ */
LHPC::LHEF::FilterRuleClass::TransverseMomentumCut
Definition:
TransverseMomentumCut.hpp:28
LHPC::LHEF::FilterRuleClass::TransverseMomentumCut::~TransverseMomentumCut
virtual ~TransverseMomentumCut()
Definition:
TransverseMomentumCut.cpp:30
LHPC::LHEF::FilterRuleClass::TransverseMomentumCut::momentumCutSquared
double momentumCutSquared
Definition:
TransverseMomentumCut.hpp:40
LHPC::LHEF::FilterRuleClass::TransverseMomentumCut::TransverseMomentumCut
TransverseMomentumCut(double const momentumCut, bool const acceptRatherThanReject=true)
Definition:
TransverseMomentumCut.cpp:22
LHPC::LHEF::FilterRuleClass::TransverseMomentumCut::operator()
virtual bool operator()(ParticleLine const &lineToCheck) const
Definition:
TransverseMomentumCut.hpp:46
LHPC::LHEF::FilterRule
Definition:
FilterRule.hpp:26
LHPC::LHEF::FilterRule::acceptRatherThanReject
bool const acceptRatherThanReject
Definition:
FilterRule.hpp:36
LHPC::LHEF::ParticleLine
Definition:
ParticleLine.hpp:30
LHPC::LHEF::ParticleLine::getTransverseMomentumSquared
double getTransverseMomentumSquared() const
Definition:
ParticleLine.hpp:427
LHPC::LHEF::FilterOnTransverseMomentum
FilterRuleClass::TransverseMomentumCut FilterOnTransverseMomentum
Definition:
TransverseMomentumCut.hpp:60
LHPC
Definition:
FourMomentum.hpp:24
LHPC
include
LHEF
FilterRuleClasses
TransverseMomentumCut.hpp
Generated on Mon Aug 4 2025 for $\texttt{HEPfit}$ using
1.9.2