ATLAS Offline Software
Loading...
Searching...
No Matches
EgammaFactory.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef EGAMMAFACTORY_H
6#define EGAMMAFACTORY_H
7
8#ifdef XAOD_STANDALONE
13
15#include <TFile.h>
16#include <TProfile2D.h>
19#include <xAODEgamma/Egamma.h>
20#include <xAODEgamma/Electron.h>
23#include <xAODEgamma/Photon.h>
33
34#include <array>
35#include <memory>
36
37class EgammaFactory : public asg::AsgMessaging {
38 public:
39 EgammaFactory();
40 ~EgammaFactory();
41 void clear();
42 void create_structure();
43 xAOD::CaloCluster* create_cluster(float eta, float phi, float e0, float e1,
44 float e2, float e3, float e);
45 xAOD::Photon* create_converted_photon(float eta, float phi, float e);
46 xAOD::Photon* create_unconverted_photon(float eta, float phi, float e);
47 xAOD::Photon* create_photon(float eta, float phi, float e, float rconv = 0,
48 float zconv = 0);
49 xAOD::Photon* create_photon(float eta, float phi, float e0, float e1,
50 float e2, float e3, float e, float rconv = 0,
51 float zconv = 0);
52 xAOD::Electron* create_electron(float eta, float phi, float e);
53 xAOD::Electron* create_electron(float eta, float phi, float e0, float e1,
54 float e2, float e3, float e);
55 // TODO: fix mu
56 xAOD::EventInfo* create_eventinfo(bool simulation, int runnumber,
57 int eventnumber = 1,
58 int average_interaction_per_crossing = 20);
59
60 private:
61 xAOD::TStore m_store;
62 xAOD::CaloClusterContainer* m_clusters;
64 xAOD::VertexContainer* m_vertexes;
66 xAOD::PhotonContainer* m_photons;
67 xAOD::PhotonAuxContainer* m_photonsAux;
68 xAOD::ElectronContainer* m_electrons;
69 xAOD::ElectronAuxContainer* m_electronsAux;
72
73 std::unique_ptr<TFile> m_fave;
74 std::array<TProfile2D*, 4> m_histos_electron;
75 std::array<TProfile2D*, 4> m_histos_conv;
76 std::array<TProfile2D*, 4> m_histos_unconv;
77 TProfile2D* m_histo_rconv;
78 TProfile2D* m_histo_zconv;
79 std::array<double, 4> get_layers_fraction(
80 const std::array<TProfile2D*, 4>& prof, double eta, double pt) const;
81};
82
83#else
84
85struct EgammaFactory {};
86
87#endif
88
89#endif
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
Class mimicking the AthMessaging class from the offline software.
static std::vector< uint32_t > runnumber
Definition iLumiCalc.h:37
PhotonAuxContainer_v3 PhotonAuxContainer
Definition of the current photon auxiliary container.
VertexAuxContainer_v1 VertexAuxContainer
Definition of the current jet auxiliary container.
PhotonContainer_v1 PhotonContainer
Definition of the current "photon container version".
ElectronContainer_v1 ElectronContainer
Definition of the current "electron container version".
EventInfo_v1 EventInfo
Definition of the latest event info version.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
VertexContainer_v1 VertexContainer
Definition of the current "Vertex container version".
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".
Photon_v1 Photon
Definition of the current "egamma version".
TrackParticleAuxContainer_v5 TrackParticleAuxContainer
Definition of the current TrackParticle auxiliary container.
ElectronAuxContainer_v3 ElectronAuxContainer
Definition of the current electron auxiliary container.
CaloClusterContainer_v1 CaloClusterContainer
Define the latest version of the calorimeter cluster container.
Electron_v1 Electron
Definition of the current "egamma version".
CaloClusterAuxContainer_v2 CaloClusterAuxContainer
Define the latest version of the calorimeter cluster auxiliary container.