![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
15 constexpr
float threshold_offset = 10.0;
25 if(!
info.isHLTSingleTau()) {
31 const bool l1_accept_flag =
passBits & TrigDefs::L1_isPassedAfterVeto;
32 const bool hlt_not_prescaled_flag = (
passBits & TrigDefs::EF_prescaled) == 0;
36 std::vector<const xAOD::TauJet*> offline_taus_1p = offline_taus.first;
37 std::vector<const xAOD::TauJet*> offline_taus_3p = offline_taus.second;
42 std::vector<const xAOD::TauJet*> hlt_taus_0p = std::get<0>(hlt_taus);
43 std::vector<const xAOD::TauJet*> hlt_taus_1p = std::get<1>(hlt_taus);
44 std::vector<const xAOD::TauJet*> hlt_taus_mp = std::get<2>(hlt_taus);
62 if(!hlt_taus_0p.empty()) {
70 if(!hlt_taus_1p.empty()) {
78 if(!hlt_taus_mp.empty()) {
92 return StatusCode::SUCCESS;
117 bool hlt_fires =
m_trigDecTool->isPassed(
trigger, TrigDefs::Physics | TrigDefs::allowResurrectedDecision);
120 for(
const auto *offline_tau : offline_tau_vec) {
121 bool L1_match =
false;
125 for(
const TLorentzVector& roi :
rois) {
126 L1_match = offline_tau->p4().DeltaR(roi) <= 0.3;
131 tauEta = offline_tau->eta();
132 tauPhi = offline_tau->phi();
135 bool is_highPt =
tauPt >
info.getHLTTauThreshold() + 20.0;
138 HLT_match =
matchObjects(offline_tau, online_tau_vec, 0.2) && hlt_fires;
142 Total_match =
static_cast<bool>(HLT_match);
146 Total_match_highPt =
static_cast<bool>(HLT_match);
151 if(!L1_match || !l1_accept_flag)
continue;
156 HLT_match_highPt =
static_cast<bool>(HLT_match);
219 detail = std::log10(std::max(detail, 140.0f));
228 fill(
monGroup,
centFrac,
etOverPtLeadTrk,
dRmax,
absipSigLeadTrk, sumPtTrkFrac, emPOverTrkSysP,
ptRatioEflowApprox,
mEflowApprox,
ptDetectorAxis,
massTrkSys,
trFlightPathSig);
243 for(
const auto *tau : tau_vec) {
246 bool linksValid =
true;
248 if(!trackEL.isValid()) {
263 n_track = tracks.size();
273 uint8_t inner_pixel_hits, inner_pixel_exp;
277 if(success1_innerPixel_hits && success2_innerPixel_exp) {
detail = inner_pixel_exp ? inner_pixel_hits : 1.; };
281 uint8_t pixel_hits, pixel_dead;
285 if(success1_pixel_hits && success2_pixel_dead) {
detail = pixel_hits + pixel_dead; };
293 if(success1_sct_hits && success2_sct_dead) {
detail = sct_hits + sct_dead; };
297 fill(
monGroup, n_track, track_pt_log, track_eta, track_phi, track_dEta, track_dPhi, track_z0sinthetaTJVA_abs_log, track_d0_abs_log, track_nIBLHitsAndExp, track_nPixelHitsPlusDeadSensors, track_nSCTHitsPlusDeadSensors);
310 for(
const auto *tau : tau_vec){
313 std::vector<const xAOD::CaloCluster*>
clusters;
338 if(success_SECOND_LAMBDA)
detail = std::log10(
detail + 0.1);
345 if(success_CENTER_LAMBDA)
detail = std::log10(
detail + 1
e-6);
349 fill(
monGroup, n_cluster, cluster_pt_jetseed_log, cluster_et_log, cluster_eta, cluster_phi, cluster_dEta, cluster_dPhi, cluster_SECOND_R_log10, cluster_SECOND_LAMBDA_log10, cluster_CENTER_LAMBDA_log10);
397 fill(
monGroup,
Pt,
Eta,
Phi, nTrack, nWideTrack, RNNScore, RNNScoreSigTrans, averageMu, TauVertexX, TauVertexY, TauVertexZ);
405 std::vector<TLorentzVector>
ret;
410 if(
info.getL1TauType() ==
"eTAU") {
412 v.SetPtEtaPhiM(roi->et(), roi->eta(), roi->phi(), 0);
415 }
else if(
info.getL1TauType() ==
"jTAU") {
417 v.SetPtEtaPhiM(roi->et(), roi->eta(), roi->phi(), 0);
420 }
else if(
info.getL1TauType() ==
"cTAU") {
421 for(
const auto& [eTau_roi, jTau_roi] :
getL1cTAUs(ctx,
info.getL1TauItem())) {
422 v.SetPtEtaPhiM(eTau_roi->et(), eTau_roi->eta(), eTau_roi->phi(), 0);
427 v.SetPtEtaPhiM(roi->eT(), roi->eta(), roi->phi(), 0);
virtual double phi() const
The azimuthal angle ( ) of the particle.
Class describing properties of a LVL1 jFEX global Trigger Object (TOB) in the xAOD format.
float x() const
Returns the x position.
void fillRNNInputVars(const std::string &trigger, const std::vector< const xAOD::TauJet * > &tau_vec, const std::string &nProng, bool online) const
@ RNNJetScoreSigTrans
RNN score which is signal transformed/flattened.
bool CENTER_LAMBDA(const xAOD::TauJet &, const xAOD::CaloVertexedTopoCluster &cluster, double &out)
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
PublicToolHandle< Trig::TrigDecisionTool > m_trigDecTool
Tool to tell whether a specific trigger is passed.
double discriminant(TauJetParameters::TauID discID) const
Get value of discriminant.
bool absipSigLeadTrk(const xAOD::TauJet &tau, double &out)
virtual double eta() const
The pseudorapidity ( ) of the particle.
size_t nTracks(TauJetParameters::TauTrackFlag flag=TauJetParameters::TauTrackFlag::classifiedCharged) const
std::vector< std::pair< const xAOD::eFexTauRoI *, const xAOD::jFexTauRoI * > > getL1cTAUs(const EventContext &ctx, const std::string &l1_item) const
std::tuple< std::vector< const xAOD::TauJet * >, std::vector< const xAOD::TauJet * >, std::vector< const xAOD::TauJet * > > classifyOnlineTaus(const std::vector< const xAOD::TauJet * > &taus, const float threshold=0.0) const
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].
@ expectInnermostPixelLayerHit
Do we expect a 0th-layer barrel hit for this track?
Helper class to provide constant type-safe access to aux data.
std::vector< const xAOD::eFexTauRoI * > getL1eTAUs(const EventContext &ctx, const std::string &l1_item) const
Class providing the definition of the 4-vector interface.
double ptDetectorAxis() const
TrigTauMonitorSingleAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Gaudi::Property< bool > m_do_variable_plots
virtual StatusCode processEvent(const EventContext &ctx) const override
ValuesCollection< T > Collection(std::string name, const T &collection)
Declare a monitored (double-convertible) collection.
std::vector< const IParticle * > clusters() const
@ centFrac
Get centrality fraction.
@ dRmax
Get maximal dR of tracks associated to calo-seeded tau.
virtual double pt() const
The transverse momentum ( ) of the particle.
virtual double phi() const
The azimuthal angle ( ) of the particle.
std::vector< const xAOD::TauJet * > getOnlineTausAll(const std::string &trigger, bool include_0P=true) const
Description of a calorimeter cluster.
void fillRNNTrack(const std::string &trigger, const std::vector< const xAOD::TauJet * > &tau_vec, bool online) const
std::pair< std::vector< const xAOD::TauJet * >, std::vector< const xAOD::TauJet * > > classifyOfflineTaus(const std::vector< const xAOD::TauJet * > &taus, const float threshold=0.0) const
virtual double eta() const
The pseudorapidity ( ) of the particle.
Class describing a LVL1 em/tau region of interest.
Class describing a LVL1 eFEX tau region of interest.
::StatusCode StatusCode
StatusCode definition for legacy code.
Class describing a tau jet.
const TauTrack * track(size_t i, TauJetParameters::TauTrackFlag flag=TauJetParameters::TauTrackFlag::classifiedCharged, int *container_index=0) const
Get the pointer to a given tauTrack associated with this tau /*container index needed by trackNonCons...
bool retrieveMoment(MomentType type, double &value) const
Retrieve individual moment.
float z() const
Returns the z position.
void fill(const ToolHandle< GenericMonitoringTool > &groupHandle, std::vector< std::reference_wrapper< Monitored::IMonitoredVariable >> &&variables) const
Fills a vector of variables to a group by reference.
void fillRNNCluster(const std::string &trigger, const std::vector< const xAOD::TauJet * > &tau_vec, bool online) const
bool SECOND_LAMBDA(const xAOD::TauJet &, const xAOD::CaloVertexedTopoCluster &cluster, double &out)
virtual FourMom_t p4() const
The full 4-momentum of the particle.
ElementLink implementation for ROOT usage.
bool detail(TauJetParameters::Detail detail, int &value) const
Set veto flag.
std::vector< TLorentzVector > getRoIsVector(const EventContext &ctx, const std::string &trigger) const
Gaudi::Property< bool > m_requireOfflineTaus
bool SECOND_R(const xAOD::TauJet &, const xAOD::CaloVertexedTopoCluster &cluster, double &out)
Gaudi::Property< bool > m_do_efficiency_plots
virtual float lbAverageInteractionsPerCrossing(const EventContext &ctx=Gaudi::Hive::currentContext()) const
Calculate the average mu, i.e.
@ RNNJetScore
RNN score for Jet rejection (not transformed)
Gaudi::Property< bool > m_doTotalEfficiency
Gaudi::Property< bool > m_doOfflineTausDistributions
std::vector< const xAOD::jFexTauRoI * > getL1jTAUs(const EventContext &ctx, const std::string &l1_item) const
const Vertex * vertex() const
#define ATH_MSG_WARNING(x)
@ numberOfSCTDeadSensors
number of dead SCT sensors crossed [unit8_t].
bool matchObjects(const T1 *tau, const std::vector< const T2 * > &tau_vec, float threshold) const
virtual FourMom_t p4() const
The full 4-momentum of the particle.
float y() const
Returns the y position.
std::vector< const xAOD::EmTauRoI * > getL1LegacyTAUs(const EventContext &ctx, const std::string &l1_item) const
Gaudi::Property< std::vector< std::string > > m_triggers
@ numberOfSCTHits
number of hits in SCT [unit8_t].
@ numberOfPixelDeadSensors
number of dead pixel sensors crossed [unit8_t].
const TrigTauInfo & getTrigInfo(const std::string &trigger) const
Declare a monitored scalar variable.
void fillBasicVars(const EventContext &ctx, const std::string &trigger, const std::vector< const xAOD::TauJet * > &tau_vec, const std::string &nProng, bool online) const
bool ptDetectorAxis(const xAOD::TauJet &tau, double &out)
size_t nTracksIsolation() const
void fillHLTEfficiencies(const EventContext &ctx, const std::string &trigger, const bool l1_accept_flag, const std::vector< const xAOD::TauJet * > &offline_tau_vec, const std::vector< const xAOD::TauJet * > &online_tau_vec, const std::string &nProng) const
std::vector< const TauTrack * > allTracks() const
Get the v<const pointer> to all tracks associated with this tau, regardless of classification.
const ToolHandle< GenericMonitoringTool > & getGroup(const std::string &name) const
Get a specific monitoring tool from the tool handle array.
std::vector< const xAOD::TauJet * > getOfflineTausAll(const EventContext &ctx, const float threshold=20.0) const
@ numberOfInnermostPixelLayerHits
these are the hits in the 0th pixel barrel layer