ATLAS Offline Software
Loading...
Searching...
No Matches
SCT_ClusterValidationNtupleWriter.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3*/
4
6// SCT_ClusterValidationNtupleWriter.h
8
9#ifndef INDET_SCT_CLUSTERVALIDATIONNTUPLEWRITER_H
10#define INDET_SCT_CLUSTERVALIDATIONNTUPLEWRITER_H
11
12// Gaudi includes
14
25
26#include <set>
27#include <string>
28#include <vector>
29
30class SCT_ID;
31class TTree;
32
33namespace InDet {
34
43
45 public:
47 SCT_ClusterValidationNtupleWriter(const std::string& name, ISvcLocator* pSvcLocator);
50
52 virtual StatusCode initialize() override;
54 virtual StatusCode execute() override;
56 virtual StatusCode finalize() override;
57
58 private:
59
60 const SCT_ID* m_sctid;
61 const InDet::SCT_ClusterContainer* m_riocontainer;
62 SG::ReadHandleKey<xAOD::EventInfo> m_eventInfoKey{this, "EventInfoKey", "EventInfo", "key for xAOD::EventInfo"};
63 SG::ReadHandleKey<SCT_ClusterContainer> m_jo_riocontainername{this, "SCT_ClusterContainer", "SCT_Clusters", "jobOption: name of container with RIOs"};
64 SG::ReadHandleKey<SCT_RDO_Container> m_dataObjectName{this, "SCT_RDOContainer", "SCT_RDOs", "Data object name: for the SCT this is SCT_RDOs"};
65 SG::ReadHandleKey<SpacePointContainer> m_spacePointContainerName{this, "SCT_SpacePointContainer", "SCT_SpacePoints", "SpacePoint container name: for the SCT this is SCT_SpacePoints"};
66 SG::ReadHandleKey<TrackCollection> m_inputTrackCollection{this, "SCT_InputTrackCollection", "CombinedInDetTracks", "TrackCollection name, needed for hits-on-tracks, default is CombinedInDetTracks"};
67
68 // For P->T converter of SCT_Clusters
69 SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
70
71 ToolHandle<ISCT_ByteStreamErrorsTool> m_byteStreamErrTool{this, "ByteStreamErrTool", "SCT_ByteStreamErrorsTool", "Tool to retrieve SCT ByteStream Errors"};
72 ToolHandle<ISCT_CablingTool> m_cabling{this, "SCT_CablingTool", "SCT_CablingTool", "Tool to retrieve SCT Cabling"};
73 StringProperty m_ntupleFileName{this, "NtupleFileName", "/NTUPLES/FILE1"};
74 StringProperty m_ntupleDirName{this, "NtupleDirectoryName", "FitterValidation"};
75 StringProperty m_ntupleTreeName{this, "NtupleTreeName", "RIOs"};
76 BooleanProperty m_fillCluster{this, "FillCluster", false};
77 BooleanProperty m_fillRDO{this, "FillRDO", true};
78 BooleanProperty m_fillSpacePoint{this, "FillSpacePoint", false};
79 BooleanProperty m_fillBSErrs{this, "FillBSErrs", true};
80 BooleanProperty m_doHitsOnTracks{this, "DoHitsOnTracks", false};
81
83 TTree* m_nt;
84
85 // --- ntuple items. Pls describe here to allow copying to wiki+doxygen ---
91
92 // ntuple items for SCT clusters
93 int m_nRIOs;
94 std::vector<float>* m_rioLoc1;
95 std::vector<float>* m_rioSurfaceX;
96 std::vector<float>* m_rioSurfaceY;
97 std::vector<float>* m_rioSurfaceZ;
98 std::vector<int>* m_SctBarrelEndcap;
99 std::vector<int>* m_SctLayerDisk;
100 std::vector<int>* m_SctEtaModule;
101 std::vector<int>* m_SctPhiModule;
102 std::vector<int>* m_SctSide;
103 std::vector<float>* m_SctDeltaPhi;
104 std::vector<float>* m_SctHitErr;
105
106 //SpacePoints
107 int m_nSP;
108 std::vector<int>* m_sp_bec;
109 std::vector<int>* m_sp_layer;
110 std::vector<int>* m_sp_eta;
111 std::vector<int>* m_sp_phi;
112 std::vector<float>* m_sp_x;
113 std::vector<float>* m_sp_y;
114 std::vector<float>* m_sp_z;
115
116 // RDO
118 std::vector<int>* m_sct_rdoGroupSize;
119 std::vector<int>* m_sct_rdoIsOnTrack;
120 std::vector<int>* m_sct_layer;
121 std::vector<int>* m_sct_eta;
122 std::vector<int>* m_sct_phi;
123 std::vector<int>* m_sct_side;
124 std::vector<int>* m_sct_barrelec;
125 std::vector<int>* m_sct_firstStrip;
126 std::vector<int>* m_sct_numHitsInWafer;
127 std::vector<int>* m_sct_waferHash;
128 std::vector<int>* m_sct_tbin;
129 std::vector<int>* m_sct_rodid;
130 std::vector<int>* m_sct_channel;
131
132 /* ByteStream errors: these variables represent a bit set in the header or trailer for a
133 link (i.e. SCT module side) in the Bytestream, indicating that the ROD found
134 something wrong for that event for that link. In general, the ROD expects to
135 get from each link for each event: [link header] [zero or more hits] [link trailer].
136 These errors can either be a bit in the header or the trailer, or they can take the place
137 of a hit (for the ABCD or Raw) errors. */
139 std::vector<int>* m_scterr_bec;
140 std::vector<int>* m_scterr_layer;
141 std::vector<int>* m_scterr_eta;
142 std::vector<int>* m_scterr_phi;
143 std::vector<int>* m_scterr_side;
144 std::vector<int>* m_scterr_rodid;
145 std::vector<int>* m_scterr_channel;
146 std::vector<int>* m_scterr_type;
147
148 };
149
150} // close of namespace
151
152#endif // INDET_SCT_CLUSTERVALIDATIONNTUPLEWRITER_H
interface file for tool that keeps track of errors in the bytestream.
Header file for abstract interface to SCT cabling tool.
Property holding a SG store/key/clid from which a ReadHandle is made.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
std::vector< int > * m_scterr_phi
phi of the SCT wafer
SG::ReadHandleKey< SCT_ClusterContainer > m_jo_riocontainername
std::vector< int > * m_SctSide
from IdHelper: side index (0/1)
std::vector< int > * m_sct_phi
phi of the SCT wafer
std::vector< int > * m_sp_layer
index of the SCT-layer in which the SCT wafer is positioned for SpacePoint
std::vector< float > * m_SctHitErr
please provide description!
std::vector< int > * m_sp_eta
eta index of the SCT-layer in which the SCT wafer is positioned for SpacePoint
std::vector< int > * m_sct_eta
eta of the SCT wafer
std::vector< int > * m_sp_bec
Barrel or endcap index (barrel: 0, endcap: +/-2) for SpacePoint.
int m_eventNumber
event number for current PRD vector
std::vector< int > * m_sct_numHitsInWafer
number of hits in the SCT wafer
std::vector< float > * m_rioLoc1
local x coordinate of strip UNIT:mm
std::vector< int > * m_scterr_bec
barrel/endcap index (barrel: 0, endcap: +/-2)
std::vector< int > * m_sct_channel
channel within ROD of the RDO
~SCT_ClusterValidationNtupleWriter()=default
Default Destructor.
std::vector< int > * m_scterr_rodid
online ID of ROD containing link
std::vector< int > * m_scterr_side
side of the SCT wafer (0 or 1) within the module
std::vector< float > * m_rioSurfaceY
global x coordinate of SCT wafer center UNIT:mm
StringProperty m_ntupleTreeName
jobOption: Ntuple tree name
BooleanProperty m_doHitsOnTracks
flag to book, access and fill RDO isOnTrack or not
BooleanProperty m_fillBSErrs
flag to book, access and fill ByteStream errors or not
std::vector< int > * m_scterr_layer
layer (barrel) or disk (endcap) of wafer with the error
std::vector< int > * m_sct_barrelec
barrel/endcap index (barrel: 0, endcap: +/-2)
std::vector< int > * m_sct_firstStrip
index (could be from 0 to 767) of the fired strip within the SCT wafer
std::vector< int > * m_SctEtaModule
from IdHelper: module index in eta
virtual StatusCode finalize() override
standard Athena-Algorithm method
std::vector< int > * m_sct_layer
index of the SCT-layer in which the SCT wafer is positioned
virtual StatusCode execute() override
standard Athena-Algorithm method
virtual StatusCode initialize() override
standard Athena-Algorithm method
std::vector< int > * m_sp_phi
phi index of the SCT-layer in which the SCT wafer is positioned for SpacePoint
SG::ReadHandleKey< TrackCollection > m_inputTrackCollection
std::vector< float > * m_rioSurfaceZ
global x coordinate of SCT wafer center UNIT:mm
BooleanProperty m_fillCluster
flag to book, access and fill Cluster or not
std::vector< float > * m_sp_z
z position of SpacePoint in ATLAS coordinate system (mm)
std::vector< int > * m_scterr_eta
eta of the SCT wafer
StringProperty m_ntupleDirName
jobOption: Ntuple directory name
std::vector< int > * m_sct_waferHash
index (could be from 0 to 8175) of the fired SCT wafer
std::vector< int > * m_scterr_channel
online channel no.
std::vector< float > * m_SctDeltaPhi
please provide description!
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_SCTDetEleCollKey
std::vector< float > * m_rioSurfaceX
global x coordinate of SCT wafer center UNIT:mm
BooleanProperty m_fillRDO
flag to book, access and fill RDO or not
std::vector< int > * m_SctLayerDisk
from IdHelper: layer/disk index
ToolHandle< ISCT_ByteStreamErrorsTool > m_byteStreamErrTool
std::vector< int > * m_SctBarrelEndcap
from IdHelper: pos/neg barrel (+/-1) and pos/neg endcap (+/-2) UNIT:1:bar, 2:ec
BooleanProperty m_fillSpacePoint
flag to book, access and fill SpacePoints or not
std::vector< int > * m_sct_side
side of the SCT wafer (0 or 1) within the SCT module
SCT_ClusterValidationNtupleWriter(const std::string &name, ISvcLocator *pSvcLocator)
Standard Athena-Algorithm Constructor.
SG::ReadHandleKey< SCT_RDO_Container > m_dataObjectName
StringProperty m_ntupleFileName
jobOption: Ntuple file name
std::vector< float > * m_sp_x
x position of SpacePoint in ATLAS coordinate system (mm)
std::vector< int > * m_scterr_type
type of BS error (as defined in SCT_ByteStreamErrs enum in ISCT_ByteStreamErrorsSvc....
const InDet::SCT_ClusterContainer * m_riocontainer
container of RIOs
SG::ReadHandleKey< SpacePointContainer > m_spacePointContainerName
std::vector< int > * m_SctPhiModule
from IdHelper: module index in phi
std::vector< float > * m_sp_y
y position of SpacePoint in ATLAS coordinate system (mm)
This is an Identifier helper class for the SCT subdetector.
Definition SCT_ID.h:68
Property holding a SG store/key/clid from which a ReadHandle is made.
Primary Vertex Finder.