ATLAS Offline Software
Classes | Public Types | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
TrigHitDVHypoTool Class Reference

Generated the decision for hypo thats triggers on dispalced vertex. More...

#include <TrigHitDVHypoTool.h>

Inheritance diagram for TrigHitDVHypoTool:
Collaboration diagram for TrigHitDVHypoTool:

Classes

struct  HitDVHypoInfo
 

Public Types

enum  SeedType { HLTJet = 2, SP = 4 }
 

Public Member Functions

 TrigHitDVHypoTool (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual ~TrigHitDVHypoTool ()
 
virtual StatusCode initialize () override
 
StatusCode decide (std::vector< HitDVHypoInfo > &) const
 decides upon a collection of tracks 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 sysInitialize () override
 Perform system initialization for an algorithm. 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
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
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. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

StatusCode inclusiveSelection (std::vector< HitDVHypoInfo > &) const
 
StatusCode multiplicitySelection (std::vector< HitDVHypoInfo > &) const
 
bool decideOnSingleObject (HitDVHypoInfo &, size_t, bool) const
 
float deltaR (float, float, float, float) const
 
int getSPLayer (int, float) const
 
StatusCode findSPSeeds (const xAOD::TrigCompositeContainer *, std::vector< float > &, std::vector< float > &) const
 
StatusCode findJetSeeds (const xAOD::JetContainer *, const float, const float, std::vector< float > &, std::vector< float > &) const
 
StatusCode calculateBDT (const xAOD::TrigCompositeContainer *, const xAOD::TrigCompositeContainer *, const std::vector< float > &, const std::vector< float > &, const float, const int, xAOD::TrigCompositeContainer *, int &) const
 
float getBDTthreshold_0eta1 (float, float) const
 
float getBDTthreshold_1eta2 (float, float) const
 
float getBDTthreshold (float) 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...
 

Private Attributes

HLT::Identifier m_decisionId
 
Gaudi::Property< std::vector< float > > m_cutJetPtGeV { this, "cutJetPtGeV", { 20.0 }, "Jet pT requirement in GeV" }
 
Gaudi::Property< std::vector< float > > m_cutJetEta { this, "cutJetEta", { 2.5 }, "Jet Eta requirement" }
 
Gaudi::Property< std::vector< float > > m_effBDT { this, "effBDT", { 0.7 }, "Efficiency for BDT cut." }
 
Gaudi::Property< std::vector< bool > > m_doSPseed { this, "doSPseed", { true }, "Switch to do SP seeding" }
 
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
 

Detailed Description

Generated the decision for hypo thats triggers on dispalced vertex.

Author
Kunihiro Nagano kunih.nosp@m.iro..nosp@m.nagan.nosp@m.o@ce.nosp@m.rn.ch - KEK

Definition at line 25 of file TrigHitDVHypoTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Member Enumeration Documentation

◆ SeedType

Enumerator
HLTJet 
SP 

Definition at line 44 of file TrigHitDVHypoTool.h.

44  {
45  HLTJet = 2,
46  SP = 4
47  };

Constructor & Destructor Documentation

◆ TrigHitDVHypoTool()

TrigHitDVHypoTool::TrigHitDVHypoTool ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Definition at line 19 of file TrigHitDVHypoTool.cxx.

◆ ~TrigHitDVHypoTool()

TrigHitDVHypoTool::~TrigHitDVHypoTool ( )
virtual

Definition at line 25 of file TrigHitDVHypoTool.cxx.

25 {}

Member Function Documentation

◆ calculateBDT()

StatusCode TrigHitDVHypoTool::calculateBDT ( const xAOD::TrigCompositeContainer ,
const xAOD::TrigCompositeContainer ,
const std::vector< float > &  ,
const std::vector< float > &  ,
const float  ,
const int  ,
xAOD::TrigCompositeContainer ,
int &   
) const
private

◆ decide()

StatusCode TrigHitDVHypoTool::decide ( std::vector< HitDVHypoInfo > &  toolInputs) const

decides upon a collection of tracks

Definition at line 130 of file TrigHitDVHypoTool.cxx.

131 {
132  size_t numTrigger = m_cutJetPtGeV.size();
133  size_t numHitDVs = toolInputs.size();
134 
135  ATH_MSG_DEBUG( " Number of HitDVs = " << numHitDVs );
136 
137  if ( numTrigger == 1 ) {
138  ATH_MSG_DEBUG( " Applying selection of single for " << m_decisionId );
139  return inclusiveSelection(toolInputs);
140  }
141  else {
142  ATH_MSG_DEBUG( " Applying selection of multiplicity for " << m_decisionId );
143  return multiplicitySelection(toolInputs);
144  }
145 
146  return StatusCode::SUCCESS;
147 }

◆ decideOnSingleObject()

bool TrigHitDVHypoTool::decideOnSingleObject ( HitDVHypoInfo input,
size_t  cutIndex,
bool  isOnlyJetCut 
) const
private

Definition at line 249 of file TrigHitDVHypoTool.cxx.

250 {
251  float ptThreshold = m_cutJetPtGeV[cutIndex];
252  float etaThreshold = m_cutJetEta[cutIndex];
253  float eff = m_effBDT[cutIndex];
254 
255  const xAOD::TrigComposite* dv = input.hitDV;
256  int seed_type = dv->getDetail<int> ("hitDV_seed_type");
257  float seed_eta = dv->getDetail<float>("hitDV_seed_eta");
258  float seed_pt = dv->getDetail<float>("hitDV_seed_pt");
259 
260  // if only jet pt/eta cut
261  if( isOnlyJetCut ) {
262  if( seed_type != SeedType::HLTJet ) return false;
263  if( std::abs(seed_eta) > etaThreshold ) return false;
264  if( seed_pt < ptThreshold ) return false;
265  // passed
266  return true;
267  }
268 
269  if( input.isSPOverflow ) return true;
270 
271  // normal cut
272  bool doSPseed = m_doSPseed[cutIndex];
273  float BDTthreshold = getBDTthreshold(input.averageMu);
274  float bdt_score = dv->getDetail<float>("hitDV_bdt_score");
275 
276  if ( std::abs(seed_eta) < 1 ) {
277  BDTthreshold = getBDTthreshold_0eta1(input.averageMu, eff);
278  } else if ( std::abs(seed_eta) < 2 ) {
279  BDTthreshold = getBDTthreshold_1eta2(input.averageMu, eff);
280  }
281 
282  if( ! doSPseed && seed_type==SeedType::SP ) return false;
283  if( seed_type==SeedType::HLTJet && seed_pt < ptThreshold ) return false;
284  if( std::abs(seed_eta) > etaThreshold ) return false;
285  if( bdt_score < BDTthreshold ) return false;
286 
287  ATH_MSG_DEBUG( " Selected, cut index / seed_type / seed_eta / bdt_score = " << cutIndex << " / " << seed_type << " / " << seed_eta << " / " << bdt_score);
288 
289  return true;
290 }

◆ declareGaudiProperty() [1/4]

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

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

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

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

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

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

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

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

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation 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.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation 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.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation 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.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation 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.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

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

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ deltaR()

float TrigHitDVHypoTool::deltaR ( float  ,
float  ,
float  ,
float   
) const
private

◆ 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.

95 { return m_detStore; }

◆ evtStore() [1/2]

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.

85 { return m_evtStore; }

◆ evtStore() [2/2]

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

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

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ 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

◆ findJetSeeds()

StatusCode TrigHitDVHypoTool::findJetSeeds ( const xAOD::JetContainer ,
const float  ,
const float  ,
std::vector< float > &  ,
std::vector< float > &   
) const
private

◆ findSPSeeds()

StatusCode TrigHitDVHypoTool::findSPSeeds ( const xAOD::TrigCompositeContainer ,
std::vector< float > &  ,
std::vector< float > &   
) const
private

◆ getBDTthreshold()

float TrigHitDVHypoTool::getBDTthreshold ( float  mu) const
private

Definition at line 110 of file TrigHitDVHypoTool.cxx.

111 {
112  const float defaultBDTthreshold = 0.03773; // 70% effi at mu=60
113 
114  if( mu<10 || 60<mu ) return defaultBDTthreshold;
115 
116  // pol4 fitting
117  const float par0 = 0.404727;
118  const float par1 = -0.00344154;
119  const float par2 = -6.54218e-05;
120  const float par3 = -3.39841e-07;
121  const float par4 = 9.93062e-09;
122 
123  float thres = par0 + par1*mu + par2*mu*mu + par3*mu*mu*mu + par4*mu*mu*mu*mu;
124  return thres;
125 }

◆ getBDTthreshold_0eta1()

float TrigHitDVHypoTool::getBDTthreshold_0eta1 ( float  mu,
float  eff 
) const
private

Definition at line 46 of file TrigHitDVHypoTool.cxx.

47 {
48  const float defaultBDTthreshold = 0.33482806; // 70% effi at mu=60
49 
50  if( mu<10 || 80<mu ) return defaultBDTthreshold;
51  if( eff<0.5 || 1.<eff ) return defaultBDTthreshold;
52 
53  // pol4*4 fitting
54  const std::vector<std::vector<float>> par = {
55  { 2.9044277, -6.3516751, -4.0085606, 25.456841, -18.208683 },
56  { 0.066196623, -0.098157640, 0.027455008, -0.19900459, 0.16721183 },
57  { -0.00091570959, 1.4831281e-05, 0.0028768317, -0.00053051617, 0.00040427140 },
58  { 2.5249073e-06, 1.7882097e-06, -7.1741129e-06, -9.7309257e-07, -3.2151707e-05 },
59  { -8.2905419e-08, 3.9337893e-07, -5.8968642e-07, 2.6341441e-07, 2.4551736e-07 }
60  };
61 
62  float thres = defaultBDTthreshold;
63  for (size_t i = 0; i < 5; i++) {
64  for (size_t j = 0; j < 5; j++) {
65  float tmp = par[i][j];
66  for (size_t imu = 0; imu < i; imu++) tmp *= mu;
67  for (size_t jeff = 0; jeff < j; jeff++) tmp *= eff;
68  thres += tmp;
69  }
70  }
71 
72  return thres;
73 }

◆ getBDTthreshold_1eta2()

float TrigHitDVHypoTool::getBDTthreshold_1eta2 ( float  mu,
float  eff 
) const
private

Definition at line 78 of file TrigHitDVHypoTool.cxx.

79 {
80  const float defaultBDTthreshold = 0.27072057; // 70% effi at mu=60
81 
82  if( mu<10 || 80<mu ) return defaultBDTthreshold;
83  if( eff<0.5 || 1.<eff ) return defaultBDTthreshold;
84 
85  // pol4*4 fitting
86  const std::vector<std::vector<float>> par = {
87  { 1.8938782, -1.7096217, -8.7938548, 19.779355, -10.656187 },
88  { 0.048863505, -0.18192399, 0.30932576, -0.11527519, -0.13591443 },
89  { -0.00060239060, 0.00096109052, -0.0015378287, -0.0030951666, 0.0063958596 },
90  { 2.5855329e-06, 7.3128949e-06, -6.9676558e-06, 4.2141737e-05, -7.1813827e-05 },
91  { -4.8077006e-08, 1.0646790e-07, -8.0539473e-08, -1.9821312e-07, 3.4713098e-07 }
92  };
93 
94  float thres = defaultBDTthreshold;
95  for (size_t i = 0; i < 5; i++) {
96  for (size_t j = 0; j < 5; j++) {
97  float tmp = par[i][j];
98  for (size_t imu = 0; imu < i; imu++) tmp *= mu;
99  for (size_t jeff = 0; jeff < j; jeff++) tmp *= eff;
100  thres += tmp;
101  }
102  }
103 
104  return thres;
105 }

◆ getSPLayer()

int TrigHitDVHypoTool::getSPLayer ( int  ,
float   
) const
private

◆ inclusiveSelection()

StatusCode TrigHitDVHypoTool::inclusiveSelection ( std::vector< HitDVHypoInfo > &  toolInputs) const
private

Definition at line 152 of file TrigHitDVHypoTool.cxx.

153 {
154  bool isJetCutPassed = false;
155  for ( auto& input: toolInputs ) {
156  if ( TrigCompositeUtils::passed( m_decisionId.numeric(), input.previousDecisionsIDs ) ) {
157  if ( decideOnSingleObject( input, 0, true )==true ) {
158  isJetCutPassed = true;
159  break;
160  }
161  }
162  }
163 
164  if( ! isJetCutPassed ) return StatusCode::SUCCESS;
165 
166  bool isPassed = false;
167  unsigned int idv=0;
168  for ( auto& input: toolInputs ) {
169  ATH_MSG_DEBUG( " --- idv=" << idv << " ---");
170  if ( TrigCompositeUtils::passed( m_decisionId.numeric(), input.previousDecisionsIDs ) ) {
171  if ( decideOnSingleObject( input, 0, false )==true ) {
172  ATH_MSG_DEBUG( " Passed selection --> adding DecisionID");
173  isPassed = true;
175  }
176  } else {
177  ATH_MSG_DEBUG( " Not match DecisionID: " << m_decisionId );
178  }
179  ++idv;
180  }
181 
182  ATH_MSG_DEBUG( "Inclusive selection isPassed = " << isPassed);
183  return StatusCode::SUCCESS;
184 }

◆ initialize()

StatusCode TrigHitDVHypoTool::initialize ( )
overridevirtual

Definition at line 30 of file TrigHitDVHypoTool.cxx.

31 {
32  ATH_MSG_DEBUG( "Initialization completed successfully:" );
33  ATH_MSG_DEBUG( " cutJetPtGeV = " << m_cutJetPtGeV );
34  ATH_MSG_DEBUG( " cutJetEta = " << m_cutJetEta );
35  ATH_MSG_DEBUG( " effBDT = " << m_effBDT );
36  ATH_MSG_DEBUG( " doSPseed = " << m_doSPseed );
37 
38  ATH_MSG_DEBUG( "Tool configured for chain/id: " << m_decisionId );
39 
40  return StatusCode::SUCCESS;
41 }

◆ 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.

◆ msg() [1/2]

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

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

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ 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  }

◆ multiplicitySelection()

StatusCode TrigHitDVHypoTool::multiplicitySelection ( std::vector< HitDVHypoInfo > &  toolInputs) const
private

Definition at line 189 of file TrigHitDVHypoTool.cxx.

190 {
191  unsigned int n_jetpassed = 0;
192  for ( size_t cutIndex=0; cutIndex < m_cutJetPtGeV.size(); ++cutIndex ) {
193  bool isJetCutPassed = false;
194  for ( auto& input: toolInputs ) {
195  if ( TrigCompositeUtils::passed( m_decisionId.numeric(), input.previousDecisionsIDs ) ) {
196  if ( decideOnSingleObject( input, cutIndex, true )==true ) {
197  isJetCutPassed = true;
198  break;
199  }
200  }
201  }
202  if( isJetCutPassed ) ++n_jetpassed;
203  }
204  if( n_jetpassed < m_cutJetPtGeV.size() ) return StatusCode::SUCCESS;
205 
206  //
207  HLT::Index2DVec passingSelection( m_cutJetPtGeV.size() );
208 
209  for ( size_t cutIndex=0; cutIndex < m_cutJetPtGeV.size(); ++cutIndex ) {
210  size_t elementIndex{ 0 };
211  for ( auto& input: toolInputs ) {
212  if ( TrigCompositeUtils::passed( m_decisionId.numeric(), input.previousDecisionsIDs ) ) {
213  if ( decideOnSingleObject( input, cutIndex, false ) == true ) {
214  ATH_MSG_DEBUG( "Pass through selection " << m_decisionId << " : Event[" << elementIndex << "]" );
215  passingSelection[cutIndex].push_back( elementIndex );
216  }
217  }
218  else {
219  ATH_MSG_DEBUG( "Not match DecisionID " << m_decisionId );
220  }
221  elementIndex++;
222  }
223  // If no object passes the selection, multipul selection should stop.
224  if ( passingSelection[cutIndex].empty() ) {
225  ATH_MSG_DEBUG( "No object passed selection " << cutIndex << " rejecting" );
226  return StatusCode::SUCCESS;
227  }
228  }
229 
230  std::set<size_t> passingIndices;
231  HLT::elementsInUniqueCombinations( passingSelection, passingIndices );
232 
233  if ( passingIndices.empty() ) {
234  ATH_MSG_DEBUG( "No track passed through selection " << m_decisionId );
235  return StatusCode::SUCCESS;
236  }
237 
238  for ( auto idx: passingIndices ) {
239  ATH_MSG_DEBUG( "track[" << idx << "] passes through Chain/ID " << m_decisionId << " with pT" );
240  TrigCompositeUtils::addDecisionID( m_decisionId.numeric(), toolInputs[idx].decision );
241  }
242 
243  return StatusCode::SUCCESS;
244 }

◆ 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.

◆ 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();
383  PBASE::renounce (h);
384  }

◆ 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  {
365  handlesArray.renounce();
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 DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ 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.

◆ 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) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_cutJetEta

Gaudi::Property< std::vector<float> > TrigHitDVHypoTool::m_cutJetEta { this, "cutJetEta", { 2.5 }, "Jet Eta requirement" }
private

Definition at line 58 of file TrigHitDVHypoTool.h.

◆ m_cutJetPtGeV

Gaudi::Property< std::vector<float> > TrigHitDVHypoTool::m_cutJetPtGeV { this, "cutJetPtGeV", { 20.0 }, "Jet pT requirement in GeV" }
private

Definition at line 57 of file TrigHitDVHypoTool.h.

◆ m_decisionId

HLT::Identifier TrigHitDVHypoTool::m_decisionId
private

Definition at line 56 of file TrigHitDVHypoTool.h.

◆ 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_doSPseed

Gaudi::Property< std::vector<bool> > TrigHitDVHypoTool::m_doSPseed { this, "doSPseed", { true }, "Switch to do SP seeding" }
private

Definition at line 60 of file TrigHitDVHypoTool.h.

◆ m_effBDT

Gaudi::Property< std::vector<float> > TrigHitDVHypoTool::m_effBDT { this, "effBDT", { 0.7 }, "Efficiency for BDT cut." }
private

Definition at line 59 of file TrigHitDVHypoTool.h.

◆ 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_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
TrigHitDVHypoTool::m_cutJetEta
Gaudi::Property< std::vector< float > > m_cutJetEta
Definition: TrigHitDVHypoTool.h:58
PlotCalibFromCool.dv
dv
Definition: PlotCalibFromCool.py:762
TrigCompositeUtils::passed
bool passed(DecisionID id, const DecisionIDContainer &idSet)
checks if required decision ID is in the set of IDs in the container
Definition: TrigCompositeUtilsRoot.cxx:117
HLT::Identifier::numeric
TrigCompositeUtils::DecisionID numeric() const
numeric ID
Definition: TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h:47
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
TrigCompositeUtils::addDecisionID
void addDecisionID(DecisionID id, Decision *d)
Appends the decision (given as ID) to the decision object.
Definition: TrigCompositeUtilsRoot.cxx:61
TrigHitDVHypoTool::HLTJet
@ HLTJet
Definition: TrigHitDVHypoTool.h:45
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
TrigHitDVHypoTool::multiplicitySelection
StatusCode multiplicitySelection(std::vector< HitDVHypoInfo > &) const
Definition: TrigHitDVHypoTool.cxx:189
TrigHitDVHypoTool::getBDTthreshold
float getBDTthreshold(float) const
Definition: TrigHitDVHypoTool.cxx:110
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
empty
bool empty(TH1 *h)
Definition: computils.cxx:294
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
HLT::Identifier::fromToolName
static HLT::Identifier fromToolName(const std::string &tname)
Definition: HLTIdentifier.cxx:31
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:27
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
lumiFormat.i
int i
Definition: lumiFormat.py:85
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
test_pyathena.parent
parent
Definition: test_pyathena.py:15
TrigHitDVHypoTool::m_decisionId
HLT::Identifier m_decisionId
Definition: TrigHitDVHypoTool.h:56
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
xAOD::TrigComposite_v1
Class used to describe composite objects in the HLT.
Definition: TrigComposite_v1.h:52
DeMoUpdate.tmp
string tmp
Definition: DeMoUpdate.py:1167
TrigHitDVHypoTool::inclusiveSelection
StatusCode inclusiveSelection(std::vector< HitDVHypoInfo > &) const
Definition: TrigHitDVHypoTool.cxx:152
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
HLT::elementsInUniqueCombinations
void elementsInUniqueCombinations(const Index2DVec &indices, std::set< size_t > &participants, std::function< bool(const Index1DVec &)> &&filter)
Definition: Combinators.cxx:154
TrigHitDVHypoTool::SP
@ SP
Definition: TrigHitDVHypoTool.h:46
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
TrigHitDVHypoTool::m_doSPseed
Gaudi::Property< std::vector< bool > > m_doSPseed
Definition: TrigHitDVHypoTool.h:60
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
createCoolChannelIdFile.par
par
Definition: createCoolChannelIdFile.py:29
TrigHitDVHypoTool::getBDTthreshold_0eta1
float getBDTthreshold_0eta1(float, float) const
Definition: TrigHitDVHypoTool.cxx:46
a
TList * a
Definition: liststreamerinfos.cxx:10
TrigHitDVHypoTool::m_effBDT
Gaudi::Property< std::vector< float > > m_effBDT
Definition: TrigHitDVHypoTool.h:59
h
TrigHitDVHypoTool::getBDTthreshold_1eta2
float getBDTthreshold_1eta2(float, float) const
Definition: TrigHitDVHypoTool.cxx:78
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
HLT::Index2DVec
std::vector< Index1DVec > Index2DVec
Definition: TrigCompositeUtils/TrigCompositeUtils/Combinators.h:140
dqt_zlumi_alleff_HIST.eff
int eff
Definition: dqt_zlumi_alleff_HIST.py:113
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
TrigHitDVHypoTool::decideOnSingleObject
bool decideOnSingleObject(HitDVHypoInfo &, size_t, bool) const
Definition: TrigHitDVHypoTool.cxx:249
CaloNoise_fillDB.mu
mu
Definition: CaloNoise_fillDB.py:53
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
fitman.k
k
Definition: fitman.py:528
TrigHitDVHypoTool::m_cutJetPtGeV
Gaudi::Property< std::vector< float > > m_cutJetPtGeV
Definition: TrigHitDVHypoTool.h:57