Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ jobs:
release_type:
- analysisbase
release_version:
- 25.2.62
- 25.2.63
- 25.2.94
- 25.2.95
- 25.2.96

steps:
- uses: actions/checkout@master
Expand Down Expand Up @@ -55,11 +56,11 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.10.20]
python-version: [3.10.21]

steps:
- uses: actions/checkout@master
- name: Set up Python 3.10.20
- name: Set up Python 3.10.21
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
Expand Down
2 changes: 1 addition & 1 deletion Root/EventInfo.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ void EventInfo::clear()
return;
}

void EventInfo::FillEvent( const xAOD::EventInfo* eventInfo, xAOD::TEvent* event, const xAOD::VertexContainer* vertices) {
void EventInfo::FillEvent( const xAOD::EventInfo* eventInfo, xAOD::Event* event, const xAOD::VertexContainer* vertices) {

if (!m_infoSwitch.m_noDataInfo){ // saved always (unless specifically requiring not to)
m_runNumber = eventInfo->runNumber();
Expand Down
6 changes: 3 additions & 3 deletions Root/HelpTreeBase.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ using std::vector;
#pragma link C++ class vector<float>+;
#endif

HelpTreeBase::HelpTreeBase(xAOD::TEvent* event, TTree* tree, TFile* file, const float units, bool debug, xAOD::TStore* store, std::string nominalTreeName):
HelpTreeBase::HelpTreeBase(xAOD::Event* event, TTree* tree, TFile* file, const float units, bool debug, xAOD::TStore* store, std::string nominalTreeName):
m_trigInfoSwitch(nullptr),
m_trigConfTool(nullptr),
m_trigDecTool(nullptr),
Expand Down Expand Up @@ -110,7 +110,7 @@ HelpTreeBase::~HelpTreeBase() {
}


HelpTreeBase::HelpTreeBase(TTree* tree, TFile* file, xAOD::TEvent* event, xAOD::TStore* store, const float units, bool debug, std::string nominalTreeName):
HelpTreeBase::HelpTreeBase(TTree* tree, TFile* file, xAOD::Event* event, xAOD::TStore* store, const float units, bool debug, std::string nominalTreeName):
HelpTreeBase(event, tree, file, units, debug, store, nominalTreeName)
{
// use the other constructor for everything
Expand Down Expand Up @@ -143,7 +143,7 @@ void HelpTreeBase::AddEvent( const std::string& detailStr ) {
this->AddEventUser(detailStr);
}

void HelpTreeBase::FillEvent( const xAOD::EventInfo* eventInfo, xAOD::TEvent* /*event*/, const xAOD::VertexContainer* vertices ) {
void HelpTreeBase::FillEvent( const xAOD::EventInfo* eventInfo, xAOD::Event* /*event*/, const xAOD::VertexContainer* vertices ) {

this->ClearEvent();

Expand Down
95 changes: 72 additions & 23 deletions Root/JetContainer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -3319,9 +3319,16 @@ void JetContainer::FillJet( const xAOD::IParticle* particle, const xAOD::Vertex*
float pu, pb, pc, ptau, score;

pu=0; pb=0; pc=0;
myBTag->variable<float>("DL1r" , "pu", pu);
myBTag->variable<float>("DL1r" , "pc", pc);
myBTag->variable<float>("DL1r" , "pb", pb);
std::string actualTagger = "DL1r";
SG::ConstAccessor<float> pbTaggerAcc_dl1r (actualTagger+"_pb");
SG::ConstAccessor<float> pcTaggerAcc_dl1r (actualTagger+"_pc");
SG::ConstAccessor<float> puTaggerAcc_dl1r (actualTagger+"_pu");
if (pbTaggerAcc_dl1r.isAvailable(*jet) && pcTaggerAcc_dl1r.isAvailable(*jet)
&& puTaggerAcc_dl1r.isAvailable(*jet)) {
pb = pbTaggerAcc_dl1r(*jet);
pc = pcTaggerAcc_dl1r(*jet);
pu = puTaggerAcc_dl1r(*jet);
}
//FixMe: Retrieve the correct f_c value from the CDI file would be the best approach
score=log( pb / (0.018*pc+0.982*pu) );
m_DL1r_pu->push_back(pu);
Expand All @@ -3330,19 +3337,33 @@ void JetContainer::FillJet( const xAOD::IParticle* particle, const xAOD::Vertex*
m_DL1r->push_back( score );

pu=0; pb=0; pc=0;
myBTag->variable<float>("DL1dv00" , "pu", pu);
myBTag->variable<float>("DL1dv00" , "pc", pc);
myBTag->variable<float>("DL1dv00" , "pb", pb);
actualTagger = "DL1dv00";
SG::ConstAccessor<float> pbTaggerAcc_dl1dv00 (actualTagger+"_pb");
SG::ConstAccessor<float> pcTaggerAcc_dl1dv00 (actualTagger+"_pc");
SG::ConstAccessor<float> puTaggerAcc_dl1dv00 (actualTagger+"_pu");
if (pbTaggerAcc_dl1dv00.isAvailable(*jet) && pcTaggerAcc_dl1dv00.isAvailable(*jet)
&& puTaggerAcc_dl1dv00.isAvailable(*jet)) {
pb = pbTaggerAcc_dl1dv00(*jet);
pc = pcTaggerAcc_dl1dv00(*jet);
pu = puTaggerAcc_dl1dv00(*jet);
}
//FixMe: Retrieve the correct f_c value from the CDI file would be the best approach
score=log( pb / (0.018*pc+0.982*pu) );
m_DL1dv00_pu->push_back(pu);
m_DL1dv00_pc->push_back(pc);
m_DL1dv00_pb->push_back(pb);
m_DL1dv00->push_back( score );
pu=0; pb=0; pc=0;
myBTag->variable<float>("DL1dv01" , "pu", pu);
myBTag->variable<float>("DL1dv01" , "pc", pc);
myBTag->variable<float>("DL1dv01" , "pb", pb);
actualTagger = "DL1dv01";
SG::ConstAccessor<float> pbTaggerAcc_dl1dv01 (actualTagger+"_pb");
SG::ConstAccessor<float> pcTaggerAcc_dl1dv01 (actualTagger+"_pc");
SG::ConstAccessor<float> puTaggerAcc_dl1dv01 (actualTagger+"_pu");
if (pbTaggerAcc_dl1dv01.isAvailable(*jet) && pcTaggerAcc_dl1dv01.isAvailable(*jet)
&& puTaggerAcc_dl1dv01.isAvailable(*jet)) {
pb = pbTaggerAcc_dl1dv01(*jet);
pc = pcTaggerAcc_dl1dv01(*jet);
pu = puTaggerAcc_dl1dv01(*jet);
}
//FixMe: Retrieve the correct f_c value from the CDI file would be the best approach
score=log( pb / (0.018*pc+0.982*pu) );
m_DL1dv01_pu->push_back(pu);
Expand All @@ -3351,9 +3372,16 @@ void JetContainer::FillJet( const xAOD::IParticle* particle, const xAOD::Vertex*
m_DL1dv01->push_back( score );

pu=0; pb=0; pc=0;
myBTag->variable<float>("GN120220509" , "pu", pu);
myBTag->variable<float>("GN120220509" , "pc", pc);
myBTag->variable<float>("GN120220509" , "pb", pb);
actualTagger = "GN120220509";
SG::ConstAccessor<float> pbTaggerAcc_GN120220509 (actualTagger+"_pb");
SG::ConstAccessor<float> pcTaggerAcc_GN120220509 (actualTagger+"_pc");
SG::ConstAccessor<float> puTaggerAcc_GN120220509 (actualTagger+"_pu");
if (pbTaggerAcc_GN120220509.isAvailable(*jet) && pcTaggerAcc_GN120220509.isAvailable(*jet)
&& puTaggerAcc_GN120220509.isAvailable(*jet)) {
pb = pbTaggerAcc_GN120220509(*jet);
pc = pcTaggerAcc_GN120220509(*jet);
pu = puTaggerAcc_GN120220509(*jet);
}
//FixMe: Retrieve the correct f_c value from the CDI file would be the best approach
score=log( pb / (0.05*pc+0.95*pu) ); // GN1 uses a different f_c value than DL1d which is 0.05
m_GN1_pu->push_back(pu);
Expand All @@ -3362,9 +3390,16 @@ void JetContainer::FillJet( const xAOD::IParticle* particle, const xAOD::Vertex*
m_GN1->push_back( score );

pu=0; pb=0; pc=0;
myBTag->variable<float>("GN2v00LegacyWP" , "pu", pu);
myBTag->variable<float>("GN2v00LegacyWP" , "pc", pc);
myBTag->variable<float>("GN2v00LegacyWP" , "pb", pb);
actualTagger = "GN2v00LegacyWP";
SG::ConstAccessor<float> pbTaggerAcc_GN2v00LegacyWP (actualTagger+"_pb");
SG::ConstAccessor<float> pcTaggerAcc_GN2v00LegacyWP (actualTagger+"_pc");
SG::ConstAccessor<float> puTaggerAcc_GN2v00LegacyWP (actualTagger+"_pu");
if (pbTaggerAcc_GN2v00LegacyWP.isAvailable(*jet) && pcTaggerAcc_GN2v00LegacyWP.isAvailable(*jet)
&& puTaggerAcc_GN2v00LegacyWP.isAvailable(*jet)) {
pb = pbTaggerAcc_GN2v00LegacyWP(*jet);
pc = pcTaggerAcc_GN2v00LegacyWP(*jet);
pu = puTaggerAcc_GN2v00LegacyWP(*jet);
}
//FixMe: Retrieve the correct f_c value from the CDI file would be the best approach
score=log( pb / (0.10*pc+0.90*pu) ); // GN2 uses a different f_c value than DL1d which is 0.01
m_GN2v00LegacyWP_pu->push_back(pu);
Expand All @@ -3373,9 +3408,16 @@ void JetContainer::FillJet( const xAOD::IParticle* particle, const xAOD::Vertex*
m_GN2v00LegacyWP->push_back( score );

pu=0; pb=0; pc=0;
myBTag->variable<float>("GN2v00NewAliasWP" , "pu", pu);
myBTag->variable<float>("GN2v00NewAliasWP" , "pc", pc);
myBTag->variable<float>("GN2v00NewAliasWP" , "pb", pb);
actualTagger = "GN2v00NewAliasWP";
SG::ConstAccessor<float> pbTaggerAcc_GN2v00NewAliasWP (actualTagger+"_pb");
SG::ConstAccessor<float> pcTaggerAcc_GN2v00NewAliasWP (actualTagger+"_pc");
SG::ConstAccessor<float> puTaggerAcc_GN2v00NewAliasWP (actualTagger+"_pu");
if (pbTaggerAcc_GN2v00NewAliasWP.isAvailable(*jet) && pcTaggerAcc_GN2v00NewAliasWP.isAvailable(*jet)
&& puTaggerAcc_GN2v00NewAliasWP.isAvailable(*jet)) {
pb = pbTaggerAcc_GN2v00NewAliasWP(*jet);
pc = pcTaggerAcc_GN2v00NewAliasWP(*jet);
pu = puTaggerAcc_GN2v00NewAliasWP(*jet);
}
//FixMe: Retrieve the correct f_c value from the CDI file would be the best approach
score=log( pb / (0.10*pc+0.90*pu) ); // GN2 uses a different f_c value than DL1d which is 0.01
m_GN2v00NewAliasWP_pu->push_back(pu);
Expand All @@ -3384,18 +3426,25 @@ void JetContainer::FillJet( const xAOD::IParticle* particle, const xAOD::Vertex*
m_GN2v00NewAliasWP->push_back( score );

pu=0; pb=0; pc=0; ptau=0;
myBTag->variable<float>("GN2v01" , "pu", pu);
myBTag->variable<float>("GN2v01" , "pc", pc);
myBTag->variable<float>("GN2v01" , "pb", pb);
myBTag->variable<float>("GN2v01" , "ptau", ptau);
actualTagger = "GN2v01";
SG::ConstAccessor<float> pbTaggerAcc_GN2v01 (actualTagger+"_pb");
SG::ConstAccessor<float> pcTaggerAcc_GN2v01 (actualTagger+"_pc");
SG::ConstAccessor<float> puTaggerAcc_GN2v01 (actualTagger+"_pu");
SG::ConstAccessor<float> ptauTaggerAcc_GN2v01 (actualTagger+"_ptau");
if (pbTaggerAcc_GN2v01.isAvailable(*jet) && pcTaggerAcc_GN2v01.isAvailable(*jet)
&& puTaggerAcc_GN2v01.isAvailable(*jet) && ptauTaggerAcc_GN2v01.isAvailable(*jet)) {
pb = pbTaggerAcc_GN2v01(*jet);
pc = pcTaggerAcc_GN2v01(*jet);
pu = puTaggerAcc_GN2v01(*jet);
ptau = ptauTaggerAcc_GN2v01(*jet);
}
//FixMe: Retrieve the correct f_c value from the CDI file would be the best approach
score=log( pb / (0.20*pc+0.01*ptau+0.79*pu) ); // GN2v01 uses a different f_c value than DL1dv01 which is 0.018
m_GN2v01_pu->push_back(pu);
m_GN2v01_pc->push_back(pc);
m_GN2v01_pb->push_back(pb);
m_GN2v01_ptau->push_back(ptau);
m_GN2v01->push_back( score );

if(m_infoSwitch.m_jetFitterDetails ) {

static SG::AuxElement::ConstAccessor< int > jf_nVTXAcc ("JetFitter_nVTX");
Expand Down
1 change: 1 addition & 0 deletions Root/JetSelector.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ EL::StatusCode JetSelector :: initialize ()
ATH_CHECK( m_jetNNJvtSelectionTool.setProperty("JetContainer", m_outContainerName) );
ATH_CHECK( m_jetNNJvtSelectionTool.setProperty("WorkingPoint", m_WorkingPointJVT) );
ATH_CHECK( m_jetNNJvtSelectionTool.setProperty("OutputLevel", msg().level()) );
ATH_CHECK( m_jetNNJvtSelectionTool.setProperty("JvtMomentName", "NNJvt") );
ATH_CHECK( m_jetNNJvtSelectionTool.retrieve() );
ANA_MSG_DEBUG("Retrieved tool: " << m_jetNNJvtSelectionTool);

Expand Down
9 changes: 9 additions & 0 deletions Root/METConstructor.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ EL::StatusCode METConstructor :: initialize ()
ANA_MSG_DEBUG( "Is MC? " << isMC() );

//////////// IMETMaker ////////////////
ATH_CHECK( m_metmaker_handle.setProperty("JetContainer", "AntiKt4EMPFlowJets") );
if ( m_dofJVTCut ) {
ANA_CHECK(m_metmaker_handle.setProperty("JetRejectionDec", m_fJVTdecorName));
}
Expand Down Expand Up @@ -145,6 +146,14 @@ EL::StatusCode METConstructor :: initialize ()
if ( m_calculateSignificance ) {
ANA_CHECK( m_metSignificance_handle.setProperty("TreatPUJets", m_significanceTreatPUJets) );
ANA_CHECK( m_metSignificance_handle.setProperty("SoftTermReso", m_significanceSoftTermReso) );
ANA_CHECK( m_metSignificance_handle.setProperty("EgammaESModel", m_significanceESModel) );
ANA_CHECK( m_metSignificance_handle.setProperty("EgammaDecorrelationModel", "1NP_v1") );
// This is the only recommended set of jet resolutions for use with R22+ MET Significance until "Consolidated" recommendations are available
ANA_CHECK( m_metSignificance_handle.setProperty("JetCalibConfig", "JES_data2017_2016_2015_Recommendation_PFlow_Aug2018_rel21.config") );
ANA_CHECK( m_metSignificance_handle.setProperty("JetCalibSequence", "JetArea_Residual_EtaJES_GSC_Smear") );
ATH_CHECK( m_metSignificance_handle.setProperty("JetCalibArea", "00-04-81") );

ANA_CHECK( m_metSignificance_handle.setProperty("MuonCalibMode", m_significanceMuonCalibMode) );

// For AFII samples
if ( isFastSim() ){
Expand Down
4 changes: 2 additions & 2 deletions Root/MinixAOD.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ EL::StatusCode MinixAOD :: initialize ()

// always do this, obviously
TFile *file_xAOD = wk()->getOutputFile(m_outputFileName);
ANA_CHECK( m_event->writeTo(file_xAOD));
ANA_CHECK( m_event->writeTo(*file_xAOD));

if(m_copyFileMetaData){
m_fileMetaDataTool = new xAODMaker::FileMetaDataTool();
Expand Down Expand Up @@ -330,7 +330,7 @@ EL::StatusCode MinixAOD :: finalize () {
//
// Close file
TFile *file_xAOD = wk()->getOutputFile(m_outputFileName);
ANA_CHECK( m_event->finishWritingTo(file_xAOD));
ANA_CHECK( m_event->finishWritingTo(*file_xAOD));

if(m_fileMetaDataTool) delete m_fileMetaDataTool;
// if(m_trigMetaDataTool) delete m_trigMetaDataTool;
Expand Down
2 changes: 1 addition & 1 deletion Root/TreeAlgo.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,6 @@ EL::StatusCode TreeAlgo :: finalize () {

EL::StatusCode TreeAlgo :: histFinalize () { return EL::StatusCode::SUCCESS; }

HelpTreeBase* TreeAlgo :: createTree(xAOD::TEvent *event, TTree* tree, TFile* file, const float units, bool debug, xAOD::TStore* store) {
HelpTreeBase* TreeAlgo :: createTree(xAOD::Event *event, TTree* tree, TFile* file, const float units, bool debug, xAOD::TStore* store) {
return new HelpTreeBase( event, tree, file, units, debug, store );
}
4 changes: 2 additions & 2 deletions Root/Writer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ EL::StatusCode Writer :: initialize ()

// output xAOD
TFile * file = wk()->getOutputFile (m_outputLabel.Data());
ANA_CHECK( m_event->writeTo(file));
ANA_CHECK( m_event->writeTo(*file));

//FIXME add this as well
// Set which variables not to write out:
Expand Down Expand Up @@ -204,7 +204,7 @@ EL::StatusCode Writer :: finalize ()

// finalize and close our output xAOD file ( and write MetaData tree )
TFile * file = wk()->getOutputFile(m_outputLabel.Data());
ANA_CHECK( m_event->finishWritingTo( file ));
ANA_CHECK( m_event->finishWritingTo( *file ));

return EL::StatusCode::SUCCESS;
}
Expand Down
11 changes: 0 additions & 11 deletions scripts/xAH_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,17 +453,6 @@ def __call__(self, parser, namespace, values, option_string=None):
job.options().setDouble(ROOT.EL.Job.optXAODPerfStats, 1)
job.options().setDouble(ROOT.EL.Job.optPrintPerFileStats, 1)

# access mode branch
if args.access_mode == 'branch':
xAH_logger.info("\tusing branch access mode: ROOT.EL.Job.optXaodAccessMode_branch")
job.options().setString( ROOT.EL.Job.optXaodAccessMode, ROOT.EL.Job.optXaodAccessMode_branch )
elif args.access_mode == 'athena':
xAH_logger.info("\tusing branch access mode: ROOT.EL.Job.optXaodAccessMode_athena")
job.options().setString (ROOT.EL.Job.optXaodAccessMode, ROOT.EL.Job.optXaodAccessMode_athena)
else:
xAH_logger.info("\tusing class access mode: ROOT.EL.Job.optXaodAccessMode_class")
job.options().setString( ROOT.EL.Job.optXaodAccessMode, ROOT.EL.Job.optXaodAccessMode_class )

# formatted string
algorithmConfiguration_string = []

Expand Down
2 changes: 1 addition & 1 deletion xAODAnaHelpers/Algorithm.h
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ namespace xAH {
std::string m_className = "Algorithm"; //!

/** The TEvent object */
xAOD::TEvent* m_event = nullptr; //!
xAOD::Event* m_event = nullptr; //!
/** The TStore object */
xAOD::TStore* m_store = nullptr; //!

Expand Down
2 changes: 1 addition & 1 deletion xAODAnaHelpers/EventInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace xAH {
void setTree (TTree *tree);
void setBranches(TTree *tree);
void clear();
void FillEvent( const xAOD::EventInfo* eventInfo, xAOD::TEvent* event = nullptr, const xAOD::VertexContainer* vertices = nullptr);
void FillEvent( const xAOD::EventInfo* eventInfo, xAOD::Event* event = nullptr, const xAOD::VertexContainer* vertices = nullptr);
template <typename T_BR>
void connectBranch(TTree *tree, std::string name, T_BR *variable);

Expand Down
8 changes: 4 additions & 4 deletions xAODAnaHelpers/HelpTreeBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ class HelpTreeBase {

public:

HelpTreeBase(xAOD::TEvent *event, TTree* tree, TFile* file, const float units = 1e3, bool debug = false, xAOD::TStore* store = nullptr, std::string nominalTreeName = "nominal" );
HelpTreeBase(TTree* tree, TFile* file, xAOD::TEvent *event = nullptr, xAOD::TStore* store = nullptr, const float units = 1e3, bool debug = false, std::string nominalTreeName = "nominal" );
HelpTreeBase(xAOD::Event *event, TTree* tree, TFile* file, const float units = 1e3, bool debug = false, xAOD::TStore* store = nullptr, std::string nominalTreeName = "nominal" );
HelpTreeBase(TTree* tree, TFile* file, xAOD::Event *event = nullptr, xAOD::TStore* store = nullptr, const float units = 1e3, bool debug = false, std::string nominalTreeName = "nominal" );
virtual ~HelpTreeBase();

void AddEvent (const std::string& detailStr = "");
Expand Down Expand Up @@ -110,7 +110,7 @@ class HelpTreeBase {
**/
static std::string FatJetCollectionName(const std::string& fatjetName = "fatjet", const std::string& suffix = "");

xAOD::TEvent* m_event;
xAOD::Event* m_event;
xAOD::TStore* m_store;

/// @brief Name of vertex container
Expand All @@ -124,7 +124,7 @@ class HelpTreeBase {
TrigConf::xAODConfigTool* m_trigConfTool;
Trig::TrigDecisionTool* m_trigDecTool;

void FillEvent( const xAOD::EventInfo* eventInfo, xAOD::TEvent* event = nullptr, const xAOD::VertexContainer* vertices = nullptr );
void FillEvent( const xAOD::EventInfo* eventInfo, xAOD::Event* event = nullptr, const xAOD::VertexContainer* vertices = nullptr );

void FillTrigger( const xAOD::EventInfo* eventInfo );
void FillJetTrigger();
Expand Down
Loading
Loading