|
ATLAS Offline Software
|
#include <MuonTrackPerformanceAlg.h>
|
| MuonTrackPerformanceAlg (const std::string &name, ISvcLocator *pSvcLocator) |
|
virtual | ~MuonTrackPerformanceAlg () |
|
virtual StatusCode | initialize () override |
|
virtual StatusCode | execute () override |
|
virtual StatusCode | finalize () override |
|
virtual unsigned int | cardinality () const override final |
|
virtual StatusCode | sysInitialize () override |
| Override sysInitialize. More...
|
|
virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. 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 | 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 |
|
|
void | extractEtaPhiCounts (const std::set< Identifier > &ids, int &neta, int &nphi, int &netaCh, int &nphiCh) const |
|
bool | handleTracks () |
|
bool | handleTrackTruth (const TrackCollection &trackCollection) |
|
bool | handleSegmentCombi (const Muon::MuonSegmentCombination &combi) |
|
void | doSummary (const TrackCollection &tracks) const |
|
void | doSummary (const Muon::IMuonTrackTruthTool::TruthTree &truthTracks) const |
|
std::string | print (const Muon::IMuonTrackTruthTool::TruthTreeEntry &trackTruth) const |
|
std::string | eventInfo () const |
|
int | eventNumber () const |
|
void | printMissingChambers () const |
|
void | printMissingTracks () const |
|
void | printFakeTracks () const |
|
std::pair< int, int > | countHitsInChamber (const Identifier &chId, const std::set< Identifier > &hitIds) const |
| counts number of eta (first number) and phi (second number in pair) hits in the set of hit IDs in the given chamber More...
|
|
bool | insertChamber (const Identifier &chId, const std::set< Identifier > &hits, int minEtaHits, int minPhiHits, ChamberData &chamberData) const |
| insert chamber information into ChamberData if hits counts pass cuts, returns true if anything was inserted More...
|
|
bool | insertTechnology (const std::set< Identifier > &chIds, const std::set< Identifier > &hits, int minEtaHits, int minPhiHits, std::vector< ChamberData > &chamberData) const |
| insert set of chambers into chamber data if hits counts pass cuts, returns true if anything was inserted More...
|
|
bool | insertStationLayers (const std::set< Identifier > &chIds, const std::set< Muon::MuonStationIndex::StIndex > &exclusionList, std::set< Muon::MuonStationIndex::StIndex > &layers) const |
| insert station layers into layer set if they are not in exclusion list More...
|
|
bool | insertStationLayers (const std::vector< ChamberData > &chambers, const std::set< Muon::MuonStationIndex::StIndex > &exclusionList, std::set< Muon::MuonStationIndex::StIndex > &layers, bool usePrecision) const |
| insert chamber data into layers if not in exclusion list More...
|
|
TrackData * | evaluateTrackTruthOverlap (const Muon::MuonTrackTruth &truthTrack) const |
| evaluate track/truth overlap and create the corresponding overlap description object More...
|
|
TrackData * | createTrackData (const Muon::IMuonTrackTruthTool::TruthTreeEntry &trackTruth) const |
| create track data object for truth track More...
|
|
void | addTrackToTrackData (const Trk::Track &track, TrackData &trackData) const |
|
std::string | print (const TrackData &trackData) const |
| print TrackData to a string More...
|
|
std::string | print (const EventData &event, const std::vector< TrackData * > &tracks, const std::string &message) const |
|
std::string | print (const EventData &event, const std::vector< const Trk::Track * > &tracks, const std::string &message) const |
|
std::string | printTrackCounters (bool doSecondaries=true) const |
| print all the track counters to a string to provide a summary More...
|
|
void | clearTracks (std::vector< const Trk::Track * > tracks) |
|
void | clearTracks (std::vector< TrackData * > tracks) |
|
void | clearEvent (EventData &event) |
|
HepMC::ConstGenParticlePtr | getMother (const TruthTrajectory &traj) const |
|
HepMC::ConstGenParticlePtr | getInitialState (const TruthTrajectory &traj) const |
|
bool | goodTruthTrack (const Muon::IMuonTrackTruthTool::TruthTreeEntry &entry) const |
|
bool | isSecondary (const Muon::MuonTrackTruth &truthTrack) const |
|
bool | isSecondary (const Muon::IMuonTrackTruthTool::TruthTreeEntry &entry) const |
|
bool | isSecondary (const TruthTrajectory &truthTrajectory) const |
|
bool | selectPdg (int pdg) const |
|
void | printSummary (const std::vector< EventSummary > &summary, std::string typeName) const |
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &) |
| specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &) |
| specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
|
|
SG::ReadHandleKey< TrackCollection > | m_trackKey |
| Location of the input tracks. More...
|
|
SG::ReadHandleKey< xAOD::MuonContainer > | m_muons {this, "MuonLocation", "Muons", "input muons"} |
|
SG::ReadHandleKey< xAOD::EventInfo > | m_eventInfoKey {this, "EventInfoKey", "EventInfo", "EventInfo key"} |
|
const xAOD::EventInfo * | m_eventInfo |
| pointer to the event info More...
|
|
SG::ReadHandleKey< McEventCollection > | m_mcEventColl {this, "McEventCollectionKey", "TruthEvent", "McEventCollection"} |
|
SG::ReadHandleKeyArray< MuonSimDataCollection > | m_muonSimData |
|
SG::ReadHandleKey< CscSimDataCollection > | m_cscSimData {this, "CSC_SDO_Container", "CSC_SDO", "CSC SDO"} |
|
SG::ReadHandleKey< TrackRecordCollection > | m_trackRecord {this, "TrackRecord", "MuonEntryLayerFilter", "Track Record Collection"} |
|
int | m_doSummary {} |
|
int | m_doHitResiduals {} |
|
int | m_doTrackDebug {} |
|
bool | m_doTruth {} |
|
bool | m_doHistos {} |
|
double | m_momentumCutSim {} |
|
double | m_momentumCut {} |
|
bool | m_usePtCut {} |
|
bool | m_isCombined {} |
|
bool | m_doSegments {} |
|
bool | m_writeToFile {} |
|
bool | m_doStau {} |
|
ServiceHandle< Muon::IMuonIdHelperSvc > | m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"} |
|
PublicToolHandle< Muon::MuonEDMPrinterTool > | m_printer {this, "Printer", "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"} |
|
ServiceHandle< Muon::IMuonEDMHelperSvc > | m_edmHelperSvc |
|
ToolHandle< Muon::IMuonTrackTruthTool > | m_truthTool {this, "TrackTruthTool",""} |
|
ToolHandle< Trk::ITrackSummaryHelperTool > | m_summaryHelperTool {this, "SummaryHelperTool", ""} |
|
int | m_doEventListMissed {} |
|
int | m_doEventListIncomplete {} |
|
int | m_doEventListFake {} |
|
int | m_minMdtHits {} |
|
int | m_minCscEtaHits {} |
|
int | m_minCscPhiHits {} |
|
int | m_minRpcEtaHits {} |
|
int | m_minRpcPhiHits {} |
|
int | m_minTgcEtaHits {} |
|
int | m_minTgcPhiHits {} |
|
int | m_minsTgcEtaHits {} |
|
int | m_minsTgcPhiHits {} |
|
int | m_minMMEtaHits {} |
|
unsigned int | m_nevents {} |
|
unsigned int | m_ntracks {} |
|
unsigned int | m_nmatchedTracks {} |
|
unsigned int | m_nmatchedTracksSecondary {} |
|
unsigned int | m_nmatchedFakeTracks {} |
|
unsigned int | m_nfakeTracks {} |
|
unsigned int | m_nfakeTracksHighPt {} |
|
unsigned int | m_nfakeTracksLowPt {} |
|
unsigned int | m_nfakeTracksSL {} |
|
unsigned int | m_nmissedTracks {} |
|
unsigned int | m_nmissedTracksOneStation {} |
|
unsigned int | m_nmissedTracksSecondary {} |
|
unsigned int | m_nmissedTracksOneStationSecondary {} |
|
unsigned int | m_nmissingStationMomLoss {} |
|
unsigned int | m_nmissingStationLayer {} |
|
unsigned int | m_nmissingCscStationLayer {} |
|
unsigned int | m_nmissingStationLayerTrigger {} |
|
unsigned int | m_nmissingStation {} |
|
unsigned int | m_nwrongStationLayer {} |
|
unsigned int | m_nwrongStationLayerTrigger {} |
|
unsigned int | m_nwrongStation {} |
|
unsigned int | m_ntruthTracks {} |
|
unsigned int | m_ntruthTracksSecondary {} |
|
std::vector< EventData > | m_badEvents |
|
std::string | m_fileName |
| name of external file to write statistics More...
|
|
std::ofstream | m_fileOutput |
| output file More...
|
|
IntegerArrayProperty | m_pdgsToBeConsidered |
|
std::set< int > | m_selectedPdgs |
|
int | m_trackType {} |
|
std::string | m_trackTypeString |
|
DataObjIDColl | m_extendedExtraObjects |
|
StoreGateSvc_t | m_evtStore |
| Pointer to StoreGate (event store by default) More...
|
|
StoreGateSvc_t | m_detStore |
| Pointer to StoreGate (detector store by default) More...
|
|
std::vector< SG::VarHandleKeyArray * > | m_vhka |
|
bool | m_varHandleArraysDeclared |
|
Definition at line 50 of file MuonTrackPerformanceAlg.h.
◆ StoreGateSvc_t
◆ MuonTrackPerformanceAlg()
MuonTrackPerformanceAlg::MuonTrackPerformanceAlg |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~MuonTrackPerformanceAlg()
MuonTrackPerformanceAlg::~MuonTrackPerformanceAlg |
( |
| ) |
|
|
virtual |
◆ addTrackToTrackData()
◆ cardinality()
virtual unsigned int MuonTrackPerformanceAlg::cardinality |
( |
| ) |
const |
|
inlinefinaloverridevirtual |
◆ clearEvent()
◆ clearTracks() [1/2]
void MuonTrackPerformanceAlg::clearTracks |
( |
std::vector< const Trk::Track * > |
tracks | ) |
|
|
private |
Definition at line 1352 of file MuonTrackPerformanceAlg.cxx.
1353 std::vector<const Trk::Track*>::const_iterator
it = tracks.begin();
1354 std::vector<const Trk::Track*>::const_iterator it_end = tracks.end();
1355 for (;
it != it_end; ++
it)
delete *
it;
◆ clearTracks() [2/2]
void MuonTrackPerformanceAlg::clearTracks |
( |
std::vector< TrackData * > |
tracks | ) |
|
|
private |
Definition at line 1359 of file MuonTrackPerformanceAlg.cxx.
1360 std::vector<TrackData*>::const_iterator
it = tracks.begin();
1361 std::vector<TrackData*>::const_iterator it_end = tracks.end();
1362 for (;
it != it_end; ++
it) {
delete *
it; }
◆ countHitsInChamber()
counts number of eta (first number) and phi (second number in pair) hits in the set of hit IDs in the given chamber
Definition at line 997 of file MuonTrackPerformanceAlg.cxx.
1001 std::set<Identifier>::const_iterator
it = hitIds.begin();
1002 std::set<Identifier>::const_iterator it_end = hitIds.end();
1003 for (;
it != it_end; ++
it) {
1012 return std::make_pair(nhitsEta, nhitsPhi);
◆ createTrackData()
create track data object for truth track
Definition at line 1257 of file MuonTrackPerformanceAlg.cxx.
1259 if (!trackTruth.
truthTrack) {
return nullptr; }
1263 std::map<Identifier, std::set<Identifier> > chambers;
1265 MuonSimDataCollection::const_iterator mit = trackTruth.
mdtHits.begin();
1266 MuonSimDataCollection::const_iterator mit_end = trackTruth.
mdtHits.end();
1267 for (; mit != mit_end; ++mit) {
1269 chambers[chId].insert(mit->first);
1273 CscSimDataCollection::const_iterator cit = trackTruth.
cscHits.begin();
1274 CscSimDataCollection::const_iterator cit_end = trackTruth.
cscHits.end();
1275 for (; cit != cit_end; ++cit) {
1282 mit_end = trackTruth.
stgcHits.end();
1283 for (; mit != mit_end; ++mit) {
1285 chambers[chId].insert(mit->first);
1289 mit = trackTruth.
mmHits.begin();
1290 mit_end = trackTruth.
mmHits.end();
1291 for (; mit != mit_end; ++mit) {
1293 chambers[chId].insert(mit->first);
1297 mit = trackTruth.
rpcHits.begin();
1298 mit_end = trackTruth.
rpcHits.end();
1299 for (; mit != mit_end; ++mit) {
1301 chambers[chId].insert(mit->first);
1304 mit = trackTruth.
tgcHits.begin();
1305 mit_end = trackTruth.
tgcHits.end();
1306 for (; mit != mit_end; ++mit) {
1308 chambers[chId].insert(mit->first);
1311 std::vector<ChamberData> missingChambers;
1312 std::map<Identifier, std::set<Identifier> >::const_iterator chIt = chambers.begin();
1313 std::map<Identifier, std::set<Identifier> >::const_iterator chIt_end = chambers.end();
1314 for (; chIt != chIt_end; ++chIt) {
1315 ChamberData chamberData;
1316 unsigned int minEtaHits = 0;
1317 unsigned int minPhiHits = 0;
1340 if (
insertChamber(chIt->first, chIt->second, minEtaHits, minPhiHits, chamberData)) {
1341 trackData->missingChambers.push_back(chamberData);
1344 trackData->missingLayersTrigger.insert(stIndex);
1346 trackData->missingLayers.insert(stIndex);
◆ 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()
◆ doSummary() [1/2]
Definition at line 622 of file MuonTrackPerformanceAlg.cxx.
624 if (truthTracks.empty())
627 msg() <<
" : " << truthTracks.size() <<
" truth tracks found " << std::endl;
628 Muon::IMuonTrackTruthTool::TruthTree::const_iterator
tit = truthTracks.begin();
629 Muon::IMuonTrackTruthTool::TruthTree::const_iterator tit_end = truthTracks.end();
630 for (;
tit != tit_end; ++
tit) {
633 Muon::IMuonTrackTruthTool::TruthTree::const_iterator tit_temp =
tit;
634 if (++tit_temp == tit_end)
◆ doSummary() [2/2]
Definition at line 598 of file MuonTrackPerformanceAlg.cxx.
600 if (trackCollection.empty())
603 msg() <<
" : " << trackCollection.size() <<
" tracks found " << std::endl;
606 for (;
tit != tit_end; ++
tit) {
614 if (
tit == tit_end - 1)
◆ evaluateTrackTruthOverlap()
evaluate track/truth overlap and create the corresponding overlap description object
Definition at line 1082 of file MuonTrackPerformanceAlg.cxx.
1089 trackData->missingChambers);
1092 trackData->missingChambers);
1096 trackData->missingChambers);
1098 trackData->missingChambers);
1104 trackData->wrongChambers);
1107 trackData->wrongChambers);
1114 std::set<Muon::MuonStationIndex::StIndex> dummyList;
1119 insertStationLayers(trackData->missingChambers, trackData->layers, trackData->missingLayers,
true);
1120 insertStationLayers(trackData->wrongChambers, trackData->layers, trackData->wrongLayers,
true);
1127 insertStationLayers(trackData->missingChambers, trackData->layersTrigger, trackData->missingLayersTrigger,
false);
1128 insertStationLayers(trackData->wrongChambers, trackData->layersTrigger, trackData->wrongLayersTrigger,
false);
◆ eventInfo()
std::string MuonTrackPerformanceAlg::eventInfo |
( |
| ) |
const |
|
private |
◆ eventNumber()
int MuonTrackPerformanceAlg::eventNumber |
( |
| ) |
const |
|
private |
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode MuonTrackPerformanceAlg::execute |
( |
| ) |
|
|
overridevirtual |
Definition at line 112 of file MuonTrackPerformanceAlg.cxx.
115 if (!evInfo.isValid()) {
117 return StatusCode::FAILURE;
124 return StatusCode::SUCCESS;
◆ extractEtaPhiCounts()
void MuonTrackPerformanceAlg::extractEtaPhiCounts |
( |
const std::set< Identifier > & |
ids, |
|
|
int & |
neta, |
|
|
int & |
nphi, |
|
|
int & |
netaCh, |
|
|
int & |
nphiCh |
|
) |
| const |
|
private |
◆ 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
◆ extraOutputDeps()
const DataObjIDColl & AthAlgorithm::extraOutputDeps |
( |
| ) |
const |
|
overridevirtualinherited |
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 50 of file AthAlgorithm.cxx.
57 return Algorithm::extraOutputDeps();
◆ finalize()
StatusCode MuonTrackPerformanceAlg::finalize |
( |
| ) |
|
|
overridevirtual |
◆ getInitialState()
Definition at line 1391 of file MuonTrackPerformanceAlg.cxx.
1392 std::vector<HepMcParticleLink>::const_reverse_iterator pit = traj.rbegin();
1393 std::vector<HepMcParticleLink>::const_reverse_iterator pit_end = traj.rend();
1394 for (; pit != pit_end; ++pit) {
1395 if (std::abs((*pit)->pdg_id()) != 13) {
1396 if (pit != traj.rbegin())
◆ getMother()
Definition at line 1382 of file MuonTrackPerformanceAlg.cxx.
1383 std::vector<HepMcParticleLink>::const_reverse_iterator pit = traj.rbegin();
1384 std::vector<HepMcParticleLink>::const_reverse_iterator pit_end = traj.rend();
1385 for (; pit != pit_end; ++pit) {
1386 if (std::abs((*pit)->pdg_id()) != 13)
return *pit;
◆ goodTruthTrack()
◆ handleSegmentCombi()
This method loops over the segments in the combi and filles them into the internal structure of the MuonCombiTrackMaker
Definition at line 127 of file MuonTrackPerformanceAlg.cxx.
133 for (
unsigned int i = 0;
i < nstations; ++
i) {
138 if (!stationSegs || stationSegs->empty())
continue;
140 Muon::MuonSegmentCombination::SegmentVec::const_iterator ipsg = stationSegs->begin();
141 Muon::MuonSegmentCombination::SegmentVec::const_iterator ipsg_end = stationSegs->end();
142 for (; ipsg != ipsg_end; ++ipsg) {
146 ATH_MSG_WARNING(
"MuonSegmentCombination contains a segment that is not a MuonSegment!!");
◆ handleTracks()
bool MuonTrackPerformanceAlg::handleTracks |
( |
| ) |
|
|
private |
Definition at line 155 of file MuonTrackPerformanceAlg.cxx.
156 std::unique_ptr<TrackCollection> allTracks = std::make_unique<TrackCollection>();
159 if (!trackCol.isValid()) {
164 ATH_MSG_DEBUG(
" Retrieved " << trackCol->size() <<
" tracks from " << trackCol.key());
172 if (!muons.isValid()) {
182 if (
m_trackType == (
int)xAOD::Muon::MSOnlyExtrapolatedMuonSpectrometerTrackParticle)
188 for (
auto muon : *muons) {
194 if (
m_trackType == xAOD::Muon::MSOnlyExtrapolatedMuonSpectrometerTrackParticle &&
muon->author() != 1 &&
195 muon->author() != 5 &&
muon->author() != 2)
198 if (
m_trackType == xAOD::Muon::ExtrapolatedMuonSpectrometerTrackParticle &&
muon->author() != 1 &&
199 muon->author() != 5 &&
muon->author() != 2 &&
muon->author() != 6)
204 if (
muon->author() != 7)
continue;
211 if (
m_trackType == xAOD::Muon::MSOnlyExtrapolatedMuonSpectrometerTrackParticle)
◆ handleTrackTruth()
Definition at line 252 of file MuonTrackPerformanceAlg.cxx.
253 bool didOutput =
false;
255 unsigned int ntruthTracks(0);
256 unsigned int ntruthTracksSecondary(0);
260 std::vector<const MuonSimDataCollection*> muonSimData;
262 if (!simDataMap.isValid()) {
266 if (!simDataMap.isPresent())
continue;
267 muonSimData.push_back(simDataMap.cptr());
272 if (!cscSimDataMap.isValid()) {
275 cscSimData = cscSimDataMap.cptr();
279 m_truthTool->createTruthTree(truthTrackCol.cptr(), mcEventCollection.cptr(), muonSimData, cscSimData);
282 std::map<const TrackRecord*, Muon::IMuonTrackTruthTool::TruthTreeEntry> truthTrackEntryMap;
283 Muon::IMuonTrackTruthTool::TruthTree::const_iterator
tit = truthTree.begin();
284 Muon::IMuonTrackTruthTool::TruthTree::const_iterator tit_end = truthTree.end();
285 for (;
tit != tit_end; ++
tit) {
286 if (!
tit->second.truthTrack)
continue;
288 truthTrackEntryMap[
tit->second.truthTrack] =
tit->second;
295 ++ntruthTracksSecondary;
303 std::set<const Trk::Track*> matchedTracks;
304 std::set<const Trk::Track*> matchedFakeTracks;
305 std::map<const TrackRecord*, Muon::IMuonTrackTruthTool::MatchResult> bestMatched;
307 unsigned int nmatched(0);
308 unsigned int nmatchedSecondary(0);
313 for (; rit != rit_end; ++rit) {
323 truthTrackEntryMap.find(trackTruth.
truthTrack);
324 if (
pos == truthTrackEntryMap.end()) {
325 ATH_MSG_WARNING(
"Truth track not found in map, this should not happen!!");
332 if (!bestMatched.count(trackTruth.
truthTrack)) {
336 matchedTracks.insert(rit->first);
347 matchedFakeTracks.insert(rit->first);
363 ATH_MSG_INFO(
"Event " << eventData.eventNumber <<
" truth tracks " << ntruthTracks);
369 for (; mit != mit_end; ++mit) {
372 truthTrackEntryMap.find(truthTrack.
truthTrack);
373 if (
pos == truthTrackEntryMap.end()) {
374 ATH_MSG_WARNING(
"Truth track not found in map, this should not happen!!");
380 if (!trackData)
continue;
382 trackData->truthTrack =
new TrackRecord(*mit->first);
387 trackData->motherPdg = mother->pdg_id();
388 if (mother->end_vertex())
390 mother->end_vertex()->position().x(), mother->end_vertex()->position().y(), mother->end_vertex()->position().z());
394 trackData->momentumAtProduction =
395 new Amg::Vector3D(original->momentum().x(), original->momentum().y(), original->momentum().z());
399 if (trackData->allOk()) {
409 if (trackData->hasMissingChambers()) {
410 if (trackData->isEndcapSLTrack() && trackData->isMissingInner()) {
412 eventData.missingStationMomLoss.push_back(trackData);
413 }
else if (trackData->hasMissingLayers()) {
415 eventData.missingStationLayer.push_back(trackData);
416 }
else if (trackData->hasMissingLayersTrigger()) {
418 eventData.missingStationLayerTrigger.push_back(trackData);
421 eventData.missingStation.push_back(trackData);
423 }
else if (trackData->hasWrongChambers()) {
424 if (trackData->hasWrongLayers()) {
425 eventData.wrongStationLayer.push_back(trackData);
427 }
else if (trackData->hasWrongLayersTrigger()) {
428 eventData.wrongStationLayer.push_back(trackData);
432 eventData.wrongStation.push_back(trackData);
442 <<
print(*trackData));
448 unsigned int nmissed(0);
449 tit = truthTree.begin();
450 tit_end = truthTree.end();
451 for (;
tit != tit_end; ++
tit) {
456 if (bestMatched.count(
tit->second.truthTrack))
continue;
464 if (
tit->second.truthTrajectory) {
468 trackData->motherPdg = mother->pdg_id();
469 if (mother->end_vertex())
471 mother->end_vertex()->position().x(), mother->end_vertex()->position().y(), mother->end_vertex()->position().z());
475 trackData->momentumAtProduction =
476 new Amg::Vector3D(original->momentum().x(), original->momentum().y(), original->momentum().z());
485 if (trackData->missingLayers.size() == 1) {
490 eventData.missingTruthTracksOneStation.push_back(trackData);
496 eventData.missingTruthTracks.push_back(trackData);
502 if (ntruthTracks < nmatched)
503 ATH_MSG_WARNING(
"found more matched tracks than truth tracks: truth " << ntruthTracks <<
" matched " << nmatched);
505 if (nmissed != ntruthTracks - nmatched)
506 ATH_MSG_WARNING(
"inconsisted number of missed tracks: truth " << ntruthTracks <<
" matched " << nmatched <<
" missed " << nmissed);
511 for (; trit != trit_end; ++trit) {
512 if (matchedTracks.count(*trit))
continue;
515 if ((**trit).perigeeParameters()) {
517 pt = (**trit).perigeeParameters()->momentum().perp();
519 pt = (**trit).perigeeParameters()->momentum().mag();
527 bool matchedFake = matchedFakeTracks.count(*trit);
528 std::string fakeType = isHighPt ?
"HighPt" :
"LowPt";
529 if (isSL) fakeType =
"SL";
530 if (matchedFake) fakeType +=
" (matched)";
533 if (matchedFake)
summary.trackPars =
"(matched) ";
540 eventData.fakeTracks.push_back(trackData);
544 eventData.fakeTracksSL.push_back(trackData);
547 eventData.fakeTracksLowPt.push_back(trackData);
551 msg() << MSG::INFO <<
"Fake track " << fakeType <<
": " << std::endl
556 if (didOutput) {
msg() << MSG::INFO <<
endmsg; }
558 if (!eventData.goodEvent())
m_badEvents.push_back(eventData);
◆ initialize()
StatusCode MuonTrackPerformanceAlg::initialize |
( |
| ) |
|
|
overridevirtual |
◆ 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.
◆ insertChamber()
insert chamber information into ChamberData if hits counts pass cuts, returns true if anything was inserted
Definition at line 1015 of file MuonTrackPerformanceAlg.cxx.
1018 bool passesThreshold =
false;
1022 if (missingHits.first >= minEtaHits) passesThreshold =
true;
1023 if (missingHits.second >= minPhiHits) passesThreshold =
true;
1027 if (passesThreshold) {
1028 chamberData.
chId = chId;
1029 std::set<Identifier>::const_iterator
it =
hits.begin();
1030 std::set<Identifier>::const_iterator it_end =
hits.end();
1031 for (;
it != it_end; ++
it) {
1034 chamberData.
hits.insert(*
it);
1038 return passesThreshold;
◆ insertStationLayers() [1/2]
insert station layers into layer set if they are not in exclusion list
Definition at line 1053 of file MuonTrackPerformanceAlg.cxx.
1056 unsigned int inputSize =
layers.size();
1058 std::set<Identifier>::const_iterator chit = chIds.begin();
1059 std::set<Identifier>::const_iterator chit_end = chIds.end();
1060 for (; chit != chit_end; ++chit) {
1062 if (!exclusionList.count(stIndex))
layers.insert(stIndex);
1065 return inputSize !=
layers.size();
◆ insertStationLayers() [2/2]
insert chamber data into layers if not in exclusion list
Definition at line 1068 of file MuonTrackPerformanceAlg.cxx.
1071 std::set<Identifier> chIds;
1072 std::vector<ChamberData>::const_iterator chit = chambers.begin();
1073 std::vector<ChamberData>::const_iterator chit_end = chambers.end();
1074 for (; chit != chit_end; ++chit) {
1076 if ((usePrecision && isTrigger) || (!usePrecision && !isTrigger))
continue;
◆ insertTechnology()
insert set of chambers into chamber data if hits counts pass cuts, returns true if anything was inserted
Definition at line 1041 of file MuonTrackPerformanceAlg.cxx.
1044 std::set<Identifier>::const_iterator
it = chIds.begin();
1045 std::set<Identifier>::const_iterator it_end = chIds.end();
1046 for (;
it != it_end; ++
it) {
1050 return !chambers.empty();
◆ isSecondary() [1/3]
◆ isSecondary() [2/3]
◆ isSecondary() [3/3]
Definition at line 1416 of file MuonTrackPerformanceAlg.cxx.
1418 if (mother && mother->end_vertex() && mother->end_vertex()->position().perp() > 100.)
return true;
◆ 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/4]
Definition at line 763 of file MuonTrackPerformanceAlg.cxx.
765 std::ostringstream sout;
766 if (!tracks.empty()) {
767 sout <<
" Event " <<
event.eventNumber <<
" position in file " <<
event.eventPosition <<
" has " << tracks.size() <<
" " <<
message
769 std::vector<const Trk::Track*>::const_iterator
it = tracks.begin();
770 std::vector<const Trk::Track*>::const_iterator it_end = tracks.end();
◆ print() [2/4]
Definition at line 750 of file MuonTrackPerformanceAlg.cxx.
752 std::ostringstream sout;
753 if (!tracks.empty()) {
754 sout <<
" Event " <<
event.eventNumber <<
" position in file " <<
event.eventPosition <<
" has " << tracks.size() <<
" " <<
message
756 std::vector<TrackData*>::const_iterator
it = tracks.begin();
757 std::vector<TrackData*>::const_iterator it_end = tracks.end();
758 for (;
it != it_end; ++
it) { sout <<
print(**
it) << std::endl; }
◆ print() [3/4]
Definition at line 642 of file MuonTrackPerformanceAlg.cxx.
643 std::ostringstream sout;
645 sout <<
" No TrackRecord found! ";
653 std::map<Identifier, std::pair<int, int> > precisionIds;
654 std::map<Identifier, std::pair<int, int> > triggerIds;
655 std::map<Identifier, std::pair<int, int> > nhitsCompIds;
657 unsigned int neta = 0;
658 unsigned int netaTrig = 0;
659 unsigned int nphi = 0;
661 std::set<Identifier> allIds;
662 MuonSimDataCollection::const_iterator mit = trackTruth.
mdtHits.begin();
663 MuonSimDataCollection::const_iterator mit_end = trackTruth.
mdtHits.end();
664 for (; mit != mit_end; ++mit) allIds.insert(mit->first);
667 CscSimDataCollection::const_iterator cit = trackTruth.
cscHits.begin();
668 CscSimDataCollection::const_iterator cit_end = trackTruth.
cscHits.end();
669 for (; cit != cit_end; ++cit) allIds.insert(
m_idHelperSvc->layerId(cit->first));
673 mit_end = trackTruth.
stgcHits.end();
674 for (; mit != mit_end; ++mit) allIds.insert(
m_idHelperSvc->layerId(mit->first));
677 mit = trackTruth.
mmHits.begin();
678 mit_end = trackTruth.
mmHits.end();
679 for (; mit != mit_end; ++mit) allIds.insert(
m_idHelperSvc->layerId(mit->first));
682 mit = trackTruth.
rpcHits.begin();
683 mit_end = trackTruth.
rpcHits.end();
684 for (; mit != mit_end; ++mit) allIds.insert(
m_idHelperSvc->layerId(mit->first));
686 mit = trackTruth.
tgcHits.begin();
687 mit_end = trackTruth.
tgcHits.end();
688 for (; mit != mit_end; ++mit) allIds.insert(
m_idHelperSvc->layerId(mit->first));
692 for (;
it != it_end; ++
it) {
697 ++nhitsCompIds[chId].first;
699 ++nhitsCompIds[chId].second;
704 ++triggerIds[chId].first;
707 ++triggerIds[chId].second;
713 ++precisionIds[chId].first;
716 ++precisionIds[chId].second;
720 sout <<
"Truth: hits " << std::setw(5) << neta + nphi + netaTrig <<
" r " << (
int)trackRecord.
GetPosition().perp() <<
" z "
728 if (mother) { sout <<
" mother " << mother->pdg_id(); }
731 sout <<
" Eta hits " << neta <<
" phi " << nphi <<
" eta trig " << netaTrig << std::endl;
732 std::map<Identifier, std::pair<int, int> >
::iterator iit = precisionIds.begin();
733 std::map<Identifier, std::pair<int, int> >
::iterator iit_end = precisionIds.end();
734 for (; iit != iit_end; ++iit) {
735 sout.setf(std::ios::left);
736 sout <<
" " << std::setw(32) <<
m_idHelperSvc->toStringChamber(iit->first) <<
" hits: eta " << std::setw(3) << iit->second.second
737 <<
" phi " << std::setw(3) << iit->second.first << std::endl;
739 iit = triggerIds.begin();
740 iit_end = triggerIds.end();
741 for (; iit != iit_end; ++iit) {
742 sout <<
" " << std::setw(32) <<
m_idHelperSvc->toStringChamber(iit->first) <<
" hits: eta " << std::setw(3)
743 << nhitsCompIds[iit->first].second <<
" phi " << std::setw(3) << nhitsCompIds[iit->first].first <<
" stations: Eta "
744 << iit->second.second <<
" Phi " << iit->second.first << std::endl;
◆ print() [4/4]
std::string MuonTrackPerformanceAlg::print |
( |
const TrackData & |
trackData | ) |
const |
|
private |
print TrackData to a string
Definition at line 1133 of file MuonTrackPerformanceAlg.cxx.
1134 std::ostringstream sout;
1139 if (trackData.truthTrack) {
1140 double charge = trackData.truthTrack->GetPDGCode() < 0 ? +1 : -1;
1142 trackData.truthTrack->GetPosition().z()),
1143 Amg::Vector3D(trackData.truthTrack->GetMomentum().x(), trackData.truthTrack->GetMomentum().y(),
1144 trackData.truthTrack->GetMomentum().z()),
1146 sout <<
"Truth: " <<
m_printer->print(perigee);
1147 if (std::abs(trackData.truthTrack->GetPDGCode()) == 13) {
1148 if (trackData.motherPdg != -1) sout <<
" mother " << trackData.motherPdg;
1150 sout <<
" pdg " << trackData.truthTrack->GetPDGCode();
1152 if (trackData.momentumAtProduction) sout <<
" production p: " << trackData.momentumAtProduction->mag();
1159 if (trackData.trackPars) {
1160 sout <<
"Track: " <<
m_printer->print(*trackData.trackPars) <<
" chi2/ndof " << trackData.chi2Ndof << std::endl;
1161 if (trackData.trackPars->covariance()) {
1164 double cov00 = (*trackData.trackPars->covariance())(0, 0);
1165 double cov11 = (*trackData.trackPars->covariance())(1, 1);
1166 double cov22 = (*trackData.trackPars->covariance())(2, 2);
1167 double cov33 = (*trackData.trackPars->covariance())(3, 3);
1168 double cov44 = (*trackData.trackPars->covariance())(4, 4);
1170 sout <<
" error d0 " << std::sqrt(cov00) <<
" z0 " << std::sqrt(cov11) <<
" phi (mrad) " << 1000 * std::sqrt(cov22)
1171 <<
" theta (mrad) " << 1000 * std::sqrt(cov33) <<
" dp/p " << dpp << std::endl;
1174 if (trackData.trackSummary && trackData.trackSummary->muonTrackSummary())
1175 sout <<
m_printer->print(*trackData.trackSummary->muonTrackSummary()) << std::endl;
1178 if (!trackData.missingChambers.empty()) {
1179 sout <<
" Missing Chambers: " << std::endl;
1180 std::vector<ChamberData>::const_iterator chIt = trackData.missingChambers.begin();
1181 std::vector<ChamberData>::const_iterator chIt_end = trackData.missingChambers.end();
1182 for (; chIt != chIt_end; ++chIt) {
1183 sout <<
" " <<
m_idHelperSvc->toStringChamber(chIt->chId) <<
" hits " << chIt->hits.size() << std::endl;
1185 std::set<Identifier>::const_iterator hit = chIt->hits.begin();
1186 std::set<Identifier>::const_iterator hit_end = chIt->hits.end();
1187 for (; hit != hit_end; ++hit) { sout <<
" " <<
m_idHelperSvc->toString(*hit) << std::endl; }
1192 if (!trackData.wrongChambers.empty()) {
1193 sout <<
" Wrong Chambers: " << std::endl;
1194 std::vector<ChamberData>::const_iterator chIt = trackData.wrongChambers.begin();
1195 std::vector<ChamberData>::const_iterator chIt_end = trackData.wrongChambers.end();
1196 for (; chIt != chIt_end; ++chIt) {
1197 sout <<
" " <<
m_idHelperSvc->toStringChamber(chIt->chId) <<
" hits " << chIt->hits.size() << std::endl;
1199 std::set<Identifier>::const_iterator hit = chIt->hits.begin();
1200 std::set<Identifier>::const_iterator hit_end = chIt->hits.end();
1201 for (; hit != hit_end; ++hit) { sout <<
" " <<
m_idHelperSvc->toString(*hit) << std::endl; }
1206 if (!trackData.missingLayers.empty() || !trackData.missingLayersTrigger.empty()) {
1207 sout <<
" Missing Layers: ";
1208 if (!trackData.missingLayers.empty()) {
1209 sout <<
" Precision: ";
1210 std::set<Muon::MuonStationIndex::StIndex>::const_iterator
it = trackData.missingLayers.begin();
1211 std::set<Muon::MuonStationIndex::StIndex>::const_iterator it_end = trackData.missingLayers.end();
1215 if (!trackData.missingLayersTrigger.empty()) {
1216 sout <<
" Trigger: ";
1217 std::set<Muon::MuonStationIndex::StIndex>::const_iterator
it = trackData.missingLayersTrigger.begin();
1218 std::set<Muon::MuonStationIndex::StIndex>::const_iterator it_end = trackData.missingLayersTrigger.end();
1224 if (!trackData.wrongLayers.empty() || !trackData.wrongLayersTrigger.empty()) {
1225 sout <<
" TrackData.Wrong Layers: ";
1226 if (!trackData.wrongLayers.empty()) {
1227 sout <<
" Precision: ";
1228 std::set<Muon::MuonStationIndex::StIndex>::const_iterator
it = trackData.wrongLayers.begin();
1229 std::set<Muon::MuonStationIndex::StIndex>::const_iterator it_end = trackData.wrongLayers.end();
1233 if (!trackData.wrongLayersTrigger.empty()) {
1234 sout <<
" Trigger: ";
1235 std::set<Muon::MuonStationIndex::StIndex>::const_iterator
it = trackData.wrongLayersTrigger.begin();
1236 std::set<Muon::MuonStationIndex::StIndex>::const_iterator it_end = trackData.wrongLayersTrigger.end();
◆ printFakeTracks()
void MuonTrackPerformanceAlg::printFakeTracks |
( |
| ) |
const |
|
private |
Definition at line 885 of file MuonTrackPerformanceAlg.cxx.
889 filename +=
"EventListFakeTracks.txt";
893 msg() << MSG::INFO <<
"Summarizing events with fake tracks, high pt, total " <<
m_nfakeTracksHighPt << std::endl;
894 std::vector<EventData>::const_iterator eit =
m_badEvents.begin();
895 std::vector<EventData>::const_iterator eit_end =
m_badEvents.end();
896 for (; eit != eit_end; ++eit) {
897 if (eit->fakeTracks.empty())
continue;
898 msg() <<
print(*eit, eit->fakeTracks,
" high pt fake tracks") << std::endl;
903 msg() << MSG::INFO <<
"Summarizing events with fake tracks, low pt, total " <<
m_nfakeTracksLowPt << std::endl;
906 for (; eit != eit_end; ++eit) {
907 if (eit->fakeTracksLowPt.empty())
continue;
908 msg() <<
print(*eit, eit->fakeTracksLowPt,
" low pt fake tracks") << std::endl;
913 msg() << MSG::INFO <<
"Summarizing events with fake tracks, SL, total " <<
m_nfakeTracksSL << std::endl;
916 for (; eit != eit_end; ++eit) {
917 if (eit->fakeTracksSL.empty())
continue;
918 msg() <<
print(*eit, eit->fakeTracksSL,
" SL fake tracks") << std::endl;
◆ printMissingChambers()
void MuonTrackPerformanceAlg::printMissingChambers |
( |
| ) |
const |
|
private |
Definition at line 776 of file MuonTrackPerformanceAlg.cxx.
780 filename +=
"EventListIncompleteTracks.txt";
784 msg() << MSG::INFO <<
"Summarizing events with endcap track without EI layer resulting in momentum loss, total "
786 std::vector<EventData>::const_iterator eit =
m_badEvents.begin();
787 std::vector<EventData>::const_iterator eit_end =
m_badEvents.end();
788 for (; eit != eit_end; ++eit) {
789 if (eit->missingStationMomLoss.empty())
continue;
790 msg() <<
print(*eit, eit->missingStationMomLoss,
" tracks without inner layer in endcap") << std::endl;
798 for (; eit != eit_end; ++eit) {
799 if (eit->missingStationLayer.empty())
continue;
800 msg() <<
print(*eit, eit->missingStationLayer,
" tracks with a missing layer") << std::endl;
805 msg() << MSG::INFO <<
"Summarizing events with track with missing chamber, total " <<
m_nmissingStation << std::endl;
808 for (; eit != eit_end; ++eit) {
809 if (eit->missingStation.empty())
continue;
810 msg() <<
print(*eit, eit->missingStation,
" tracks with a missing chamber") << std::endl;
815 msg() << MSG::INFO <<
"Summarizing events with track with wrong layer, total " <<
m_nwrongStationLayer << std::endl;
818 for (; eit != eit_end; ++eit) {
819 if (eit->wrongStation.empty())
continue;
820 msg() <<
print(*eit, eit->wrongStation,
" tracks with a wrong layer") << std::endl;
825 msg() << MSG::INFO <<
"Summarizing events with track with wrong chamber, total " <<
m_nwrongStation << std::endl;
828 for (; eit != eit_end; ++eit) {
829 if (eit->wrongStation.empty())
continue;
830 msg() <<
print(*eit, eit->wrongStation,
" tracks with a wrong chamber") << std::endl;
838 for (; eit != eit_end; ++eit) {
839 if (eit->missingStationLayerTrigger.empty())
continue;
840 msg() <<
print(*eit, eit->missingStationLayerTrigger,
" tracks with a missing trigger layer") << std::endl;
848 for (; eit != eit_end; ++eit) {
849 if (eit->wrongStationLayerTrigger.empty())
continue;
850 msg() <<
print(*eit, eit->wrongStationLayerTrigger,
" tracks with a wrong trigger layer") << std::endl;
◆ printMissingTracks()
void MuonTrackPerformanceAlg::printMissingTracks |
( |
| ) |
const |
|
private |
Definition at line 856 of file MuonTrackPerformanceAlg.cxx.
860 filename +=
"EventListMissedTracks.txt";
864 msg() << MSG::INFO <<
"Summarizing events with missing track, total " <<
m_nmissedTracks << std::endl;
865 std::vector<EventData>::const_iterator eit =
m_badEvents.begin();
866 std::vector<EventData>::const_iterator eit_end =
m_badEvents.end();
867 for (; eit != eit_end; ++eit) {
868 if (eit->missingTruthTracks.empty())
continue;
869 msg() <<
print(*eit, eit->missingTruthTracks,
" missing tracks") << std::endl;
877 for (; eit != eit_end; ++eit) {
878 if (eit->missingTruthTracksOneStation.empty())
continue;
879 msg() <<
print(*eit, eit->missingTruthTracksOneStation,
" missing single station tracks") << std::endl;
◆ printSummary()
void MuonTrackPerformanceAlg::printSummary |
( |
const std::vector< EventSummary > & |
summary, |
|
|
std::string |
typeName |
|
) |
| const |
|
private |
◆ printTrackCounters()
std::string MuonTrackPerformanceAlg::printTrackCounters |
( |
bool |
doSecondaries = true | ) |
const |
|
private |
print all the track counters to a string to provide a summary
Definition at line 924 of file MuonTrackPerformanceAlg.cxx.
925 std::ostringstream sout;
932 <<
" number of tracks " << std::setw(12) <<
m_ntracks <<
" average per event " <<
m_ntracks * evScale;
937 unsigned int nmissedTracksOneStation =
941 double trTrkScale = ntruthTracks != 0 ? 1. / ntruthTracks : 1.;
945 <<
" number of truth tracks " << std::setw(12) << ntruthTracks <<
" average per event "
946 << ntruthTracks * evScale << std::endl
947 <<
" number of good tracks " << std::setw(12) << nmatchedTracks <<
" average per event "
948 << nmatchedTracks * evScale << std::endl
949 <<
" number of missed multi station tracks " << std::setw(12) << nmissedTracks <<
" average per event "
950 << nmissedTracks * evScale << std::endl
951 <<
" number of missed one station tracks " << std::setw(12) << nmissedTracksOneStation <<
" average per event "
952 << nmissedTracksOneStation * evScale << std::endl;
954 sout <<
" number of secondary truth tracks " << std::setw(12) <<
m_ntruthTracksSecondary <<
" average per event "
958 <<
" number of secondary missed multi st tracks " << std::setw(12) <<
m_nmissedTracksSecondary <<
" average per event "
963 sout <<
" number of fake tracks " << std::setw(12) <<
m_nfakeTracks <<
" average per event "
965 <<
" number of high pt fake tracks " << std::setw(12) <<
m_nfakeTracksHighPt <<
" average per event "
967 <<
" number of low pt fake tracks " << std::setw(12) <<
m_nfakeTracksLowPt <<
" average per event "
969 <<
" number of SL fake tracks " << std::setw(12) <<
m_nfakeTracksSL <<
" average per event "
971 <<
" number of matched fake tracks " << std::setw(12) <<
m_nmatchedFakeTracks <<
" average per event "
975 <<
" number of tracks missing precision layer " << std::setw(12) <<
m_nmissingStationLayer <<
" average per truth track "
979 <<
" number of tracks missing chamber " << std::setw(12) <<
m_nmissingStation <<
" average per truth track "
981 <<
" number of tracks wrong precision layer " << std::setw(12) <<
m_nwrongStationLayer <<
" average per truth track "
985 <<
" number of tracks wrong chamber " << std::setw(12) <<
m_nwrongStation <<
" average per truth track "
987 <<
" efficiency: " << nmatchedTracks * trTrkScale <<
" fake rate " <<
m_nfakeTracks * evScale <<
" high pt "
989 << nmissedTracks * trTrkScale;
◆ renounce()
◆ renounceArray()
◆ selectPdg()
bool MuonTrackPerformanceAlg::selectPdg |
( |
int |
pdg | ) |
const |
|
inlineprivate |
◆ sysInitialize()
StatusCode AthAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ 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_badEvents
std::vector<EventData> MuonTrackPerformanceAlg::m_badEvents |
|
private |
◆ m_cscSimData
◆ m_detStore
◆ m_doEventListFake
int MuonTrackPerformanceAlg::m_doEventListFake {} |
|
private |
◆ m_doEventListIncomplete
int MuonTrackPerformanceAlg::m_doEventListIncomplete {} |
|
private |
◆ m_doEventListMissed
int MuonTrackPerformanceAlg::m_doEventListMissed {} |
|
private |
◆ m_doHistos
bool MuonTrackPerformanceAlg::m_doHistos {} |
|
private |
◆ m_doHitResiduals
int MuonTrackPerformanceAlg::m_doHitResiduals {} |
|
private |
◆ m_doSegments
bool MuonTrackPerformanceAlg::m_doSegments {} |
|
private |
◆ m_doStau
bool MuonTrackPerformanceAlg::m_doStau {} |
|
private |
◆ m_doSummary
int MuonTrackPerformanceAlg::m_doSummary {} |
|
private |
◆ m_doTrackDebug
int MuonTrackPerformanceAlg::m_doTrackDebug {} |
|
private |
◆ m_doTruth
bool MuonTrackPerformanceAlg::m_doTruth {} |
|
private |
◆ m_edmHelperSvc
Initial value:{this, "edmHelper", "Muon::MuonEDMHelperSvc/MuonEDMHelperSvc",
"Handle to the service providing the IMuonEDMHelperSvc interface"}
Definition at line 290 of file MuonTrackPerformanceAlg.h.
◆ m_eventInfo
◆ m_eventInfoKey
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_fileName
std::string MuonTrackPerformanceAlg::m_fileName |
|
private |
◆ m_fileOutput
std::ofstream MuonTrackPerformanceAlg::m_fileOutput |
|
private |
◆ m_idHelperSvc
◆ m_isCombined
bool MuonTrackPerformanceAlg::m_isCombined {} |
|
private |
◆ m_mcEventColl
◆ m_minCscEtaHits
int MuonTrackPerformanceAlg::m_minCscEtaHits {} |
|
private |
◆ m_minCscPhiHits
int MuonTrackPerformanceAlg::m_minCscPhiHits {} |
|
private |
◆ m_minMdtHits
int MuonTrackPerformanceAlg::m_minMdtHits {} |
|
private |
◆ m_minMMEtaHits
int MuonTrackPerformanceAlg::m_minMMEtaHits {} |
|
private |
◆ m_minRpcEtaHits
int MuonTrackPerformanceAlg::m_minRpcEtaHits {} |
|
private |
◆ m_minRpcPhiHits
int MuonTrackPerformanceAlg::m_minRpcPhiHits {} |
|
private |
◆ m_minsTgcEtaHits
int MuonTrackPerformanceAlg::m_minsTgcEtaHits {} |
|
private |
◆ m_minsTgcPhiHits
int MuonTrackPerformanceAlg::m_minsTgcPhiHits {} |
|
private |
◆ m_minTgcEtaHits
int MuonTrackPerformanceAlg::m_minTgcEtaHits {} |
|
private |
◆ m_minTgcPhiHits
int MuonTrackPerformanceAlg::m_minTgcPhiHits {} |
|
private |
◆ m_momentumCut
double MuonTrackPerformanceAlg::m_momentumCut {} |
|
private |
◆ m_momentumCutSim
double MuonTrackPerformanceAlg::m_momentumCutSim {} |
|
private |
◆ m_muons
◆ m_muonSimData
Initial value:{
this, "MuonSimDataNames", {"MDT_SDO", "RPC_SDO", "TGC_SDO", "sTGC_SDO", "MM_SDO"}, "Muon SDO maps"}
Definition at line 267 of file MuonTrackPerformanceAlg.h.
◆ m_nevents
unsigned int MuonTrackPerformanceAlg::m_nevents {} |
|
private |
◆ m_nfakeTracks
unsigned int MuonTrackPerformanceAlg::m_nfakeTracks {} |
|
private |
◆ m_nfakeTracksHighPt
unsigned int MuonTrackPerformanceAlg::m_nfakeTracksHighPt {} |
|
private |
◆ m_nfakeTracksLowPt
unsigned int MuonTrackPerformanceAlg::m_nfakeTracksLowPt {} |
|
private |
◆ m_nfakeTracksSL
unsigned int MuonTrackPerformanceAlg::m_nfakeTracksSL {} |
|
private |
◆ m_nmatchedFakeTracks
unsigned int MuonTrackPerformanceAlg::m_nmatchedFakeTracks {} |
|
private |
◆ m_nmatchedTracks
unsigned int MuonTrackPerformanceAlg::m_nmatchedTracks {} |
|
private |
◆ m_nmatchedTracksSecondary
unsigned int MuonTrackPerformanceAlg::m_nmatchedTracksSecondary {} |
|
private |
◆ m_nmissedTracks
unsigned int MuonTrackPerformanceAlg::m_nmissedTracks {} |
|
private |
◆ m_nmissedTracksOneStation
unsigned int MuonTrackPerformanceAlg::m_nmissedTracksOneStation {} |
|
private |
◆ m_nmissedTracksOneStationSecondary
unsigned int MuonTrackPerformanceAlg::m_nmissedTracksOneStationSecondary {} |
|
private |
◆ m_nmissedTracksSecondary
unsigned int MuonTrackPerformanceAlg::m_nmissedTracksSecondary {} |
|
private |
◆ m_nmissingCscStationLayer
unsigned int MuonTrackPerformanceAlg::m_nmissingCscStationLayer {} |
|
private |
◆ m_nmissingStation
unsigned int MuonTrackPerformanceAlg::m_nmissingStation {} |
|
private |
◆ m_nmissingStationLayer
unsigned int MuonTrackPerformanceAlg::m_nmissingStationLayer {} |
|
private |
◆ m_nmissingStationLayerTrigger
unsigned int MuonTrackPerformanceAlg::m_nmissingStationLayerTrigger {} |
|
private |
◆ m_nmissingStationMomLoss
unsigned int MuonTrackPerformanceAlg::m_nmissingStationMomLoss {} |
|
private |
◆ m_ntracks
unsigned int MuonTrackPerformanceAlg::m_ntracks {} |
|
private |
◆ m_ntruthTracks
unsigned int MuonTrackPerformanceAlg::m_ntruthTracks {} |
|
private |
◆ m_ntruthTracksSecondary
unsigned int MuonTrackPerformanceAlg::m_ntruthTracksSecondary {} |
|
private |
◆ m_nwrongStation
unsigned int MuonTrackPerformanceAlg::m_nwrongStation {} |
|
private |
◆ m_nwrongStationLayer
unsigned int MuonTrackPerformanceAlg::m_nwrongStationLayer {} |
|
private |
◆ m_nwrongStationLayerTrigger
unsigned int MuonTrackPerformanceAlg::m_nwrongStationLayerTrigger {} |
|
private |
◆ m_pdgsToBeConsidered
IntegerArrayProperty MuonTrackPerformanceAlg::m_pdgsToBeConsidered |
|
private |
◆ m_printer
◆ m_selectedPdgs
std::set<int> MuonTrackPerformanceAlg::m_selectedPdgs |
|
private |
◆ m_summaryHelperTool
◆ m_trackKey
Initial value:{this, "TrackInputLocation", "MuonSpectrometerTracks",
"input tracks"}
Location of the input tracks.
Definition at line 259 of file MuonTrackPerformanceAlg.h.
◆ m_trackRecord
◆ m_trackType
int MuonTrackPerformanceAlg::m_trackType {} |
|
private |
◆ m_trackTypeString
std::string MuonTrackPerformanceAlg::m_trackTypeString |
|
private |
◆ m_truthTool
◆ m_usePtCut
bool MuonTrackPerformanceAlg::m_usePtCut {} |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ m_writeToFile
bool MuonTrackPerformanceAlg::m_writeToFile {} |
|
private |
The documentation for this class was generated from the following files:
JetConstituentVector::iterator iterator
Const iterator class for DataVector/DataList.
uint64_t eventNumber() const
The current event's event number.
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.
std::shared_ptr< const TruthTrajectory > truthTrajectory
MuonTechnologyTruth stgcs
std::set< Identifier > wrongHits
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
CscSimDataCollection cscHits
std::vector< SG::VarHandleKeyArray * > m_vhka
SegmentVec * stationSegments(unsigned int index) const
Access to segments in a given station.
bool msgLvl(const MSG::Level lvl) const
MuonSimDataCollection mmHits
MuonSimDataCollection stgcHits
std::set< Identifier > missedHits
ParametersT< TrackParametersDim, Charged, PerigeeSurface > Perigee
virtual void setOwner(IDataHandleHolder *o)=0
virtual StatusCode sysInitialize() override
Override sysInitialize.
POOL::TEvent event(POOL::TEvent::kClassAccess)
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
MuonSimDataCollection tgcHits
CLHEP::Hep3Vector GetPosition() const
Position.
::StatusCode StatusCode
StatusCode definition for legacy code.
std::set< Identifier > matchedChambers
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
std::shared_ptr< const TruthTrajectory > truthTrajectory
std::set< Identifier > missedChambers
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
const GenParticle * ConstGenParticlePtr
MuonSimDataCollection rpcHits
std::string to_string(const DetectorType &type)
double charge(const T &p)
value_type push_back(value_type pElem)
Add an element to the end of the collection.
Eigen::Matrix< double, 3, 1 > Vector3D
CLHEP::Hep3Vector GetMomentum() const
Momentum.
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
std::set< Identifier > wrongChambers
DataObjIDColl m_extendedExtraObjects
MuonSimDataCollection mdtHits
#define ATH_MSG_WARNING(x)
std::vector< std::unique_ptr< MuonSegment > > SegmentVec
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
static const std::string & stName(StIndex index)
convert StIndex into a string
AthAlgorithm()
Default constructor:
StIndex
enum to classify the different station layers in the muon spectrometer
Class describing a TrackParticle.
const MuonTrackSummary * muonTrackSummary() const
returns a pointer to the MuonTrackSummary if available
int GetPDGCode() const
PDG Code.
unsigned int numberOfStations() const
Number of stations with segment.
size_type size() const noexcept
Returns the number of elements in the collection.
unsigned int numberOfMatchedHits() const
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
TrackSummary_v1 TrackSummary
const TrackRecord * truthTrack
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
const TrackRecord * truthTrack