ATLAS Offline Software
TFCSLateralShapeParametrization.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
7 #include <TClass.h>
8 
9 //=============================================
10 //======= TFCSLateralShapeParametrization =========
11 //=============================================
12 
14  const char *name, const char *title)
15  : TFCSParametrization(name, title), m_Ekin_bin(-1), m_calosample(-1) {}
16 
18  m_Ekin_bin = bin;
19 }
20 
22  m_calosample = cs;
23 }
24 
27  set_calosample(ref.calosample());
28  set_Ekin_bin(ref.Ekin_bin());
30 }
31 
33  const TFCSParametrizationBase &ref) const {
34  if (IsA() != ref.IsA()) {
35  ATH_MSG_DEBUG("compare(): different class types "
36  << IsA()->GetName() << " != " << ref.IsA()->GetName());
37  return false;
38  }
39  const TFCSLateralShapeParametrization &ref_typed =
40  static_cast<const TFCSLateralShapeParametrization &>(ref);
41  if (Ekin_bin() != ref_typed.Ekin_bin()) {
42  ATH_MSG_DEBUG("compare(): different Ekin bin");
43  return false;
44  }
45  if (calosample() != ref_typed.calosample()) {
46  ATH_MSG_DEBUG("compare(): different calosample");
47  return false;
48  }
49 
50  return true;
51 }
52 
53 void TFCSLateralShapeParametrization::Print(Option_t *option) const {
54  TString opt(option);
55  bool shortprint = opt.Index("short") >= 0;
56  bool longprint = msgLvl(MSG::DEBUG) || (msgLvl(MSG::INFO) && !shortprint);
57  TString optprint = opt;
58  optprint.ReplaceAll("short", "");
60  if (longprint) {
61  if (Ekin_bin() == -1)
62  ATH_MSG_INFO(optprint << " Ekin_bin=all ; calosample=" << calosample());
63  else
64  ATH_MSG_INFO(optprint << " Ekin_bin=" << Ekin_bin()
65  << " ; calosample=" << calosample());
66  }
67 }
TFCSLateralShapeParametrization::set_pdgid_Ekin_eta_Ekin_bin_calosample
virtual void set_pdgid_Ekin_eta_Ekin_bin_calosample(const TFCSLateralShapeParametrization &ref)
Definition: TFCSLateralShapeParametrization.cxx:25
IsA
#define IsA
Declare the TObject style functions.
Definition: xAODTEventBranch.h:59
TFCSLateralShapeParametrization::Ekin_bin
int Ekin_bin() const
Definition: TFCSLateralShapeParametrization.h:31
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
make_coralServer_rep.opt
opt
Definition: make_coralServer_rep.py:19
TFCSLateralShapeParametrization::m_Ekin_bin
int m_Ekin_bin
Definition: TFCSLateralShapeParametrization.h:46
TFCSParametrization::set_pdgid_Ekin_eta
virtual void set_pdgid_Ekin_eta(const TFCSParametrizationBase &ref)
Definition: TFCSParametrization.cxx:72
TFCSLateralShapeParametrization::Print
void Print(Option_t *option="") const override
Definition: TFCSLateralShapeParametrization.cxx:53
bin
Definition: BinsDiffFromStripMedian.h:43
TFCSLateralShapeParametrization::TFCSLateralShapeParametrization
TFCSLateralShapeParametrization(const char *name=nullptr, const char *title=nullptr)
Definition: TFCSLateralShapeParametrization.cxx:13
TFCSParametrizationBase
Definition: TFCSParametrizationBase.h:46
TFCSLateralShapeParametrization::set_calosample
void set_calosample(int cs)
Definition: TFCSLateralShapeParametrization.cxx:21
TFCSLateralShapeParametrization::set_Ekin_bin
void set_Ekin_bin(int bin)
Definition: TFCSLateralShapeParametrization.cxx:17
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
covarianceTool.title
title
Definition: covarianceTool.py:542
TFCSParametrizationBase::Print
void Print(Option_t *option="") const
Print object information.
Definition: TFCSParametrizationBase.cxx:52
TFCSLateralShapeParametrization.h
TFCSParametrization
Definition: TFCSParametrization.h:10
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
plotBeamSpotVxVal.bin
int bin
Definition: plotBeamSpotVxVal.py:83
TFCSLateralShapeParametrization::compare
bool compare(const TFCSParametrizationBase &ref) const
Definition: TFCSLateralShapeParametrization.cxx:32
TFCSLateralShapeParametrization::calosample
int calosample() const
Definition: TFCSLateralShapeParametrization.h:34
ref
const boost::regex ref(r_ef)
DEBUG
#define DEBUG
Definition: page_access.h:11
FastCaloSim_CaloCell_ID.h
TFCSLateralShapeParametrization
Definition: TFCSLateralShapeParametrization.h:10
TFCSLateralShapeParametrization::m_calosample
int m_calosample
Definition: TFCSLateralShapeParametrization.h:47
ISF_FCS::MLogging::msgLvl
bool msgLvl(const MSG::Level lvl) const
Check whether the logging system is active at the provided verbosity level.
Definition: MLogging.h:222