ATLAS Offline Software
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
Analysis::JetTagCalibCondAlg Class Reference

@ class JetTagCalibCondAlg More...

#include <JetTagCalibCondAlg.h>

Inheritance diagram for Analysis::JetTagCalibCondAlg:
Collaboration diagram for Analysis::JetTagCalibCondAlg:

Public Member Functions

 JetTagCalibCondAlg (const std::string &name, ISvcLocator *pSvcLocator)
 @ class JetTagCalibCondAlg More...
 
 ~JetTagCalibCondAlg ()
 
virtual StatusCode initialize () override
 
virtual StatusCode execute () override
 
virtual StatusCode finalize () override
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. 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 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

void registerHistogram (const std::string &tagger, const std::string &histoname)
 
void registerHistogram (const std::string &tagger, const std::string &directory, const std::string &histoname)
 
StatusCode createHistoMap (TFile *file, JetTagCalibCondData *histos)
 
StatusCode objectTDirExists (const std::string &histname, TFile *file) const
 
std::vector< std::string > tokenize (const std::string &str, const std::string &delim)
 
void smoothAndNormalizeHistogram (TH1 *h, const std::string &hname)
 
void smoothASH2D (TH2 *input2D, int m1, int m2)
 
void initializeIPTag ()
 
void initializeIP2D ()
 
void initializeIP3D ()
 
void initializeSVEff (const std::string &)
 
void initializeSV1 ()
 
void initializeSV2 ()
 
void initializeJetFitterNN ()
 
void initializeSoftMu ()
 
void initializeMV2 (const std::string &)
 
void initializeRNNIP ()
 
void initializeMultiSV (const std::string &)
 
void initializeDL1 (const std::string &)
 
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

SG::ReadCondHandleKey< CondAttrListCollectionm_readKey {this, "ReadKeyCalibPath", "/GLOBAL/BTagCalib/RUN12", "Key of input (raw) conditions folder of bration path"}
 
SG::WriteCondHandleKey< JetTagCalibCondDatam_writeKey {this, "HistosKey", "JetTagCalibHistosKey", "Key of output (derived) JetTag calibration data"}
 
IPoolSvcm_poolsvc
 
std::vector< std::string > m_taggers
 
std::unordered_map< std::string, std::string > m_directoryMap
 
std::vector< std::vector< std::string > > m_taggersHists
 
std::vector< std::string > m_mappedAlias
 
std::vector< std::string > m_originalChannels
 
StringArrayProperty m_channelAliases
 
std::map< std::string, std::vector< std::string > > m_channelAliasesMultiMap
 
bool m_IPTag_useCHypo
 
std::vector< std::string > m_IPTag_hypotheses
 
std::vector< std::string > m_IP2D_trackGradePartitions
 
bool m_useDRJPVSV
 
bool m_usePtSV2
 
int m_Likelihood_smoothNTimes
 
std::vector< std::string > m_Likelihood_vetoSmoothingOf
 
std::string m_JetFitterNN_calibrationDirectory
 
std::string m_JetFitterNN_calibrationSubDirectory
 
bool m_JetFitterNN_useCombinedIPNN
 
int m_JetFitterNN_maximumRegisteredLayers
 
std::string m_DL1_file_name
 
std::map< std::string, std::string > m_RNNIP_network_cfg
 
DataObjIDColl m_extendedExtraObjects
 
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

@ class JetTagCalibCondAlg

This class retrieves calibration histograms from COOL for the taggers. A single COOL folder is defined for all the taggers. Each tagger is subdivided in channels, each channel being associated to a jet type (Cone4Topo, Kt6, etc).

Any further substructure (track categories, signal/background) is hidden to COOL and is defined by the actual name of the histogram.

This class holds the collection of maps between the histogram name and the pointer to the histogram, the latter being kept up-to-date with the condition algorithm mecanism. All the taggers histograms are registered in initialize() method with the registerHistogram() method.

The geometry tag corresponding to the calibrations, the type of physics events used, the tracking algorithm, etc, are all defined by a DB tag.

Author
emman.nosp@m.uel..nosp@m.le.gu.nosp@m.irri.nosp@m.ec@ce.nosp@m.rn.c.nosp@m.h

Definition at line 49 of file JetTagCalibCondAlg.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ JetTagCalibCondAlg()

Analysis::JetTagCalibCondAlg::JetTagCalibCondAlg ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

@ class JetTagCalibCondAlg

Author
emman.nosp@m.uel..nosp@m.le.gu.nosp@m.irri.nosp@m.ec@ce.nosp@m.rn.c.nosp@m.h

Definition at line 28 of file JetTagCalibCondAlg.cxx.

29  : ::AthAlgorithm( name, pSvcLocator ),
35  {
36  declareProperty("taggers", m_taggers);
38  declareProperty("channelAliases", m_channelAliases);
39  declareProperty("IPTag_UseCHypo" , m_IPTag_useCHypo = true);
40  declareProperty("IP2D_TrackGradePartitions", m_IP2D_trackGradePartitions);
41  declareProperty("SV_useDRJPV", m_useDRJPVSV=true);
42  declareProperty("SV2_usePt", m_usePtSV2=false);
43  declareProperty("Likelihood_smoothNTimes",m_Likelihood_smoothNTimes);
44  declareProperty("Likelihood_vetoSmoothingOf", m_Likelihood_vetoSmoothingOf);
45  declareProperty("JetFitterNN_CalibrationDirectory",m_JetFitterNN_calibrationDirectory);
46  declareProperty("JetFitterNN_CalibrationSubDirectory",m_JetFitterNN_calibrationSubDirectory);
47  declareProperty("JetFitterNN_useCombinedIPNN",m_JetFitterNN_useCombinedIPNN);
48  declareProperty("JetFitterNN_maximumRegisteredLayers",m_JetFitterNN_maximumRegisteredLayers);
49  declareProperty("RNNIP_NetworkConfig", m_RNNIP_network_cfg);
50  m_Likelihood_vetoSmoothingOf.push_back("/N2T");
51  m_Likelihood_vetoSmoothingOf.push_back("/N2TEffSV2");
52  m_Likelihood_vetoSmoothingOf.push_back("/Sip3D");
53  }

◆ ~JetTagCalibCondAlg()

Analysis::JetTagCalibCondAlg::~JetTagCalibCondAlg ( )

Definition at line 55 of file JetTagCalibCondAlg.cxx.

56  {
57  }

Member Function Documentation

◆ createHistoMap()

StatusCode Analysis::JetTagCalibCondAlg::createHistoMap ( TFile *  file,
JetTagCalibCondData histos 
)
private

get all aliases

now see if the jet collection exists in db

check alias for the first tagger. same jet collections for all taggers for now

Definition at line 583 of file JetTagCalibCondAlg.cxx.

583  {
584 
585  ATH_MSG_DEBUG("#BTAG# in createHistoMap" );
586  std::vector< std::string > channels;
587 
588  for(unsigned int j=0; j<m_originalChannels.size(); ++j){
589  channels.push_back(m_originalChannels[j]);
590  }
591 
592  std::string folder(m_readKey.key());
593 
594 
595  for(uint i=0;i<m_taggers.size();++i) {
596  std::string tagger = m_taggers[i];
597 
598  for(unsigned int j=0; j<m_originalChannels.size(); ++j){
600  std::map<std::string, std::vector<std::string> >::iterator ialiaslist
602  if(ialiaslist == m_channelAliasesMultiMap.end()){
603  ATH_MSG_DEBUG( "#BTAG# no alias for original channel" << m_originalChannels[j] );
604  if(!objectTDirExists(tagger+"/"+m_originalChannels[j], pfile)){
605  ATH_MSG_WARNING( "#BTAG# no calibration for jet collection " << m_originalChannels[j]
606  << " consider using aliases " );
607  }
608  continue;
609  }
610  std::vector<std::string> aliaslist = ialiaslist->second;
611  if(aliaslist.size() == 1){
612  if("none" == aliaslist[0]){
613  ATH_MSG_DEBUG("#BTAG# no alias for original channel" << m_originalChannels[j]);
614 
615  if(objectTDirExists(tagger+"/"+m_originalChannels[j], pfile)){
616  ATH_MSG_WARNING( "#BTAG# no calibration for jet collection " << m_originalChannels[j]
617  << " consider using aliases " );
618  }
619  continue;
620  }
621  }
622 
623  bool foundalias=false;
624 
625  for(unsigned int k=0; k<aliaslist.size(); ++k){
626  std::string aliasentry = aliaslist[k];
627  if("none" == aliasentry){
628  ATH_MSG_DEBUG("#BTAG# first alias entry is none - replace with original channel"
629  << m_originalChannels[j] );
630  aliasentry= m_originalChannels[j];
631  }
633  std::string hFullName(tagger);
634  hFullName+="/"; hFullName+=aliasentry;
635  // Check if jet collection already in channel alias map
636  if (std::count(m_mappedAlias.begin(), m_mappedAlias.end(), aliasentry) > 0) {
637  ATH_MSG_DEBUG( "#BTAG# found alias entry in Map " << aliasentry );
638  histosCdo->addChannelAlias(m_originalChannels[j],aliasentry);
639  foundalias=true;
640  break;
641  }
642  else {
643  if (objectTDirExists(hFullName, pfile)) {
644  ATH_MSG_DEBUG( "#BTAG# found alias entry in DB " << aliasentry );
645  if("none"!=aliaslist[k]){
646  std::vector<std::string>::const_iterator pos = find(channels.begin(),
647  channels.end(), aliasentry);
648  if(pos==channels.end()) {
649  ATH_MSG_DEBUG("#BTAG# Alias is pointing to undefined channel: " << aliasentry
650  << ". Adding it to channel list.");
651  channels.push_back(aliasentry);
652  }
653  histosCdo->addChannelAlias(m_originalChannels[j],aliasentry);
654  m_mappedAlias.push_back(aliasentry);
655  }
656  foundalias=true;
657  break;
658  }
659  else{
660  ATH_MSG_DEBUG( "#BTAG# no alias entry " << aliasentry
661  << " trying next alias ");
662  }
663  }
664  }
665  if(!foundalias){
666  ATH_MSG_WARNING( "#BTAG# none of the aliases exist for jet collection "
667  << m_originalChannels[j]);
668  }
669 
670  }
671  break ;
672 
673  }
674 
675  ATH_MSG_DEBUG( "#BTAG# final registered channels " );
676  for(uint i=0;i<channels.size();++i) {
677  ATH_MSG_DEBUG( "#BTAG# Channel " << channels[i] );
678  }
679 
680  //print alias map
681  histosCdo->printAliasesStatus();
682 
683  return StatusCode::SUCCESS;
684 
685  }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

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

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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; }

◆ execute()

StatusCode Analysis::JetTagCalibCondAlg::execute ( )
overridevirtual

Definition at line 419 of file JetTagCalibCondAlg.cxx.

419  {
420  ATH_MSG_DEBUG("execute " << name());
421 
422  // Write Cond Handle
424  //For serial Athena. Execute() should not be called in AthenaMT
425  if (histoWriteHandle.isValid()) {
426  ATH_MSG_DEBUG("#BTAG# Write CondHandle "<< histoWriteHandle.fullKey() << " is already valid");
427  return StatusCode::SUCCESS;
428  }
429 
430  m_mappedAlias.clear();
431 
432  // Read Cond Handle - GUID
434  const CondAttrListCollection* atrcol{*readHandle};
435  if(atrcol==nullptr) {
436  ATH_MSG_ERROR("#BTAG# Cannot retrieve CondAttrListCollection for " << m_readKey.key());
437  return StatusCode::FAILURE;
438  }
439 
440 
441  // Construct the output Cond Object and fill it in
442  std::unique_ptr<JetTagCalibCondData> writeCdo{std::make_unique<JetTagCalibCondData>()};
443  writeCdo->resize(m_taggers);
444 
445  // Define validity of the output cond object and record it
446  EventIDRange rangeW;
447  if(!readHandle.range(rangeW)) {
448  ATH_MSG_ERROR("#BTAG# Failed to retrieve validity range for " << readHandle.key());
449  return StatusCode::FAILURE;
450  }
451 
452 
453  unsigned int channel=1; //Always 1 in old version with CoolHistSvc
454  CondAttrListCollection::const_iterator citr = atrcol->chanAttrListPair(channel);
455  if (citr==atrcol->end()) {
456  ATH_MSG_WARNING("#BTAG# Cannot find valid reference for " << readHandle.key() << " channel " << channel);
457  return StatusCode::FAILURE;
458  }
459 
460  const std::string coolguid=citr->second["fileGUID"].data<std::string>();
461  ATH_MSG_DEBUG("#BTAG# Folder key "+ readHandle.key()+" has current file GUID "+coolguid);
462 
463  // Open the file
464  std::string pfname, tech;
465  m_poolsvc->catalog()->getFirstPFN(coolguid, pfname, tech );
466  std::unique_ptr< TFile > pfile(TFile::Open(pfname.c_str(),"READ"));
467  if (pfile.get()==nullptr || !pfile.get()->IsOpen()) {
468  ATH_MSG_WARNING("Problems opening input file " << pfname
469  << " [GUID " << coolguid << "]");
470  return StatusCode::FAILURE;
471  }
472 
473  StatusCode sc = createHistoMap(pfile.get(), writeCdo.get());
474  if(sc != StatusCode::SUCCESS){
475  // do nothing for the moment
476  }
477 
478  for(uint i=0;i<m_taggers.size();i++) {
479  std::string tagger = m_taggers[i];
480 
481  ATH_MSG_DEBUG( "#BTAG# registrating tagger "<< m_taggers[i]);
482  std::vector<std::string> histnames = m_taggersHists[i];
483  for(unsigned int h=0; h<histnames.size(); ++h){
484  std::string hname = histnames[h];
485  for(uint j=0;j<m_mappedAlias.size();j++) {
486  std::string fname = writeCdo->fullHistoName(m_mappedAlias[j],hname);
487  ATH_MSG_DEBUG( "#BTAG# Retrieving " << tagger <<":"<< fname );
488  std::string channel = writeCdo->channelName(fname);
489  std::string hname = writeCdo->histoName(fname);
490  std::string hFullName(m_directoryMap[tagger]);
491  hFullName+="/"; hFullName+=channel;
492  hFullName+="/"; hFullName+=hname;
493  ATH_MSG_DEBUG( "#BTAG# histo name in physical file= " << hFullName );
494  std::unique_ptr< TObject > hPointer(pfile->Get(hFullName.c_str()));
495  if(hPointer) {
496  ATH_MSG_DEBUG( "#BTAG# Cached pointer to TObject: " << hPointer.get());
497  if (tagger.find("DL1")!=std::string::npos ) {
498  ATH_MSG_DEBUG("#BTAG# Build DL1 NN config for tagger " << tagger << " and jet collection " << channel << " and write it in condition data");
499  TObjString* cal_string = dynamic_cast<TObjString*>(hPointer.get());
500  std::istringstream nn_config_sstream(cal_string->GetString().Data());
501  lwt::JSONConfig nn_config = lwt::parse_json(nn_config_sstream);
502  ATH_MSG_DEBUG("#BTAG# Layers size << " << nn_config.layers.size());
503 
504  writeCdo->addDL1NN(tagger, channel, nn_config);
505  } else if ((tagger.find("MV2")!=std::string::npos ) or (tagger.find("SoftMu")!=std::string::npos ) or (tagger.find("MultiSV") !=std::string::npos)) {
506  ATH_MSG_DEBUG("#BTAG# Build BDT for tagger " << tagger << " and jet collection " << channel << " and write it in condition data");
507  TTree *tree = dynamic_cast<TTree*>(hPointer.get());
508  if (tree) {
509  ATH_MSG_DEBUG("#BTAG# The TTree to build the BDT for " << tagger<< " is valid");
510  auto bdt = std::make_unique<MVAUtils::BDT>(tree);
511  writeCdo->addBdt(tagger,channel,std::move(bdt));
512  }
513  TObjArray * toa = dynamic_cast<TObjArray*>(hPointer.get());
514  if (toa) {
515  ATH_MSG_DEBUG("#BTAG# The TObjArray to build the input variables of BDT for " << tagger<< " is valid");
516  toa->SetOwner (true);
517  std::vector<std::string> inputVars; inputVars.clear();
518  std::string commaSepVars="";
519  if (toa->GetEntries()>0) {
520  auto tos = dynamic_cast<TObjString*> (toa->At(0));
521  if (tos) {
522  commaSepVars=tos->GetString().Data();
523  }
524  }
525  while (commaSepVars.find(',')!=std::string::npos) {
526  inputVars.push_back(commaSepVars.substr(0,commaSepVars.find(',')));
527  commaSepVars.erase(0,commaSepVars.find(',')+1);
528  }
529  inputVars.push_back(commaSepVars);
530  ATH_MSG_DEBUG("#BTAG# inputVars.size()= "<< inputVars.size() <<" toa->GetEntries()= "<< toa->GetEntries() <<"commaSepVars= "<< commaSepVars);
531  for (unsigned int asv=0; asv<inputVars.size(); asv++) ATH_MSG_DEBUG("#BTAG# inputVar= "<< inputVars.at(asv));
532  writeCdo->addInputVars(tagger,fname,inputVars);
533  }
534  } else if (tagger.find("RNNIP")!=std::string::npos) {
535  ATH_MSG_DEBUG("#BTAG# Build RNN config for tagger " << tagger << " and jet collection " << channel << " and write it in condition data");
536  TObjString* cal_string = dynamic_cast<TObjString*>(hPointer.get());
537  std::string calstring;
538  if (cal_string == 0){ //catch if no string was found
539  ATH_MSG_WARNING("can't retrieve calibration: " + hFullName);
540  calstring = std::string();
541  }
542  else {
543  calstring = cal_string->GetString().Data();
544  }
545  writeCdo->addIPRNN(tagger,channel,calstring);
546  } else {
547  //The other ones are histograms
548  TH1* h = dynamic_cast<TH1*>(hPointer.get());
549  if (!h) {
550  ATH_MSG_WARNING("#BTAG# This object is not an histogram: " << hFullName);
551  continue;
552  }
553  h->SetDirectory(nullptr);
554  (void)hPointer.release();
555  if (tagger == "IP2D" || tagger == "IP3D" || tagger == "SV1") {
556  ATH_MSG_VERBOSE("#BTAG# Smoothing histogram " << hname << " ...");
558  }
559  writeCdo->addHisto(i,fname, std::unique_ptr<TH1>(h));
560  }
561  } else {
562  ATH_MSG_WARNING("#BTAG# TObject can not be loaded. Error: histogram "<<hFullName
563  <<" does not exist - you are probably using an old database tag");
564  }
565  } //end loop mapped alias
566  } //end loop histograms
567  } //end loop tagger
568 
569  // close the file
570  pfile->Close();
571 
572  if(histoWriteHandle.record(rangeW,std::move(writeCdo)).isFailure()) {
573  ATH_MSG_ERROR("#BTAG# Could not record vector of histograms maps " << histoWriteHandle.key()
574  << " with EventRange " << rangeW
575  << " into Conditions Store");
576  return StatusCode::FAILURE;
577  }
578  ATH_MSG_INFO("recorded new CDO " << histoWriteHandle.key() << " with range " << rangeW << " into Conditions Store");
579 
580  return StatusCode::SUCCESS;
581  }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::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

◆ extraOutputDeps()

const DataObjIDColl & AthAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 50 of file AthAlgorithm.cxx.

51 {
52  // If we didn't find any symlinks to add, just return the collection
53  // from the base class. Otherwise, return the extended collection.
54  if (!m_extendedExtraObjects.empty()) {
56  }
57  return Algorithm::extraOutputDeps();
58 }

◆ finalize()

StatusCode Analysis::JetTagCalibCondAlg::finalize ( )
overridevirtual

Definition at line 706 of file JetTagCalibCondAlg.cxx.

706  {
707  ATH_MSG_DEBUG("finalize " << name());
708  return StatusCode::SUCCESS;
709  }

◆ initialize()

StatusCode Analysis::JetTagCalibCondAlg::initialize ( )
overridevirtual

Definition at line 59 of file JetTagCalibCondAlg.cxx.

59  {
60  ATH_MSG_DEBUG("initialize " << name());
61 
62  // PoolSvc
63  ATH_CHECK(service("PoolSvc",m_poolsvc));
64 
65  // Condition Handles
67  ATH_CHECK( m_writeKey.initialize() );
68 
69  // Prepare histo maps:
70  if (m_taggers.size() > 0) {
71  ATH_MSG_DEBUG( "#BTAG# List of calibrated taggers");
72  for(uint i=0;i<m_taggers.size();i++) {
73  ATH_MSG_DEBUG("#BTAG# Tagger " << m_taggers[i] );
74  std::vector<std::string> hvect;
75  m_taggersHists.push_back(hvect);
76  }
77  }
78  else {
79  ATH_MSG_ERROR( "#BTAG# No taggers defined");
80  }
81 
82  // List of channels:
83  ATH_MSG_DEBUG( "#BTAG# Original channels " );
84 
85  for(uint i=0;i<m_originalChannels.size();i++) {
86  ATH_MSG_DEBUG("#BTAG# Channel " << m_originalChannels[i] );
87  }
88 
89  // Decode channel aliases
90  if (m_channelAliases.size() > 0) {
91  for (const std::string& alias : m_channelAliases) {
92  const std::string::size_type delim = alias.find("->");
93  if(delim == std::string::npos) {
94  ATH_MSG_ERROR( "#BTAG# Unexpected format in channelAliases: " << alias);
95  } else {
96  ATH_MSG_DEBUG( "#BTAG# Calibration channel alias: " << alias.substr(0, delim) << " -> "
97  << alias.substr(delim+2) );
98  std::string jetc= alias.substr(0, delim);
99  std::vector<std::string> jeta = tokenize(alias.substr(delim+2), ",");
100  m_channelAliasesMultiMap.insert(std::make_pair(jetc, jeta) );
101  // Add to list of channels to which aliases will be attached
102  // (necessary because getJetAuthor used in taggers does not use
103  // jet collection name but standardised info)
104  if (std::find(m_originalChannels.begin(), m_originalChannels.end(),jetc)
105  == m_originalChannels.end()) m_originalChannels.push_back(jetc);
106  }
107  }
108  }
109  else {
110  ATH_MSG_ERROR( "#BTAG# No channel aliases defined");
111  }
112 
113  m_directoryMap.clear();
114 
115  //IP taggers
116  if (std::find(m_taggers.begin(), m_taggers.end(), "IP2D") != m_taggers.end() or
117  std::find(m_taggers.begin(), m_taggers.end(), "IP3D") != m_taggers.end() or
118  std::find(m_taggers.begin(), m_taggers.end(), "SV1") != m_taggers.end()) {
119  initializeIPTag();
120  }
121 
122  //IP2D tagger
123  if (std::find(m_taggers.begin(), m_taggers.end(), "IP2D") != m_taggers.end()) {
124  initializeIP2D();
125  }
126 
127  //IP3D tagger
128  if (std::find(m_taggers.begin(), m_taggers.end(), "IP3D") != m_taggers.end()) {
129  initializeIP3D();
130  }
131 
132  //SV1 tagger
133  if (std::find(m_taggers.begin(), m_taggers.end(), "SV1") != m_taggers.end()) {
134  initializeSV1();
135  }
136 
137  //SV2 tagger
138  if (std::find(m_taggers.begin(), m_taggers.end(), "SV2") != m_taggers.end()) {
139  initializeSV2();
140  }
141 
142  //JetFitterNN tagger
143  if (std::find(m_taggers.begin(), m_taggers.end(), "JetFitterNN") != m_taggers.end()) {
145  }
146 
147 
148  //SoftMu tagger
149  if (std::find(m_taggers.begin(), m_taggers.end(), "SoftMu") != m_taggers.end()) {
151  }
152 
153  //MV2c10 tagger
154  if (std::find(m_taggers.begin(), m_taggers.end(), "MV2c10") != m_taggers.end()) {
155  initializeMV2("MV2c10");
156  }
157 
158  //MV2cl100 tagger
159  if (std::find(m_taggers.begin(), m_taggers.end(), "MV2cl100") != m_taggers.end()) {
160  initializeMV2("MV2cl100");
161  }
162 
163  //MV2c100 tagger
164  if (std::find(m_taggers.begin(), m_taggers.end(), "MV2c100") != m_taggers.end()) {
165  initializeMV2("MV2c100");
166  }
167 
168  //MV2c10mu tagger
169  if (std::find(m_taggers.begin(), m_taggers.end(), "MV2c10mu") != m_taggers.end()) {
170  initializeMV2("MV2c10mu");
171  }
172 
173  //MV2c10rnn tagger
174  if (std::find(m_taggers.begin(), m_taggers.end(), "MV2c10rnn") != m_taggers.end()) {
175  initializeMV2("MV2c10rnn");
176  }
177 
178  //RNNIP tagger
179  if (std::find(m_taggers.begin(), m_taggers.end(), "RNNIP") != m_taggers.end()) {
180  initializeRNNIP();
181  }
182 
183  //MultiSV tagger
184  if (std::find(m_taggers.begin(), m_taggers.end(), "MultiSVbb1") != m_taggers.end()) {
185  initializeMultiSV("MultiSVbb1");
186  }
187 
188  //MultiSV tagger
189  if (std::find(m_taggers.begin(), m_taggers.end(), "MultiSVbb2") != m_taggers.end()) {
190  initializeMultiSV("MultiSVbb2");
191  }
192 
193  //Dl1 taggers
194  if (std::find(m_taggers.begin(), m_taggers.end(), "DL1") != m_taggers.end()) {
195  initializeDL1("DL1");
196  }
197 
198  if (std::find(m_taggers.begin(), m_taggers.end(), "DL1mu") != m_taggers.end()) {
199  initializeDL1("DL1mu");
200  }
201 
202  if (std::find(m_taggers.begin(), m_taggers.end(), "DL1rnn") != m_taggers.end()) {
203  initializeDL1("DL1rnn");
204  }
205 
206  return StatusCode::SUCCESS;
207  }

◆ initializeDL1()

void Analysis::JetTagCalibCondAlg::initializeDL1 ( const std::string &  taggerNameBase)
private

Definition at line 386 of file JetTagCalibCondAlg.cxx.

387  {
388  m_DL1_file_name = "net_configuration"; // directory of NN calibration (starting from specific jet collection directory) in COOL db
389  this->registerHistogram(taggerNameBase, m_DL1_file_name); //register the calibration file for later access
390 
391  ATH_MSG_DEBUG(" #BTAG# Registered NN histograms with directory: " << taggerNameBase);
392  }

◆ initializeIP2D()

void Analysis::JetTagCalibCondAlg::initializeIP2D ( )
private

Definition at line 219 of file JetTagCalibCondAlg.cxx.

219  {
220  ATH_MSG_DEBUG("initialize IP2D paths of the calibration file");
221 
222  //check that hypotheses for likelihood tool are defined
223  std::string hName;
224  for(unsigned int i=0;i<m_IP2D_trackGradePartitions.size();i++) {
225  for(unsigned int ih=0;ih<m_IPTag_hypotheses.size();ih++) {
226  hName = m_IPTag_hypotheses[ih]+"/"+m_IP2D_trackGradePartitions[i]+"/SipA0";
227  registerHistogram("IP2D", hName);
228  }
229  }
230  }

◆ initializeIP3D()

void Analysis::JetTagCalibCondAlg::initializeIP3D ( )
private

Definition at line 233 of file JetTagCalibCondAlg.cxx.

233  {
234  ATH_MSG_DEBUG("initialize IP3D paths of the calibration file");
235 
236  //check that hypotheses for likelihood tool are defined
237  std::string hName;
238  for(unsigned int i=0;i<m_IP2D_trackGradePartitions.size();i++) {
239  for(unsigned int ih=0;ih<m_IPTag_hypotheses.size();ih++) {
240  hName = m_IPTag_hypotheses[ih]+"/"+m_IP2D_trackGradePartitions[i]+"/Sip3D";
241  registerHistogram("IP3D", hName);
242  }
243  }
244  }

◆ initializeIPTag()

void Analysis::JetTagCalibCondAlg::initializeIPTag ( )
private

Definition at line 210 of file JetTagCalibCondAlg.cxx.

210  {
211  ATH_MSG_DEBUG("initialize IPTag paths of the calibration file");
212  m_IPTag_hypotheses.push_back("B");
213  m_IPTag_hypotheses.push_back("U");
214  if(m_IPTag_useCHypo){
215  m_IPTag_hypotheses.push_back("C");
216  }
217  }

◆ initializeJetFitterNN()

void Analysis::JetTagCalibCondAlg::initializeJetFitterNN ( )
private

Definition at line 300 of file JetTagCalibCondAlg.cxx.

301  {
302 
304  directory+="/";
306  {
307  directory+="comb";
308  }
309  else
310  {
311  directory+="standalone";
312  }
313  directory+="/";
314 
316  std::string((const char*)(directory+"LayersInfo")));
317 
319 
320  for (Int_t i=0;i<nHidden+1;++i)
321  {
322 
323  TString weightName("Layer");
324  weightName+=i;
325  weightName+="_weights";
326 
327  TString thresholdName("Layer");
328  thresholdName+=i;
329  thresholdName+="_thresholds";
330 
332  std::string((const char*)(directory+weightName)));
333 
335  std::string((const char*)(directory+thresholdName)));
336  }
337  ATH_MSG_DEBUG(" Registered NN histograms with directory: " << m_JetFitterNN_calibrationDirectory << " and subdirectory " << directory);
338 
339  }

◆ initializeMultiSV()

void Analysis::JetTagCalibCondAlg::initializeMultiSV ( const std::string &  taggerNameBase)
private

Definition at line 376 of file JetTagCalibCondAlg.cxx.

377  {
378  ATH_MSG_DEBUG("#BTAG# taggerNameBase " << taggerNameBase);
379  std::string treeName = "BDT";
380  std::string varStrName = "variables";
381  this->registerHistogram(taggerNameBase, taggerNameBase+"Calib");
382  this->registerHistogram(taggerNameBase, taggerNameBase+"Calib/"+treeName);
383  this->registerHistogram(taggerNameBase, taggerNameBase+"Calib/"+varStrName);
384  }

◆ initializeMV2()

void Analysis::JetTagCalibCondAlg::initializeMV2 ( const std::string &  taggerNameBase)
private

Definition at line 353 of file JetTagCalibCondAlg.cxx.

354  {
355  std::string treeName("BDT");
356  std::string varStrName("variables");
357  ATH_MSG_DEBUG("#BTAG# Folder I look into: "<< taggerNameBase+"Calib/"+treeName);
358 
359  this->registerHistogram(taggerNameBase, taggerNameBase+"Calib");
360  this->registerHistogram(taggerNameBase, taggerNameBase+"Calib/"+treeName);
361  this->registerHistogram(taggerNameBase, taggerNameBase+"Calib/"+varStrName);
362  }

◆ initializeRNNIP()

void Analysis::JetTagCalibCondAlg::initializeRNNIP ( )
private

Definition at line 364 of file JetTagCalibCondAlg.cxx.

365  {
366  for (const auto& rnn_name_pair: m_RNNIP_network_cfg) {
367  if (rnn_name_pair.second.size() == 0) {
368  ATH_MSG_VERBOSE("registering RNN " << rnn_name_pair.first);
369  this->registerHistogram("RNNIP",rnn_name_pair.first);
370  ATH_MSG_DEBUG(" #BTAG# Registered NN histograms with directory: " <<
371  "RNNIP");
372  }
373  }
374  }

◆ initializeSoftMu()

void Analysis::JetTagCalibCondAlg::initializeSoftMu ( )
private

Definition at line 342 of file JetTagCalibCondAlg.cxx.

343  {
344  std::string taggerNameBase("SMT");
345  std::string treeName("BDT");
346  std::string varStrName("variables");
347  ATH_MSG_DEBUG("#BTAG# Folder I look into: "<< taggerNameBase+"Calib/"+treeName);
348  this->registerHistogram("SoftMu", taggerNameBase, taggerNameBase+"Calib/"+treeName);
349  this->registerHistogram("SoftMu", taggerNameBase, taggerNameBase+"Calib/"+varStrName);
350  }

◆ initializeSV1()

void Analysis::JetTagCalibCondAlg::initializeSV1 ( )
private

Definition at line 258 of file JetTagCalibCondAlg.cxx.

258  {
259  ATH_MSG_DEBUG("initialize SV1 paths of the calibration file");
260 
261  std::string hName;
262  for(unsigned int ih=0;ih<m_IPTag_hypotheses.size();ih++) {
263  hName = m_IPTag_hypotheses[ih]+"/N2T";
264  registerHistogram("SV1", hName);
265  hName = m_IPTag_hypotheses[ih]+"/BidimME";
266  registerHistogram("SV1", hName);
267  if(m_useDRJPVSV) {
268  hName = m_IPTag_hypotheses[ih]+"/DRJPVSV";
269  registerHistogram("SV1", hName);
270  }
271  }
272 
273  this->initializeSVEff("SV1");
274  }

◆ initializeSV2()

void Analysis::JetTagCalibCondAlg::initializeSV2 ( )
private

Definition at line 276 of file JetTagCalibCondAlg.cxx.

276  {
277  ATH_MSG_DEBUG("initialize SV2 paths of the calibration file");
278 
279  this->initializeIPTag();
280 
281  std::string hName;
282  if(m_usePtSV2){
283  for(unsigned int ih=0;ih<m_IPTag_hypotheses.size();ih++) {
284  hName = m_IPTag_hypotheses[ih]+"/TridimMENPt";
285  registerHistogram("SV2", hName);
286  hName = m_IPTag_hypotheses[ih]+"/N2TEffSV2";
287  registerHistogram("SV2", hName);
288  }
289  }else{
290  for(unsigned int ih=0;ih<m_IPTag_hypotheses.size();ih++) {
291  hName = m_IPTag_hypotheses[ih]+"/TridimMEN2T";
292  registerHistogram("SV2", hName);
293  }
294  }
295 
296  this->initializeSVEff("SV2");
297  }

◆ initializeSVEff()

void Analysis::JetTagCalibCondAlg::initializeSVEff ( const std::string &  SVmode)
private

Definition at line 246 of file JetTagCalibCondAlg.cxx.

246  {
247  // for SV efficiencies, add a few histograms:
248  std::string hName;
249  for(unsigned int ih=0;ih<m_IPTag_hypotheses.size();ih++) {
250  hName = m_IPTag_hypotheses[ih]+"/N2TEff"+SVmode;
251  registerHistogram(SVmode, hName);
252  hName = m_IPTag_hypotheses[ih]+"/N2TNorm"+SVmode;
253  registerHistogram(SVmode, hName);
254  }
255  }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Algorithm > >::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< Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

MsgStream& AthCommonMsg< Algorithm >::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< Algorithm >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

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

◆ objectTDirExists()

StatusCode Analysis::JetTagCalibCondAlg::objectTDirExists ( const std::string &  histname,
TFile *  file 
) const
private

Definition at line 711 of file JetTagCalibCondAlg.cxx.

711  {
712 
713  ATH_MSG_DEBUG("#BTAG# in objectTDirExists" );
714 
715  // now read the histogram into memory
716  ATH_MSG_DEBUG("Getting object "+histname+" from file");
717  TObject* hist = nullptr;
718  pfile->GetObject(histname.c_str(),hist);
719  if (hist==nullptr) {
720  ATH_MSG_DEBUG("#BTAG# Could not load TObject " << histname);
721  return StatusCode::FAILURE;
722  }
723 
724  return StatusCode::SUCCESS;
725  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Algorithm > >::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.

◆ registerHistogram() [1/2]

void Analysis::JetTagCalibCondAlg::registerHistogram ( const std::string &  tagger,
const std::string &  directory,
const std::string &  histoname 
)
private

Definition at line 399 of file JetTagCalibCondAlg.cxx.

399  {
400  ATH_MSG_DEBUG( "#BTAG# registering histogram " << hname << " in tagger " << tagger );
401  m_directoryMap[tagger] = directory;
402  bool registered = false;
403  for(uint i=0;i<m_taggers.size();i++) {
404  if(tagger==m_taggers[i]) {
405  ATH_MSG_DEBUG( "#BTAG# tagger " << tagger << " found in pos " << i
406  << " , registrating " << hname );
407 
408  m_taggersHists[i].push_back(hname);
409  registered = true;
410  }
411  }
412  if(!registered) {
413  ATH_MSG_DEBUG( "#BTAG# tagger " << tagger << " not found."
414  << " Registrating of " << hname << " not possible.");
415  }
416  }

◆ registerHistogram() [2/2]

void Analysis::JetTagCalibCondAlg::registerHistogram ( const std::string &  tagger,
const std::string &  histoname 
)
private

Definition at line 394 of file JetTagCalibCondAlg.cxx.

394  {
395  std::string dir(tagger);
396  this->registerHistogram(tagger,dir,hname);
397  }

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

◆ smoothAndNormalizeHistogram()

void Analysis::JetTagCalibCondAlg::smoothAndNormalizeHistogram ( TH1 h,
const std::string &  hname 
)
private

Definition at line 727 of file JetTagCalibCondAlg.cxx.

727  {
728  //Select small part of NewLikelihoodTool to reproduce CalibrationBroker behaviour (smooth and normalize histogram)
729  if(h) {
730  double norm = h->Integral();
731  if(norm) {
732  // check if smoothing of histogram is not vetoed:
733  bool veto = false;
734  for(unsigned int iv=0; iv<m_Likelihood_vetoSmoothingOf.size(); iv++) {
735  if(hname.find(m_Likelihood_vetoSmoothingOf[iv])!=std::string::npos) {
736  veto = true;
737  ATH_MSG_VERBOSE("#BTAG# Smoothing of " << hname << " is vetoed !");
738  break;
739  }
740  }
741  if(1==h->GetDimension() && m_Likelihood_smoothNTimes) {
742  if(!veto) {
743  if(norm>10000)h->Smooth(m_Likelihood_smoothNTimes);
744  else h->Smooth((int)(m_Likelihood_smoothNTimes*100./sqrt(norm)));
745  }
746  }
747  if(2==h->GetDimension()) {
748  int m2d=3;
749  if(!veto) {
750  TH2 * dc_tmp = dynamic_cast<TH2*>(h);
751  if (dc_tmp) {
752  this->smoothASH2D(dc_tmp, m2d, m2d);
753  }
754  }
755  }
756  if(3==h->GetDimension()) {
757  ATH_MSG_WARNING("#BTAG# Code needs to be migrated from NewLikelihoodTool");
758  }
759  // normalize:
760  norm = h->Integral();
761  h->Scale(1./norm);
762  } else {
763  ATH_MSG_DEBUG("#BTAG# Histo "<<h<<" is empty!");
764  }
765  }
766  }

◆ smoothASH2D()

void Analysis::JetTagCalibCondAlg::smoothASH2D ( TH2 input2D,
int  m1,
int  m2 
)
private

Definition at line 768 of file JetTagCalibCondAlg.cxx.

768  {
769 
770  ATH_MSG_DEBUG("Smoothing a two dimensional histogram "<< input2D->GetName()
771  << " " << m1 << " " << m2);
772  ATH_MSG_DEBUG("First (1-3, 1-3) 3x3 bins before smoothing: ");
773  for(int i=1;i<4;i++) {
774  for(int j=1;j<4;j++) {
775  ATH_MSG_DEBUG(i<<" "<<j<<" : "<<input2D->GetBinContent(i,j)<< " / ");
776  }
777  }
778  int ioffset = input2D->GetNbinsX() / 2 ;
779  int joffset = input2D->GetNbinsY() / 2 ;
780  ATH_MSG_DEBUG("Middle (" << ioffset+1 << "-" << ioffset+4 << ", ("
781  << joffset+1 << "-" << joffset+4 << ") 3x3 bins before smoothing: ");
782  for(int i=1;i<4;i++) {
783  for(int j=1;j<4;j++) {
784  ATH_MSG_DEBUG(i<<" "<<j<<" : "<<input2D->GetBinContent(i+ioffset,j+joffset)<< " / ");
785  }
786  }
787 
788  //
789  const int lsup = 20;
790  if (m1 > lsup || m2 > lsup) {
791  ATH_MSG_DEBUG("HistoHelperRoot::smoothASH2D: m1 or m2 too big !");
792  return;
793  } else {
794  int nx = input2D->GetNbinsX()+1;
795  int ny = input2D->GetNbinsY()+1;
796  float **h, **res;
797  h = new float*[nx-1];
798  res = new float*[nx-1];
799  for (int i = 0;i < nx-1;i++) {
800  h[i] = new float[ny-1];
801  res[i] = new float[ny-1];
802  }
803  for (int iy = 1;iy<ny;iy++) {
804  for (int ix = 1;ix<nx;ix++) {
805  h[ix-1][iy-1] = (float) input2D->GetBinContent(ix,iy);
806  }
807  }
808  //
809  int i,j,k,l;
810  float wk1[41],wk2[41],wgt[100][100];
811  double wk[41][41],wks = 0.;
812  float ai,am1 = float(m1), am2 = float(m2);
813  const float am12 = am1*am1, am22 = am2*am2;
814  const float inv_am1_am2 = 1. / (am1 * am2);
815  const float inv_am12 = 1. / am12;
816  const float inv_am22 = 1. / am22;
817  // Initialisation
818  for (k = 0;k<nx-1;k++) {
819  for (l = 0;l<ny-1;l++) {
820  res[k][l] = 0.; wgt[k][l] = 0.;
821  }
822  }
823  // Weights
824  for (i = lsup+1-m1;i<lsup+m1;i++) {
825  ai = float(i-lsup)*float(i-lsup);
826  wk1[i] = 15./16.*(1.-ai*inv_am12)*(1.-ai*inv_am12);
827  wks = wks + wk1[i];
828  }
829  const double fac1 = am1 / wks;
830  for (i = lsup+1-m1;i<lsup+m1;i++) {
831  wk1[i] = wk1[i]*fac1;
832  }
833  wks = 0.;
834  for (i = lsup+1-m2;i<lsup+m2;i++) {
835  ai = float(i-lsup)*float(i-lsup);
836  wk2[i] = 15./16.*(1.-ai*inv_am22)*(1.-ai*inv_am22);
837  wks = wks + wk2[i];
838  }
839  const double fac2 = am2 / wks;
840  for (i = lsup+1-m2;i<lsup+m2;i++) {
841  wk2[i] = wk2[i]*fac2;
842  }
843  for (i = lsup+1-m1;i<lsup+m1;i++) {
844  for (j = lsup+1-m2;j<lsup+m2;j++) {
845  wk[i][j] = wk1[i]*wk2[j];
846  }
847  }
848  //
849  for (k = 0;k<nx-1;k++) {
850  for (l = 0;l<ny-1;l++) {
851  for (i = std::max(0,k-m1+1);i<std::min(nx-1,k+m1);i++) {
852  for (j = std::max(0,l-m2+1);j<std::min(ny-1,l+m2);j++) {
853  res[i][j] = res[i][j] + wk[lsup+i-k][lsup+j-l]*h[k][l];
854  wgt[i][j] = wgt[i][j] + wk[lsup+i-k][lsup+j-l];
855  }
856  }
857  }
858  }
859  for (k = 0;k<nx-1;k++) {
860  for (l = 0;l<ny-1;l++) {
861  res[k][l] = res[k][l]*inv_am1_am2;
862  if (wgt[k][l] != 0.) {res[k][l] = res[k][l]/wgt[k][l];}
863  }
864  }
865  // replace the histo content with the result of smoothing:
866  input2D->Reset();
867  for (int iy = 1;iy<ny;iy++) {
868  for (int ix = 1;ix<nx;ix++) {
869  input2D->SetBinContent(ix,iy,res[ix-1][iy-1]);
870  }
871  }
872  for (i = 0; i < nx-1; i++){
873  delete[] h[i];
874  delete[] res[i];
875  }
876  delete[] h;
877  delete[] res;
878  }
879  ATH_MSG_DEBUG("First (1-3, 1-3) 3x3 bins after smoothing: ");
880  for(int i=1;i<4;i++) {
881  for(int j=1;j<4;j++) {
882  ATH_MSG_DEBUG(i<<" "<<j<<" : "<<input2D->GetBinContent(i,j)<< " / ");
883  }
884  }
885  ioffset = input2D->GetNbinsX() / 2 ;
886  joffset = input2D->GetNbinsY() / 2 ;
887  ATH_MSG_DEBUG("Middle (" << ioffset+1 << "-" << ioffset+4 << ", ("
888  << joffset+1 << "-" << joffset+4 << ") 3x3 bins after smoothing: ");
889  for(int i=1;i<4;i++) {
890  for(int j=1;j<4;j++) {
891  ATH_MSG_DEBUG(i<<" "<<j<<" : "<<input2D->GetBinContent(i+ioffset,j+joffset)<< " / ");
892  }
893  }
894 }

◆ sysInitialize()

StatusCode AthAlgorithm::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, PyAthena::Alg, and AthHistogramAlgorithm.

Definition at line 66 of file AthAlgorithm.cxx.

66  {
68 
69  if (sc.isFailure()) {
70  return sc;
71  }
72  ServiceHandle<ICondSvc> cs("CondSvc",name());
73  for (auto h : outputHandles()) {
74  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
75  // do this inside the loop so we don't create the CondSvc until needed
76  if ( cs.retrieve().isFailure() ) {
77  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
78  return StatusCode::SUCCESS;
79  }
80  if (cs->regHandle(this,*h).isFailure()) {
81  sc = StatusCode::FAILURE;
82  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
83  << " with CondSvc");
84  }
85  }
86  }
87  return sc;
88 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Algorithm > >::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.

◆ tokenize()

std::vector< std::string > Analysis::JetTagCalibCondAlg::tokenize ( const std::string &  str,
const std::string &  delim 
)
private

Definition at line 689 of file JetTagCalibCondAlg.cxx.

689  {
690  std::vector<std::string> tokens;
691  std::string::size_type sPos, sEnd, sLen;
692  // if str starts with a character in delim, do you want an empty string in tokens?
693  // sPos = 0; // if answer is yes
694  sPos = str.find_first_not_of(delim); // if answer is no
695  while(sPos != std::string::npos){
696  sEnd = str.find_first_of(delim, sPos);
697  if(sEnd == std::string::npos) sEnd = str.length();
698  sLen = sEnd - sPos;
699  std::string token = str.substr(sPos, sLen);
700  tokens.push_back(token);
701  sPos = str.find_first_not_of(delim, sEnd);
702  }
703  return tokens;
704  }

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::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_channelAliases

StringArrayProperty Analysis::JetTagCalibCondAlg::m_channelAliases
private

Definition at line 95 of file JetTagCalibCondAlg.h.

◆ m_channelAliasesMultiMap

std::map< std::string, std::vector<std::string> > Analysis::JetTagCalibCondAlg::m_channelAliasesMultiMap
private

Definition at line 96 of file JetTagCalibCondAlg.h.

◆ m_detStore

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

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_directoryMap

std::unordered_map<std::string,std::string> Analysis::JetTagCalibCondAlg::m_directoryMap
private

Definition at line 88 of file JetTagCalibCondAlg.h.

◆ m_DL1_file_name

std::string Analysis::JetTagCalibCondAlg::m_DL1_file_name
private

Definition at line 122 of file JetTagCalibCondAlg.h.

◆ m_evtStore

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

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthAlgorithm::m_extendedExtraObjects
privateinherited

Definition at line 79 of file AthAlgorithm.h.

◆ m_IP2D_trackGradePartitions

std::vector< std::string > Analysis::JetTagCalibCondAlg::m_IP2D_trackGradePartitions
private

Definition at line 103 of file JetTagCalibCondAlg.h.

◆ m_IPTag_hypotheses

std::vector<std::string> Analysis::JetTagCalibCondAlg::m_IPTag_hypotheses
private

Definition at line 100 of file JetTagCalibCondAlg.h.

◆ m_IPTag_useCHypo

bool Analysis::JetTagCalibCondAlg::m_IPTag_useCHypo
private

Definition at line 99 of file JetTagCalibCondAlg.h.

◆ m_JetFitterNN_calibrationDirectory

std::string Analysis::JetTagCalibCondAlg::m_JetFitterNN_calibrationDirectory
private

Definition at line 116 of file JetTagCalibCondAlg.h.

◆ m_JetFitterNN_calibrationSubDirectory

std::string Analysis::JetTagCalibCondAlg::m_JetFitterNN_calibrationSubDirectory
private

Definition at line 117 of file JetTagCalibCondAlg.h.

◆ m_JetFitterNN_maximumRegisteredLayers

int Analysis::JetTagCalibCondAlg::m_JetFitterNN_maximumRegisteredLayers
private

Definition at line 119 of file JetTagCalibCondAlg.h.

◆ m_JetFitterNN_useCombinedIPNN

bool Analysis::JetTagCalibCondAlg::m_JetFitterNN_useCombinedIPNN
private

Definition at line 118 of file JetTagCalibCondAlg.h.

◆ m_Likelihood_smoothNTimes

int Analysis::JetTagCalibCondAlg::m_Likelihood_smoothNTimes
private

Definition at line 112 of file JetTagCalibCondAlg.h.

◆ m_Likelihood_vetoSmoothingOf

std::vector<std::string> Analysis::JetTagCalibCondAlg::m_Likelihood_vetoSmoothingOf
private

Definition at line 113 of file JetTagCalibCondAlg.h.

◆ m_mappedAlias

std::vector< std::string > Analysis::JetTagCalibCondAlg::m_mappedAlias
private

Definition at line 90 of file JetTagCalibCondAlg.h.

◆ m_originalChannels

std::vector< std::string > Analysis::JetTagCalibCondAlg::m_originalChannels
private

Definition at line 91 of file JetTagCalibCondAlg.h.

◆ m_poolsvc

IPoolSvc* Analysis::JetTagCalibCondAlg::m_poolsvc
private

Definition at line 84 of file JetTagCalibCondAlg.h.

◆ m_readKey

SG::ReadCondHandleKey<CondAttrListCollection> Analysis::JetTagCalibCondAlg::m_readKey {this, "ReadKeyCalibPath", "/GLOBAL/BTagCalib/RUN12", "Key of input (raw) conditions folder of bration path"}
private

Definition at line 81 of file JetTagCalibCondAlg.h.

◆ m_RNNIP_network_cfg

std::map<std::string, std::string > Analysis::JetTagCalibCondAlg::m_RNNIP_network_cfg
private

Definition at line 129 of file JetTagCalibCondAlg.h.

◆ m_taggers

std::vector< std::string > Analysis::JetTagCalibCondAlg::m_taggers
private

Definition at line 87 of file JetTagCalibCondAlg.h.

◆ m_taggersHists

std::vector<std::vector<std::string> > Analysis::JetTagCalibCondAlg::m_taggersHists
private

Definition at line 89 of file JetTagCalibCondAlg.h.

◆ m_useDRJPVSV

bool Analysis::JetTagCalibCondAlg::m_useDRJPVSV
private

Definition at line 106 of file JetTagCalibCondAlg.h.

◆ m_usePtSV2

bool Analysis::JetTagCalibCondAlg::m_usePtSV2
private

Definition at line 109 of file JetTagCalibCondAlg.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.

◆ m_writeKey

SG::WriteCondHandleKey<JetTagCalibCondData> Analysis::JetTagCalibCondAlg::m_writeKey {this, "HistosKey", "JetTagCalibHistosKey", "Key of output (derived) JetTag calibration data"}
private

Definition at line 82 of file JetTagCalibCondAlg.h.


The documentation for this class was generated from the following files:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
PlotCalibFromCool.norm
norm
Definition: PlotCalibFromCool.py:100
Analysis::JetTagCalibCondAlg::initializeJetFitterNN
void initializeJetFitterNN()
Definition: JetTagCalibCondAlg.cxx:300
Analysis::JetTagCalibCondAlg::m_taggers
std::vector< std::string > m_taggers
Definition: JetTagCalibCondAlg.h:87
Analysis::JetTagCalibCondAlg::m_mappedAlias
std::vector< std::string > m_mappedAlias
Definition: JetTagCalibCondAlg.h:90
python.SystemOfUnits.m2
int m2
Definition: SystemOfUnits.py:92
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
max
#define max(a, b)
Definition: cfImp.cxx:41
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:28
Analysis::JetTagCalibCondAlg::createHistoMap
StatusCode createHistoMap(TFile *file, JetTagCalibCondData *histos)
Definition: JetTagCalibCondAlg.cxx:583
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
Analysis::JetTagCalibCondAlg::m_readKey
SG::ReadCondHandleKey< CondAttrListCollection > m_readKey
Definition: JetTagCalibCondAlg.h:81
Analysis::JetTagCalibCondAlg::initializeMV2
void initializeMV2(const std::string &)
Definition: JetTagCalibCondAlg.cxx:353
dqt_zlumi_pandas.hname
string hname
Definition: dqt_zlumi_pandas.py:272
Analysis::JetTagCalibCondAlg::m_DL1_file_name
std::string m_DL1_file_name
Definition: JetTagCalibCondAlg.h:122
AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
plotmaker.hist
hist
Definition: plotmaker.py:148
Analysis::JetTagCalibCondAlg::m_JetFitterNN_calibrationDirectory
std::string m_JetFitterNN_calibrationDirectory
Definition: JetTagCalibCondAlg.h:116
tree
TChain * tree
Definition: tile_monitor.h:30
python.setupRTTAlg.histnames
list histnames
Definition: setupRTTAlg.py:12
Analysis::JetTagCalibCondAlg::initializeIP2D
void initializeIP2D()
Definition: JetTagCalibCondAlg.cxx:219
Analysis::JetTagCalibCondAlg::m_Likelihood_vetoSmoothingOf
std::vector< std::string > m_Likelihood_vetoSmoothingOf
Definition: JetTagCalibCondAlg.h:113
Analysis::JetTagCalibCondAlg::initializeSVEff
void initializeSVEff(const std::string &)
Definition: JetTagCalibCondAlg.cxx:246
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
Analysis::JetTagCalibCondAlg::m_poolsvc
IPoolSvc * m_poolsvc
Definition: JetTagCalibCondAlg.h:84
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
Analysis::JetTagCalibCondAlg::initializeSV2
void initializeSV2()
Definition: JetTagCalibCondAlg.cxx:276
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
beamspotman.tokens
tokens
Definition: beamspotman.py:1284
CondAttrListCollection
This class is a collection of AttributeLists where each one is associated with a channel number....
Definition: CondAttrListCollection.h:52
lwtDev::parse_json
JSONConfig parse_json(std::istream &json)
Definition: parse_json.cxx:42
Analysis::JetTagCalibCondAlg::registerHistogram
void registerHistogram(const std::string &tagger, const std::string &histoname)
Definition: JetTagCalibCondAlg.cxx:394
Analysis::JetTagCalibCondAlg::m_directoryMap
std::unordered_map< std::string, std::string > m_directoryMap
Definition: JetTagCalibCondAlg.h:88
XMLtoHeader.count
count
Definition: XMLtoHeader.py:85
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
dq_defect_copy_defect_database.channels
def channels
Definition: dq_defect_copy_defect_database.py:56
Analysis::JetTagCalibCondAlg::m_IPTag_useCHypo
bool m_IPTag_useCHypo
Definition: JetTagCalibCondAlg.h:99
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
Analysis::JetTagCalibCondAlg::initializeIPTag
void initializeIPTag()
Definition: JetTagCalibCondAlg.cxx:210
Analysis::JetTagCalibCondAlg::m_channelAliases
StringArrayProperty m_channelAliases
Definition: JetTagCalibCondAlg.h:95
uint
unsigned int uint
Definition: LArOFPhaseFill.cxx:20
AthCommonDataStore
Definition: AthCommonDataStore.h:52
python.changerun.m1
m1
Definition: changerun.py:32
AthAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthAlgorithm.cxx:66
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
PixelAthClusterMonAlgCfg.histname
histname
Definition: PixelAthClusterMonAlgCfg.py:106
AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
DeMoScan.directory
string directory
Definition: DeMoScan.py:80
Analysis::JetTagCalibCondAlg::initializeSoftMu
void initializeSoftMu()
Definition: JetTagCalibCondAlg.cxx:342
lumiFormat.i
int i
Definition: lumiFormat.py:92
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
extractSporadic.h
list h
Definition: extractSporadic.py:97
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
COOLRates.alias
alias
Definition: COOLRates.py:1172
Analysis::JetTagCalibCondAlg::m_IP2D_trackGradePartitions
std::vector< std::string > m_IP2D_trackGradePartitions
Definition: JetTagCalibCondAlg.h:103
res
std::pair< std::vector< unsigned int >, bool > res
Definition: JetGroupProductTest.cxx:14
dumpFileToPlots.treeName
string treeName
Definition: dumpFileToPlots.py:20
Analysis::JetTagCalibCondAlg::initializeIP3D
void initializeIP3D()
Definition: JetTagCalibCondAlg.cxx:233
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
TH2
Definition: rootspy.cxx:373
Analysis::JetTagCalibCondAlg::m_writeKey
SG::WriteCondHandleKey< JetTagCalibCondData > m_writeKey
Definition: JetTagCalibCondAlg.h:82
beamspotman.dir
string dir
Definition: beamspotman.py:623
min
#define min(a, b)
Definition: cfImp.cxx:40
Analysis::JetTagCalibCondAlg::smoothASH2D
void smoothASH2D(TH2 *input2D, int m1, int m2)
Definition: JetTagCalibCondAlg.cxx:768
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
Analysis::JetTagCalibCondAlg::smoothAndNormalizeHistogram
void smoothAndNormalizeHistogram(TH1 *h, const std::string &hname)
Definition: JetTagCalibCondAlg.cxx:727
Analysis::JetTagCalibCondAlg::m_Likelihood_smoothNTimes
int m_Likelihood_smoothNTimes
Definition: JetTagCalibCondAlg.h:112
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
Analysis::JetTagCalibCondAlg::m_JetFitterNN_calibrationSubDirectory
std::string m_JetFitterNN_calibrationSubDirectory
Definition: JetTagCalibCondAlg.h:117
Analysis::JetTagCalibCondAlg::m_RNNIP_network_cfg
std::map< std::string, std::string > m_RNNIP_network_cfg
Definition: JetTagCalibCondAlg.h:129
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
IPoolSvc::catalog
virtual const pool::IFileCatalog * catalog() const =0
Analysis::JetTagCalibCondAlg::m_useDRJPVSV
bool m_useDRJPVSV
Definition: JetTagCalibCondAlg.h:106
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
pool::IFileCatalog::getFirstPFN
void getFirstPFN(const std::string &fid, std::string &pfn, std::string &tech) const
Get the first PFN + filetype for the given FID.
Analysis::JetTagCalibCondAlg::initializeSV1
void initializeSV1()
Definition: JetTagCalibCondAlg.cxx:258
python.AthDsoLogger.fname
string fname
Definition: AthDsoLogger.py:67
AthAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Definition: AthAlgorithm.h:79
Analysis::JetTagCalibCondAlg::objectTDirExists
StatusCode objectTDirExists(const std::string &histname, TFile *file) const
Definition: JetTagCalibCondAlg.cxx:711
a
TList * a
Definition: liststreamerinfos.cxx:10
h
Analysis::JetTagCalibCondAlg::m_IPTag_hypotheses
std::vector< std::string > m_IPTag_hypotheses
Definition: JetTagCalibCondAlg.h:100
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
CondAttrListCollection::const_iterator
ChanAttrListMap::const_iterator const_iterator
Definition: CondAttrListCollection.h:63
TH1
Definition: rootspy.cxx:268
Analysis::JetTagCalibCondAlg::tokenize
std::vector< std::string > tokenize(const std::string &str, const std::string &delim)
Definition: JetTagCalibCondAlg.cxx:689
Analysis::JetTagCalibCondAlg::initializeMultiSV
void initializeMultiSV(const std::string &)
Definition: JetTagCalibCondAlg.cxx:376
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
Analysis::JetTagCalibCondAlg::m_JetFitterNN_useCombinedIPNN
bool m_JetFitterNN_useCombinedIPNN
Definition: JetTagCalibCondAlg.h:118
CaloCondBlobAlgs_fillNoiseFromASCII.folder
folder
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:56
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
Analysis::JetTagCalibCondAlg::m_originalChannels
std::vector< std::string > m_originalChannels
Definition: JetTagCalibCondAlg.h:91
AthAlgorithm::AthAlgorithm
AthAlgorithm()
Default constructor:
str
Definition: BTagTrackIpAccessor.cxx:11
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
Analysis::JetTagCalibCondAlg::initializeDL1
void initializeDL1(const std::string &)
Definition: JetTagCalibCondAlg.cxx:386
veto
std::vector< std::string > veto
these patterns are anded
Definition: listroot.cxx:191
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
Analysis::JetTagCalibCondAlg::m_usePtSV2
bool m_usePtSV2
Definition: JetTagCalibCondAlg.h:109
Analysis::JetTagCalibCondAlg::initializeRNNIP
void initializeRNNIP()
Definition: JetTagCalibCondAlg.cxx:364
Analysis::JetTagCalibCondAlg::m_JetFitterNN_maximumRegisteredLayers
int m_JetFitterNN_maximumRegisteredLayers
Definition: JetTagCalibCondAlg.h:119
Analysis::JetTagCalibCondAlg::m_taggersHists
std::vector< std::vector< std::string > > m_taggersHists
Definition: JetTagCalibCondAlg.h:89
SG::WriteCondHandle
Definition: WriteCondHandle.h:26
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
readCCLHist.float
float
Definition: readCCLHist.py:83
Analysis::JetTagCalibCondAlg::m_channelAliasesMultiMap
std::map< std::string, std::vector< std::string > > m_channelAliasesMultiMap
Definition: JetTagCalibCondAlg.h:96
fitman.k
k
Definition: fitman.py:528
ServiceHandle< ICondSvc >