Skip to content

Commit 525d6c1

Browse files
committed
Update
1 parent 9746b97 commit 525d6c1

File tree

6 files changed

+28
-5
lines changed

6 files changed

+28
-5
lines changed

ALICE3/TableProducer/OTF/onTheFlyDetectorGeometryProvider.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ struct OnTheFlyDetectorGeometryProvider {
4444
return;
4545
}
4646
int idx = 0;
47-
for (auto& configFile : detectorConfiguration.value) {
47+
for (std::string& configFile : detectorConfiguration.value) {
4848
LOG(info) << "Loading detector geometry from configuration file: " << configFile;
4949
histos.add<TH1>(Form("GeometryConfigFile_%d", idx), configFile.c_str(), o2::framework::HistType::kTH1D, {{1, 0, 1}})->Fill(0.5);
5050
// If the filename starts with ccdb: then take the file from the ccdb

ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -728,6 +728,7 @@ struct OnTheFlyRichPid {
728728

729729
std::array<float, 6> mcPvCov = {0.};
730730
o2::dataformats::VertexBase mcPvVtx({0.0f, 0.0f, 0.0f}, mcPvCov);
731+
return;
731732
if (collision.has_mcCollision()) {
732733
auto mcCollision = collision.mcCollision();
733734
mcPvVtx.setX(mcCollision.posX());

ALICE3/TableProducer/OTF/onTheFlyTofPid.cxx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,7 @@ struct OnTheFlyTofPid {
732732

733733
// Now we calculate the expected arrival time following certain mass hypotheses
734734
// and the (imperfect!) reconstructed track parametrizations
735-
float trackLengthRecoInnerTOF = -1, trackLengthRecoOuterTOF = -1;
735+
float trackLengthRecoInnerTOF = 20, trackLengthRecoOuterTOF = 20;
736736
auto recoTrack = getTrackParCov(track);
737737
xPv = -100.f;
738738
if (recoTrack.propagateToDCA(pvVtx, mMagneticField)) {
@@ -742,6 +742,9 @@ struct OnTheFlyTofPid {
742742
trackLengthRecoInnerTOF = computeTrackLength(recoTrack, simConfig.innerTOFRadius, mMagneticField);
743743
trackLengthRecoOuterTOF = computeTrackLength(recoTrack, simConfig.outerTOFRadius, mMagneticField);
744744
}
745+
// trackLengthRecoInnerTOF = trackLengthInnerTOF;
746+
// trackLengthRecoOuterTOF = trackLengthOuterTOF;
747+
// LOG(info) << "Track lengths: true innerTOF " << trackLengthInnerTOF << " cm, reco innerTOF " << trackLengthRecoInnerTOF << " cm";
745748

746749
// cache the track info needed for the event time calculation
747750
// Reuse or emplace a new object in the vector

ALICE3/TableProducer/OTF/onTheFlyTracker.cxx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
#include <DetectorsBase/Propagator.h>
4343
#include <DetectorsVertexing/PVertexer.h>
4444
#include <DetectorsVertexing/PVertexerHelpers.h>
45+
#include <DetectorsVertexing/PVertexerParams.h>
4546
#include <Field/MagneticField.h>
4647
#include <Framework/AnalysisDataModel.h>
4748
#include <Framework/AnalysisTask.h>
@@ -474,6 +475,7 @@ struct OnTheFlyTracker {
474475

475476
if (doExtraQA) {
476477
histos.add("h2dVerticesVsContributors", "h2dVerticesVsContributors", kTH2F, {axes.axisMultiplicity, axes.axisNVertices});
478+
histos.add("h1dVerticesNotReco", "h1dVerticesNotReco", kTH1F, {axes.axisMultiplicity});
477479
histos.add("hRecoVsSimMultiplicity", "hRecoVsSimMultiplicity", kTH2F, {axes.axisMultiplicity, axes.axisMultiplicity});
478480

479481
histos.add("hSimTrackX", "hSimTrackX", kTH1F, {axes.axisX});
@@ -554,9 +556,13 @@ struct OnTheFlyTracker {
554556
irSampler.init();
555557

556558
vertexer.setValidateWithIR(kFALSE);
559+
vertexer.setTrackSources(o2::dataformats::GlobalTrackID::ITS);
557560
vertexer.setBunchFilling(irSampler.getBunchFilling());
561+
vertexer.setBz(mMagneticField);
558562
vertexer.init();
559563

564+
o2::vertexing::PVertexerParams::Instance().printKeyValues();
565+
560566
// initialize O2 2-prong fitter
561567
fitter.setPropagateToPCA(true);
562568
fitter.setMaxR(200.);
@@ -1361,7 +1367,7 @@ struct OnTheFlyTracker {
13611367
// data preparation
13621368
o2::vertexing::PVertex primaryVertex;
13631369
if (enablePrimaryVertexing) {
1364-
LOG(debug) << "Starting primary vertexing with " << tracksAlice3.size() << " tracks.";
1370+
LOG(info) << "Starting primary vertexing with " << tracksAlice3.size() << " tracks.";
13651371
std::vector<o2::MCCompLabel> lblTracks;
13661372
std::vector<o2::vertexing::PVertex> vertices;
13671373
std::vector<o2::vertexing::GIndex> vertexTrackIDs;
@@ -1387,8 +1393,13 @@ struct OnTheFlyTracker {
13871393
lblVtx);
13881394

13891395
if (n_vertices < 1) {
1396+
LOG(info) << "Vertexing completed, no vtx found.";
1397+
if (doExtraQA) {
1398+
histos.fill(HIST("h1dVerticesNotReco"), tracksAlice3.size());
1399+
}
13901400
return; // primary vertex not reconstructed
13911401
}
1402+
LOG(info) << "Vertexing completed with " << n_vertices << " vertices found.";
13921403

13931404
// Find largest vertex
13941405
int largestVertex = 0;

ALICE3/TableProducer/alice3TrackingTranslator.cxx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ struct Alice3TrackingTranslator {
7070
o2::framework::Produces<o2::aod::McCollisions> tableMcCollisions;
7171
o2::framework::Produces<o2::aod::OTFLUTConfigId> tableOTFLUTConfigId;
7272

73-
o2::framework::Configurable<int> maxCollisions{"maxCollisions", 1000, "Nsigma for TOF PID (if enabled)"};
73+
o2::framework::Configurable<int> maxCollisions{"maxCollisions", -1000, "Nsigma for TOF PID (if enabled)"};
7474

7575
void init(o2::framework::InitContext&)
7676
{
@@ -257,7 +257,7 @@ struct Alice3TrackingTranslator {
257257

258258
const Long64_t kEvents = fileParticles.getEntries();
259259
for (Long64_t iEvent = 0; iEvent < kEvents; ++iEvent) {
260-
if (iEvent > 0 && iEvent % maxCollisions) {
260+
if (iEvent > 0 && maxCollisions.value > 0 && (iEvent % maxCollisions) == 0) {
261261
LOG(info) << "Processing event " << iEvent << "/" << kEvents;
262262
break;
263263
}
@@ -587,6 +587,12 @@ struct Alice3TrackingTranslator {
587587
}
588588
};
589589

590+
/// Extends TracksExtra if necessary
591+
struct Alice3TrackingTranslatorInitializer {
592+
o2::framework::Spawns<o2::aod::TracksExtra> tableStoredTracksExtra;
593+
void init(o2::framework::InitContext const&) {}
594+
};
595+
590596
o2::framework::WorkflowSpec defineDataProcessing(o2::framework::ConfigContext const& cfgc)
591597
{
592598
o2::framework::WorkflowSpec w;
@@ -599,5 +605,6 @@ o2::framework::WorkflowSpec defineDataProcessing(o2::framework::ConfigContext co
599605
}
600606
}
601607
w.push_back(adaptAnalysisTask<Alice3TrackingTranslator>(cfgc));
608+
// w.push_back(adaptAnalysisTask<Alice3TrackingTranslatorInitializer>(cfgc));
602609
return w;
603610
}

ALICE3/Tasks/alice3HfTask3Prong.cxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,7 @@ struct Alice3HfTask3Prong {
423423
{
424424
// MC gen.
425425
for (const auto& particle : mcParticles) {
426+
// LOG(info) << "Processing MC generated particle with PDG " << particle.pdgCode() << " and flagMcGen " << particle.flagMcGen() << " " << selectedPdg;
426427
if (std::abs(particle.flagMcGen()) == selectedPdg) {
427428
double yGen = hfHelper.getCandY<CharmHad>(particle);
428429
if (yCandGenMax >= 0. && std::abs(yGen) > yCandGenMax) {

0 commit comments

Comments
 (0)