ATLAS Offline Software
Loading...
Searching...
No Matches
MonitorTnPAlgorithm.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3
4 Author : B. Laforge (laforge@lpnhe.in2p3.fr)
5 4 May 2020
6*/
7
8
9#ifndef MonitorTnPAlgorithm_H
10#define MonitorTnPAlgorithm_H
11
15
16#include "xAODEgamma/Electron.h"
20
21#include <string>
22
24public:
25 MonitorTnPAlgorithm( const std::string& name, ISvcLocator* pSvcLocator );
26 virtual ~MonitorTnPAlgorithm() = default;
27 virtual StatusCode initialize() override;
28 StatusCode fillHistograms( const EventContext& ctx ) const override;
29 StatusCode fillElectronProbe(const xAOD::Electron *el, const bool isleading, const EventContext& ctx) const;
30 enum Regions : int { BARREL=0, CRACK, ENDCAP, FORWARD, NREGIONS };
31
32private:
33
34 SG::ReadHandleKey<xAOD::ElectronContainer> m_ParticleContainerKey {this, "ParticleContainerName", "Electrons", "Name of electron container" };
35 SG::ReadDecorHandleKeyArray<xAOD::ElectronContainer> m_ElectronIsolationKey {this, "ElectronIsolationKey", {"Electrons.ptcone20", "Electrons.topoetcone40"} };
36 Gaudi::Property<std::string> m_ParticlePrefix {this,"ParticlePrefix","electron","Name of the particle prefix to be used to define hists"};
37 Gaudi::Property<std::string> m_RecoName {this,"RecoName","LHLoose","Name of particle flavor in egamma reco"};
38 Gaudi::Property<std::string> m_TnPType {this,"TnPType","Z","Variable to describe what is the TnP resonance name"};
39
40 Gaudi::Property<Float_t> m_MassPeak {this, "MassPeak", ParticleConstants::ZMassInMeV, "Resonance peak position"};
41 Gaudi::Property<Float_t> m_ElectronEtCut {this, "ElectronEtCut", 15000, "Et cut for electron"};
42 Gaudi::Property<Float_t> m_MassLowerCut {this, "MassLowerCut", 70000, "Lower Mass cut"};
43 Gaudi::Property<Float_t> m_MassUpperCut {this, "MassUpperCut", 110000, "Upper Mass Cut"};
44
45 Regions GetRegion(Float_t eta) const {
46 Float_t aeta = fabs(eta);
47 // check if object is in barrel
48 if ( aeta < 1.37 ) return MonitorTnPAlgorithm::BARREL;
49 // check if object is in end-caps
50 if ( aeta > 1.52 && aeta < 2.47 ) return MonitorTnPAlgorithm::ENDCAP;
51 // check if object is in crack region
52 if ( aeta > 1.37 && aeta < 1.52 ) return MonitorTnPAlgorithm::CRACK;
53 return MonitorTnPAlgorithm::NREGIONS; // out of acceptance
54 }
55
56};
57#endif
Scalar eta() const
pseudorapidity method
Header file to be included by clients of the Monitored infrastructure.
A number of constexpr particle constants to avoid hardcoding them directly in various places.
AthMonitorAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
StatusCode fillElectronProbe(const xAOD::Electron *el, const bool isleading, const EventContext &ctx) const
Gaudi::Property< Float_t > m_MassPeak
SG::ReadHandleKey< xAOD::ElectronContainer > m_ParticleContainerKey
StatusCode fillHistograms(const EventContext &ctx) const override
adds event to the monitoring histograms
Gaudi::Property< Float_t > m_MassUpperCut
Gaudi::Property< Float_t > m_MassLowerCut
Gaudi::Property< std::string > m_ParticlePrefix
SG::ReadDecorHandleKeyArray< xAOD::ElectronContainer > m_ElectronIsolationKey
Regions GetRegion(Float_t eta) const
MonitorTnPAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Gaudi::Property< std::string > m_RecoName
virtual StatusCode initialize() override
initialize
Gaudi::Property< Float_t > m_ElectronEtCut
Gaudi::Property< std::string > m_TnPType
virtual ~MonitorTnPAlgorithm()=default
Property holding a SG store/key/clid from which a ReadHandle is made.
constexpr double ZMassInMeV
the mass of the Z0 boson (in MeV)
DecorHandleKeyArray< ReadDecorHandle< T, S >, ReadDecorHandleKey< T >, Gaudi::DataHandle::Reader > ReadDecorHandleKeyArray
Electron_v1 Electron
Definition of the current "egamma version".