ATLAS Offline Software
PhysicsAnalysis
D3PDMaker
CaloSysD3PDMaker
src
TileCosmicMuonFillerTool.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
/*
6
* File: TileCosmicMuonFillerTool.cxx
7
* Author: Stephen Cole <stephen.cole@cern.ch>
8
*
9
* Created on November 2, 2011, 1:26 PM
10
*/
11
12
#include "
TileCosmicMuonFillerTool.h
"
13
#include "GaudiKernel/MsgStream.h"
14
#include "GaudiKernel/ISvcLocator.h"
15
#include "GaudiKernel/StatusCode.h"
16
#include "
AthenaKernel/errorcheck.h
"
17
18
using namespace
std;
19
20
namespace
D3PD
{
21
22
TileCosmicMuonFillerTool::TileCosmicMuonFillerTool(
const
string
&
type
,
23
const
string
&
name
,
const
IInterface*
parent
):
24
BlockFillerTool
<
TileCosmicMuon
>(
type
,
name
,
parent
)
25
{
26
TileCosmicMuonFillerTool::book
().ignore();
// Avoid coverity warnings
27
}
28
29
TileCosmicMuonFillerTool::~TileCosmicMuonFillerTool
() {
30
}
31
32
StatusCode
TileCosmicMuonFillerTool::book
(){
33
// CHECK(addVariable("nTracks", m_nTracks));
34
// CHECK(addVariable("trackOfMaxE", m_trackOfMaxE));
35
// CHECK(addVariable("nSegments", m_nSegments));
36
37
CHECK
(
addVariable
(
"x"
,
m_positionX
));
38
CHECK
(
addVariable
(
"y"
,
m_positionY
));
39
CHECK
(
addVariable
(
"z"
,
m_positionZ
));
40
CHECK
(
addVariable
(
"phi"
,
m_directionPhi
));
41
CHECK
(
addVariable
(
"theta"
,
m_directionTheta
));
42
CHECK
(
addVariable
(
"time"
,
m_time
));
43
CHECK
(
addVariable
(
"fitQuality"
,
m_fitQuality
));
44
CHECK
(
addVariable
(
"fitNcells"
,
m_fitNCells
));
45
CHECK
(
addVariable
(
"trackNcells"
,
m_trackNCells
));
46
CHECK
(
addVariable
(
"path"
,
m_fullPath
));
47
CHECK
(
addVariable
(
"energy"
,
m_fullEnergy
));
48
49
CHECK
(
addVariable
(
"pathTopA"
,
m_pathTopA
));
50
CHECK
(
addVariable
(
"pathTopBC"
,
m_pathTopBC
));
51
CHECK
(
addVariable
(
"pathTopD"
,
m_pathTopD
));
52
CHECK
(
addVariable
(
"pathBottomA"
,
m_pathBottomA
));
53
CHECK
(
addVariable
(
"pathBottomBC"
,
m_pathBottomBC
));
54
CHECK
(
addVariable
(
"pathBottomD"
,
m_pathBottomD
));
55
CHECK
(
addVariable
(
"energyTopA"
,
m_energyTopA
));
56
CHECK
(
addVariable
(
"energyTopBC"
,
m_energyTopBC
));
57
CHECK
(
addVariable
(
"energyTopD"
,
m_energyTopD
));
58
CHECK
(
addVariable
(
"energyBottomA"
,
m_energyBottomA
));
59
CHECK
(
addVariable
(
"energyBottomBC"
,
m_energyBottomBC
));
60
CHECK
(
addVariable
(
"energyBottomD"
,
m_energyBottomD
));
61
62
CHECK
(
addVariable
(
"segmentPath"
,
m_segmentPath
));
63
CHECK
(
addVariable
(
"segmentPartition"
,
m_segmentPartition
));
64
CHECK
(
addVariable
(
"segmentModule"
,
m_segmentModule
));
65
CHECK
(
addVariable
(
"segmentSampling"
,
m_segmentSampling
));
66
// CHECK(addVariable("segmentTrack", m_segmentTrack));
67
68
return
StatusCode::SUCCESS;
69
}
70
71
StatusCode
TileCosmicMuonFillerTool::fill
(
const
TileCosmicMuon
&
p
){
72
MsgStream
log
(
msgSvc
(),
name
());
73
log
<< MSG::INFO <<
" in TileCosmicMuonFillerTool::book()"
<<
74
endmsg
;
75
76
*
m_positionX
=
p
.GetPositionX();
77
*
m_positionY
=
p
.GetPositionY();
78
*
m_positionZ
=
p
.GetPositionZ();
79
*
m_directionPhi
=
p
.GetDirectionPhi();
80
*
m_directionTheta
=
p
.GetDirectionTheta();
81
*
m_time
=
p
.GetTime();
82
*
m_fitQuality
=
p
.GetFitQuality();
83
*
m_fitNCells
=
p
.GetFitNCells();
84
85
if
(
p
.GetNSamples()!=3){
86
log
<<
MSG::DEBUG
<<
"Warning!: TileCosmicMuon with "
<<
87
p
.GetNSamples()<<
" samples."
<<
endmsg
;
88
*
m_fullPath
=0;
89
*
m_fullEnergy
=0;
90
*
m_pathTopA
=0;
91
*
m_pathTopBC
=0;
92
*
m_pathTopD
=0;
93
*
m_pathBottomA
=0;
94
*
m_pathBottomBC
=0;
95
*
m_pathBottomD
=0;
96
*
m_energyTopA
=0;
97
*
m_energyTopBC
=0;
98
*
m_energyTopD
=0;
99
*
m_energyBottomA
=0;
100
*
m_energyBottomBC
=0;
101
*
m_energyBottomD
=0;
102
}
103
else
{
104
*
m_fullPath
=
const_cast<
TileCosmicMuon
*
>
(&
p
)->GetFullPath();
105
*
m_fullEnergy
=
const_cast<
TileCosmicMuon
*
>
(&
p
)->GetFullEnergy();
106
*
m_pathTopA
=
p
.GetPathTop(0);
107
*
m_pathTopBC
=
p
.GetPathTop(1);
108
*
m_pathTopD
=
p
.GetPathTop(2);
109
*
m_pathBottomA
=
p
.GetPathBottom(0);
110
*
m_pathBottomBC
=
p
.GetPathBottom(1);
111
*
m_pathBottomD
=
p
.GetPathBottom(2);
112
*
m_energyTopA
=
p
.GetEnergyTop(0);
113
*
m_energyTopBC
=
p
.GetEnergyTop(1);
114
*
m_energyTopD
=
p
.GetEnergyTop(2);
115
*
m_energyBottomA
=
p
.GetEnergyBottom(0);
116
*
m_energyBottomBC
=
p
.GetEnergyBottom(1);
117
*
m_energyBottomD
=
p
.GetEnergyBottom(2);
118
}
119
120
for
(
int
i
=0;
i
<
p
.GetNSegments();++
i
){
121
m_segmentPath
->push_back(
p
.GetSegmentPath(
i
));
122
m_segmentPartition
->push_back(
p
.GetSegmentPartition(
i
));
123
m_segmentModule
->push_back(
p
.GetSegmentModule(
i
));
124
m_segmentSampling
->push_back(
p
.GetSegmentSampling(
i
));
125
}
126
127
return
StatusCode::SUCCESS;
128
}
129
130
}
D3PD::TileCosmicMuonFillerTool::m_directionTheta
float * m_directionTheta
Definition:
TileCosmicMuonFillerTool.h:62
D3PD::TileCosmicMuonFillerTool::m_segmentPath
std::vector< float > * m_segmentPath
Definition:
TileCosmicMuonFillerTool.h:83
D3PD::TileCosmicMuonFillerTool::m_segmentSampling
std::vector< int > * m_segmentSampling
Definition:
TileCosmicMuonFillerTool.h:86
D3PD::TileCosmicMuonFillerTool::fill
virtual StatusCode fill(const TileCosmicMuon &p)
Fill one block — type-safe version.
Definition:
TileCosmicMuonFillerTool.cxx:71
D3PD::TileCosmicMuonFillerTool::m_trackNCells
int * m_trackNCells
Definition:
TileCosmicMuonFillerTool.h:66
D3PD::TileCosmicMuonFillerTool::~TileCosmicMuonFillerTool
virtual ~TileCosmicMuonFillerTool()
Definition:
TileCosmicMuonFillerTool.cxx:29
TileCosmicMuon
Class containing detailed results from TileMuonFitter.
Definition:
TileCosmicMuon.h:35
D3PD::TileCosmicMuonFillerTool::m_pathTopA
float * m_pathTopA
Definition:
TileCosmicMuonFillerTool.h:69
D3PD::TileCosmicMuonFillerTool::book
virtual StatusCode book()
Declare tuple variables.
Definition:
TileCosmicMuonFillerTool.cxx:32
D3PD::TileCosmicMuonFillerTool::m_energyBottomA
float * m_energyBottomA
Definition:
TileCosmicMuonFillerTool.h:78
D3PD::TileCosmicMuonFillerTool::m_positionY
float * m_positionY
Definition:
TileCosmicMuonFillerTool.h:59
D3PD::TileCosmicMuonFillerTool::m_pathTopBC
float * m_pathTopBC
Definition:
TileCosmicMuonFillerTool.h:70
D3PD::TileCosmicMuonFillerTool::m_segmentPartition
std::vector< int > * m_segmentPartition
Definition:
TileCosmicMuonFillerTool.h:84
D3PD::TileCosmicMuonFillerTool::m_energyBottomBC
float * m_energyBottomBC
Definition:
TileCosmicMuonFillerTool.h:79
D3PD::TileCosmicMuonFillerTool::m_energyTopD
float * m_energyTopD
Definition:
TileCosmicMuonFillerTool.h:77
D3PD::AddVariable::addVariable
virtual StatusCode addVariable(const std::string &name, const std::type_info &ti, void *&ptr, const std::string &docstring="", const void *defval=0)
Add a variable to the tuple.
Definition:
AddVariable.cxx:85
D3PD::TileCosmicMuonFillerTool::m_fitQuality
float * m_fitQuality
Definition:
TileCosmicMuonFillerTool.h:64
D3PD::TileCosmicMuonFillerTool::m_pathBottomBC
float * m_pathBottomBC
Definition:
TileCosmicMuonFillerTool.h:73
D3PD
Block filler tool for noisy FEB information.
Definition:
CaloCellDetailsFillerTool.cxx:29
D3PD::TileCosmicMuonFillerTool::m_fitNCells
int * m_fitNCells
Definition:
TileCosmicMuonFillerTool.h:65
python.utils.AtlRunQueryDQUtils.p
p
Definition:
AtlRunQueryDQUtils.py:210
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition:
StdJOSetup.py:36
lumiFormat.i
int i
Definition:
lumiFormat.py:85
D3PD::TileCosmicMuonFillerTool::m_positionZ
float * m_positionZ
Definition:
TileCosmicMuonFillerTool.h:60
endmsg
#define endmsg
Definition:
AnalysisConfig_Ntuple.cxx:63
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
D3PD::BlockFillerTool
Type-safe wrapper for block filler tools.
Definition:
BlockFillerTool.h:68
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition:
Control/AthenaKernel/AthenaKernel/errorcheck.h:422
D3PD::TileCosmicMuonFillerTool::m_pathBottomD
float * m_pathBottomD
Definition:
TileCosmicMuonFillerTool.h:74
D3PD::TileCosmicMuonFillerTool::m_fullPath
float * m_fullPath
Definition:
TileCosmicMuonFillerTool.h:67
D3PD::TileCosmicMuonFillerTool::m_energyBottomD
float * m_energyBottomD
Definition:
TileCosmicMuonFillerTool.h:80
D3PD::TileCosmicMuonFillerTool::m_pathBottomA
float * m_pathBottomA
Definition:
TileCosmicMuonFillerTool.h:72
D3PD::TileCosmicMuonFillerTool::m_directionPhi
float * m_directionPhi
Definition:
TileCosmicMuonFillerTool.h:61
name
std::string name
Definition:
Control/AthContainers/Root/debug.cxx:221
errorcheck.h
Helpers for checking error return status codes and reporting errors.
D3PD::TileCosmicMuonFillerTool::m_energyTopA
float * m_energyTopA
Definition:
TileCosmicMuonFillerTool.h:75
D3PD::TileCosmicMuonFillerTool::m_time
float * m_time
Definition:
TileCosmicMuonFillerTool.h:63
D3PD::TileCosmicMuonFillerTool::m_energyTopBC
float * m_energyTopBC
Definition:
TileCosmicMuonFillerTool.h:76
python.CaloScaleNoiseConfig.type
type
Definition:
CaloScaleNoiseConfig.py:78
DEBUG
#define DEBUG
Definition:
page_access.h:11
python.CaloCondTools.log
log
Definition:
CaloCondTools.py:20
D3PD::TileCosmicMuonFillerTool::m_pathTopD
float * m_pathTopD
Definition:
TileCosmicMuonFillerTool.h:71
TileCosmicMuonFillerTool.h
D3PD::TileCosmicMuonFillerTool::m_fullEnergy
float * m_fullEnergy
Definition:
TileCosmicMuonFillerTool.h:68
D3PD::TileCosmicMuonFillerTool::m_segmentModule
std::vector< int > * m_segmentModule
Definition:
TileCosmicMuonFillerTool.h:85
D3PD::TileCosmicMuonFillerTool::m_positionX
float * m_positionX
Definition:
TileCosmicMuonFillerTool.h:58
Generated on Thu Nov 7 2024 21:28:05 for ATLAS Offline Software by
1.8.18