ATLAS Offline Software
DiMuMon.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef DiMuMon_H
6 #define DiMuMon_H
7 
8 #include <vector>
9 #include <map>
10 
15 #include "xAODMuon/MuonContainer.h"
16 
17 
18 class TH1F;
19 class TH2F;
20 
21 
23 {
24  public:
25 
26  DiMuMon( const std::string & type, const std::string & name,
27  const IInterface* parent );
28 
29  virtual ~DiMuMon();
30 
31  virtual StatusCode initialize();
32  virtual StatusCode bookHistograms();
33  virtual StatusCode fillHistograms();
34  virtual StatusCode procHistograms();
35 
36 
37  template <class T> void RegisterHisto(MonGroup& mon, T* histo);
38  double getInvmass(const xAOD::TrackParticle* track1, const xAOD::TrackParticle* track2, double Mass) const;
39  double getCrtDiff(const xAOD::TrackParticle* id1, const xAOD::TrackParticle* id2 ) const;
40  double getEta(const xAOD::TrackParticle* id1, const xAOD::TrackParticle* id2 ) const;
41  double getPhi(const xAOD::TrackParticle* id1, const xAOD::TrackParticle* id2 ) const;
42  double getPt(const xAOD::TrackParticle* id1, const xAOD::TrackParticle* id2 ) const;
43  void iterativeGausFit(TH2F* hin, const std::vector<TH1F*>& hout, int mode);
44  bool trackQuality(const xAOD::TrackParticle *idTrk);
45 
46 
47  protected:
48 
50 
51  int m_nMassBins{};
52  int m_nVarBins{};
53  int m_nPtBins{};
54  int m_nEtaBins{};
55  int m_nPhiBins{};
56 
57  double m_coneSize{};
58  double m_isolationCut{};
59  double m_minInvmass{};
60  double m_maxInvmass{};
61  double m_ptCut{};
62  double m_etaCut{};
63 
64  std::string m_resonName{};
65  std::string m_triggerChainName{};
66  SG::ReadHandleKey<xAOD::MuonContainer> m_muonCollection{this, "muonCollection", "Muons"};
67 
68  bool m_doFits{};
69  bool m_doSaveFits{};
70  bool m_setDebug{};
71 
72 
73  std::vector< std::string > m_regions;
74  std::vector< std::string > m_varsVSmean;
75  std::vector< std::string > m_varsVSwidth;
76  std::vector< std::string > m_varsDistr;
77  std::map< std::string, std::pair <double, double> > m_varRanges;
78  std::map< std::string, double > m_varValues;
79  std::map< std::string, std::string > m_varLabels;
80 
83  std::map< std::string, TH1F* > m_invmass;
84  std::map< std::string, std::map< std::string, TH2F*> > m_2DinvmassVSx;
85  std::map< std::string, std::map< std::string, TH1F*> > m_invmassVSx;
86  std::map< std::string, std::map< std::string, TH1F*> > m_widthVSx;
87  std::map< std::string, std::map< std::string, TH1F*> > m_xDistr;
88 
89 };
90 
91 #endif
DiMuMon::procHistograms
virtual StatusCode procHistograms()
An inheriting class should either override this function or finalHists().
Definition: DiMuMon.cxx:450
DiMuMon::m_varRanges
std::map< std::string, std::pair< double, double > > m_varRanges
Definition: DiMuMon.h:77
DiMuMon::fillHistograms
virtual StatusCode fillHistograms()
An inheriting class should either override this function or fillHists().
Definition: DiMuMon.cxx:244
DiMuMon::getEta
double getEta(const xAOD::TrackParticle *id1, const xAOD::TrackParticle *id2) const
Definition: DiMuMon.cxx:644
DiMuMon::m_varsVSmean
std::vector< std::string > m_varsVSmean
Definition: DiMuMon.h:74
DiMuMon::m_varsVSwidth
std::vector< std::string > m_varsVSwidth
Definition: DiMuMon.h:75
ManagedMonitorToolBase
Provides functionality for users to implement and save histograms, ntuples, and summary data,...
Definition: ManagedMonitorToolBase.h:73
DiMuMon::m_chi2
TH1F * m_chi2
Definition: DiMuMon.h:81
DiMuMon::getPt
double getPt(const xAOD::TrackParticle *id1, const xAOD::TrackParticle *id2) const
Definition: DiMuMon.cxx:636
DiMuMon::m_resonName
std::string m_resonName
Definition: DiMuMon.h:64
DiMuMon::m_isolationCut
double m_isolationCut
Definition: DiMuMon.h:58
DiMuMon::m_nVarBins
int m_nVarBins
Definition: DiMuMon.h:52
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
DiMuMon::~DiMuMon
virtual ~DiMuMon()
Definition: DiMuMon.cxx:58
DiMuMon::m_nEtaBins
int m_nEtaBins
Definition: DiMuMon.h:54
python.TrigEgammaMonitorHelper.TH2F
def TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:45
DiMuMon::m_lumiBlockNum
int m_lumiBlockNum
Definition: DiMuMon.h:49
DiMuMon::m_xDistr
std::map< std::string, std::map< std::string, TH1F * > > m_xDistr
Definition: DiMuMon.h:87
DiMuMon::m_invmass
std::map< std::string, TH1F * > m_invmass
Definition: DiMuMon.h:83
DiMuMon::m_etaCut
double m_etaCut
Definition: DiMuMon.h:62
ManagedMonitorToolBase.h
DiMuMon::m_setDebug
bool m_setDebug
Definition: DiMuMon.h:70
ManagedMonitorToolBase::MonGroup
A container of information describing a monitoring object.
Definition: ManagedMonitorToolBase.h:137
DiMuMon::m_stat
TH1F * m_stat
Definition: DiMuMon.h:82
id2
HWIdentifier id2
Definition: LArRodBlockPhysicsV0.cxx:562
DiMuMon::m_2DinvmassVSx
std::map< std::string, std::map< std::string, TH2F * > > m_2DinvmassVSx
Definition: DiMuMon.h:84
DiMuMon::m_invmassVSx
std::map< std::string, std::map< std::string, TH1F * > > m_invmassVSx
Definition: DiMuMon.h:85
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
test_pyathena.parent
parent
Definition: test_pyathena.py:15
AthenaMonManager.h
Preparation.mode
mode
Definition: Preparation.py:94
jet::CompScaleVar::Mass
@ Mass
Definition: UncertaintyEnum.h:98
DiMuMon
Definition: DiMuMon.h:23
DiMuMon::m_coneSize
double m_coneSize
Definition: DiMuMon.h:57
DiMuMon::m_minInvmass
double m_minInvmass
Definition: DiMuMon.h:59
DiMuMon::m_nPtBins
int m_nPtBins
Definition: DiMuMon.h:53
DiMuMon::m_muonCollection
SG::ReadHandleKey< xAOD::MuonContainer > m_muonCollection
Definition: DiMuMon.h:66
DiMuMon::m_widthVSx
std::map< std::string, std::map< std::string, TH1F * > > m_widthVSx
Definition: DiMuMon.h:86
DiMuMon::m_maxInvmass
double m_maxInvmass
Definition: DiMuMon.h:60
DiMuMon::m_doFits
bool m_doFits
Definition: DiMuMon.h:68
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
DiMuMon::m_triggerChainName
std::string m_triggerChainName
Definition: DiMuMon.h:65
DiMuMon::getPhi
double getPhi(const xAOD::TrackParticle *id1, const xAOD::TrackParticle *id2) const
Definition: DiMuMon.cxx:654
DiMuMon::m_varValues
std::map< std::string, double > m_varValues
Definition: DiMuMon.h:78
DiMuMon::getCrtDiff
double getCrtDiff(const xAOD::TrackParticle *id1, const xAOD::TrackParticle *id2) const
Definition: DiMuMon.cxx:663
MuonContainer.h
DiMuMon::m_doSaveFits
bool m_doSaveFits
Definition: DiMuMon.h:69
DiMuMon::bookHistograms
virtual StatusCode bookHistograms()
An inheriting class should either override this function or bookHists().
Definition: DiMuMon.cxx:132
TrackParticle.h
DiMuMon::trackQuality
bool trackQuality(const xAOD::TrackParticle *idTrk)
Definition: DiMuMon.cxx:591
DiMuMon::m_regions
std::vector< std::string > m_regions
Definition: DiMuMon.h:73
DiMuMon::initialize
virtual StatusCode initialize()
Definition: DiMuMon.cxx:62
DiMuMon::iterativeGausFit
void iterativeGausFit(TH2F *hin, const std::vector< TH1F * > &hout, int mode)
Definition: DiMuMon.cxx:480
DiMuMon::DiMuMon
DiMuMon(const std::string &type, const std::string &name, const IInterface *parent)
Definition: DiMuMon.cxx:33
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
plotBeamSpotMon.mon
mon
Definition: plotBeamSpotMon.py:67
DiMuMon::RegisterHisto
void RegisterHisto(MonGroup &mon, T *histo)
Definition: DiMuMon.cxx:583
DiMuMon::m_nPhiBins
int m_nPhiBins
Definition: DiMuMon.h:55
DiMuMon::m_ptCut
double m_ptCut
Definition: DiMuMon.h:61
python.TrigEgammaMonitorHelper.TH1F
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:24
DiMuMon::m_varsDistr
std::vector< std::string > m_varsDistr
Definition: DiMuMon.h:76
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
plotBeamSpotCompare.histo
histo
Definition: plotBeamSpotCompare.py:415
DiMuMon::m_nMassBins
int m_nMassBins
Definition: DiMuMon.h:51
DiMuMon::getInvmass
double getInvmass(const xAOD::TrackParticle *track1, const xAOD::TrackParticle *track2, double Mass) const
Definition: DiMuMon.cxx:627
TrackParticleContainer.h
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35
DiMuMon::m_varLabels
std::map< std::string, std::string > m_varLabels
Definition: DiMuMon.h:79