|
ATLAS Offline Software
|
Go to the documentation of this file.
12 #include "GaudiKernel/PhysicalConstants.h"
23 addBranch(std::make_shared<MuonVal::EventInfoBranch>(*
this,0));
25 return StatusCode::SUCCESS;
63 IdentifierHash
hash{};
65 hash = RE->measurementHash(hit->identify());
68 hash = RE->layerHash(hit->identify());
70 auto localToChamber = RE->msSector()->globalToLocalTrans(gctx) * RE->localToGlobalTrans(gctx,
hash);
71 auto chamberPos = localToChamber * xAOD::toEigen(hit->localPosition());
72 minYhit =
std::min(chamberPos.y(),minYhit);
73 maxYhit =
std::max(chamberPos.y(),maxYhit);
85 for (
auto & seed :
obj.matchedSeeds){
93 for (
auto & hit : seed->getHitsInMax()){
94 minYhit =
std::min(hit->positionInChamber().y(),minYhit);
95 maxYhit =
std::max(hit->positionInChamber().y(),maxYhit);
104 if (seed->hasPhiExtension()){
115 [](
int i,
const HoughHitType &
h){i += h->measuresEta();return i;}));
117 [](
int i,
const HoughHitType &
h){i += h->measuresPhi();return i;}));
118 unsigned int nMdtSeed{0}, nRpcSeed{0}, nTgcSeed{0}, nMmSeed{0}, nsTgcSeed{0};
119 for (
const HoughHitType & houghSP: seed->getHitsInMax()){
120 switch (houghSP->type()) {
125 nRpcSeed+=houghSP->measuresEta();
126 nRpcSeed+=houghSP->measuresPhi();
129 nTgcSeed+=houghSP->measuresEta();
130 nTgcSeed+=houghSP->measuresPhi();
140 <<
" not yet implemented");
155 using namespace SegmentFit;
162 !=
segment->measurements().end());
181 unsigned int nMdtHits{0}, nRpcEtaHits{0}, nRpcPhiHits{0}, nTgcEtaHits{0}, nTgcPhiHits{0};
182 for (
const auto & meas :
segment->measurements()){
183 switch (meas->type()) {
188 nRpcEtaHits += meas->measuresEta();
189 nRpcPhiHits += meas->measuresPhi();
192 nTgcEtaHits += meas->measuresEta();
193 nTgcPhiHits += meas->measuresPhi();
207 for (
auto & hit :
segment->measurements()){
210 minYhit =
std::min(hit->positionInChamber().y(),minYhit);
211 maxYhit =
std::max(hit->positionInChamber().y(),maxYhit);
MuonVal::VectorBranch< float > & m_out_seed_nMatchedHits
MuonVal::ScalarBranch< float > & m_out_gen_tantheta
MuonVal::VectorBranch< float > & m_out_segment_tantheta
MuonVal::ScalarBranch< float > & m_out_gen_y0
Truth - segment parameters
MuonVal::VectorBranch< float > & m_out_segment_err_tantheta
MuonVal::VectorBranch< unsigned short > & m_out_seed_nsTgc
int8_t side() const
Returns the side of the MS-sector 1 -> A side ; -1 -> C side.
helper struct to associate truth to reco segments and hough seeds
A spectrometer sector forms the envelope of all chambers that are placed in the same MS sector & laye...
int stationPhi() const
: Returns the station phi of the sector
StatusCode init(OWNER *instance)
Initialize method.
MuonVal::ScalarBranch< short > & m_out_stationSide
+1 for A-, -1 of C-side
MuonVal::VectorBranch< unsigned short > & m_out_segment_nMdtHits
MuonVal::ScalarBranch< float > & m_out_gen_Phi
MuonVal::ScalarBranch< unsigned short > & m_out_gen_nMDTHits
MuonVal::VectorBranch< float > & m_out_segment_err_tanphi
MuonVal::VectorBranch< float > & m_out_segment_err_time
MuonVal::ScalarBranch< float > & m_out_gen_time
@ BEE
BEE measurement point.
bool accumulate(AccumulateMap &map, std::vector< module_t > const &modules, FPGATrackSimMatrixAccumulator const &acc)
Accumulates an accumulator (e.g.
MuonVal::ScalarBranch< unsigned short > & m_out_gen_nTGCHits
void fillTruthInfo(const xAOD::MuonSegment *truthSegment, const MuonGMR4::MuonDetectorManager *detMgr, const ActsGeometryContext &gctx)
void fillSegmentInfo(const ActsGeometryContext &gctx, const ObjectMatching &obj)
MuonVal::VectorBranch< float > & m_out_segment_err_y0
Class describing a MuonSegment.
MuonVal::VectorBranch< unsigned short > & m_out_segment_nTgcPhiHits
MuonVal::VectorBranch< unsigned short > & m_out_segment_truthMatchedHits
MuonVal::ScalarBranch< float > & m_out_gen_maxYhit
MuonVal::VectorBranch< float > & m_out_segment_maxYhit
MuonVal::ScalarBranch< float > & m_out_bucketEnd
MuonVal::VectorBranch< unsigned short > & m_out_seed_nMdt
MuonVal::VectorBranch< uint16_t > & m_out_segment_nDoF
MuonVal::VectorBranch< unsigned short > & m_out_segment_nRpcPhiHits
std::pair< Amg::Vector3D, Amg::Vector3D > makeLine(const Parameters &pars)
Returns the parsed parameters into an Eigen line parametrization.
MuonVal::VectorBranch< unsigned short > & m_out_seed_nTgc
MuonVal::VectorBranch< unsigned short > & m_out_seed_nRpc
MuonVal::VectorBranch< unsigned short > & m_out_seed_nEtaHits
MuonVal::VectorBranch< uint16_t > & m_out_segment_fitIter
MuonVal::ScalarBranch< short > & m_out_gen_Q
MuonVal::ScalarBranch< float > & m_out_gen_x0
double houghTanPhi(const Amg::Vector3D &v)
: Returns the hough tanPhi [x] / [z]
Muon::MuonStationIndex::ChIndex chamberIndex() const
Returns the chamber index scheme.
MuonVal::ScalarBranch< unsigned short > & m_out_gen_nHits
Truth - hit count summary.
MuonVal::ScalarBranch< float > & m_out_bucketStart
MuonVal::ScalarBranch< int > & m_out_stationPhi
phi index of the station
MuonVal::VectorBranch< float > & m_out_seed_tanphi
MuonVal::VectorBranch< bool > & m_out_seed_ledToSegment
MuonVal::ScalarBranch< unsigned short > & m_out_gen_nRPCHits
MuonVal::VectorBranch< unsigned short > & m_out_seed_nHits
::StatusCode StatusCode
StatusCode definition for legacy code.
MuonVal::VectorBranch< float > & m_out_seed_x0
MuonVal::VectorBranch< float > & m_out_seed_y0
MuonVal::VectorBranch< bool > & m_out_segment_hasPhi
MuonVal::VectorBranch< float > & m_out_segment_tanphi
MuonVal::VectorBranch< unsigned short > & m_out_segment_nTgcEtaHits
MuonVal::VectorBranch< float > & m_out_seed_maxYhit
MuonVal::VectorBranch< unsigned short > & m_out_seed_nMm
MuonVal::VectorBranch< float > & m_out_segment_y0
Include the GeoPrimitives which need to be put first.
StatusCode initialize(AthHistogramAlgorithm *parent)
initialisation - internally calls the MuonTesterTree::init method
MuonVal::ScalarBranch< int > & m_out_chamberIndex
====== Common block: Filled for all entries ===========
MuonVal::VectorBranch< float > & m_out_segment_x0
void push_back(const T &value)
Adds a new element at the end of the vector.
The muon space point is the combination of two uncalibrated measurements one of them measures the eta...
Lightweight algorithm to read xAOD MDT sim hits and (fast-digitised) drift circles from SG and fill a...
virtual bool isMdt(const Identifier &id) const =0
returns whether this is a MDT Identifier or not
MuonVal::VectorBranch< float > & m_out_segment_chi2
MuonVal::VectorBranch< unsigned short > & m_out_seed_nPhiHits
MuonVal::VectorBranch< float > & m_out_seed_tantheta
constexpr int toInt(const ParamDefs p)
MuonVal::VectorBranch< float > & m_out_segment_minYhit
MuonVal::ScalarBranch< unsigned short > & m_out_gen_nNswHits
MuonVal::VectorBranch< bool > & m_out_seed_hasPhiExtension
MuonVal::VectorBranch< float > & m_out_segment_err_x0
Eigen::Matrix< double, 3, 1 > Vector3D
MuonVal::ScalarBranch< unsigned > & m_out_segment_n
========== Segment block: Filled when we have one or multiple segments =============
This header ties the generic definitions in this package.
void fillChamberInfo(const MuonGMR4::SpectrometerSector *chamber)
#define ATH_MSG_WARNING(x)
MuonVal::VectorBranch< float > & m_out_segment_time
const T & getVariable() const
const Muon::IMuonIdHelperSvc * idHelperSvc() const
Returns a pointer to the central MuonIdHelperSvc.
MuonVal::VectorBranch< float > & m_out_seed_minYhit
Parameters localSegmentPars(const xAOD::MuonSegment &seg)
Returns the localSegPars decoration from a xAODMuon::Segment.
MuonVal::ScalarBranch< float > & m_out_gen_Eta
global particle properties
void fillSeedInfo(const ObjectMatching &obj)
MuonVal::ScalarBranch< bool > & m_out_hasTruth
======= Truth block: Filled if we have a truth match. ============
MuonVal::ScalarBranch< float > & m_out_gen_minYhit
MuonVal::ScalarBranch< unsigned > & m_out_seed_n
========== Seed block: Filled when we have one or multiple seeds ============= seed count
MuonVal::VectorBranch< unsigned short > & m_out_segment_nRpcEtaHits
MuonVal::ScalarBranch< float > & m_out_gen_Pt
MuonVal::VectorBranch< bool > & m_out_segment_hasTimeFit
double houghTanTheta(const Amg::Vector3D &v)
Returns the hough tanTheta [y] / [z].
std::unordered_set< const xAOD::MuonSimHit * > getMatchingSimHits(const xAOD::MuonSegment &segment)
: Returns all sim hits matched to a xAOD::MuonSegment
Muon::NSW_PadTriggerSegment segment(const NSWL1::PadTrigger &data)
bool addBranch(std::shared_ptr< IMuonTesterBranch > branch)
Branch is added to the tree without transferring the ownership.
const MuonReadoutElement * getReadoutElement(const Identifier &id) const
Returns a generic Muon readout element.
MuonVal::ScalarBranch< float > & m_out_gen_tanphi