ATLAS Offline Software
Loading...
Searching...
No Matches
JetForwardJvtToolBDT Class Reference

#include <JetForwardJvtToolBDT.h>

Inheritance diagram for JetForwardJvtToolBDT:

Public Member Functions

 JetForwardJvtToolBDT (const std::string &name)
 Constructor with parameters:
virtual ~JetForwardJvtToolBDT ()
 Destructor:
virtual StatusCode initialize () override
 Dummy implementation of the initialisation function.
virtual StatusCode decorate (const xAOD::JetContainer &jetCont) const override
 Decorate a jet collection without otherwise modifying it.
StatusCode getInputs (const xAOD::Jet *jet) const
float getMVfJVT (const xAOD::Jet *jet, int pvind, const std::vector< TVector2 > &pileupMomenta) const
float getFJVT (const xAOD::Jet *jet, int pvind, const std::vector< TVector2 > &pileupMomenta) const
bool forwardJet (const xAOD::Jet *jet) const
bool centralJet (const xAOD::Jet *jet) const
float getDrpt (const xAOD::Jet *jet) const
int getJetVertex (const xAOD::Jet *jet) const
bool passMVfJVT (float mvfjvt, float pt, float eta) const
StatusCode tagTruth (const xAOD::JetContainer *jets, const xAOD::JetContainer *truthJets)
std::vector< TVector2 > calculateVertexMomenta (const xAOD::JetContainer *jets, int pvind) const
int getPV () const
virtual void print () const
 Print the state of the tool.
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const
virtual StatusCode modify (xAOD::JetContainer &jets) const override final
 Concrete implementation of the function inherited from IJetModifier.
Additional helper functions, not directly mimicking Athena
template<class T>
const T * getProperty (const std::string &name) const
 Get one of the tool's properties.
const std::string & msg_level_name () const __attribute__((deprecated))
 A deprecated function for getting the message level's name.
const std::string & getName (const void *ptr) const
 Get the name of an object that is / should be in the event store.
SG::sgkey_t getKey (const void *ptr) const
 Get the (hashed) key of an object that is in the event store.

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

Gaudi::Property< std::string > m_configDir {this, "configDir", "JetPileupTag/MVfJVT/", "Configuration directory"}
Gaudi::Property< std::vector< std::string > > m_MVconfig
Gaudi::Property< std::string > m_wpFile {this, "WPfile", "MVfJVT_WPs.Nov2019.root", "WP file"}
std::unique_ptr< TFile > m_wpFileIn
std::unique_ptr< TMVA::Reader > m_MVreader
std::unique_ptr< TH3D > m_mvfjvtThresh
Gaudi::Property< double > m_etaThresh {this, "EtaThresh", 2.5, "Eta threshold"}
Gaudi::Property< double > m_forwardMinPt {this, "ForwardMinPt", 20e3, "Forward minimum pt"}
Gaudi::Property< double > m_forwardMaxPt {this, "ForwardMaxPt", 120e3, "Forward maximum pt"}
Gaudi::Property< double > m_centerMinPt {this, "CentralMinPt", 20e3, "Central minimum pt"}
Gaudi::Property< double > m_centerMaxPt {this, "CentralMaxPt", -1, "Central maximum pt (set to -1 for no limit)"}
Gaudi::Property< double > m_centerJvtThresh {this, "CentralJvtThresh", 0.11, "Central JVT threshold"}
Gaudi::Property< std::string > m_jvtMomentName {this, "JvtMomentName", "Jvt", "SG key for JVT moment"}
Gaudi::Property< double > m_centerDrptThresh {this, "CentralDrptThresh", 0.2, "Central drpt threshold"}
Gaudi::Property< double > m_maxStochPt {this, "CentralMaxStochPt", 35e3, "Central maximum stochpt"}
Gaudi::Property< double > m_jetScaleFactor {this, "JetScaleFactor", 0.4, "Jet scale factor"}
Gaudi::Property< std::string > m_OP {this, "OperatingPoint", "DEFAULT", "Selected operating point, can be 'LOOSE', 'TIGHT' or 'TIGHTER'"}
Gaudi::Property< bool > m_getTagger {this, "retrieveTagger", false, "Whether to retrieve the tagger"}
Gaudi::Property< bool > m_isAna {this, "AnaToolMode", false, "True if running in AnaTool mode"}
Gaudi::Property< int > m_pvind {this, "PVIndexHS", -1, ""}
Gaudi::Property< std::string > m_jetContainerName {this, "JetContainer", "", "SG key of input jet container"}
SG::WriteDecorHandleKey< xAOD::JetContainerm_outMVKey {this, "OutputDecMV", "passMVFJVT", "SG key for the output MV decoration"}
SG::WriteDecorHandleKey< xAOD::JetContainerm_mvfjvtKey {this, "MVFJVTName", "MVfJVT", "SG key for the output MVfJVT decoration"}
SG::WriteDecorHandleKey< xAOD::JetContainerm_cllambda2Key {this, "cllambda2Name", "LeadclSecondLambda", "SG key for the LeadclSecondLambda decoration"}
SG::WriteDecorHandleKey< xAOD::JetContainerm_clwidthKey {this, "cletawidthName", "LeadclWidth", "SG key for the cluster eta width decoration"}
SG::WriteDecorHandleKey< xAOD::JetContainerm_clisoKey {this, "clisoName", "SumclIso", "SG key for the cluster isolation decoration"}
SG::WriteDecorHandleKey< xAOD::JetContainerm_clemprobKey {this, "clemprobName", "SumclEMprob", "SG key for the cluster EMprob decoration"}
SG::WriteDecorHandleKey< xAOD::JetContainerm_cleKey {this, "cleName", "Sumcle", "SG key for the cluster energy decoration"}
SG::ReadDecorHandleKey< xAOD::JetContainerm_lcllambda2NTKey {this, "lcllambda2NTName", "LeadingClusterSecondLambda", "Leading cluster second lambda to use if getTagger is false"}
SG::ReadDecorHandleKey< xAOD::JetContainerm_lcllambda2Key {this, "lcllambda2Name", "DFCommonJets_MVfJVT_LeadclSecondLambda", "Leading cluster second lambda to use if getTagger is true"}
SG::ReadDecorHandleKey< xAOD::JetContainerm_lclwidthKey {this, "lclwidthName", "DFCommonJets_MVfJVT_LeadclWidth", "Leading cluster width to use if getTagger is true"}
SG::ReadDecorHandleKey< xAOD::JetContainerm_lclisoKey {this, "lclisoName", "DFCommonJets_MVfJVT_SumclIso", "Leading cluster isolation to use if getTagger is true"}
SG::ReadDecorHandleKey< xAOD::JetContainerm_lclemprobKey {this, "lclemprobName", "DFCommonJets_MVfJVT_SumclEMprob", "Leading cluster EMprob to use if getTagger is true"}
SG::ReadDecorHandleKey< xAOD::JetContainerm_lcleKey {this, "lcleName", "DFCommonJets_MVfJVT_Sumcle", "Leading cluster energy to use if getTagger is true"}
SG::ReadHandleKey< xAOD::EventInfom_eventInfoKey {this, "EventInfoName", "EventInfo", "SG key for input EventInfo"}
SG::ReadHandleKey< xAOD::VertexContainerm_vertexContainerKey {this, "VertexContainerName", "PrimaryVertices", "SG key for input vertex container"}
SG::ReadHandleKey< xAOD::CaloClusterContainerm_caloClusterContainerKey {this, "CaloClusterContainerName" "CaloCalTopoClusters", "SG key for input calo cluster container"}
SG::ReadHandleKey< xAOD::MissingETContainerm_trkMetKey {this, "TrackMetName", "MET_Track", "SG key for input track MET container"}
SG::WriteDecorHandleKey< xAOD::JetContainerm_isHSKey {this, "isHSName", "isJvtHS", "SG key for output isHS decoration"}
SG::WriteDecorHandleKey< xAOD::JetContainerm_isPUKey {this, "isPUName", "isJvtPU", "SG key for output isPU decoration"}
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 45 of file JetForwardJvtToolBDT.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ JetForwardJvtToolBDT()

JetForwardJvtToolBDT::JetForwardJvtToolBDT ( const std::string & name)

Constructor with parameters:

Definition at line 27 of file JetForwardJvtToolBDT.cxx.

27 :
28 asg::AsgTool(name)
29{
30}

◆ ~JetForwardJvtToolBDT()

JetForwardJvtToolBDT::~JetForwardJvtToolBDT ( )
virtualdefault

Destructor:

Member Function Documentation

◆ calculateVertexMomenta()

std::vector< TVector2 > JetForwardJvtToolBDT::calculateVertexMomenta ( const xAOD::JetContainer * jets,
int pvind ) const

Definition at line 351 of file JetForwardJvtToolBDT.cxx.

351 {
352
353 std::vector<TVector2> pileupMomenta;
354
355 SG::ReadHandle<xAOD::MissingETContainer> trkMetHandle(m_trkMetKey);
356 if( !trkMetHandle.isValid() ) {
357 ATH_MSG_WARNING(" xAOD::MissingETContainer " << m_trkMetKey.key() << "is invalid");
358 return pileupMomenta;
359 }
360 SG::ReadHandle<xAOD::VertexContainer> vxContHandle(m_vertexContainerKey);
361 if( !vxContHandle.isValid() ) {
362 ATH_MSG_WARNING(" xAOD::VertexContainer " << m_vertexContainerKey.key() << "is invalid");
363 return pileupMomenta;
364 }
365 ATH_MSG_DEBUG("In JetForwardJvtToolBDT::calculateVertexMomenta : Starting vertex loop ");
366 for(const xAOD::Vertex *vx : *vxContHandle) {
367 ATH_MSG_DEBUG(" --> VertexType="<<vx->vertexType());
368 if(vx->vertexType()!=xAOD::VxType::PriVtx && vx->vertexType()!=xAOD::VxType::PileUp) continue;
369 TString vname = "PVTrack_vx";
370 vname += vx->index();
371 pileupMomenta.push_back((vx->index()==(size_t)pvind?0:-(1./m_jetScaleFactor))*TVector2(0.5*(*trkMetHandle)[vname.Data()]->mpx(),0.5*(*trkMetHandle)[vname.Data()]->mpy()));
372 }
373 for (const xAOD::Jet *jet : *jets) {
374 if (!centralJet(jet)) continue;
375 int jetvert = getJetVertex(jet);
376 if (jetvert>=0) pileupMomenta[jetvert] += TVector2(0.5*jet->pt()*cos(jet->phi()),0.5*jet->pt()*sin(jet->phi()));
377 }
378
379 return pileupMomenta;
380}
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
SG::ReadHandleKey< xAOD::VertexContainer > m_vertexContainerKey
Gaudi::Property< double > m_jetScaleFactor
bool centralJet(const xAOD::Jet *jet) const
int getJetVertex(const xAOD::Jet *jet) const
SG::ReadHandleKey< xAOD::MissingETContainer > m_trkMetKey
@ PileUp
Pile-up vertex.
@ PriVtx
Primary vertex.
Jet_v1 Jet
Definition of the current "jet version".
Vertex_v1 Vertex
Define the latest version of the vertex class.

◆ centralJet()

bool JetForwardJvtToolBDT::centralJet ( const xAOD::Jet * jet) const

Definition at line 389 of file JetForwardJvtToolBDT.cxx.

389 {
390
391 if (fabs(jet->eta())>m_etaThresh) return false;
392 if (jet->pt()<m_centerMinPt || (m_centerMaxPt>0 && jet->pt()>m_centerMaxPt)) return false;
393 float jvt = 0;
394 jet->getAttribute<float>(m_jvtMomentName,jvt);
395 if (jvt>m_centerJvtThresh) return false;
396 if (jet->pt()<m_maxStochPt && getDrpt(jet)<m_centerDrptThresh) return false;
397 return true;
398}
Gaudi::Property< std::string > m_jvtMomentName
Gaudi::Property< double > m_centerMinPt
Gaudi::Property< double > m_centerJvtThresh
float getDrpt(const xAOD::Jet *jet) const
Gaudi::Property< double > m_etaThresh
Gaudi::Property< double > m_centerMaxPt
Gaudi::Property< double > m_maxStochPt
Gaudi::Property< double > m_centerDrptThresh
virtual double pt() const
The transverse momentum ( ) of the particle.
Definition Jet_v1.cxx:44
bool getAttribute(AttributeID type, T &value) const
Retrieve attribute moment by enum.
virtual double eta() const
The pseudorapidity ( ) of the particle.
Definition Jet_v1.cxx:49

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ decorate()

StatusCode JetForwardJvtToolBDT::decorate ( const xAOD::JetContainer & jets) const
overridevirtual

Decorate a jet collection without otherwise modifying it.

Implements IJetDecorator.

Definition at line 132 of file JetForwardJvtToolBDT.cxx.

132 {
133
134 // -- Retrieve PV index if not provided by user
135 //pvind = (m_pvind.value()==-1) ? getPV() : m_pvind;
136 int pvind = m_pvind.value();
137 if(pvind == -1) pvind = getPV();
138
139 ATH_MSG_DEBUG("In JetForwardJvtToolBDT::modify: PV index = " << pvind);
140 if( pvind == -1 ){
141 ATH_MSG_WARNING( "Something went wrong with the HS primary vertex identification." );
142 return StatusCode::FAILURE;
143 }
144
145 SG::WriteDecorHandle<xAOD::JetContainer, char> outMVHandle(m_outMVKey);
146 SG::WriteDecorHandle<xAOD::JetContainer, float> mvfjvtHandle(m_mvfjvtKey);
147
148 SG::WriteDecorHandle<xAOD::JetContainer, float> cllambda2Handle(m_cllambda2Key);
149 SG::WriteDecorHandle<xAOD::JetContainer, float> clwidthHandle(m_clwidthKey);
150 SG::WriteDecorHandle<xAOD::JetContainer, float> clisoHandle(m_clisoKey);
151 SG::WriteDecorHandle<xAOD::JetContainer, float> clemprobHandle(m_clemprobKey);
152 SG::WriteDecorHandle<xAOD::JetContainer, float> cleHandle(m_cleKey);
153 std::vector<TVector2> pileupMomenta;
154 for(const xAOD::Jet *jetF : jetCont) {
155
156 float mvfjvt = -2;
157 outMVHandle(*jetF) = 1;
158 cllambda2Handle(*jetF) = 0;
159 clwidthHandle(*jetF) = 0;
160 cleHandle(*jetF) = 0;
161 clisoHandle(*jetF) = 0;
162 clemprobHandle(*jetF) = 0;
163
164 // -- Get PU vertices momenta sums, then compute tagger value for forward jets
165 if ( forwardJet(jetF) ){
166 if( pileupMomenta.empty() ) {
167 pileupMomenta = calculateVertexMomenta(&jetCont, pvind);
168 if( pileupMomenta.empty() ) {
169 ATH_MSG_DEBUG( "pileupMomenta is empty, this can happen for events with no PU vertices. fJVT won't be computed for this event and will be set to 0 instead." );
170 mvfjvtHandle(*jetF) = 0;
171 continue;
172 }
173 }
174 mvfjvt = getMVfJVT(jetF, pvind, pileupMomenta);
175 if(m_isAna) outMVHandle(*jetF) = passMVfJVT( mvfjvt, jetF->pt()/(GeV), fabs(jetF->eta()) );
176 mvfjvtHandle(*jetF) = mvfjvt;
177 }
178 }
179 return StatusCode::SUCCESS;
180
181}
std::vector< TVector2 > calculateVertexMomenta(const xAOD::JetContainer *jets, int pvind) const
SG::WriteDecorHandleKey< xAOD::JetContainer > m_cllambda2Key
SG::WriteDecorHandleKey< xAOD::JetContainer > m_clisoKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_clwidthKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_outMVKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_clemprobKey
Gaudi::Property< bool > m_isAna
float getMVfJVT(const xAOD::Jet *jet, int pvind, const std::vector< TVector2 > &pileupMomenta) const
SG::WriteDecorHandleKey< xAOD::JetContainer > m_cleKey
Gaudi::Property< int > m_pvind
bool forwardJet(const xAOD::Jet *jet) const
SG::WriteDecorHandleKey< xAOD::JetContainer > m_mvfjvtKey
bool passMVfJVT(float mvfjvt, float pt, float eta) const

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

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

◆ forwardJet()

bool JetForwardJvtToolBDT::forwardJet ( const xAOD::Jet * jet) const

Definition at line 382 of file JetForwardJvtToolBDT.cxx.

382 {
383
384 if (fabs(jet->eta())<m_etaThresh) return false;
385 if (jet->pt()<m_forwardMinPt || jet->pt()>m_forwardMaxPt) return false;
386 return true;
387}
Gaudi::Property< double > m_forwardMaxPt
Gaudi::Property< double > m_forwardMinPt

◆ getDrpt()

float JetForwardJvtToolBDT::getDrpt ( const xAOD::Jet * jet) const

Definition at line 415 of file JetForwardJvtToolBDT.cxx.

415 {
416
417 std::vector<float> sumpts;
418 jet->getAttribute<std::vector<float> >("SumPtTrkPt500",sumpts);
419 if (sumpts.size()<2) return 0;
420
421 std::nth_element(sumpts.begin(),sumpts.begin()+sumpts.size()/2,sumpts.end(),std::greater<int>());
422 double median = sumpts[sumpts.size()/2];
423 std::nth_element(sumpts.begin(),sumpts.begin(),sumpts.end(),std::greater<int>());
424 double max = sumpts[0];
425 return (max-median)/jet->pt();
426}
#define max(a, b)
Definition cfImp.cxx:41
float median(std::vector< float > &Vec)

◆ getFJVT()

float JetForwardJvtToolBDT::getFJVT ( const xAOD::Jet * jet,
int pvind,
const std::vector< TVector2 > & pileupMomenta ) const

Definition at line 184 of file JetForwardJvtToolBDT.cxx.

184 {
185
186 TVector2 fjet(-jet->pt()*cos(jet->phi()),-jet->pt()*sin(jet->phi()));
187 double fjvt = 0;
188 ATH_MSG_DEBUG("In JetForwardJvtToolBDT::getFJVT -----> Starting looping on vertices (pileupMomenta.size() = "<<pileupMomenta.size());
189 for (size_t pui = 0; pui < pileupMomenta.size(); pui++) {
190 if (pui!=(size_t)pvind){
191 double projection = pileupMomenta[pui]*fjet/fjet.Mod();
192 if (projection>fjvt) fjvt = projection;
193 }
194 }
195 return fjvt;
196}
virtual double phi() const
The azimuthal angle ( ) of the particle.
Definition Jet_v1.cxx:54

◆ getInputs()

StatusCode JetForwardJvtToolBDT::getInputs ( const xAOD::Jet * jet) const

Definition at line 286 of file JetForwardJvtToolBDT.cxx.

286 {
287 SG::WriteDecorHandle<xAOD::JetContainer, float> cllambda2Handle(m_cllambda2Key);
288 SG::WriteDecorHandle<xAOD::JetContainer, float> clwidthHandle(m_clwidthKey);
289 SG::WriteDecorHandle<xAOD::JetContainer, float> clisoHandle(m_clisoKey);
290 SG::WriteDecorHandle<xAOD::JetContainer, float> clemprobHandle(m_clemprobKey);
291 SG::WriteDecorHandle<xAOD::JetContainer, float> cleHandle(m_cleKey);
292
293 if(!m_getTagger){
294 SG::ReadDecorHandle<xAOD::JetContainer, float> lcllambda2NTHandle(m_lcllambda2NTKey);
295 cllambda2Handle(*jet) = lcllambda2NTHandle(*jet);
296
297 // -- Additional variables computed from cluster information
298 SG::ReadHandle<xAOD::CaloClusterContainer> clustersHandle(m_caloClusterContainerKey);
299 if( !clustersHandle.isValid() ) {
300 ATH_MSG_ERROR(" xAOD::CaloClusterContainer " << m_caloClusterContainerKey.key() << "is invalid");
301 return StatusCode::FAILURE;
302 }
303
304 int ind = 0;
305 float maxpt = 0;
306 float cle1 = 0;
307 float cliso1 = 0;
308 float clemprob1 = 0;
309 float cle2 = 0;
310
311 // Loop over clusters within DeltaR<0.6 of the jet axis to compute the (energy-weighted) moment sums used in the BDT definitions
312 static const SG::ConstAccessor<float> ISOLATIONAcc ("ISOLATION");
313 static const SG::ConstAccessor<float> EM_PROBABILITYAcc ("EM_PROBABILITY");
314 for (const xAOD::CaloCluster *cl: *clustersHandle) {
315 if(cl->p4().DeltaR(jet->p4())>0.6) continue;
316 cle1 += cl->e();
317 cle2 += cl->e()*cl->e();
318 cliso1 += ISOLATIONAcc(*cl)*cl->e()*cl->e();
319 clemprob1 += EM_PROBABILITYAcc(*cl)*cl->e()*cl->e();
320 if(cl->rawE()/cosh(cl->rawEta()) > maxpt){
321 maxpt = cl->rawE()/cosh(cl->rawEta());
322 ind = cl->index();
323 }
324 }
325 const xAOD::CaloCluster *cl = clustersHandle->at(ind);
326 static const SG::ConstAccessor<float> SECOND_RAcc ("SECOND_R");
327 static const SG::ConstAccessor<float> CENTER_MAGAcc ("CENTER_MAG");
328 clwidthHandle(*jet) = TMath::CosH(cl->rawEta()) * TMath::ATan2( TMath::Sqrt(SECOND_RAcc(*cl)),
329 CENTER_MAGAcc(*cl));
330
331 cleHandle(*jet) = cle1;
332 clisoHandle(*jet)= cliso1/cle2;
333 clemprobHandle(*jet) =clemprob1/cle2;
334
335 } else {
336 SG::ReadDecorHandle<xAOD::JetContainer, float> lcllambda2Handle(m_lcllambda2Key);
337 SG::ReadDecorHandle<xAOD::JetContainer, float> lclwidthHandle(m_lclwidthKey);
338 SG::ReadDecorHandle<xAOD::JetContainer, float> lclisoHandle(m_lclisoKey);
339 SG::ReadDecorHandle<xAOD::JetContainer, float> lclemprobHandle(m_lclemprobKey);
340 SG::ReadDecorHandle<xAOD::JetContainer, float> lcleHandle(m_lcleKey);
341
342 cllambda2Handle(*jet) = lcllambda2Handle(*jet);
343 clwidthHandle(*jet) = lclwidthHandle(*jet);
344 clisoHandle(*jet) = lclisoHandle(*jet);
345 clemprobHandle(*jet) = lclemprobHandle(*jet);
346 cleHandle(*jet) = lcleHandle(*jet);
347 }
348 return StatusCode::SUCCESS;
349}
#define ATH_MSG_ERROR(x)
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_caloClusterContainerKey
SG::ReadDecorHandleKey< xAOD::JetContainer > m_lclwidthKey
SG::ReadDecorHandleKey< xAOD::JetContainer > m_lcllambda2NTKey
Gaudi::Property< bool > m_getTagger
SG::ReadDecorHandleKey< xAOD::JetContainer > m_lclisoKey
SG::ReadDecorHandleKey< xAOD::JetContainer > m_lcleKey
SG::ReadDecorHandleKey< xAOD::JetContainer > m_lcllambda2Key
SG::ReadDecorHandleKey< xAOD::JetContainer > m_lclemprobKey
virtual FourMom_t p4() const
The full 4-momentum of the particle.
Definition Jet_v1.cxx:71
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.

◆ getJetVertex()

int JetForwardJvtToolBDT::getJetVertex ( const xAOD::Jet * jet) const

Definition at line 400 of file JetForwardJvtToolBDT.cxx.

400 {
401
402 std::vector<float> sumpts;
403 jet->getAttribute<std::vector<float> >("SumPtTrkPt500",sumpts);
404 double firstVal = 0;
405 int bestMatch = -1;
406 for (size_t i = 0; i < sumpts.size(); i++) {
407 if (sumpts[i]>firstVal) {
408 bestMatch = i;
409 firstVal = sumpts[i];
410 }
411 }
412 return bestMatch;
413}

◆ getKey()

SG::sgkey_t asg::AsgTool::getKey ( const void * ptr) const
inherited

Get the (hashed) key of an object that is in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::TEvent both provide ways for getting the SG::sgkey_t key for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getName
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The hashed key of the object in the store. If not found, an invalid (zero) key.

Definition at line 119 of file AsgTool.cxx.

119 {
120
121#ifdef XAOD_STANDALONE
122 // In case we use @c xAOD::TEvent, we have a direct function call
123 // for this.
124 return evtStore()->event()->getKey( ptr );
125#else
126 const SG::DataProxy* proxy = evtStore()->proxy( ptr );
127 return ( proxy == nullptr ? 0 : proxy->sgkey() );
128#endif // XAOD_STANDALONE
129 }
ServiceHandle< StoreGateSvc > & evtStore()

◆ getMVfJVT()

float JetForwardJvtToolBDT::getMVfJVT ( const xAOD::Jet * jet,
int pvind,
const std::vector< TVector2 > & pileupMomenta ) const

Definition at line 199 of file JetForwardJvtToolBDT.cxx.

199 {
200
201 static const SG::ConstAccessor<float> MVfJVTAcc ("MVfJVT");
202 if(m_isAna && !m_getTagger) return MVfJVTAcc(*jet);
203
204 StatusCode sc = getInputs(jet);
205 if( sc.isFailure() ) {
206 ATH_MSG_WARNING(" Could not calculate BDT inputs");
207 return -2;
208 }
209
210 SG::ReadHandle<xAOD::EventInfo> eventInfoHandle(m_eventInfoKey);
211 if ( !eventInfoHandle.isValid() ) {
212 ATH_MSG_WARNING(" xAOD::EventInfo " << m_eventInfoKey.key() << "is invalid");
213 return -2;
214 }
215 float mu = eventInfoHandle->actualInteractionsPerCrossing();
216
217 if (!forwardJet(jet)) return -2;
218
219 SG::WriteDecorHandle<xAOD::JetContainer, float> cllambda2Handle(m_cllambda2Key);
220 SG::WriteDecorHandle<xAOD::JetContainer, float> clwidthHandle(m_clwidthKey);
221 SG::WriteDecorHandle<xAOD::JetContainer, float> clisoHandle(m_clisoKey);
222 SG::WriteDecorHandle<xAOD::JetContainer, float> clemprobHandle(m_clemprobKey);
223 SG::WriteDecorHandle<xAOD::JetContainer, float> cleHandle(m_cleKey);
224
225 std::vector<float> MVinputs;
226 MVinputs.push_back( getFJVT(jet, pvind, pileupMomenta)/jet->pt() );
227 MVinputs.push_back( jet->getAttribute<float>("Width") );
228 MVinputs.push_back( jet->getAttribute<float>("Timing") );
229 MVinputs.push_back( cllambda2Handle(*jet) );
230 MVinputs.push_back( clwidthHandle(*jet) );
231 MVinputs.push_back( cleHandle(*jet) );
232 MVinputs.push_back( clisoHandle(*jet) );
233 MVinputs.push_back( clemprobHandle(*jet) );
234
235 float pt = jet->pt()/(GeV);
236 float eta = fabs(jet->eta());
237
238 float score = -2.;
239 // TMVA::Reader::EvaluateMVA isn't thread-safe.
240 TMVA::Reader& reader ATLAS_THREAD_SAFE = *m_MVreader;
241 static std::mutex mutex;
242 std::lock_guard lock (mutex);
243 if ( pt < 30. && pt >= 20. && eta >= 3.2 && mu>=50. ) score = reader.EvaluateMVA( MVinputs, "BDT_1" ,1.);
244 else if ( pt < 30. && pt >= 20. && eta < 3.2 && mu>=50. ) score = reader.EvaluateMVA( MVinputs, "BDT_2" ,1.);
245 else if ( pt < 40. && pt >= 30. && eta >= 3.2 && mu>=50. ) score = reader.EvaluateMVA( MVinputs, "BDT_3" ,1.);
246 else if ( pt < 40. && pt >= 30. && eta < 3.2 && mu>=50. ) score = reader.EvaluateMVA( MVinputs, "BDT_4" ,1.);
247 else if ( pt < 50. && pt >= 40. && eta >= 3.2 && mu>=50. ) score = reader.EvaluateMVA( MVinputs, "BDT_5" ,1.);
248 else if ( pt < 50. && pt >= 40. && eta < 3.2 && mu>=50. ) score = reader.EvaluateMVA( MVinputs, "BDT_6" ,1.);
249 else if ( pt < 120. && pt >= 50. && eta >= 3.2 && mu>=50. ) score = reader.EvaluateMVA( MVinputs, "BDT_7" ,1.);
250 else if ( pt < 120. && pt >= 50. && eta < 3.2 && mu>=50. ) score = reader.EvaluateMVA( MVinputs, "BDT_8" ,1.);
251 else if ( pt < 30. && pt >= 20. && eta >= 3.2 && mu<50. ) score = reader.EvaluateMVA( MVinputs, "BDT_9" ,1.);
252 else if ( pt < 30. && pt >= 20. && eta < 3.2 && mu<50. ) score = reader.EvaluateMVA( MVinputs, "BDT_10" ,1.);
253 else if ( pt < 40. && pt >= 30. && eta >= 3.2 && mu<50. ) score = reader.EvaluateMVA( MVinputs, "BDT_11" ,1.);
254 else if ( pt < 40. && pt >= 30. && eta < 3.2 && mu<50. ) score = reader.EvaluateMVA( MVinputs, "BDT_12" ,1.);
255 else if ( pt < 50. && pt >= 40. && eta >= 3.2 && mu<50. ) score = reader.EvaluateMVA( MVinputs, "BDT_13" ,1.);
256 else if ( pt < 50. && pt >= 40. && eta < 3.2 && mu<50. ) score = reader.EvaluateMVA( MVinputs, "BDT_14" ,1.);
257 else if ( pt < 120. && pt >= 50. && eta >= 3.2 && mu<50. ) score = reader.EvaluateMVA( MVinputs, "BDT_15" ,1.);
258 else if ( pt < 120. && pt >= 50. && eta < 3.2 && mu<50. ) score = reader.EvaluateMVA( MVinputs, "BDT_16" ,1.);
259
260 ATH_MSG_DEBUG("pt = " << pt << " | eta = " << eta << " | mu = " << mu << " || MVfJVT = " << score );
261
262 return score;
263}
Scalar eta() const
pseudorapidity method
static Double_t sc
#define ATLAS_THREAD_SAFE
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
std::unique_ptr< TMVA::Reader > m_MVreader
StatusCode getInputs(const xAOD::Jet *jet) const
float getFJVT(const xAOD::Jet *jet, int pvind, const std::vector< TVector2 > &pileupMomenta) const
::StatusCode StatusCode
StatusCode definition for legacy code.
reader
read the goodrunslist xml file(s)
Definition collisions.py:22

◆ getName()

const std::string & asg::AsgTool::getName ( const void * ptr) const
inherited

Get the name of an object that is / should be in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::TEvent both provide ways for getting the std::string name for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getKey
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The string name of the object in the store. If not found, an empty string.

Definition at line 106 of file AsgTool.cxx.

106 {
107
108#ifdef XAOD_STANDALONE
109 // In case we use @c xAOD::TEvent, we have a direct function call
110 // for this.
111 return evtStore()->event()->getName( ptr );
112#else
113 const SG::DataProxy* proxy = evtStore()->proxy( ptr );
114 static const std::string dummy = "";
115 return ( proxy == nullptr ? dummy : proxy->name() );
116#endif // XAOD_STANDALONE
117 }

◆ getProperty()

template<class T>
const T * asg::AsgTool::getProperty ( const std::string & name) const
inherited

Get one of the tool's properties.

◆ getPV()

int JetForwardJvtToolBDT::getPV ( ) const

Definition at line 428 of file JetForwardJvtToolBDT.cxx.

428 {
429
430 SG::ReadHandle<xAOD::VertexContainer> vxContHandle(m_vertexContainerKey);
431 if( !vxContHandle.isValid() ) {
432 ATH_MSG_WARNING(" xAOD::VertexContainer " << m_vertexContainerKey.key() << "is invalid");
433 return 0;
434 } else {
435 ATH_MSG_DEBUG("Successfully retrieved primary vertex container");
436 for(const xAOD::Vertex *vx : *vxContHandle) {
437 if(vx->vertexType()==xAOD::VxType::PriVtx) return vx->index();
438 }
439 }
440 ATH_MSG_DEBUG("Couldn't identify the hard-scatter primary vertex (no vertex with \"vx->vertexType()==xAOD::VxType::PriVtx\" in the container)!");
441 return 0;
442}

◆ initialize()

StatusCode JetForwardJvtToolBDT::initialize ( void )
overridevirtual

Dummy implementation of the initialisation function.

It's here to allow the dual-use tools to skip defining an initialisation function. Since many are doing so...

Reimplemented from asg::AsgTool.

Definition at line 38 of file JetForwardJvtToolBDT.cxx.

39{
40 ATH_MSG_INFO ("Initializing " << name() << "...");
41
42 if(m_isAna){
43 // -- Retrieve MVfJVT WP configFile ONLY if tool used in 'Analysis mode'
44 std::string filename = PathResolverFindCalibFile(std::string(m_configDir)+m_wpFile);
45 if (filename.empty()){
46 ATH_MSG_ERROR ( "Could NOT resolve file name " << m_wpFile);
47 return StatusCode::FAILURE;
48 } else{
49 ATH_MSG_INFO(" Config Files Path found = "<<filename);
50 }
51
52 // -- Retrieve WP histograms
53 m_wpFileIn = std::make_unique<TFile> (filename.c_str(),"read");
54
55 if ( m_OP=="TIGHTER") {
56 m_mvfjvtThresh = std::unique_ptr< TH3D >( dynamic_cast<TH3D*>( m_wpFileIn->Get( "MVfJVT_tighter" ) ) );
57 } else if ( m_OP=="TIGHT" ) {
58 m_mvfjvtThresh = std::unique_ptr< TH3D >( dynamic_cast<TH3D*>( m_wpFileIn->Get( "MVfJVT_tight" ) ) );
59 } else if ( m_OP=="DEFAULT" || m_OP=="LOOSE" ) {
60 m_mvfjvtThresh = std::unique_ptr< TH3D >( dynamic_cast<TH3D*>( m_wpFileIn->Get( "MVfJVT_loose" ) ) );
61 } else {
62 ATH_MSG_ERROR(m_OP << " working point doesn't exist." );
63 return StatusCode::FAILURE;
64 }
65 m_mvfjvtThresh->SetDirectory(nullptr);
66 m_wpFileIn->Close();
67 }
68
69 // -- Setup the tagger
70 m_MVreader = std::make_unique< TMVA::Reader > ( "Silent" );
71 float fjvt,width,time,cllambda2,cletawidth,cle,cliso,clemprob;
72 m_MVreader->AddVariable( "fjvtdist", &fjvt );
73 m_MVreader->AddVariable( "Width_jet", &width );
74 m_MVreader->AddVariable( "timedist", &time );
75 m_MVreader->AddVariable( "jet_LeadingClusterSecondLambda", &cllambda2 );
76 m_MVreader->AddVariable( "cl_etaWidthLead", &cletawidth );
77 m_MVreader->AddVariable( "clsum_e", &cle );
78 m_MVreader->AddVariable( "cl_ISOLATIONsumE", &cliso );
79 m_MVreader->AddVariable( "cl_EM_PROBABILITYsumE", &clemprob );
80 for(unsigned int i = 0; i<m_MVconfig.size(); ++i) m_MVreader->BookMVA(TString::Format("BDT_%i",i+1),PathResolverFindCalibFile(m_configDir+m_MVconfig.value().at(i)));
81
82 // "passMVfJVT" flag
84 ATH_CHECK(m_outMVKey.initialize());
85
86 // Moments values
88 ATH_CHECK(m_mvfjvtKey.initialize());
89
94 m_cleKey = m_jetContainerName + "." + m_cleKey.key();
95
96 ATH_CHECK(m_cllambda2Key.initialize());
97 ATH_CHECK(m_clwidthKey.initialize());
98 ATH_CHECK(m_clisoKey.initialize());
99 ATH_CHECK(m_clemprobKey.initialize());
100 ATH_CHECK(m_cleKey.initialize());
101
107 m_lcleKey = m_jetContainerName + "." + m_lcleKey.key();
108
109 ATH_CHECK(m_lcllambda2Key.initialize());
110 ATH_CHECK(m_lcllambda2NTKey.initialize());
111 ATH_CHECK(m_lclwidthKey.initialize());
112 ATH_CHECK(m_lclisoKey.initialize());
113 ATH_CHECK(m_lclemprobKey.initialize());
114 ATH_CHECK(m_lcleKey.initialize());
115
116 ATH_CHECK(m_eventInfoKey.initialize());
117 ATH_CHECK(m_vertexContainerKey.initialize());
119 ATH_CHECK(m_trkMetKey.initialize());
120
121 // Truth information
122 m_isHSKey = m_jetContainerName + "." + m_isHSKey.key();
123 m_isPUKey = m_jetContainerName + "." + m_isPUKey.key();
124
125 ATH_CHECK(m_isHSKey.initialize());
126 ATH_CHECK(m_isPUKey.initialize());
127
128 return StatusCode::SUCCESS;
129}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_INFO(x)
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
const double width
Gaudi::Property< std::vector< std::string > > m_MVconfig
std::unique_ptr< TH3D > m_mvfjvtThresh
Gaudi::Property< std::string > m_OP
SG::WriteDecorHandleKey< xAOD::JetContainer > m_isPUKey
Gaudi::Property< std::string > m_jetContainerName
SG::WriteDecorHandleKey< xAOD::JetContainer > m_isHSKey
Gaudi::Property< std::string > m_wpFile
std::unique_ptr< TFile > m_wpFileIn
Gaudi::Property< std::string > m_configDir
time(flags, cells_name, *args, **kw)

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

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.

◆ modify()

virtual StatusCode IJetDecorator::modify ( xAOD::JetContainer & jets) const
inlinefinaloverridevirtualinherited

Concrete implementation of the function inherited from IJetModifier.

Implements IJetModifier.

Definition at line 32 of file IJetDecorator.h.

32{return decorate(jets);};
virtual StatusCode decorate(const xAOD::JetContainer &jets) const =0
Decorate a jet collection without otherwise modifying it.

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msg_level_name()

const std::string & asg::AsgTool::msg_level_name ( ) const
inherited

A deprecated function for getting the message level's name.

Instead of using this, weirdly named function, user code should get the string name of the current minimum message level (in case they really need it...), with:

MSG::name( msg().level() )

This function's name doesn't follow the ATLAS coding rules, and as such will be removed in the not too distant future.

Returns
The string name of the current minimum message level that's printed

Definition at line 101 of file AsgTool.cxx.

101 {
102
103 return MSG::name( msg().level() );
104 }
MsgStream & msg() const
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
Definition MsgLevel.cxx:19

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

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.

◆ passMVfJVT()

bool JetForwardJvtToolBDT::passMVfJVT ( float mvfjvt,
float pt,
float eta ) const

Definition at line 265 of file JetForwardJvtToolBDT.cxx.

265 {
266
267 double mvfjvtThresh = -999.;
268
269 SG::ReadHandle<xAOD::EventInfo> eventInfoHandle(m_eventInfoKey);
270 if ( !eventInfoHandle.isValid() ) {
271 ATH_MSG_WARNING(" xAOD::EventInfo " << m_eventInfoKey.key() << "is invalid");
272 return true;
273 }
274
275 float mu = eventInfoHandle->actualInteractionsPerCrossing();
276
277 // -- Grab WP from histogram
278 mvfjvtThresh = m_mvfjvtThresh->GetBinContent(m_mvfjvtThresh->GetXaxis()->FindBin(pt),
279 m_mvfjvtThresh->GetYaxis()->FindBin(eta),
280 m_mvfjvtThresh->GetZaxis()->FindBin(mu));
281
282 return mvfjvt==-2 || mvfjvt>mvfjvtThresh;
283
284}

◆ print()

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and DerivationFramework::CfAthAlgTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ tagTruth()

StatusCode JetForwardJvtToolBDT::tagTruth ( const xAOD::JetContainer * jets,
const xAOD::JetContainer * truthJets )

Definition at line 444 of file JetForwardJvtToolBDT.cxx.

444 {
445 SG::WriteDecorHandle<xAOD::JetContainer, char> isHSHandle(m_isHSKey);
446 SG::WriteDecorHandle<xAOD::JetContainer, char> isPUHandle(m_isPUKey);
447
448 for(const xAOD::Jet *jet : *jets) {
449 bool ishs = false;
450 bool ispu = true;
451 for(const xAOD::Jet *tjet : *truthJets) {
452 if (tjet->p4().DeltaR(jet->p4())<0.3 && tjet->pt()>10e3) ishs = true;
453 if (tjet->p4().DeltaR(jet->p4())<0.6) ispu = false;
454 }
455 isHSHandle(*jet)=ishs;
456 isPUHandle(*jet)=ispu;
457 }
458 return StatusCode::SUCCESS;
459}

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_caloClusterContainerKey

SG::ReadHandleKey<xAOD::CaloClusterContainer> JetForwardJvtToolBDT::m_caloClusterContainerKey {this, "CaloClusterContainerName" "CaloCalTopoClusters", "SG key for input calo cluster container"}
private

Definition at line 143 of file JetForwardJvtToolBDT.h.

143{this, "CaloClusterContainerName" "CaloCalTopoClusters", "SG key for input calo cluster container"};

◆ m_centerDrptThresh

Gaudi::Property<double> JetForwardJvtToolBDT::m_centerDrptThresh {this, "CentralDrptThresh", 0.2, "Central drpt threshold"}
private

Definition at line 115 of file JetForwardJvtToolBDT.h.

115{this, "CentralDrptThresh", 0.2, "Central drpt threshold"};

◆ m_centerJvtThresh

Gaudi::Property<double> JetForwardJvtToolBDT::m_centerJvtThresh {this, "CentralJvtThresh", 0.11, "Central JVT threshold"}
private

Definition at line 113 of file JetForwardJvtToolBDT.h.

113{this, "CentralJvtThresh", 0.11, "Central JVT threshold"};

◆ m_centerMaxPt

Gaudi::Property<double> JetForwardJvtToolBDT::m_centerMaxPt {this, "CentralMaxPt", -1, "Central maximum pt (set to -1 for no limit)"}
private

Definition at line 112 of file JetForwardJvtToolBDT.h.

112{this, "CentralMaxPt", -1, "Central maximum pt (set to -1 for no limit)"};

◆ m_centerMinPt

Gaudi::Property<double> JetForwardJvtToolBDT::m_centerMinPt {this, "CentralMinPt", 20e3, "Central minimum pt"}
private

Definition at line 111 of file JetForwardJvtToolBDT.h.

111{this, "CentralMinPt", 20e3, "Central minimum pt"};

◆ m_cleKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JetForwardJvtToolBDT::m_cleKey {this, "cleName", "Sumcle", "SG key for the cluster energy decoration"}
private

Definition at line 132 of file JetForwardJvtToolBDT.h.

132{this, "cleName", "Sumcle", "SG key for the cluster energy decoration"};

◆ m_clemprobKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JetForwardJvtToolBDT::m_clemprobKey {this, "clemprobName", "SumclEMprob", "SG key for the cluster EMprob decoration"}
private

Definition at line 131 of file JetForwardJvtToolBDT.h.

131{this, "clemprobName", "SumclEMprob", "SG key for the cluster EMprob decoration"};

◆ m_clisoKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JetForwardJvtToolBDT::m_clisoKey {this, "clisoName", "SumclIso", "SG key for the cluster isolation decoration"}
private

Definition at line 130 of file JetForwardJvtToolBDT.h.

130{this, "clisoName", "SumclIso", "SG key for the cluster isolation decoration"};

◆ m_cllambda2Key

SG::WriteDecorHandleKey<xAOD::JetContainer> JetForwardJvtToolBDT::m_cllambda2Key {this, "cllambda2Name", "LeadclSecondLambda", "SG key for the LeadclSecondLambda decoration"}
private

Definition at line 128 of file JetForwardJvtToolBDT.h.

128{this, "cllambda2Name", "LeadclSecondLambda", "SG key for the LeadclSecondLambda decoration"};

◆ m_clwidthKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JetForwardJvtToolBDT::m_clwidthKey {this, "cletawidthName", "LeadclWidth", "SG key for the cluster eta width decoration"}
private

Definition at line 129 of file JetForwardJvtToolBDT.h.

129{this, "cletawidthName", "LeadclWidth", "SG key for the cluster eta width decoration"};

◆ m_configDir

Gaudi::Property<std::string> JetForwardJvtToolBDT::m_configDir {this, "configDir", "JetPileupTag/MVfJVT/", "Configuration directory"}
private

Definition at line 83 of file JetForwardJvtToolBDT.h.

83{this, "configDir", "JetPileupTag/MVfJVT/", "Configuration directory"};

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_etaThresh

Gaudi::Property<double> JetForwardJvtToolBDT::m_etaThresh {this, "EtaThresh", 2.5, "Eta threshold"}
private

Definition at line 108 of file JetForwardJvtToolBDT.h.

108{this, "EtaThresh", 2.5, "Eta threshold"};

◆ m_eventInfoKey

SG::ReadHandleKey<xAOD::EventInfo> JetForwardJvtToolBDT::m_eventInfoKey {this, "EventInfoName", "EventInfo", "SG key for input EventInfo"}
private

Definition at line 141 of file JetForwardJvtToolBDT.h.

141{this, "EventInfoName", "EventInfo", "SG key for input EventInfo"};

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_forwardMaxPt

Gaudi::Property<double> JetForwardJvtToolBDT::m_forwardMaxPt {this, "ForwardMaxPt", 120e3, "Forward maximum pt"}
private

Definition at line 110 of file JetForwardJvtToolBDT.h.

110{this, "ForwardMaxPt", 120e3, "Forward maximum pt"};

◆ m_forwardMinPt

Gaudi::Property<double> JetForwardJvtToolBDT::m_forwardMinPt {this, "ForwardMinPt", 20e3, "Forward minimum pt"}
private

Definition at line 109 of file JetForwardJvtToolBDT.h.

109{this, "ForwardMinPt", 20e3, "Forward minimum pt"};

◆ m_getTagger

Gaudi::Property<bool> JetForwardJvtToolBDT::m_getTagger {this, "retrieveTagger", false, "Whether to retrieve the tagger"}
private

Definition at line 119 of file JetForwardJvtToolBDT.h.

119{this, "retrieveTagger", false, "Whether to retrieve the tagger"};

◆ m_isAna

Gaudi::Property<bool> JetForwardJvtToolBDT::m_isAna {this, "AnaToolMode", false, "True if running in AnaTool mode"}
private

Definition at line 120 of file JetForwardJvtToolBDT.h.

120{this, "AnaToolMode", false, "True if running in AnaTool mode"};

◆ m_isHSKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JetForwardJvtToolBDT::m_isHSKey {this, "isHSName", "isJvtHS", "SG key for output isHS decoration"}
private

Definition at line 146 of file JetForwardJvtToolBDT.h.

146{this, "isHSName", "isJvtHS", "SG key for output isHS decoration"};

◆ m_isPUKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JetForwardJvtToolBDT::m_isPUKey {this, "isPUName", "isJvtPU", "SG key for output isPU decoration"}
private

Definition at line 147 of file JetForwardJvtToolBDT.h.

147{this, "isPUName", "isJvtPU", "SG key for output isPU decoration"};

◆ m_jetContainerName

Gaudi::Property<std::string> JetForwardJvtToolBDT::m_jetContainerName {this, "JetContainer", "", "SG key of input jet container"}
private

Definition at line 123 of file JetForwardJvtToolBDT.h.

123{this, "JetContainer", "", "SG key of input jet container"};

◆ m_jetScaleFactor

Gaudi::Property<double> JetForwardJvtToolBDT::m_jetScaleFactor {this, "JetScaleFactor", 0.4, "Jet scale factor"}
private

Definition at line 117 of file JetForwardJvtToolBDT.h.

117{this, "JetScaleFactor", 0.4, "Jet scale factor"};

◆ m_jvtMomentName

Gaudi::Property<std::string> JetForwardJvtToolBDT::m_jvtMomentName {this, "JvtMomentName", "Jvt", "SG key for JVT moment"}
private

Definition at line 114 of file JetForwardJvtToolBDT.h.

114{this, "JvtMomentName", "Jvt", "SG key for JVT moment"};

◆ m_lcleKey

SG::ReadDecorHandleKey<xAOD::JetContainer> JetForwardJvtToolBDT::m_lcleKey {this, "lcleName", "DFCommonJets_MVfJVT_Sumcle", "Leading cluster energy to use if getTagger is true"}
private

Definition at line 139 of file JetForwardJvtToolBDT.h.

139{this, "lcleName", "DFCommonJets_MVfJVT_Sumcle", "Leading cluster energy to use if getTagger is true"};

◆ m_lclemprobKey

SG::ReadDecorHandleKey<xAOD::JetContainer> JetForwardJvtToolBDT::m_lclemprobKey {this, "lclemprobName", "DFCommonJets_MVfJVT_SumclEMprob", "Leading cluster EMprob to use if getTagger is true"}
private

Definition at line 138 of file JetForwardJvtToolBDT.h.

138{this, "lclemprobName", "DFCommonJets_MVfJVT_SumclEMprob", "Leading cluster EMprob to use if getTagger is true"};

◆ m_lclisoKey

SG::ReadDecorHandleKey<xAOD::JetContainer> JetForwardJvtToolBDT::m_lclisoKey {this, "lclisoName", "DFCommonJets_MVfJVT_SumclIso", "Leading cluster isolation to use if getTagger is true"}
private

Definition at line 137 of file JetForwardJvtToolBDT.h.

137{this, "lclisoName", "DFCommonJets_MVfJVT_SumclIso", "Leading cluster isolation to use if getTagger is true"};

◆ m_lcllambda2Key

SG::ReadDecorHandleKey<xAOD::JetContainer> JetForwardJvtToolBDT::m_lcllambda2Key {this, "lcllambda2Name", "DFCommonJets_MVfJVT_LeadclSecondLambda", "Leading cluster second lambda to use if getTagger is true"}
private

Definition at line 135 of file JetForwardJvtToolBDT.h.

135{this, "lcllambda2Name", "DFCommonJets_MVfJVT_LeadclSecondLambda", "Leading cluster second lambda to use if getTagger is true"};

◆ m_lcllambda2NTKey

SG::ReadDecorHandleKey<xAOD::JetContainer> JetForwardJvtToolBDT::m_lcllambda2NTKey {this, "lcllambda2NTName", "LeadingClusterSecondLambda", "Leading cluster second lambda to use if getTagger is false"}
private

Definition at line 134 of file JetForwardJvtToolBDT.h.

134{this, "lcllambda2NTName", "LeadingClusterSecondLambda", "Leading cluster second lambda to use if getTagger is false"};

◆ m_lclwidthKey

SG::ReadDecorHandleKey<xAOD::JetContainer> JetForwardJvtToolBDT::m_lclwidthKey {this, "lclwidthName", "DFCommonJets_MVfJVT_LeadclWidth", "Leading cluster width to use if getTagger is true"}
private

Definition at line 136 of file JetForwardJvtToolBDT.h.

136{this, "lclwidthName", "DFCommonJets_MVfJVT_LeadclWidth", "Leading cluster width to use if getTagger is true"};

◆ m_maxStochPt

Gaudi::Property<double> JetForwardJvtToolBDT::m_maxStochPt {this, "CentralMaxStochPt", 35e3, "Central maximum stochpt"}
private

Definition at line 116 of file JetForwardJvtToolBDT.h.

116{this, "CentralMaxStochPt", 35e3, "Central maximum stochpt"};

◆ m_MVconfig

Gaudi::Property<std::vector<std::string> > JetForwardJvtToolBDT::m_MVconfig
private
Initial value:
{this, "ConfigFiles", {
"weights/MVfJVT_pt2030_etaHigh_muHigh.May2019.weights.xml",
"weights/MVfJVT_pt2030_etaLow_muHigh.May2019.weights.xml",
"weights/MVfJVT_pt3040_etaHigh_muHigh.May2019.weights.xml",
"weights/MVfJVT_pt3040_etaLow_muHigh.May2019.weights.xml",
"weights/MVfJVT_pt4050_etaHigh_muHigh.May2019.weights.xml",
"weights/MVfJVT_pt4050_etaLow_muHigh.May2019.weights.xml",
"weights/MVfJVT_pt50plus_etaHigh_muHigh.May2019.weights.xml",
"weights/MVfJVT_pt50plus_etaLow_muHigh.May2019.weights.xml",
"weights/MVfJVT_pt2030_etaHigh_muLow.May2019.weights.xml",
"weights/MVfJVT_pt2030_etaLow_muLow.May2019.weights.xml",
"weights/MVfJVT_pt3040_etaHigh_muLow.May2019.weights.xml",
"weights/MVfJVT_pt3040_etaLow_muLow.May2019.weights.xml",
"weights/MVfJVT_pt4050_etaHigh_muLow.May2019.weights.xml",
"weights/MVfJVT_pt4050_etaLow_muLow.May2019.weights.xml",
"weights/MVfJVT_pt50plus_etaHigh_muLow.May2019.weights.xml",
"weights/MVfJVT_pt50plus_etaLow_muLow.May2019.weights.xml"
}, "List of config file names"}

Definition at line 84 of file JetForwardJvtToolBDT.h.

84 {this, "ConfigFiles", {
85 "weights/MVfJVT_pt2030_etaHigh_muHigh.May2019.weights.xml",
86 "weights/MVfJVT_pt2030_etaLow_muHigh.May2019.weights.xml",
87 "weights/MVfJVT_pt3040_etaHigh_muHigh.May2019.weights.xml",
88 "weights/MVfJVT_pt3040_etaLow_muHigh.May2019.weights.xml",
89 "weights/MVfJVT_pt4050_etaHigh_muHigh.May2019.weights.xml",
90 "weights/MVfJVT_pt4050_etaLow_muHigh.May2019.weights.xml",
91 "weights/MVfJVT_pt50plus_etaHigh_muHigh.May2019.weights.xml",
92 "weights/MVfJVT_pt50plus_etaLow_muHigh.May2019.weights.xml",
93 "weights/MVfJVT_pt2030_etaHigh_muLow.May2019.weights.xml",
94 "weights/MVfJVT_pt2030_etaLow_muLow.May2019.weights.xml",
95 "weights/MVfJVT_pt3040_etaHigh_muLow.May2019.weights.xml",
96 "weights/MVfJVT_pt3040_etaLow_muLow.May2019.weights.xml",
97 "weights/MVfJVT_pt4050_etaHigh_muLow.May2019.weights.xml",
98 "weights/MVfJVT_pt4050_etaLow_muLow.May2019.weights.xml",
99 "weights/MVfJVT_pt50plus_etaHigh_muLow.May2019.weights.xml",
100 "weights/MVfJVT_pt50plus_etaLow_muLow.May2019.weights.xml"
101 }, "List of config file names"}; // pt [20,30,40,50,120] || |eta| [2.5,3.2,4.5] || mu [0,50,inf.];

◆ m_mvfjvtKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JetForwardJvtToolBDT::m_mvfjvtKey {this, "MVFJVTName", "MVfJVT", "SG key for the output MVfJVT decoration"}
private

Definition at line 127 of file JetForwardJvtToolBDT.h.

127{this, "MVFJVTName", "MVfJVT", "SG key for the output MVfJVT decoration"};

◆ m_mvfjvtThresh

std::unique_ptr< TH3D > JetForwardJvtToolBDT::m_mvfjvtThresh
private

Definition at line 106 of file JetForwardJvtToolBDT.h.

◆ m_MVreader

std::unique_ptr< TMVA::Reader > JetForwardJvtToolBDT::m_MVreader
private

Definition at line 105 of file JetForwardJvtToolBDT.h.

◆ m_OP

Gaudi::Property<std::string> JetForwardJvtToolBDT::m_OP {this, "OperatingPoint", "DEFAULT", "Selected operating point, can be 'LOOSE', 'TIGHT' or 'TIGHTER'"}
private

Definition at line 118 of file JetForwardJvtToolBDT.h.

118{this, "OperatingPoint", "DEFAULT", "Selected operating point, can be 'LOOSE', 'TIGHT' or 'TIGHTER'"};

◆ m_outMVKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JetForwardJvtToolBDT::m_outMVKey {this, "OutputDecMV", "passMVFJVT", "SG key for the output MV decoration"}
private

Definition at line 125 of file JetForwardJvtToolBDT.h.

125{this, "OutputDecMV", "passMVFJVT", "SG key for the output MV decoration"};

◆ m_pvind

Gaudi::Property<int> JetForwardJvtToolBDT::m_pvind {this, "PVIndexHS", -1, ""}
private

Definition at line 121 of file JetForwardJvtToolBDT.h.

121{this, "PVIndexHS", -1, ""};

◆ m_trkMetKey

SG::ReadHandleKey<xAOD::MissingETContainer> JetForwardJvtToolBDT::m_trkMetKey {this, "TrackMetName", "MET_Track", "SG key for input track MET container"}
private

Definition at line 144 of file JetForwardJvtToolBDT.h.

144{this, "TrackMetName", "MET_Track", "SG key for input track MET container"};

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vertexContainerKey

SG::ReadHandleKey<xAOD::VertexContainer> JetForwardJvtToolBDT::m_vertexContainerKey {this, "VertexContainerName", "PrimaryVertices", "SG key for input vertex container"}
private

Definition at line 142 of file JetForwardJvtToolBDT.h.

142{this, "VertexContainerName", "PrimaryVertices", "SG key for input vertex container"};

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.

◆ m_wpFile

Gaudi::Property<std::string> JetForwardJvtToolBDT::m_wpFile {this, "WPfile", "MVfJVT_WPs.Nov2019.root", "WP file"}
private

Definition at line 102 of file JetForwardJvtToolBDT.h.

102{this, "WPfile", "MVfJVT_WPs.Nov2019.root", "WP file"};

◆ m_wpFileIn

std::unique_ptr< TFile > JetForwardJvtToolBDT::m_wpFileIn
private

Definition at line 104 of file JetForwardJvtToolBDT.h.


The documentation for this class was generated from the following files: