|
ATLAS Offline Software
|
Helper tool to print EDM objects to string in a fix format.
More...
#include <MuonEDMPrinterTool.h>
|
| MuonEDMPrinterTool (const std::string &, const std::string &, const IInterface *) |
| constructor More...
|
|
| ~MuonEDMPrinterTool ()=default |
| destructor More...
|
|
StatusCode | initialize () |
| AlgTool initilize. More...
|
|
std::string | print (const Trk::Track &track) const |
| print track parameters to string More...
|
|
std::string | printStations (const Trk::Track &track) const |
| print stations on track to string More...
|
|
std::string | print (const Trk::MuonTrackSummary &summary) const |
| print stations on track to string More...
|
|
std::string | print (const MuonSegment &segment) const |
| print segment parameters to string More...
|
|
std::string | print (const std::vector< const MuonSegment * > &segs) const |
| print vector of segments
More...
|
|
std::string | print (std::vector< std::unique_ptr< MuonSegment > > &segs) const |
|
std::string | print (const Trk::MeasurementBase &measurement) const |
| print Muon MeasurementBase to string More...
|
|
std::string | print (const Trk::PrepRawData &prd) const |
| print Muon PrepRawData to string More...
|
|
std::string | print (const std::vector< const Trk::MeasurementBase * > &measurements) const |
| print vector of measurement base to string More...
|
|
std::string | print (const MuonSegmentCombinationCollection &combiCol) const |
| print MuonSegmentCombinationCollection More...
|
|
std::string | print (const MuonSegmentCombination &combi) const |
| print MuonSegmentCombination More...
|
|
std::string | print (const MuonPattern &pattern) const |
| print MuonPattern More...
|
|
std::string | print (const MuonPatternCollection &patCol) const |
| print MuonPatternCollection More...
|
|
std::string | print (const MuonPrdPatternCollection &patCol) const |
| print MuonPatternCollection More...
|
|
std::string | print (const MuonPatternCombination &pattern) const |
| print MuonPatternCombination More...
|
|
std::string | print (const MuonPatternCombinationCollection &combiCol) const |
| print MuonPatternCombinationCollection More...
|
|
std::string | print (const MuonPatternChamberIntersect &intersect) const |
| print MuonPatternChamberIntersect More...
|
|
std::string | print (const Trk::TrackStateOnSurface &tsos) const |
| print the track state on surface to the string More...
|
|
std::string | printMeasurements (const Trk::Track &track) const |
| print measurements on track to string More...
|
|
std::string | printData (const Trk::MeasurementBase &measurement) const |
| print data part of Muon MeasurementBase to string More...
|
|
std::string | printId (const Trk::MeasurementBase &measurement) const |
| print identifier part of Muon MeasurementBase to string More...
|
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysInitialize () override |
| Perform system initialization for an algorithm. More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
Helper tool to print EDM objects to string in a fix format.
Definition at line 43 of file MuonEDMPrinterTool.h.
◆ StoreGateSvc_t
◆ MuonEDMPrinterTool()
Muon::MuonEDMPrinterTool::MuonEDMPrinterTool |
( |
const std::string & |
ty, |
|
|
const std::string & |
na, |
|
|
const IInterface * |
pa |
|
) |
| |
◆ ~MuonEDMPrinterTool()
Muon::MuonEDMPrinterTool::~MuonEDMPrinterTool |
( |
| ) |
|
|
default |
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ initialize()
StatusCode Muon::MuonEDMPrinterTool::initialize |
( |
| ) |
|
AlgTool initilize.
Definition at line 41 of file MuonEDMPrinterTool.cxx.
42 if (
parent() != toolSvc()) {
44 return StatusCode::FAILURE;
56 return StatusCode::SUCCESS;
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ interfaceID()
static const InterfaceID& Muon::MuonEDMPrinterTool::interfaceID |
( |
| ) |
|
|
inlinestatic |
access to tool interface
Definition at line 55 of file MuonEDMPrinterTool.h.
57 static const InterfaceID IID_MuonEDMPrinterTool(
"Muon::MuonEDMPrinterTool", 1, 0);
58 return IID_MuonEDMPrinterTool;
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ print() [1/21]
std::string Muon::MuonEDMPrinterTool::print |
( |
const MuonPattern & |
pattern | ) |
const |
print MuonPattern
Definition at line 585 of file MuonEDMPrinterTool.cxx.
587 std::ostringstream sout;
589 unsigned int nhits =
pattern.numberOfContainedPrds();
590 sout <<
"MuonPattern with " << nhits <<
" hits" << std::setprecision(5) <<
" theta "
591 <<
pattern.globalDirection().theta() <<
" phi " <<
pattern.globalDirection().phi() << std::setprecision(1)
592 <<
" r " << std::setw(5) << (
int)
pattern.globalPosition().perp() <<
" z " << std::setw(5)
593 << (
int)
pattern.globalPosition().z() << std::endl;
594 for (
unsigned int i = 0;
i < nhits; ++
i) {
597 sout <<
" ERROR found zero pointer on MuonPattern " << std::endl;
600 sout <<
" " <<
print(*prd);
601 if (
i < nhits - 1) sout << std::endl;
◆ print() [2/21]
print MuonPatternChamberIntersect
&& !detEls.count(detEl)
&& !detEls.count(detEl2)
Definition at line 696 of file MuonEDMPrinterTool.cxx.
698 std::ostringstream sout;
700 std::string chIdString(
"Unknown id");
701 double chTheta(-99.);
706 firstPrd =
intersect.prepRawDataVec().front();
718 unsigned int nchannelsEta = 0;
719 unsigned int nchannelsPhi = 0;
720 std::set<const Trk::TrkDetElementBase*> detEls;
721 std::vector<const Trk::PrepRawData*>::const_iterator hit =
intersect.prepRawDataVec().begin();
722 std::vector<const Trk::PrepRawData*>::const_iterator hit_end =
intersect.prepRawDataVec().end();
723 for (; hit != hit_end; ++hit) {
726 sout <<
" ERROR found zero pointer on MuonPatternChamberIntersect " << std::endl;
739 if (isMdt && detEls.empty()) {
743 if (MuonDetMgr ==
nullptr) {
751 if (
m_idHelperSvc->mdtIdHelper().numberOfMultilayers(
id) == 2) {
752 detEl2 = MuonDetMgr->getMdtReadoutElement(idml2);
757 detEls.insert(detEl1);
763 detEls.insert(detEl2);
787 unsigned int nchHitsEta = 0;
788 unsigned int nchHitsPhi = 0;
794 if (coll !=
nullptr) {
795 nchHitsEta = coll->size();
800 if (coll !=
nullptr) {
801 for (
const RpcPrepData* prd : *coll) {
811 if (coll !=
nullptr) {
812 for (
const TgcPrepData* prd : *coll) {
821 sout.setf(std::ios::left);
822 sout << std::setw(33) << chIdString <<
" neta " << std::setw(3) << neta;
824 sout <<
" nphi " << std::setw(3) << nphi;
828 double scaleEta = nchannelsEta != 0 ? 1. / nchannelsEta : 0.;
829 double scalePhi = nchannelsPhi != 0 ? 1. / nchannelsPhi : 0.;
830 sout <<
" occupancy eta " << std::fixed << std::setprecision(2) << std::setw(5) << scaleEta * nchHitsEta;
832 sout <<
" phi " << std::fixed << std::setw(5) << scalePhi * nchHitsPhi;
836 sout << std::setprecision(2) <<
" pat theta " << std::setw(5) <<
intersect.intersectDirection().theta()
837 <<
" ch theta " << std::setw(5) << chTheta <<
" ch phi " << std::setw(6) << chPhi << std::setprecision(1)
838 <<
" r " << std::setw(5) << (
int)
intersect.intersectPosition().perp() <<
" z " << std::setw(5)
◆ print() [3/21]
print MuonPatternCollection
Definition at line 607 of file MuonEDMPrinterTool.cxx.
609 std::ostringstream sout;
611 sout <<
"MuonPatternCollection with " << patCol.
size() <<
" patterns " << std::endl;
616 for (;
it != it_end; ++
it) {
618 sout <<
" WARNING, zero pointer detected in MuonPatternCollection!!! " << std::endl;
622 if (
it != it_last) sout << std::endl;
◆ print() [4/21]
print MuonPatternCombination
Definition at line 670 of file MuonEDMPrinterTool.cxx.
672 std::ostringstream sout;
674 unsigned int nchambers = combi.chamberData().size();
675 sout <<
"MuonPatternCombination with " << nchambers <<
" chambers ";
680 sout <<
" -> combi has no parameters ";
682 if (!combi.chamberData().empty()) sout << std::endl;
683 std::vector<MuonPatternChamberIntersect>::const_iterator chit = combi.chamberData().begin();
684 std::vector<MuonPatternChamberIntersect>::const_iterator chit_end = combi.chamberData().end();
685 std::vector<MuonPatternChamberIntersect>::const_iterator chit_last = chit_end;
687 for (; chit != chit_end; ++chit) {
688 const MuonPatternChamberIntersect& chamberIntersect = *chit;
689 sout <<
print(chamberIntersect);
690 if (chit != chit_last) sout << std::endl;
◆ print() [5/21]
print MuonPatternCombinationCollection
Definition at line 649 of file MuonEDMPrinterTool.cxx.
651 std::ostringstream sout;
653 sout <<
"MuonPatternCombinationCollection with combis " << combiCol.
size() << std::endl;
658 for (;
it != it_end; ++
it) {
660 sout <<
" WARNING, zero pointer detected in MuonPatternCombinationCollection!!! " << std::endl;
664 if (
it != it_last) sout << std::endl;
◆ print() [6/21]
print MuonPatternCollection
◆ print() [7/21]
std::string Muon::MuonEDMPrinterTool::print |
( |
const MuonSegment & |
segment | ) |
const |
print segment parameters to string
Definition at line 315 of file MuonEDMPrinterTool.cxx.
318 std::ostringstream sout;
328 double shortestTubeLen = 1e9;
330 std::vector<const Trk::MeasurementBase*>::const_iterator hit =
segment.containedMeasurements().begin();
331 std::vector<const Trk::MeasurementBase*>::const_iterator hit_end =
segment.containedMeasurements().end();
332 for (; hit != hit_end; ++hit) {
338 const CompetingMuonClustersOnTrack* crot =
dynamic_cast<const CompetingMuonClustersOnTrack*
>(*hit);
339 if (crot)
id = crot->containedROTs().front()->identify();
341 if (!
id.is_valid())
continue;
350 const MdtDriftCircleOnTrack* mdt =
dynamic_cast<const MdtDriftCircleOnTrack*
>(rot);
351 if (mdt && mdt->prepRawData()) {
352 double tubelen = 0.5 * mdt->prepRawData()->detectorElement()->tubeLength(
id);
353 if (tubelen < shortestTubeLen) {
355 shortestTubeLen = tubelen;
356 mdtDetEl = mdt->prepRawData()->detectorElement();
360 if (!measuresPhi) ++ntrigEta;
368 sout << std::setprecision(2) <<
" chi2 " << std::setw(7) << fq->
chiSquared();
370 sout <<
" no fit Quality ";
373 sout <<
" neta " << std::setw(2) << neta <<
" nphi " << std::setw(2) << nphi <<
" nTrigEta " << std::setw(2)
376 const MuonSegmentQuality*
q =
dynamic_cast<const MuonSegmentQuality*
>(fq);
377 if (
q) sout << std::setw(2) <<
" nholes " <<
q->numberOfHoles();
380 sout <<
" theta " << std::fixed << std::setprecision(5) << std::setw(7) <<
segment.globalDirection().theta()
381 <<
" phi " << std::fixed << std::setprecision(3) << std::setw(6) <<
segment.globalDirection().phi();
384 sout <<
" T0 " << std::fixed << std::setprecision(2) << std::setw(5) <<
segment.time() <<
" err "
385 << std::setw(5) <<
segment.errorTime();
389 double distFromEdge = posAlongTube - shortestTubeLen;
390 if (distFromEdge < -100.)
391 sout <<
" inside chamber";
392 else if (distFromEdge < -1.)
393 sout <<
" close to edge";
394 else if (distFromEdge < 0.0001)
397 sout <<
" outside chamber";
◆ print() [8/21]
print MuonSegmentCombination
Definition at line 559 of file MuonEDMPrinterTool.cxx.
561 std::ostringstream sout;
563 unsigned int nstations = combi.numberOfStations();
564 sout <<
"SegmentCombination with stations " << nstations << std::endl;
567 for (
unsigned int i = 0;
i < nstations; ++
i) {
573 if (!stationSegs || stationSegs->empty())
continue;
577 sout <<
print(*stationSegs);
578 if (
i != nstations - 1) sout << std::endl;
◆ print() [9/21]
print MuonSegmentCombinationCollection
Definition at line 538 of file MuonEDMPrinterTool.cxx.
540 std::ostringstream sout;
542 sout <<
"MuonSegmentCombinationCollection with combis " << combiCol.
size() << std::endl;
547 for (;
it != it_end; ++
it) {
549 sout <<
" WARNING, zero pointer detected in MuonSegmentCombinationCollection!!! " << std::endl;
553 if (
it != it_last) sout << std::endl;
◆ print() [10/21]
print vector of segments
Definition at line 494 of file MuonEDMPrinterTool.cxx.
497 std::ostringstream sout;
499 std::vector<const MuonSegment*>::const_iterator
it = segs.begin();
500 std::vector<const MuonSegment*>::const_iterator it_end = segs.end();
501 std::vector<const MuonSegment*>::const_iterator it_last = it_end;
503 for (;
it != it_end; ++
it) {
505 sout <<
" WARNING, zero pointer detected in MuonSegment vector!!! " << std::endl;
509 if (
it != it_last) sout << std::endl;
◆ print() [11/21]
print vector of measurement base to string
Definition at line 455 of file MuonEDMPrinterTool.cxx.
458 std::ostringstream sout;
461 std::vector<std::string> idStrings;
462 std::vector<std::string> dataStrings;
463 unsigned int idWidth = 0;
465 std::vector<const Trk::MeasurementBase*>::const_iterator hit = measurements.begin();
466 std::vector<const Trk::MeasurementBase*>::const_iterator hit_end = measurements.end();
468 for (; hit != hit_end; ++hit) {
470 sout <<
" WARNING, zero pointer detected in MeasurementBase vector!!! " << std::endl;
474 std::string idStr =
printId(**hit);
475 idStrings.push_back(idStr);
476 if (idStr.length() > idWidth) idWidth = idStr.length();
479 dataStrings.push_back(dataStr);
484 unsigned int n = idStrings.size();
485 for (
unsigned int i = 0;
i <
n; ++
i) {
486 sout << std::left << std::setw(idWidth) << idStrings[
i] << std::right <<
" " << dataStrings[
i];
487 if (
i !=
n - 1) sout << std::endl;
◆ print() [12/21]
print the alignment effects on track object to the string
Definition at line 995 of file MuonEDMPrinterTool.cxx.
996 std::stringstream aeot_string;
999 return aeot_string.str();
◆ print() [13/21]
print the material effects object to the string
Definition at line 969 of file MuonEDMPrinterTool.cxx.
970 std::stringstream mat_string{};
980 mat_string<<
" deltaE: "<<eloss->
deltaE();
988 mat_string<<
" Length "<<eloss->
length();
993 return mat_string.str();
◆ print() [14/21]
◆ print() [15/21]
print stations on track to string
Definition at line 60 of file MuonEDMPrinterTool.cxx.
63 std::ostringstream sout;
67 sout <<
"Hits: eta " <<
summary.netaHits() <<
" phi " <<
summary.nphiHits() <<
" holes " <<
summary.nholes()
68 <<
" outliers " <<
summary.noutliers() <<
" pseudo " <<
summary.npseudoMeasurements() <<
" scatterers "
69 <<
summary.nscatterers() <<
" close Hits " <<
summary.ncloseHits() << std::endl;
72 const std::vector<ChamberHitSummary>& chamberHitSummary =
summary.chamberHitSummary();
73 sout.setf(std::ios::left);
74 std::vector<ChamberHitSummary>::const_iterator chit = chamberHitSummary.begin();
75 std::vector<ChamberHitSummary>::const_iterator chit_end = chamberHitSummary.end();
76 std::vector<ChamberHitSummary>::const_iterator chit_last = chit_end - 1;
77 for (; chit != chit_end; ++chit) {
81 sout <<
" " << std::setw(35) <<
m_idHelperSvc->toStringChamber(chId);
83 const ChamberHitSummary::Projection&
first = isMdt ? chit->mdtMl1() : chit->etaProjection();
84 const ChamberHitSummary::Projection&
second = isMdt ? chit->mdtMl2() : chit->phiProjection();
87 std::string firstString = isMdt ?
"ml1 " :
"eta ";
88 std::string secondString = isMdt ?
"ml2 " :
"phi ";
90 sout <<
" Hits: " << firstString << std::setw(3) <<
first.nhits <<
" " << secondString << std::setw(3)
95 if (
first.nholes != 0) sout << firstString << std::setw(3) <<
first.nholes;
97 if (
first.nholes != 0) sout <<
" ";
98 sout << secondString << std::setw(3) <<
second.nholes;
102 sout <<
" Outliers: ";
103 if (
first.noutliers != 0) sout << firstString << std::setw(3) <<
first.noutliers <<
" ";
104 if (
second.noutliers != 0) {
105 if (
first.noutliers != 0) sout <<
" ";
106 sout << secondString << std::setw(3) <<
second.noutliers;
112 if (
first.ndeltas != 0) sout << firstString << std::setw(3) <<
first.ndeltas <<
" ";
113 if (
second.ndeltas != 0) {
114 if (
first.ndeltas != 0) sout <<
" ";
115 sout << secondString << std::setw(3) <<
second.ndeltas;
120 sout <<
" Close Hits: ";
121 if (
first.ncloseHits != 0) sout << firstString << std::setw(3) <<
first.ncloseHits <<
" ";
122 if (
second.ncloseHits != 0) {
123 if (
first.ncloseHits != 0) sout <<
" ";
124 sout << secondString << std::setw(3) <<
second.ncloseHits;
128 if (chit != chit_last) sout << std::endl;
◆ print() [16/21]
print Muon PrepRawData to string
Definition at line 403 of file MuonEDMPrinterTool.cxx.
406 std::ostringstream sout;
414 pos = &
cl->globalPosition();
418 pos = &mdt->detectorElement()->surface(
id).center();
421 if (strip)
pos = &
strip->globalPosition();
425 sout <<
" unknown type of muon prepdata " << std::endl;
427 double h_r =
pos->perp();
428 double h_z =
pos->z();
429 double h_phi =
pos->phi();
430 double h_theta =
pos->theta();
436 if (rpc)
rpcTime = rpc->time();
438 sout <<
"r " << std::fixed << std::setprecision(0) << std::setw(5) << h_r <<
" z " << std::fixed
439 << std::setprecision(0) << std::setw(5) << h_z <<
" theta " << std::fixed << std::setprecision(3)
440 << std::setw(4) << h_theta <<
" phi " << std::fixed << std::setprecision(3) << std::setw(4) << h_phi
441 <<
" error " << std::fixed << std::setprecision(2) << std::setw(5) <<
error;
442 if (rpc) sout <<
" time " << std::fixed << std::setprecision(2) << std::setw(5) <<
rpcTime;
◆ print() [17/21]
print ResidualPull object to string
Definition at line 861 of file MuonEDMPrinterTool.cxx.
863 std::ostringstream sout;
866 const std::vector<double>&
pull = resPull.
pull();
867 for (
unsigned int i = 0;
i <
residual.size(); ++
i) {
869 sout <<
" residual " << std::setprecision(3) << std::setw(8) <<
residual[
i] <<
" ";
872 for (
unsigned int i = 0;
i <
pull.size(); ++
i) sout << std::setprecision(3) << std::setw(8) <<
pull[
i] <<
" ";
◆ print() [18/21]
std::string Muon::MuonEDMPrinterTool::print |
( |
const Trk::Track & |
track | ) |
const |
print track parameters to string
Definition at line 279 of file MuonEDMPrinterTool.cxx.
282 std::ostringstream sout;
288 sout << std::setprecision(4) <<
" : chi2 " << fq->
chiSquared() <<
" ndof " << fq->
numberDoF();
290 sout <<
" no fit Quality ";
294 sout <<
" " <<
print(*pp);
296 sout <<
" no perigee ";
299 sout<<
"----- Track states -------"<<std::endl;
302 if (tsos->measurementOnTrack()) sout<<
" **** "<<std::setw(3)<<
n<<
" Measurement: "<<
print(*tsos->measurementOnTrack())<<std::endl;
303 if (tsos->materialEffectsOnTrack()) sout<<
" **** "<<std::setw(3)<<
n<<
" Material: "<<
print(*tsos->materialEffectsOnTrack())<<std::endl;
304 if (tsos->alignmentEffectsOnTrack()) sout<<
" **** "<<std::setw(3)<<
n<<
" AEOT: "<<
print(*tsos->alignmentEffectsOnTrack())<<std::endl;
305 if (tsos->trackParameters()) sout<<
" **** "<<std::setw(3)<<
n<<
" Parameters: "<<
print(*tsos->trackParameters())<<std::endl;
308 sout<<
"-----------------------------"<<std::endl;
◆ print() [19/21]
print Trk::TrackParameters
Definition at line 845 of file MuonEDMPrinterTool.cxx.
847 std::ostringstream sout;
848 sout <<
"r " << std::fixed << std::setprecision(0) << std::setw(5)
849 <<
pars.position().perp()
850 <<
" z " << std::fixed << std::setprecision(0) << std::setw(6) <<
pars.position().z() <<
" theta "
851 << std::fixed << std::setprecision(5) << std::setw(7) <<
pars.momentum().theta()<<
" eta "
852 << std::fixed << std::setprecision(5) << std::setw(7) <<
pars.momentum().eta() <<
" phi " << std::fixed
853 << std::setprecision(3) << std::setw(6) <<
pars.momentum().phi() <<
" q*p(GeV) " << std::scientific
854 << std::setprecision(3) << std::setw(10) <<
pars.momentum().mag() *
pars.charge() * 1
e-3 <<
" pT(GeV) "
855 << std::scientific << std::setprecision(3) << std::setw(9) <<
pars.momentum().perp() * 1
e-3;
◆ print() [20/21]
print the track state on surface to the string
Definition at line 1002 of file MuonEDMPrinterTool.cxx.
1003 std::stringstream tsos_str{};
1008 return tsos_str.str();
◆ print() [21/21]
std::string Muon::MuonEDMPrinterTool::print |
( |
std::vector< std::unique_ptr< MuonSegment > > & |
segs | ) |
const |
Definition at line 516 of file MuonEDMPrinterTool.cxx.
519 std::ostringstream sout;
521 std::vector<std::unique_ptr<MuonSegment> >
::iterator it = segs.begin();
522 std::vector<std::unique_ptr<MuonSegment> >
::iterator it_end = segs.end();
523 std::vector<std::unique_ptr<MuonSegment> >
::iterator it_last = it_end;
525 for (;
it != it_end; ++
it) {
527 sout <<
" WARNING, zero pointer detected in MuonSegment vector!!! " << std::endl;
531 if (
it != it_last) sout << std::endl;
◆ printData()
print data part of Muon MeasurementBase to string
Definition at line 878 of file MuonEDMPrinterTool.cxx.
880 std::ostringstream sout;
890 sout <<
"r " << std::fixed << std::setprecision(0) << std::setw(5) << h_r <<
" z " << std::fixed
891 << std::setprecision(0) << std::setw(5) << h_z <<
" phi " << std::fixed << std::setprecision(3) << std::setw(4)
892 << h_phi <<
" theta " << std::fixed << std::setprecision(3) << std::setw(4) << h_theta
893 <<
" lPos " << std::fixed << std::setprecision(2) << std::setw(5) << local_pos
894 <<
" error " << std::fixed << std::setprecision(2) << std::setw(5) <<
error;
901 const MdtDriftCircleOnTrack* mdt =
dynamic_cast<const MdtDriftCircleOnTrack*
>(rot);
903 sout <<
" r_drift " << std::fixed << std::setprecision(2) << std::setw(5) << mdt->driftRadius();
907 const RpcClusterOnTrack* rpc =
dynamic_cast<const RpcClusterOnTrack*
>(rot);
911 sout <<
" time " << std::fixed << std::setprecision(2) << std::setw(5) << rpcPRD->time();
917 const CompetingMuonClustersOnTrack* crot =
dynamic_cast<const CompetingMuonClustersOnTrack*
>(&measurement);
919 unsigned int nlayers = 0;
920 unsigned int nhits = 0;
921 std::set<Identifier>
layers;
922 std::vector<double> rpcTimes;
923 const std::vector<const MuonClusterOnTrack*>& rots = crot->containedROTs();
925 rpcTimes.reserve(nhits);
926 std::vector<const MuonClusterOnTrack*>::const_iterator itR = rots.begin(), itR_end = rots.end();
927 for (; itR != itR_end; ++itR) {
930 const RpcClusterOnTrack* rpc =
dynamic_cast<const RpcClusterOnTrack*
>(*itR);
931 const RpcPrepData* rpcPRD = rpc ? rpc->prepRawData() :
nullptr;
932 if (rpcPRD) rpcTimes.push_back(rpcPRD->time());
935 sout <<
" CompRot: hits " << nhits <<
" layers " << nlayers;
937 if (!rpcTimes.empty()) {
938 sout << (rpcTimes.size() == 1 ?
" time" :
" times") << std::fixed << std::setprecision(2);
940 for (; itD != itD_end; ++itD) sout <<
" " << std::setw(5) << *itD;
◆ printId()
print identifier part of Muon MeasurementBase to string
Definition at line 950 of file MuonEDMPrinterTool.cxx.
954 if (!
id.is_valid()) {
957 idStr =
"pseudo measurement";
959 idStr =
"no Identifier";
◆ printMeasurements()
std::string Muon::MuonEDMPrinterTool::printMeasurements |
( |
const Trk::Track & |
track | ) |
const |
print measurements on track to string
Definition at line 154 of file MuonEDMPrinterTool.cxx.
156 std::ostringstream sout;
164 std::multimap<const Trk::MeasurementBase*, const Trk::AlignmentEffectsOnTrack*> measAndTheirAlignmentEffects;
167 for (;
it != it_end; ++
it) {
168 aeot = (*it)->alignmentEffectsOnTrack();
174 for (; it2 != it2_end; ++it2) {
175 m = (*it2)->measurementOnTrack();
183 measAndTheirAlignmentEffects.insert(
184 std::pair<const Trk::MeasurementBase*, const Trk::AlignmentEffectsOnTrack*>(
m, aeot));
196 std::vector<std::string> idStrings;
197 std::vector<std::string> dataStrings;
198 unsigned int idWidth = 0;
199 for (;
it != it_end; ++
it) {
200 m = (*it)->measurementOnTrack();
204 idStrings.push_back(idStr);
205 if (idStr.length() > idWidth) idWidth = idStr.length();
209 if (trackParameters) {
211 measAndTheirAlignmentEffects.begin();
212 itMap = measAndTheirAlignmentEffects.find(
m);
213 if (itMap != measAndTheirAlignmentEffects.end()) {
214 std::vector<const Trk::AlignmentEffectsOnTrack*> aeotos;
215 aeotos.push_back(itMap->second);
217 if (itMap != measAndTheirAlignmentEffects.end() && itMap->first ==
m)
218 aeotos.push_back(itMap->second);
221 if (resPull) dataStr +=
print(*resPull);
222 if (resPull) dataStr +=
" (AEOT)";
224 std::optional<Trk::ResidualPull> resPull{
226 if (resPull) dataStr +=
print(*resPull);
230 dataStr +=
" (Outlier)";
232 dataStr +=
" (Hole)";
234 dataStrings.push_back(dataStr);
236 aeot = (*it)->alignmentEffectsOnTrack();
238 std::string idStr =
" AEOT ";
239 idStrings.push_back(idStr);
240 std::ostringstream souta;
241 souta << std::setprecision(3) <<
" deltaTranslation (mm) " << aeot->
deltaTranslation() <<
" error "
244 dataStrings.push_back(souta.str());
249 unsigned int n = idStrings.size();
250 for (
unsigned int i = 0;
i <
n; ++
i) {
251 sout << std::left << std::setw(idWidth) << idStrings[
i] << std::right <<
" " << dataStrings[
i];
252 if (
i !=
n - 1) sout << std::endl;
◆ printPatRec()
std::string Muon::MuonEDMPrinterTool::printPatRec |
( |
const Trk::Track & |
track | ) |
|
|
static |
produce a string indicating who produced the track
Definition at line 260 of file MuonEDMPrinterTool.cxx.
268 return "MuidCombined";
◆ printStations()
std::string Muon::MuonEDMPrinterTool::printStations |
( |
const Trk::Track & |
track | ) |
const |
◆ renounce()
◆ renounceArray()
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_DetectorManagerKey
Initial value:{
this,
"DetectorManagerKey",
"MuonDetectorManager",
"Key of input MuonDetectorManager condition data",
}
Definition at line 155 of file MuonEDMPrinterTool.h.
◆ m_detStore
◆ m_edmHelperSvc
Initial value:{
this,
"edmHelper",
"Muon::MuonEDMHelperSvc/MuonEDMHelperSvc",
"Handle to the service providing the IMuonEDMHelperSvc interface",
}
Definition at line 142 of file MuonEDMPrinterTool.h.
◆ m_evtStore
◆ m_idHelperSvc
Initial value:{
this,
"MuonIdHelperSvc",
"Muon::MuonIdHelperSvc/MuonIdHelperSvc",
}
Definition at line 137 of file MuonEDMPrinterTool.h.
◆ m_mdtKey
Initial value:{
this,
"MdtPrdCollection",
"MDT_DriftCircles",
"MDT PRD Container",
}
Definition at line 161 of file MuonEDMPrinterTool.h.
◆ m_pullCalculator
Initial value:{
this,
"ResidualPullCalculator",
"Trk::ResidualPullCalculator/ResidualPullCalculator",
}
Definition at line 149 of file MuonEDMPrinterTool.h.
◆ m_rpcKey
Initial value:{
this,
"RpcPrdCollection",
"RPC_Measurements",
"RPC PRD Container",
}
Definition at line 167 of file MuonEDMPrinterTool.h.
◆ m_tgcKey
Initial value:{
this,
"TgcPrdCollection",
"TGC_Measurements",
"TGC PRD Container",
}
Definition at line 173 of file MuonEDMPrinterTool.h.
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
JetConstituentVector::iterator iterator
bool effectsLastFromNowOn() const
Returns true if the effects of this AlignmentEffectsOnTrack apply to all remaining TrackStatesOnSurfa...
double deltaPhi() const
returns the
double sigmaMinusDeltaE() const
returns the negative side
const TrackParameters * trackParameters() const
return ptr to trackparameters const overload
@ MuidCombined
MuidCombined.
int getNLayers() const
Returns the number of tube layers inside the multilayer.
Const iterator class for DataVector/DataList.
int NphiStripPanels() const
returns the number of phi strip panels (1 or 2)
std::string find(const std::string &s)
return a remapped string
int nGasGapPerLay() const
returns the number of gasgaps
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
MuonPrepDataCollection< RpcPrepData > RpcPrepDataCollection
const std::vector< Identifier > & vectorOfAffectedTSOS() const
Returns a vector of the affected TSOS in the track.
const Amg::MatrixX & localCovariance() const
return const ref to the error matrix
@ MuidStandAlone
MuidStandalone.
@ Unbiased
RP with track state that has measurement not included.
bool contains(ParamDefs par) const
The simple check for the clients whether the parameter is contained.
const std::vector< double > & pull() const
return pull vector
MuonPrepDataCollection< MdtPrepData > MdtPrepDataCollection
double sigmaDeltaE() const
returns the symmatric error
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
represents a deflection of the track caused through multiple scattering in material.
const MeasurementBase * measurementOnTrack() const
returns MeasurementBase const overload
An RpcReadoutElement corresponds to a single RPC module; therefore typicaly a barrel muon station con...
@ Muonboy
Tracks from MuonBoy.
double deltaAngle() const
returns the
Class to represent misalignments or 'discontinuities' on tracks These have a surface where the z axis...
int nGasGaps() const
Returns the number of gas gaps associated with the readout element (2 or 3)
structure to hold information per chamber in the muon system
virtual void setOwner(IDataHandleHolder *o)=0
@ Outlier
This TSoS contains an outlier, that is, it contains a MeasurementBase/RIO_OnTrack which was not used ...
Amg::Transform3D globalToLocalTransf(const int tubeLayer, const int tube) const
Class to handle pseudo-measurements in fitters and on track objects.
represents the full description of deflection and e-loss of a track in material.
double sigmaDeltaTheta() const
returns the
@ Hole
A hole on the track - this is defined in the following way.
const MaterialEffectsBase * materialEffectsOnTrack() const
return material effects const overload
@ MuGirlUnrefitted
Tracks from MuGirl not refitted with iPat.
int NphiStrips() const
returns the number of phi strips
double deltaE() const
returns the
A TgcReadoutElement corresponds to a single TGC chamber; therefore typically a TGC station contains s...
@ MuidVertexAssociator
MuidVertexAssociator.
@ MuGirlLowBeta
MuGirlLowBeta.
Detailed track summary for the muon system Give access to hit counts per chamber.
@ STACO
Tracks produced by STACO.
Class to represent and store fit qualities from track reconstruction in terms of and number of degre...
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
int nStrips(int gasGap) const
Returns the number of strips in a given gas gap.
int NetaStrips() const
returns the number of eta strips
int nWireGangs(int gasGap) const
Returns the number of wire gangs (Random grouping of wires) in a given gas gap.
const Amg::MatrixX & localCovariance() const
Interface method to get the localError.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Identifier identify() const
return the identifier
represents the track state (measurement, material, fit parameters and quality) at a surface.
A summary of the information contained by a track.
This class describes energy loss material effects in the ATLAS tracking EDM.
virtual const Amg::Vector3D & globalPosition() const =0
Interface method to get the global Position.
StatusCode initialize(bool used=true)
Eigen::Matrix< double, 3, 1 > Vector3D
const LocalParameters & localParameters() const
Interface method to get the LocalParameters.
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const EnergyLoss * energyLoss() const
returns the energy loss object.
std::vector< Identifier > identifiers(const InDetSimDataCollection &coll)
@ StacoLowPt
Tracks produced by StacoLowpt.
std::optional< double > intersect(const AmgVector(N)&posA, const AmgVector(N)&dirA, const AmgVector(N)&posB, const AmgVector(N)&dirB)
Calculates the point B' along the line B that's closest to a second line A.
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
#define ATH_MSG_WARNING(x)
std::vector< std::unique_ptr< MuonSegment > > SegmentVec
Identifier identify() const
return the identifier -extends MeasurementBase
const ScatteringAngles * scatteringAngles() const
returns the MCS-angles object.
double sigmaDeltaPhi() const
returns the
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
@ MuTag
Tracks produced by MuTag.
double chiSquared() const
returns the of the overall track fit
double sigmaDeltaTranslation() const
returns the
int numberDoF() const
returns the number of degrees of freedom of the overall track or vertex fit as integer
MuonPrepDataCollection< TgcPrepData > TgcPrepDataCollection
double deltaTranslation() const
returns the
const std::vector< double > & residual() const
return residual vector
double deltaTheta() const
returns the
int getNtubesperlayer() const
Returns the number of tubes in each tube layer.
virtual const Amg::Vector3D & center() const =0
Return the center of the element.
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
size_type size() const noexcept
Returns the number of elements in the collection.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
double sigmaPlusDeltaE() const
returns the positive side
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
Muon::NSW_PadTriggerSegment segment(const NSWL1::PadTrigger &data)
double sigmaDeltaAngle() const
returns the
virtual const TrkDetElementBase * detectorElement() const =0
return the detector element corresponding to this PRD The pointer will be zero if the det el is not d...
@ MuidComb
Back compatibility with older ESD versions.