|
ATLAS Offline Software
|
Go to the documentation of this file.
25 #include "GaudiKernel/SmartDataPtr.h"
26 #include "GaudiKernel/ITHistSvc.h"
35 m_riocontainer{
nullptr},
44 m_rioSurfaceX{
nullptr},
45 m_rioSurfaceY{
nullptr},
46 m_rioSurfaceZ{
nullptr},
47 m_SctBarrelEndcap{
nullptr},
48 m_SctLayerDisk{
nullptr},
49 m_SctEtaModule{
nullptr},
50 m_SctPhiModule{
nullptr},
52 m_SctDeltaPhi{
nullptr},
63 m_sct_rdoGroupSize{
nullptr},
64 m_sct_rdoIsOnTrack{
nullptr},
69 m_sct_barrelec{
nullptr},
70 m_sct_firstStrip{
nullptr},
71 m_sct_numHitsInWafer{
nullptr},
72 m_sct_waferHash{
nullptr},
75 m_sct_channel{
nullptr},
77 m_scterr_bec{
nullptr},
78 m_scterr_layer{
nullptr},
79 m_scterr_eta{
nullptr},
80 m_scterr_phi{
nullptr},
81 m_scterr_side{
nullptr},
82 m_scterr_rodid{
nullptr},
83 m_scterr_channel{
nullptr},
84 m_scterr_type{
nullptr}
107 SmartIF<ITHistSvc> tHistSvc{Gaudi::svcLocator()->service(
"THistSvc")};
116 if (
sc.isFailure()) {
117 ATH_MSG_ERROR(
"Unable to register TTree : " << fullNtupleName );
129 m_nt->Branch(
"SCT_nRIOs", &
m_nRIOs,
"Number_of_RIOs/I");
163 m_sp_x =
new std::vector<float>();
164 m_sp_y =
new std::vector<float>();
165 m_sp_z =
new std::vector<float>();
191 m_nt->Branch(
"SP_SCT_nSpacePoints", &
m_nSP);
311 if (not h_riocontainer.
isValid()) {
322 if (not h_spContainer.
isValid()) {
325 p_spContainer = &*h_spContainer;
332 std::vector<Identifier> RDOsOnTracks;
335 if (not h_rdocontainer.
isValid()) {
338 p_rdocontainer = &*h_rdocontainer;
347 for (
int i=0;
i<(
int)tracks->size();
i++) {
349 if (
track ==
nullptr) {
355 if (trackStates ==
nullptr) {
356 ATH_MSG_WARNING(
"for current track is TrackStateOnSurfaces == Null, no data will be written for this track");
367 if (RawDataClus==
nullptr) {
374 const std::vector<Identifier>& rdoList = RawDataClus->
rdoList();
375 RDOsOnTracks.insert(RDOsOnTracks.end(),rdoList.begin(),rdoList.end());
393 InDet::SCT_ClusterContainer::const_iterator containerIterator =
m_riocontainer->begin();
394 for( ; containerIterator !=
m_riocontainer->end(); ++containerIterator) {
395 ATH_MSG_DEBUG(
"There are " << (*containerIterator)->size() <<
" entries in the PrepRawDataCollection" );
400 InDet::SCT_ClusterCollection::const_iterator rioIterator = (*containerIterator)->begin();
401 for (; rioIterator != (*containerIterator)->end(); ++rioIterator) {
403 if (!(*rioIterator)) {
407 if (!((*rioIterator)->detectorElement())) {
415 return StatusCode::SUCCESS;
418 const Amg::Vector3D surfaceGlobPos = (*rioIterator)->detectorElement()->center( (*rioIterator)->identify() ) ;
424 const Amg::Vector2D locPos = (*rioIterator)->localPosition();
464 std::pair<IdentifierHash, IdentifierHash> sp_clusInfo;
468 if (!colNext)
continue;
471 for(p_sp=colNext->
begin(); p_sp!=colNext->
end(); ++p_sp) {
485 m_sp_x->push_back(point.x());
486 m_sp_y->push_back(point.y());
487 m_sp_z->push_back(point.z());
492 if (
m_fillRDO.value() && p_rdocontainer !=
nullptr) {
496 for( ; col_it!= lastCol ; ++col_it) {
499 if (!SCT_Collection)
continue;
501 unsigned int theHashOfTheRDOCollection=
m_sctid->
wafer_hash(theWaferIdOfTheRDOCollection);
510 int totalNumberOfStrips=0;
515 int thisSide =
m_sctid->
side(theWaferIdOfTheRDOCollection);
518 for(; p_rdo!=end_rdo; ++p_rdo) {
522 totalNumberOfStrips=totalNumberOfStrips+((*p_rdo)->getGroupSize());
549 if (
find(RDOsOnTracks.begin(),RDOsOnTracks.end(),
SCT_Identifier) != RDOsOnTracks.end())
568 for(
const auto& idHash : errorSet) {
594 return StatusCode::SUCCESS;
599 ATH_MSG_INFO(
"SCT_ClusterValidationNtupleWriter finalize()" );
680 return StatusCode::SUCCESS;
std::vector< float > * m_sp_z
z position of SpacePoint in ATLAS coordinate system (mm)
def retrieve(aClass, aKey=None)
std::vector< int > * m_sct_eta
eta of the SCT wafer
std::vector< int > * m_sct_phi
phi of the SCT wafer
std::vector< int > * m_sct_rdoGroupSize
RDO group size.
Const iterator class for DataVector/DataList.
This is an Identifier helper class for the SCT subdetector. This class is a factory for creating comp...
int m_eventNumber
event number for current PRD vector
ToolHandle< ISCT_CablingTool > m_cabling
virtual StatusCode execute() override
standard Athena-Algorithm method
std::string find(const std::string &s)
return a remapped string
uint64_t eventNumber() const
The current event's event number.
virtual const Amg::Vector3D & globalPosition() const override final
Interface method to get the global Position.
std::vector< int > * m_sct_side
side of the SCT wafer (0 or 1) within the SCT module
Eigen::Matrix< double, 2, 1 > Vector2D
std::vector< int > * m_scterr_rodid
online ID of ROD containing link
std::vector< int > * m_sp_bec
Barrel or endcap index (barrel: 0, endcap: +/-2) for SpacePoint.
std::vector< int > * m_sct_numHitsInWafer
number of hits in the SCT wafer
const Amg::MatrixX & localCovariance() const
return const ref to the error matrix
virtual Identifier identify() const override final
SG::ReadHandleKey< SpacePointContainer > m_spacePointContainerName
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
const std::vector< Identifier > & rdoList() const
return the List of rdo identifiers (pointers)
SG::ReadHandleKey< SCT_RDO_Container > m_dataObjectName
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
int phi_module(const Identifier &id) const
std::vector< int > * m_sct_rdoIsOnTrack
RDO on track.
std::vector< int > * m_sct_rodid
ROD ID of the RDO.
StringProperty m_ntupleDirName
jobOption: Ntuple directory name
int m_nRIOs
number of RIOs, i.e.
uint32_t runNumber() const
The current event's run number.
std::vector< int > * m_SctPhiModule
from IdHelper: module index in phi
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_SCTDetEleCollKey
int m_lumiBlock
event lumi block information
int m_timeStamp
event time stamp
std::vector< int > * m_scterr_side
side of the SCT wafer (0 or 1) within the module
std::vector< float > * m_SctHitErr
please provide description!
BooleanProperty m_doHitsOnTracks
flag to book, access and fill RDO isOnTrack or not
std::vector< int > * m_SctLayerDisk
from IdHelper: layer/disk index
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_scterr_layer
layer (barrel) or disk (endcap) of wafer with the error
SCT_ClusterValidationNtupleWriter(const std::string &name, ISvcLocator *pSvcLocator)
Standard Athena-Algorithm Constructor.
std::vector< int > * m_sct_channel
channel within ROD of the RDO
BooleanProperty m_fillCluster
flag to book, access and fill Cluster or not
::StatusCode StatusCode
StatusCode definition for legacy code.
int m_runNumber
run number
std::vector< int > * m_scterr_channel
online channel no.
std::vector< float > * m_rioLoc1
local x coordinate of strip UNIT:mm
SG::ReadHandleKey< SCT_ClusterContainer > m_jo_riocontainername
std::vector< float > * m_sp_x
x position of SpacePoint in ATLAS coordinate system (mm)
std::vector< int > * m_SctBarrelEndcap
from IdHelper: pos/neg barrel (+/-1) and pos/neg endcap (+/-2) UNIT:1:bar, 2:ec
StringProperty m_ntupleFileName
jobOption: Ntuple file name
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_sp_eta
eta index of the SCT-layer in which the SCT wafer is positioned for SpacePoint
std::vector< int > * m_SctSide
from IdHelper: side index (0/1)
const_iterator end() const
return const_iterator for end of container
IdentifierHash wafer_hash(const Identifier &wafer_id) const
wafer hash from id - optimized
std::vector< int > * m_sct_waferHash
index (could be from 0 to 8175) of the fired SCT wafer
const_iterator begin() const
return const_iterator for first entry
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
StringProperty m_ntupleTreeName
jobOption: Ntuple tree name
std::vector< int > * m_SctEtaModule
from IdHelper: module index in eta
std::vector< float > * m_SctDeltaPhi
please provide description!
uint32_t lumiBlock() const
The current event's luminosity block number.
int m_totalNumErrors
total number of BS errors.
virtual StatusCode initialize() override
standard Athena-Algorithm method
virtual const InDetDD::SiDetectorElement * detectorElement() const override final
return the detector element corresponding to this PRD The pointer will be zero if the det el is not d...
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const std::pair< IdentifierHash, IdentifierHash > & elementIdList() const
return the pair of Ids of the element by reference
double error(const Amg::MatrixX &mat, int index)
return diagonal error of the matrix caller should ensure the matrix is symmetric and the index is in ...
std::vector< int > * m_scterr_type
type of BS error (as defined in SCT_ByteStreamErrs enum in ISCT_ByteStreamErrorsSvc....
int layer_disk(const Identifier &id) const
StatusCode initialize(bool used=true)
Eigen::Matrix< double, 3, 1 > Vector3D
virtual const Trk::PrepRawData * prepRawData() const =0
returns the PrepRawData (also known as RIO) object to which this RIO_OnTrack is associated.
std::vector< float > * m_rioSurfaceZ
global x coordinate of SCT wafer center UNIT:mm
BooleanProperty m_fillSpacePoint
flag to book, access and fill SpacePoints or not
std::vector< float > * m_sp_y
y position of SpacePoint in ATLAS coordinate system (mm)
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
int m_nRDOs
Number of RDOs.
std::vector< int > * m_sct_tbin
timebin of the RDO
An STL vector of pointers that by default owns its pointed-to elements.
const InDet::SiWidth & width() const
return width class reference
std::vector< int > * m_sct_layer
index of the SCT-layer in which the SCT wafer is positioned
std::vector< int > * m_sct_barrelec
barrel/endcap index (barrel: 0, endcap: +/-2)
const SCT_ID * m_sctid
SCT ID helper.
#define ATH_MSG_WARNING(x)
int strip(const Identifier &id) const
std::vector< int > * m_sp_layer
index of the SCT-layer in which the SCT wafer is positioned for SpacePoint
int eta_module(const Identifier &id) const
std::vector< int > * m_scterr_eta
eta of the SCT wafer
BooleanProperty m_fillBSErrs
flag to book, access and fill ByteStream errors or not
uint32_t timeStamp() const
POSIX time in seconds from 1970. January 1st.
int m_bunchCrossing
event bunch crossing ID
int side(const Identifier &id) const
Handle class for reading from StoreGate.
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module, int side) const
For a single side of module.
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
uint32_t bcid() const
The bunch crossing ID of the event.
virtual StatusCode finalize() override
standard Athena-Algorithm method
std::vector< float > * m_rioSurfaceY
global x coordinate of SCT wafer center UNIT:mm
ToolHandle< ISCT_ByteStreamErrorsTool > m_byteStreamErrTool
std::vector< int > * m_scterr_phi
phi of the SCT wafer
const InDet::SCT_ClusterContainer * m_riocontainer
container of RIOs
size_type size() const noexcept
Returns the number of elements in the collection.
TTree * m_nt
pointer to the ntuple tree.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
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< int > * m_scterr_bec
barrel/endcap index (barrel: 0, endcap: +/-2)