Skip to content
Snippets Groups Projects
Commit 8709bc9a authored by Walter Lampl's avatar Walter Lampl
Browse files

Merge branch 'jburzyns-fix-SecVtxTruthMatchTool-bugs' into 'main'

Fix a few bugs in SecVertexTruthMatchAlg

See merge request !71010
parents 9b0293f5 3966200a
No related branches found
No related tags found
30 merge requests!78241Draft: FPGATrackSim: GenScan code refactor,!78236Draft: Switching Streams https://its.cern.ch/jira/browse/ATR-27417,!78056AFP monitoring: new synchronization and cleaning,!78041AFP monitoring: new synchronization and cleaning,!77990Updating TRT chip masks for L1TRT trigger simulation - ATR-28372,!77733Draft: add new HLT NN JVT, augmented with additional tracking information,!77731Draft: Updates to ZDC reconstruction,!77728Draft: updates to ZDC reconstruction,!77522Draft: sTGC Pad Trigger Emulator,!76725ZdcNtuple: Fix cppcheck warning.,!76611L1CaloFEXByteStream: Fix out-of-bounds array accesses.,!76475Punchthrough AF3 implementation in FastG4,!76474Punchthrough AF3 implementation in FastG4,!76343Draft: MooTrackBuilder: Recalibrate NSW hits in refine method,!75729New implementation of ZDC nonlinear FADC correction.,!75703Draft: Update to HI han config for HLT jets,!75184Draft: Update file heavyions_run.config,!74430Draft: Fixing upper bound for Delayed Jet Triggers,!73963Changing the path of the histograms to "Expert" area,!73875updating ID ART reference plots,!73874AtlasCLHEP_RandomGenerators: Fix cppcheck warnings.,!73449Add muon detectors to DarkJetPEBTLA partial event building,!73343Draft: [TrigEgamma] Add photon ringer chains on bootstrap mechanism,!72336Fixed TRT calibration crash,!72176Draft: Improving L1TopoOnline chain that now gets no-empty plots. Activating it by default,!72012Draft: Separate JiveXMLConfig.py into Config files,!71876Fix MET trigger name in MissingETMonitoring,!71820Draft: Adding new TLA End-Of-Fill (EOF) chains and removing obsolete DIPZ chains,!71279Draft: ATR-29330: Move L1_4J15 and the HLT chains seeded by it in the MC Menu,!71010Fix a few bugs in SecVertexTruthMatchAlg
......@@ -31,7 +31,7 @@ namespace CP {
std::vector<std::string> recoTypes{"All", "Matched", "Merged", "Fake", "Split", "Other"};
std::vector<std::string> truthTypes{"Inclusive", "Reconstructable", "Accepted", "Seeded", "Reconstructed", "ReconstructedSplit"};
ANA_CHECK (book(TH1F("RecoVertex/matchType", "Vertex Match Type", 8, -0.5, 7.5)));
ANA_CHECK (book(TH1F("RecoVertex/matchType", "Vertex Match Type", 65, -0.5, 64.5)));
for(const auto& recoType : recoTypes) {
ANA_CHECK (book(TH1F(("RecoVertex/" + recoType + "_x").c_str(), "Reco vertex x [mm]", 1000, -500, 500)));
......@@ -75,7 +75,7 @@ namespace CP {
ANA_CHECK (book(TH1F(("RecoVertex/" + recoType + "_Trk_charge").c_str(), "Reco track charge ", 3, -1.5, 1.5)));
// truth matching -- don't book for non-matched vertices
if ( recoType != "Inclusive" and recoType != "Fake" ) {
if ( recoType != "All" and recoType != "Fake" ) {
ANA_CHECK (book(TH1F(("RecoVertex/" + recoType + "_positionRes_R").c_str(), "Position resolution for vertices matched to truth decays", 400, -20, 20)));
ANA_CHECK (book(TH1F(("RecoVertex/" + recoType + "_positionRes_Z").c_str(), "Position resolution for vertices matched to truth decays", 400, -20, 20)));
ANA_CHECK (book(TH1F(("RecoVertex/" + recoType + "_matchScore_weight").c_str(), "Vertex Match Score (weight)", 101, 0, 1.01)));
......@@ -343,19 +343,21 @@ namespace CP {
truthmatchinfo = matchInfoDecor(*secVtx);
// This includes all matched vertices, including splits
if(not truthmatchinfo.empty()){
float matchScore_weight = std::get<1>(truthmatchinfo.at(0));
float matchScore_pt = std::get<2>(truthmatchinfo.at(0));
if (matchType != "All" and matchType != "Fake") {
if(not truthmatchinfo.empty()){
float matchScore_weight = std::get<1>(truthmatchinfo.at(0));
float matchScore_pt = std::get<2>(truthmatchinfo.at(0));
ATH_MSG_DEBUG("Match Score and probability: " << matchScore_weight << " " << matchScore_pt/0.01);
ATH_MSG_DEBUG("Match Score and probability: " << matchScore_weight << " " << matchScore_pt/0.01);
const ElementLink<xAOD::TruthVertexContainer>& truthVertexLink = std::get<0>(truthmatchinfo.at(0));
const xAOD::TruthVertex& truthVtx = **truthVertexLink ;
const ElementLink<xAOD::TruthVertexContainer>& truthVertexLink = std::get<0>(truthmatchinfo.at(0));
const xAOD::TruthVertex& truthVtx = **truthVertexLink ;
hist("RecoVertex/" + matchType + "_positionRes_R")->Fill(Lxy - truthVtx.perp());
hist("RecoVertex/" + matchType + "_positionRes_Z")->Fill(secVtx->z() - truthVtx.z());
hist("RecoVertex/" + matchType + "_matchScore_weight")->Fill(matchScore_weight);
hist("RecoVertex/" + matchType + "_matchScore_pt")->Fill(matchScore_pt);
hist("RecoVertex/" + matchType + "_positionRes_R")->Fill(Lxy - truthVtx.perp());
hist("RecoVertex/" + matchType + "_positionRes_Z")->Fill(secVtx->z() - truthVtx.z());
hist("RecoVertex/" + matchType + "_matchScore_weight")->Fill(matchScore_weight);
hist("RecoVertex/" + matchType + "_matchScore_pt")->Fill(matchScore_pt);
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment