Skip to content
Closed
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
42 changes: 24 additions & 18 deletions Common/TableProducer/mftmchMatchingML.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,36 @@
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

#include <math.h>
#include <onnxruntime_cxx_api.h>
#include <string>
#include <regex>
#include <TLorentzVector.h>
#include "Common/DataModel/MftmchMatchingML.h"

#include "Common/CCDB/EventSelectionParams.h"
#include "Common/Core/TrackSelection.h"
#include "Common/Core/trackUtilities.h"
#include "Common/DataModel/EventSelection.h"
#include "Common/DataModel/TrackSelectionTables.h"
#include "Tools/ML/model.h"

#include "CCDB/CcdbApi.h"
#include "DetectorsBase/Propagator.h"
#include "Framework/ASoAHelpers.h"
#include "Framework/AnalysisDataModel.h"
#include "Framework/AnalysisTask.h"
#include "Framework/runDataProcessing.h"
#include "Framework/ASoAHelpers.h"
#include "Common/DataModel/EventSelection.h"
#include "Common/CCDB/EventSelectionParams.h"
#include "Common/DataModel/TrackSelectionTables.h"
#include "Common/Core/trackUtilities.h"
#include "Common/Core/TrackSelection.h"
#include "GlobalTracking/MatchGlobalFwd.h"
#include "MCHTracking/TrackExtrap.h"
#include "MCHTracking/TrackParam.h"
#include "MFTTracking/Tracker.h"
#include "ReconstructionDataFormats/TrackFwd.h"

#include "Math/SMatrix.h"
#include "DetectorsBase/Propagator.h"
#include "MFTTracking/Tracker.h"
#include "MCHTracking/TrackParam.h"
#include "MCHTracking/TrackExtrap.h"
#include "GlobalTracking/MatchGlobalFwd.h"
#include "CCDB/CcdbApi.h"
#include "Tools/ML/model.h"
#include <TLorentzVector.h>

#include <onnxruntime_cxx_api.h>

#include <regex>
#include <string>

#include <math.h>

using namespace o2;
using namespace o2::framework;
Expand Down Expand Up @@ -80,7 +86,7 @@
std::vector<float> getVariables(F const& fwdtrack, M const& mfttrack)
{

static constexpr Double_t MatchingPlaneZ = -77.5;

Check failure on line 89 in Common/TableProducer/mftmchMatchingML.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.

// propagate muontrack to matching position
double muonchi2 = fwdtrack.chi2();
Expand All @@ -98,12 +104,12 @@
o2::track::TrackParCovFwd mftpars1{mfttrack.z(), mftpars, mftcovs, mftchi2};
mftpars1.propagateToZlinear(MatchingPlaneZ);

Float_t MFT_X = mftpars1.getX();

Check failure on line 107 in Common/TableProducer/mftmchMatchingML.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
Float_t MFT_Y = mftpars1.getY();

Check failure on line 108 in Common/TableProducer/mftmchMatchingML.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
Float_t MFT_Phi = mftpars1.getPhi();

Check failure on line 109 in Common/TableProducer/mftmchMatchingML.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
Float_t MFT_Tanl = mftpars1.getTanl();

Check failure on line 110 in Common/TableProducer/mftmchMatchingML.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.

Float_t MCH_X = muonpars1.getX();

Check failure on line 112 in Common/TableProducer/mftmchMatchingML.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
Float_t MCH_Y = muonpars1.getY();
Float_t MCH_Phi = muonpars1.getPhi();
Float_t MCH_Tanl = muonpars1.getTanl();
Expand All @@ -118,7 +124,7 @@
Float_t Delta_Phi = MFT_Phi - MCH_Phi;
Float_t Delta_Tanl = MFT_Tanl - MCH_Tanl;

Float_t Delta_XY = sqrt(Delta_X * Delta_X + Delta_Y * Delta_Y);

Check failure on line 127 in Common/TableProducer/mftmchMatchingML.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.

std::vector<float> input_tensor_values{
MFT_X,
Expand Down Expand Up @@ -250,9 +256,9 @@

float dcaX = (mftpars1.getX() - mfttrack.collision().posX());
float dcaY = (mftpars1.getY() - mfttrack.collision().posY());
double px = fwdtrack.p() * sin(M_PI / 2 - atan(mfttrack.tgl())) * cos(mfttrack.phi());

Check failure on line 259 in Common/TableProducer/mftmchMatchingML.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
double py = fwdtrack.p() * sin(M_PI / 2 - atan(mfttrack.tgl())) * sin(mfttrack.phi());

Check failure on line 260 in Common/TableProducer/mftmchMatchingML.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
double pz = fwdtrack.p() * cos(M_PI / 2 - atan(mfttrack.tgl()));

Check failure on line 261 in Common/TableProducer/mftmchMatchingML.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
fwdtrackml(fwdtrack.collisionId(), 0, mfttrack.x(), mfttrack.y(), mfttrack.z(), mfttrack.phi(), mfttrack.tgl(), fwdtrack.sign() / std::sqrt(std::pow(px, 2) + std::pow(py, 2)), fwdtrack.nClusters(), fwdtrack.pDca(), fwdtrack.rAtAbsorberEnd(), 0, 0, 0, bestscore, mfttrack.globalIndex(), fwdtrack.globalIndex(), fwdtrack.mchBitMap(), fwdtrack.midBitMap(), fwdtrack.midBoards(), mfttrack.trackTime(), mfttrack.trackTimeRes(), mfttrack.eta(), std::sqrt(std::pow(px, 2) + std::pow(py, 2)), std::sqrt(std::pow(px, 2) + std::pow(py, 2) + std::pow(pz, 2)), dcaX, dcaY);
}
}
Expand Down
4 changes: 2 additions & 2 deletions EventFiltering/PWGHF/HFFilterPrepareMLSamples.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
#include "Common/DataModel/PIDResponseTPC.h"
#include "Common/DataModel/TrackSelectionTables.h"

#include <onnxruntime_cxx_api.h>

#include <CCDB/BasicCCDBManager.h>
#include <CCDB/CcdbApi.h>
#include <CommonConstants/PhysicsConstants.h>
Expand All @@ -46,6 +44,8 @@

#include <TPDGCode.h>

#include <onnxruntime_cxx_api.h>

#include <Rtypes.h>

#include <array>
Expand Down
4 changes: 2 additions & 2 deletions PWGJE/Core/MlResponseHfTagging.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@

#include "Tools/ML/MlResponse.h"

#include <onnxruntime_cxx_api.h>

#include <Framework/Logger.h>

#include <onnxruntime_c_api.h>
#include <onnxruntime_cxx_api.h>

#include <cstddef>
#include <cstdint>
Expand Down Expand Up @@ -330,6 +329,7 @@ class TensorAllocator
{
protected:
Ort::MemoryInfo memInfo;

public:
TensorAllocator()
: memInfo(Ort::MemoryInfo::CreateCpu(OrtAllocatorType::OrtArenaAllocator, OrtMemType::OrtMemTypeDefault))
Expand Down
7 changes: 4 additions & 3 deletions PWGJE/DataModel/PhotonChargedTriggerCorrelation.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@
#ifndef PWGJE_DATAMODEL_PHOTONCHARGEDTRIGGERCORRELATION_H_
#define PWGJE_DATAMODEL_PHOTONCHARGEDTRIGGERCORRELATION_H_

#include "Framework/AnalysisDataModel.h"
#include "PWGJE/Core/JetDerivedDataUtilities.h"
#include "PWGJE/DataModel/Jet.h"
#include "PWGEM/PhotonMeson/DataModel/gammaTables.h"
#include "PWGEM/PhotonMeson/Utils/PCMUtilities.h"
#include "PWGJE/Core/JetDerivedDataUtilities.h"
#include "PWGJE/DataModel/Jet.h"

#include "Framework/AnalysisDataModel.h"

namespace o2::aod
{
Expand Down
45 changes: 23 additions & 22 deletions PWGJE/Tasks/photonChargedTriggerCorrelation.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -18,36 +18,37 @@
/// Also contains checks and monte-carlo (efficiency, purity, mc-true correlation,...)
/// End goal of studying correlations between direct photons and jets

#include <cmath>
#include <deque>
#include <string>
#include <vector>
#include <algorithm>
#include <chrono>
#include <memory>
#include <random>
#include "PWGJE/DataModel/PhotonChargedTriggerCorrelation.h"

#include "TMath.h"
#include "Math/Vector4D.h"
#include "PWGEM/PhotonMeson/DataModel/gammaTables.h"
#include "PWGEM/PhotonMeson/Utils/PCMUtilities.h"
#include "PWGJE/DataModel/Jet.h"

#include "Common/Core/TableHelper.h"
#include "Common/DataModel/Centrality.h"
#include "Common/DataModel/EventSelection.h"
#include "Common/DataModel/Multiplicity.h"
#include "Common/DataModel/PIDResponse.h"
#include "Common/DataModel/TrackSelectionTables.h"

#include "CCDB/BasicCCDBManager.h"
#include "Framework/ASoAHelpers.h"
#include "Framework/runDataProcessing.h"
#include "Framework/AnalysisTask.h"
#include "Framework/AnalysisDataModel.h"
#include "Framework/AnalysisTask.h"
#include "Framework/O2DatabasePDGPlugin.h"
#include "Common/DataModel/EventSelection.h"
#include "Common/DataModel/TrackSelectionTables.h"
#include "Common/DataModel/Multiplicity.h"
#include "Common/DataModel/Centrality.h"
#include "Common/DataModel/PIDResponse.h"
#include "Common/Core/TableHelper.h"
#include "Framework/runDataProcessing.h"

#include "PWGEM/PhotonMeson/DataModel/gammaTables.h"
#include "PWGEM/PhotonMeson/Utils/PCMUtilities.h"
#include "Math/Vector4D.h"
#include "TMath.h"

#include "PWGJE/DataModel/Jet.h"
#include "PWGJE/DataModel/PhotonChargedTriggerCorrelation.h"
#include <algorithm>
#include <chrono>
#include <cmath>
#include <deque>
#include <memory>
#include <random>
#include <string>
#include <vector>

const double absEtaMax = 0.8;
#define DPHI_SCALE constants::math::TwoPI - constants::math::PIHalf
Expand Down
6 changes: 3 additions & 3 deletions PWGJE/Tasks/statPromptPhoton.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1114,9 +1114,9 @@ struct statPromptPhoton {

histos.fill(HIST("DATA_nEvents"), 2.5);

if (!jetderiveddatautilities::selectTrigger(collision, triggerMaskBits)) {
return;
}
if (!jetderiveddatautilities::selectTrigger(collision, triggerMaskBits)) {
return;
}

histos.fill(HIST("DATA_nEvents"), 3.5);

Expand Down
21 changes: 12 additions & 9 deletions PWGLF/Tasks/Resonances/k1AnalysisMicro.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,23 @@
/// \author Su-Jeong Ji <su-jeong.ji@cern.ch>, Bong-Hwi Lim <bong-hwi.lim@cern.ch>
///

#include <vector>
#include <TLorentzVector.h>
#include <TDatabasePDG.h> // FIXME
#include <TPDGCode.h> // FIXME
#include "PWGLF/DataModel/LFResonanceTables.h"

#include "Common/DataModel/PIDResponse.h"
#include "Common/DataModel/Centrality.h"
#include "Common/DataModel/EventSelection.h"
#include "Framework/AnalysisTask.h"
#include "Common/DataModel/PIDResponse.h"

#include "CommonConstants/PhysicsConstants.h"
#include "DataFormatsParameters/GRPObject.h"
#include "Framework/ASoAHelpers.h"
#include "Framework/AnalysisTask.h"
#include "Framework/runDataProcessing.h"
#include "PWGLF/DataModel/LFResonanceTables.h"
#include "DataFormatsParameters/GRPObject.h"
#include "CommonConstants/PhysicsConstants.h"

#include <TDatabasePDG.h> // FIXME
#include <TLorentzVector.h>
#include <TPDGCode.h> // FIXME

#include <vector>

using namespace o2;
using namespace o2::framework;
Expand Down
12 changes: 8 additions & 4 deletions Tutorials/src/reweighting.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,15 @@
// This workflow is used to create a flat tree for model training
// Use o2-aod-merger to combine dataframes in output AnalysisResults_trees.root

#include <onnxruntime_cxx_api.h>
#include "Framework/runDataProcessing.h"
#include "Framework/AnalysisTask.h"
#include "Common/DataModel/Multiplicity.h"
#include "TrainingTree.h"

#include "Common/DataModel/Multiplicity.h"

#include "Framework/AnalysisTask.h"
#include "Framework/runDataProcessing.h"

#include <onnxruntime_cxx_api.h>

#include <cmath>

using namespace o2;
Expand Down
Loading