ATLAS Offline Software
TFCSParametrization.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 #include <TClass.h>
7 
8 //=============================================
9 //======= TFCSParametrization =========
10 //=============================================
11 
13  : TFCSParametrizationBase(name, title), m_Ekin_nominal(init_Ekin_nominal),
14  m_Ekin_min(init_Ekin_min), m_Ekin_max(init_Ekin_max),
15  m_eta_nominal(init_eta_nominal), m_eta_min(init_eta_min),
16  m_eta_max(init_eta_max) {}
17 
19  m_pdgid.clear();
26 }
27 
29  m_pdgid.clear();
30  m_pdgid.insert(id);
31 }
32 
33 void TFCSParametrization::set_pdgid(const std::set<int> &ids) { m_pdgid = ids; }
34 
35 void TFCSParametrization::add_pdgid(int id) { m_pdgid.insert(id); }
36 
38 
40  m_Ekin_nominal = nominal;
41 }
42 
44 
46 
48  m_eta_nominal = nominal;
49 }
50 
52 
54 
56  set_Ekin_nominal(ref.Ekin_nominal());
57  set_Ekin_min(ref.Ekin_min());
58  set_Ekin_max(ref.Ekin_max());
59 }
60 
62  set_eta_nominal(ref.eta_nominal());
63  set_eta_min(ref.eta_min());
64  set_eta_max(ref.eta_max());
65 }
66 
68  set_Ekin(ref);
69  set_eta(ref);
70 }
71 
75  set_pdgid(ref.pdgid());
76 }
77 
79  if (IsA() != ref.IsA()) {
80  ATH_MSG_DEBUG("compare(): different class types "
81  << IsA()->GetName() << " != " << ref.IsA()->GetName());
82  return false;
83  }
84  std::string name(GetName());
85  if (name != ref.GetName()) {
86  ATH_MSG_DEBUG("compare(): different names " << GetName()
87  << " != " << ref.GetName());
88  return false;
89  }
90  std::string title(GetTitle());
91  if (title != ref.GetTitle()) {
92  ATH_MSG_DEBUG("compare(): different titles " << GetTitle()
93  << " != " << ref.GetTitle());
94  return false;
95  }
96  if (is_match_all_pdgid() != ref.is_match_all_pdgid() ||
97  pdgid() != ref.pdgid()) {
98  ATH_MSG_DEBUG("compare(): different pdgids");
99  return false;
100  }
101  if (Ekin_nominal() != ref.Ekin_nominal() || Ekin_min() != ref.Ekin_min() ||
102  Ekin_max() != ref.Ekin_max()) {
103  ATH_MSG_DEBUG("compare(): different Ekin range");
104  return false;
105  }
106  if (eta_nominal() != ref.eta_nominal() || eta_min() != ref.eta_min() ||
107  eta_max() != ref.eta_max()) {
108  ATH_MSG_DEBUG("compare(): different eta range");
109  return false;
110  }
111 
112  return true;
113 }
TFCSParametrization::set_Ekin_nominal
virtual void set_Ekin_nominal(double min)
Definition: TFCSParametrization.cxx:39
TFCSParametrization::pdgid
const std::set< int > & pdgid() const override
Definition: TFCSParametrization.h:34
TFCSParametrization::compare
bool compare(const TFCSParametrizationBase &ref) const
Definition: TFCSParametrization.cxx:78
TFCSParametrizationBase::init_Ekin_max
static constexpr double init_Ekin_max
Do not persistify!
Definition: TFCSParametrizationBase.h:155
TFCSParametrizationBase::init_eta_nominal
static constexpr double init_eta_nominal
Do not persistify!
Definition: TFCSParametrizationBase.h:156
TFCSParametrizationBase::init_Ekin_min
static constexpr double init_Ekin_min
Do not persistify!
Definition: TFCSParametrizationBase.h:154
IsA
#define IsA
Declare the TObject style functions.
Definition: xAODTEventBranch.h:59
TFCSParametrization::Ekin_max
double Ekin_max() const override
Definition: TFCSParametrization.h:37
TFCSParametrizationBase::is_match_all_pdgid
virtual bool is_match_all_pdgid() const
Definition: TFCSParametrizationBase.h:66
TFCSParametrizationBase::init_eta_min
static constexpr double init_eta_min
Do not persistify!
Definition: TFCSParametrizationBase.h:157
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
TFCSParametrization::add_pdgid
virtual void add_pdgid(int id)
Definition: TFCSParametrization.cxx:35
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
TFCSParametrization::set_pdgid_Ekin_eta
virtual void set_pdgid_Ekin_eta(const TFCSParametrizationBase &ref)
Definition: TFCSParametrization.cxx:72
TFCSParametrization::m_eta_nominal
double m_eta_nominal
Definition: TFCSParametrization.h:65
TFCSParametrization::set_Ekin_max
virtual void set_Ekin_max(double max)
Definition: TFCSParametrization.cxx:45
TFCSParametrizationBase::init_eta_max
static constexpr double init_eta_max
Do not persistify!
Definition: TFCSParametrizationBase.h:158
TFCSParametrization::eta_nominal
double eta_nominal() const override
Definition: TFCSParametrization.h:38
TFCSParametrization::m_eta_max
double m_eta_max
Definition: TFCSParametrization.h:65
TFCSParametrization::set_Ekin
virtual void set_Ekin(const TFCSParametrizationBase &ref)
Definition: TFCSParametrization.cxx:55
TFCSParametrization::set_eta
virtual void set_eta(const TFCSParametrizationBase &ref)
Definition: TFCSParametrization.cxx:61
TFCSParametrization::set_eta_max
virtual void set_eta_max(double max)
Definition: TFCSParametrization.cxx:53
TFCSParametrization::set_pdgid
virtual void set_pdgid(int id)
Definition: TFCSParametrization.cxx:28
TFCSParametrization::set_Ekin_eta
virtual void set_Ekin_eta(const TFCSParametrizationBase &ref)
Definition: TFCSParametrization.cxx:67
TFCSParametrizationBase
Definition: TFCSParametrizationBase.h:46
TFCSParametrization::set_Ekin_min
virtual void set_Ekin_min(double min)
Definition: TFCSParametrization.cxx:43
TFCSParametrization.h
TFCSParametrization::TFCSParametrization
TFCSParametrization(const char *name=nullptr, const char *title=nullptr)
Definition: TFCSParametrization.cxx:12
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
TFCSParametrization::clear_pdgid
virtual void clear_pdgid()
Definition: TFCSParametrization.cxx:37
covarianceTool.title
title
Definition: covarianceTool.py:542
TFCSParametrization::m_Ekin_min
double m_Ekin_min
Definition: TFCSParametrization.h:64
TFCSParametrization::Ekin_min
double Ekin_min() const override
Definition: TFCSParametrization.h:36
TFCSParametrization::m_eta_min
double m_eta_min
Definition: TFCSParametrization.h:65
TFCSParametrization::eta_max
double eta_max() const override
Definition: TFCSParametrization.h:40
TFCSParametrization::m_Ekin_nominal
double m_Ekin_nominal
Definition: TFCSParametrization.h:64
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
TFCSParametrization::eta_min
double eta_min() const override
Definition: TFCSParametrization.h:39
TFCSParametrization::m_pdgid
std::set< int > m_pdgid
Definition: TFCSParametrization.h:63
python.subdetectors.mmg.ids
ids
Definition: mmg.py:8
TFCSParametrization::set_eta_nominal
virtual void set_eta_nominal(double min)
Definition: TFCSParametrization.cxx:47
TFCSParametrization::clear
void clear()
Definition: TFCSParametrization.cxx:18
TFCSParametrizationBase::init_Ekin_nominal
static constexpr double init_Ekin_nominal
Definition: TFCSParametrizationBase.h:153
ref
const boost::regex ref(r_ef)
TFCSParametrization::Ekin_nominal
double Ekin_nominal() const override
Definition: TFCSParametrization.h:35
TFCSParametrization::set_eta_min
virtual void set_eta_min(double min)
Definition: TFCSParametrization.cxx:51
TFCSParametrization::m_Ekin_max
double m_Ekin_max
Definition: TFCSParametrization.h:64