a Code for the Combination of Indirect and Direct Constraints on High Energy Physics Models Logo
PseudorapidityCut.hpp
Go to the documentation of this file.
1/*
2 * PseudorapidityCut.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 PSEUDORAPIDITYCUT_HPP_
15#define PSEUDORAPIDITYCUT_HPP_
16
17#include "../FilterRule.hpp"
18
19namespace LHPC
20{
21 namespace LHEF
22 {
23 namespace FilterRuleClass
24 {
25 // this class returns acceptRatherThanReject if it finds that
26 // lineToCheck.getPseudorapidity() is outside the given range.
28 {
29 public:
31 double const maximumPseudorapidity,
32 bool const acceptRatherThanReject = true );
33 PseudorapidityCut( double const absoluteMaximumPseudorapidity,
34 bool const acceptRatherThanReject = true );
35 virtual
37
38 virtual bool
39 operator()( ParticleLine const& lineToCheck ) const;
40
41
42 protected:
45 };
46
47
48
49 inline bool
50 PseudorapidityCut::operator()( ParticleLine const& lineToCheck ) const
51 {
52 double linePseudorapidity( lineToCheck.getPseudorapidity() );
53 if( ( minimumPseudorapidity <= linePseudorapidity )
54 &&
55 ( maximumPseudorapidity >= linePseudorapidity ) )
56 {
58 }
59 else
60 {
62 }
63 }
64
65 }
67
68 }
69
70}
71
72#endif /* PSEUDORAPIDITYCUT_HPP_ */
virtual bool operator()(ParticleLine const &lineToCheck) const
PseudorapidityCut(double const minimumPseudorapidity, double const maximumPseudorapidity, bool const acceptRatherThanReject=true)
bool const acceptRatherThanReject
Definition: FilterRule.hpp:36
double getPseudorapidity() const
FilterRuleClass::PseudorapidityCut FilterOnPseudorapidity