ATLAS Offline Software
CombinerToolTag.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 /******************************************************
6 
7  @class CombinerToolTag
8  General tool to combine likelihoods
9  (uses Andi Wildauer's CombinerTool)
10 
11  Created - 23 April 2007
12 
13  @author:
14  * Giacinto Piacquadio (giacinto.piacquadio AT physik.uni-freiburg.de)
15  * Christian Weiser (christian.weiser AT physik.uni-freiburg.de)
16 
17  --- ( University of FREIBURG ) ---
18 
19  (c) 2007 - ATLAS Detector Software
20 
21 ********************************************************/
22 
24 #include "JetTagInfo/BaseTagInfo.h"
26 
27 namespace Analysis {
28 
29  CombinerToolTag::CombinerToolTag(const std::string& t, const std::string& n, const IInterface* p)
30  : AthAlgTool(t,n,p),
31  m_combinedTagString("combinedTag"),
32  m_combinerTool("Analysis::CombinerTool")
33  {
34  declareInterface<ITagTool>(this);
35  // global configuration:
36  declareProperty("listTaggers",m_listTaggers);
37  declareProperty("combinedTagString",m_combinedTagString);
38  declareProperty("CombinerTool",m_combinerTool);
39  }
40 
42 
43  StatusCode sc = m_combinerTool.retrieve();
44  if( StatusCode::SUCCESS != sc ) {
45  ATH_MSG_ERROR("#BTAG# creation of Analysis::CombinerTool failed.");
46  return sc;
47  }
48 
49  return StatusCode::SUCCESS;
50  }
51 
52  void CombinerToolTag::tagJet(xAOD::Jet& jetToTag) {
53 
54  std::vector<double> combination=m_combinerTool->simpleCombine(jetToTag,
56 
58  newTagInfo->setTagLikelihood(combination);
59  jetToTag.addInfo(newTagInfo);
60  newTagInfo->makeValid();
61 
62  }
63 
64 }//end namespace
65 
66 
Analysis::CombinerToolTag::CombinerToolTag
CombinerToolTag(const std::string &, const std::string &, const IInterface *)
Definition: CombinerToolTag.cxx:45
Analysis::CombinerToolTag::tagJet
virtual void tagJet(xAOD::Jet &jetToTag)
Definition: CombinerToolTag.cxx:68
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
Analysis::BaseTagInfo::setTagLikelihood
virtual void setTagLikelihood(const std::vector< double > &)
Return and set methods for the likelihood.
Definition: BaseTagInfo.h:93
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
Analysis::BaseTagInfo::makeValid
virtual void makeValid()
sets the isValid flag to true, cannot be reversed!
Definition: BaseTagInfo.h:85
Analysis::CombinerToolTag::m_combinedTagString
std::string m_combinedTagString
Definition: CombinerToolTag.h:55
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
beamspotman.n
n
Definition: beamspotman.py:731
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Analysis::BaseTagInfo
Class BasetagInfo: Implements methods defined in ITagInfo.
Definition: BaseTagInfo.h:40
ICombinerTool.h
BaseTagInfo.h
Analysis
The namespace of all packages in PhysicsAnalysis/JetTagging.
Definition: BTaggingCnvAlg.h:20
CombinerToolTag.h
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
Analysis::CombinerToolTag::m_listTaggers
std::vector< std::string > m_listTaggers
List of the variables to be used in the likelihood.
Definition: CombinerToolTag.h:54
Analysis::CombinerToolTag::initialize
virtual StatusCode initialize() override
Definition: CombinerToolTag.cxx:57
AthAlgTool
Definition: AthAlgTool.h:26
Analysis::CombinerToolTag::m_combinerTool
ToolHandle< ICombinerTool > m_combinerTool
Definition: CombinerToolTag.h:57