25 #include "GaudiKernel/IMessageSvc.h"
33 unsigned int trk_indx,
36 std::string thisName(
"TrigInDetTrackTruthMap::addMatch");
84 std::string thisName(
"TrigInDetTrackTruthMap::truth");
100 log <<
MSG::DEBUG <<
"Truth match for track at ptr=" << p_trig_trk
101 <<
" found in map at index " <<
i <<
endmsg;
117 return (
truth(p_trig_trk)->bestSiMatch() );
126 return (
truth(p_trig_trk)->nrCommonHitsBestSi() );
137 return (
truth(p_trig_trk)->bestTRTMatch() );
146 return (
truth(p_trig_trk)->nrCommonHitsBestTRT() );
155 std::string thisName(
"TrigInDetTrackTruthMap::print");
158 std::ostringstream oss;
160 <<
" track-truth associations" << std::endl;
162 oss <<
"---------------------------------------------------------------------------------------------------------------------------------" << std::endl;
163 oss <<
"#track|algo| pointer | pT | eta | phi |#match|mother|Sihits|TRThits|ev.index| barcode | pdg id | pT | eta | phi |"<< std::endl;
165 oss << std::setiosflags(std::ios::dec) << std::setw(6) <<
i <<
"|"
166 << std::setiosflags(std::ios::dec) << std::setw(4) << (*(
m_elink_vec[
i]))->algorithmId() <<
"|"
170 oss << std::setiosflags(std::ios::dec) <<
"Invalid TrigInDetTrack link !"
171 << std::setiosflags(std::ios::dec) << std::setw(8) <<
"|";
176 oss << std::setiosflags(std::ios::dec) << std::setw(14) << (*(
m_elink_vec[
i]))->param()->pT() <<
"|"
177 << std::setiosflags(std::ios::dec) << std::setw(10) << (*(
m_elink_vec[
i]))->param()->eta() <<
"|"
178 << std::setiosflags(std::ios::dec) << std::setw(10) << (*(
m_elink_vec[
i]))->param()->phi0()<<
"|";
180 oss << std::setiosflags(std::ios::dec) << std::setw(15) <<
"|"
181 << std::setiosflags(std::ios::dec) << std::setw(11) <<
"|"
182 << std::setiosflags(std::ios::dec) << std::setw(11) <<
"|";
188 for (
unsigned int j=0; j <
m_truth_vec[
i].nrMatches(); ++j) {
193 int mother_indx = -1;
194 if (child_indx >= 0) mother_indx = (
m_truth_vec[
i]).motherIndexInChain(child_indx);
198 oss << std::setiosflags(std::ios::dec) << std::setw(7) <<
"|"
199 << std::setiosflags(std::ios::dec) << std::setw(5) <<
"|";
200 oss << std::setiosflags(std::ios::dec) << std::setw(15) <<
"|"
201 << std::setiosflags(std::ios::dec) << std::setw(11) <<
"|"
202 << std::setiosflags(std::ios::dec) << std::setw(11) <<
"|";
205 oss << std::setiosflags(std::ios::dec) << std::setw(6) << j+1 <<
"|";
207 if (mother_indx >= 0) {
208 oss << std::setiosflags(std::ios::dec) << std::setw(6) << mother_indx <<
"|";
212 oss << std::setiosflags(std::ios::dec) << std::setw(6) << (
m_truth_vec[
i]).nrCommonSiHits(j) <<
"|"
213 << std::setiosflags(std::ios::dec) << std::setw(7) << (
m_truth_vec[
i]).nrCommonTRTHits(j) <<
"|"
214 << std::setiosflags(std::ios::dec) << std::setw(8) << (
m_truth_vec[
i]).truthMatch(j)->eventIndex() <<
"|"
215 << std::setiosflags(std::ios::dec) << std::setw(9) << (
m_truth_vec[
i]).truthMatch(j)->barcode() <<
"|";
219 oss << std::setiosflags(std::ios::dec) << std::setw(10) << (
m_truth_vec[
i]).truthMatch(j)->cptr()->pdg_id() <<
"|"
220 << std::setiosflags(std::ios::dec) << std::setw(14) << (
m_truth_vec[
i]).truthMatch(j)->cptr()->momentum().perp()<<
"|"
221 << std::setiosflags(std::ios::dec) << std::setw(10) << (
m_truth_vec[
i]).truthMatch(j)->cptr()->momentum().eta() <<
"|"
222 << std::setiosflags(std::ios::dec) << std::setw(10) << (
m_truth_vec[
i]).truthMatch(j)->cptr()->momentum().phi() <<
"|";
224 oss << std::setiosflags(std::ios::dec) << std::setw(11) <<
"|"
225 << std::setiosflags(std::ios::dec) << std::setw(15) <<
"|"
226 << std::setiosflags(std::ios::dec) << std::setw(11) <<
"|"
227 << std::setiosflags(std::ios::dec) << std::setw(11) <<
"|";
232 oss <<
"---------------------------------------------------------------------------------------------------------------------------------" << std::endl;