|
ATLAS Offline Software
|
@ class JetTagCalibCondAlg
More...
#include <JetTagCalibCondAlg.h>
|
| 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 |
|
|
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...
|
|
@ 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.
◆ StoreGateSvc_t
◆ JetTagCalibCondAlg()
Analysis::JetTagCalibCondAlg::JetTagCalibCondAlg |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~JetTagCalibCondAlg()
Analysis::JetTagCalibCondAlg::~JetTagCalibCondAlg |
( |
| ) |
|
◆ 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.
586 std::vector< std::string >
channels;
600 std::map<std::string, std::vector<std::string> >
::iterator ialiaslist
606 <<
" consider using aliases " );
610 std::vector<std::string> aliaslist = ialiaslist->second;
611 if(aliaslist.size() == 1){
612 if(
"none" == aliaslist[0]){
617 <<
" consider using aliases " );
623 bool foundalias=
false;
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"
633 std::string hFullName(tagger);
634 hFullName+=
"/"; hFullName+=aliasentry;
637 ATH_MSG_DEBUG(
"#BTAG# found alias entry in Map " << aliasentry );
644 ATH_MSG_DEBUG(
"#BTAG# found alias entry in DB " << aliasentry );
645 if(
"none"!=aliaslist[
k]){
649 ATH_MSG_DEBUG(
"#BTAG# Alias is pointing to undefined channel: " << aliasentry
650 <<
". Adding it to channel list.");
661 <<
" trying next alias ");
666 ATH_MSG_WARNING(
"#BTAG# none of the aliases exist for jet collection "
681 histosCdo->printAliasesStatus();
683 return StatusCode::SUCCESS;
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode Analysis::JetTagCalibCondAlg::execute |
( |
| ) |
|
|
overridevirtual |
Definition at line 419 of file JetTagCalibCondAlg.cxx.
425 if (histoWriteHandle.isValid()) {
426 ATH_MSG_DEBUG(
"#BTAG# Write CondHandle "<< histoWriteHandle.fullKey() <<
" is already valid");
427 return StatusCode::SUCCESS;
435 if(atrcol==
nullptr) {
437 return StatusCode::FAILURE;
442 std::unique_ptr<JetTagCalibCondData> writeCdo{std::make_unique<JetTagCalibCondData>()};
447 if(!readHandle.range(rangeW)) {
448 ATH_MSG_ERROR(
"#BTAG# Failed to retrieve validity range for " << readHandle.key());
449 return StatusCode::FAILURE;
455 if (citr==atrcol->end()) {
457 return StatusCode::FAILURE;
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);
464 std::string pfname, tech;
466 std::unique_ptr< TFile > pfile(TFile::Open(pfname.c_str(),
"READ"));
467 if (pfile.get()==
nullptr || !pfile.get()->IsOpen()) {
469 <<
" [GUID " << coolguid <<
"]");
470 return StatusCode::FAILURE;
474 if(
sc != StatusCode::SUCCESS){
489 std::string
hname = writeCdo->histoName(
fname);
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()));
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());
502 ATH_MSG_DEBUG(
"#BTAG# Layers size << " << nn_config.layers.size());
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());
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));
513 TObjArray * toa =
dynamic_cast<TObjArray*
>(hPointer.get());
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));
522 commaSepVars=tos->GetString().Data();
525 while (commaSepVars.find(
',')!=std::string::npos) {
526 inputVars.push_back(commaSepVars.substr(0,commaSepVars.find(
',')));
527 commaSepVars.erase(0,commaSepVars.find(
',')+1);
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);
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){
540 calstring = std::string();
543 calstring = cal_string->GetString().Data();
545 writeCdo->addIPRNN(tagger,
channel,calstring);
548 TH1*
h =
dynamic_cast<TH1*
>(hPointer.get());
550 ATH_MSG_WARNING(
"#BTAG# This object is not an histogram: " << hFullName);
553 h->SetDirectory(
nullptr);
554 (void)hPointer.release();
555 if (tagger ==
"IP2D" || tagger ==
"IP3D" || tagger ==
"SV1") {
559 writeCdo->addHisto(
i,
fname, std::unique_ptr<TH1>(
h));
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");
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;
578 ATH_MSG_INFO(
"recorded new CDO " << histoWriteHandle.key() <<
" with range " << rangeW <<
" into Conditions Store");
580 return StatusCode::SUCCESS;
◆ extraDeps_update_handler()
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.
57 return Algorithm::extraOutputDeps();
◆ finalize()
StatusCode Analysis::JetTagCalibCondAlg::finalize |
( |
| ) |
|
|
overridevirtual |
◆ initialize()
StatusCode Analysis::JetTagCalibCondAlg::initialize |
( |
| ) |
|
|
overridevirtual |
Definition at line 59 of file JetTagCalibCondAlg.cxx.
74 std::vector<std::string> hvect;
92 const std::string::size_type delim =
alias.find(
"->");
93 if(delim == std::string::npos) {
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),
",");
206 return StatusCode::SUCCESS;
◆ initializeDL1()
void Analysis::JetTagCalibCondAlg::initializeDL1 |
( |
const std::string & |
taggerNameBase | ) |
|
|
private |
◆ initializeIP2D()
void Analysis::JetTagCalibCondAlg::initializeIP2D |
( |
| ) |
|
|
private |
◆ initializeIP3D()
void Analysis::JetTagCalibCondAlg::initializeIP3D |
( |
| ) |
|
|
private |
◆ initializeIPTag()
void Analysis::JetTagCalibCondAlg::initializeIPTag |
( |
| ) |
|
|
private |
◆ initializeJetFitterNN()
void Analysis::JetTagCalibCondAlg::initializeJetFitterNN |
( |
| ) |
|
|
private |
Definition at line 300 of file JetTagCalibCondAlg.cxx.
316 std::string((
const char*)(
directory+
"LayersInfo")));
320 for (Int_t
i=0;
i<nHidden+1;++
i)
323 TString weightName(
"Layer");
325 weightName+=
"_weights";
327 TString thresholdName(
"Layer");
329 thresholdName+=
"_thresholds";
332 std::string((
const char*)(
directory+weightName)));
335 std::string((
const char*)(
directory+thresholdName)));
◆ initializeMultiSV()
void Analysis::JetTagCalibCondAlg::initializeMultiSV |
( |
const std::string & |
taggerNameBase | ) |
|
|
private |
◆ initializeMV2()
void Analysis::JetTagCalibCondAlg::initializeMV2 |
( |
const std::string & |
taggerNameBase | ) |
|
|
private |
◆ initializeRNNIP()
void Analysis::JetTagCalibCondAlg::initializeRNNIP |
( |
| ) |
|
|
private |
◆ initializeSoftMu()
void Analysis::JetTagCalibCondAlg::initializeSoftMu |
( |
| ) |
|
|
private |
Definition at line 342 of file JetTagCalibCondAlg.cxx.
344 std::string taggerNameBase(
"SMT");
346 std::string varStrName(
"variables");
349 this->
registerHistogram(
"SoftMu", taggerNameBase, taggerNameBase+
"Calib/"+varStrName);
◆ initializeSV1()
void Analysis::JetTagCalibCondAlg::initializeSV1 |
( |
| ) |
|
|
private |
◆ initializeSV2()
void Analysis::JetTagCalibCondAlg::initializeSV2 |
( |
| ) |
|
|
private |
◆ initializeSVEff()
void Analysis::JetTagCalibCondAlg::initializeSVEff |
( |
const std::string & |
SVmode | ) |
|
|
private |
◆ inputHandles()
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]
◆ msg() [2/2]
◆ msgLvl()
◆ objectTDirExists()
StatusCode Analysis::JetTagCalibCondAlg::objectTDirExists |
( |
const std::string & |
histname, |
|
|
TFile * |
file |
|
) |
| const |
|
private |
Definition at line 711 of file JetTagCalibCondAlg.cxx.
717 TObject*
hist =
nullptr;
721 return StatusCode::FAILURE;
724 return StatusCode::SUCCESS;
◆ outputHandles()
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.
402 bool registered =
false;
405 ATH_MSG_DEBUG(
"#BTAG# tagger " << tagger <<
" found in pos " <<
i
406 <<
" , registrating " <<
hname );
414 <<
" Registrating of " <<
hname <<
" not possible.");
◆ registerHistogram() [2/2]
void Analysis::JetTagCalibCondAlg::registerHistogram |
( |
const std::string & |
tagger, |
|
|
const std::string & |
histoname |
|
) |
| |
|
private |
◆ renounce()
◆ renounceArray()
◆ smoothAndNormalizeHistogram()
void Analysis::JetTagCalibCondAlg::smoothAndNormalizeHistogram |
( |
TH1 * |
h, |
|
|
const std::string & |
hname |
|
) |
| |
|
private |
Definition at line 727 of file JetTagCalibCondAlg.cxx.
730 double norm =
h->Integral();
747 if(2==
h->GetDimension()) {
750 TH2 * dc_tmp =
dynamic_cast<TH2*
>(
h);
756 if(3==
h->GetDimension()) {
757 ATH_MSG_WARNING(
"#BTAG# Code needs to be migrated from NewLikelihoodTool");
760 norm =
h->Integral();
◆ smoothASH2D()
void Analysis::JetTagCalibCondAlg::smoothASH2D |
( |
TH2 * |
input2D, |
|
|
int |
m1, |
|
|
int |
m2 |
|
) |
| |
|
private |
Definition at line 768 of file JetTagCalibCondAlg.cxx.
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++) {
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)<<
" / ");
790 if (
m1 > lsup ||
m2 > lsup) {
791 ATH_MSG_DEBUG(
"HistoHelperRoot::smoothASH2D: m1 or m2 too big !");
794 int nx = input2D->GetNbinsX()+1;
795 int ny = input2D->GetNbinsY()+1;
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];
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);
810 float wk1[41],wk2[41],wgt[100][100];
811 double wk[41][41],wks = 0.;
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;
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.;
824 for (
i = lsup+1-
m1;
i<lsup+
m1;
i++) {
826 wk1[
i] = 15./16.*(1.-ai*inv_am12)*(1.-ai*inv_am12);
829 const double fac1 = am1 / wks;
830 for (
i = lsup+1-
m1;
i<lsup+
m1;
i++) {
831 wk1[
i] = wk1[
i]*fac1;
834 for (
i = lsup+1-
m2;
i<lsup+
m2;
i++) {
836 wk2[
i] = 15./16.*(1.-ai*inv_am22)*(1.-ai*inv_am22);
839 const double fac2 = am2 / wks;
840 for (
i = lsup+1-
m2;
i<lsup+
m2;
i++) {
841 wk2[
i] = wk2[
i]*fac2;
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];
849 for (
k = 0;
k<nx-1;
k++) {
850 for (
l = 0;
l<ny-1;
l++) {
854 wgt[
i][j] = wgt[
i][j] + wk[lsup+
i-
k][lsup+j-
l];
859 for (
k = 0;
k<nx-1;
k++) {
860 for (
l = 0;
l<ny-1;
l++) {
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]);
872 for (
i = 0;
i < nx-1;
i++){
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++) {
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)<<
" / ");
◆ sysInitialize()
StatusCode AthAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ sysStart()
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.
690 std::vector<std::string>
tokens;
691 std::string::size_type sPos, sEnd, sLen;
694 sPos =
str.find_first_not_of(delim);
695 while(sPos != std::string::npos){
696 sEnd =
str.find_first_of(delim, sPos);
697 if(sEnd == std::string::npos) sEnd =
str.length();
699 std::string token =
str.substr(sPos, sLen);
701 sPos =
str.find_first_not_of(delim, sEnd);
◆ updateVHKA()
◆ m_channelAliases
StringArrayProperty Analysis::JetTagCalibCondAlg::m_channelAliases |
|
private |
◆ m_channelAliasesMultiMap
std::map< std::string, std::vector<std::string> > Analysis::JetTagCalibCondAlg::m_channelAliasesMultiMap |
|
private |
◆ m_detStore
◆ m_directoryMap
std::unordered_map<std::string,std::string> Analysis::JetTagCalibCondAlg::m_directoryMap |
|
private |
◆ m_DL1_file_name
std::string Analysis::JetTagCalibCondAlg::m_DL1_file_name |
|
private |
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_IP2D_trackGradePartitions
std::vector< std::string > Analysis::JetTagCalibCondAlg::m_IP2D_trackGradePartitions |
|
private |
◆ m_IPTag_hypotheses
std::vector<std::string> Analysis::JetTagCalibCondAlg::m_IPTag_hypotheses |
|
private |
◆ m_IPTag_useCHypo
bool Analysis::JetTagCalibCondAlg::m_IPTag_useCHypo |
|
private |
◆ m_JetFitterNN_calibrationDirectory
std::string Analysis::JetTagCalibCondAlg::m_JetFitterNN_calibrationDirectory |
|
private |
◆ m_JetFitterNN_calibrationSubDirectory
std::string Analysis::JetTagCalibCondAlg::m_JetFitterNN_calibrationSubDirectory |
|
private |
◆ m_JetFitterNN_maximumRegisteredLayers
int Analysis::JetTagCalibCondAlg::m_JetFitterNN_maximumRegisteredLayers |
|
private |
◆ m_JetFitterNN_useCombinedIPNN
bool Analysis::JetTagCalibCondAlg::m_JetFitterNN_useCombinedIPNN |
|
private |
◆ m_Likelihood_smoothNTimes
int Analysis::JetTagCalibCondAlg::m_Likelihood_smoothNTimes |
|
private |
◆ m_Likelihood_vetoSmoothingOf
std::vector<std::string> Analysis::JetTagCalibCondAlg::m_Likelihood_vetoSmoothingOf |
|
private |
◆ m_mappedAlias
std::vector< std::string > Analysis::JetTagCalibCondAlg::m_mappedAlias |
|
private |
◆ m_originalChannels
std::vector< std::string > Analysis::JetTagCalibCondAlg::m_originalChannels |
|
private |
◆ m_poolsvc
IPoolSvc* Analysis::JetTagCalibCondAlg::m_poolsvc |
|
private |
◆ m_readKey
◆ m_RNNIP_network_cfg
std::map<std::string, std::string > Analysis::JetTagCalibCondAlg::m_RNNIP_network_cfg |
|
private |
◆ m_taggers
std::vector< std::string > Analysis::JetTagCalibCondAlg::m_taggers |
|
private |
◆ m_taggersHists
std::vector<std::vector<std::string> > Analysis::JetTagCalibCondAlg::m_taggersHists |
|
private |
◆ m_useDRJPVSV
bool Analysis::JetTagCalibCondAlg::m_useDRJPVSV |
|
private |
◆ m_usePtSV2
bool Analysis::JetTagCalibCondAlg::m_usePtSV2 |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ m_writeKey
The documentation for this class was generated from the following files:
JetConstituentVector::iterator iterator
void initializeJetFitterNN()
std::vector< std::string > m_taggers
std::vector< std::string > m_mappedAlias
StatusCode createHistoMap(TFile *file, JetTagCalibCondData *histos)
std::string find(const std::string &s)
return a remapped string
SG::ReadCondHandleKey< CondAttrListCollection > m_readKey
void initializeMV2(const std::string &)
std::string m_DL1_file_name
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
std::string m_JetFitterNN_calibrationDirectory
std::vector< std::string > m_Likelihood_vetoSmoothingOf
void initializeSVEff(const std::string &)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
#define ATH_MSG_VERBOSE(x)
const std::string & key() const
Return the StoreGate ID for the referenced object.
This class is a collection of AttributeLists where each one is associated with a channel number....
JSONConfig parse_json(std::istream &json)
void registerHistogram(const std::string &tagger, const std::string &histoname)
std::unordered_map< std::string, std::string > m_directoryMap
virtual void setOwner(IDataHandleHolder *o)=0
StringArrayProperty m_channelAliases
virtual StatusCode sysInitialize() override
Override sysInitialize.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
::StatusCode StatusCode
StatusCode definition for legacy code.
std::vector< std::string > m_IP2D_trackGradePartitions
std::pair< std::vector< unsigned int >, bool > res
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
SG::WriteCondHandleKey< JetTagCalibCondData > m_writeKey
void smoothASH2D(TH2 *input2D, int m1, int m2)
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
void smoothAndNormalizeHistogram(TH1 *h, const std::string &hname)
int m_Likelihood_smoothNTimes
std::string m_JetFitterNN_calibrationSubDirectory
std::map< std::string, std::string > m_RNNIP_network_cfg
StatusCode initialize(bool used=true)
virtual const pool::IFileCatalog * catalog() const =0
void getFirstPFN(const std::string &fid, std::string &pfn, std::string &tech) const
Get the first PFN + filetype for the given FID.
DataObjIDColl m_extendedExtraObjects
StatusCode objectTDirExists(const std::string &histname, TFile *file) const
std::vector< std::string > m_IPTag_hypotheses
#define ATH_MSG_WARNING(x)
ChanAttrListMap::const_iterator const_iterator
std::vector< std::string > tokenize(const std::string &str, const std::string &delim)
void initializeMultiSV(const std::string &)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
bool m_JetFitterNN_useCombinedIPNN
std::vector< std::string > m_originalChannels
AthAlgorithm()
Default constructor:
void initializeDL1(const std::string &)
std::vector< std::string > veto
these patterns are anded
int m_JetFitterNN_maximumRegisteredLayers
std::vector< std::vector< std::string > > m_taggersHists
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
std::map< std::string, std::vector< std::string > > m_channelAliasesMultiMap