Skip to content

Commit

Permalink
Fix ITS track pattern building, add vertex info, add LinkDef for dict…
Browse files Browse the repository at this point in the history
…ionary (AliceO2Group#13496)

* Fix ITS track pattern building, add LinkDef for dictionary

* Add ITS occupancy at MC event time

* Add vertexing and matching info
  • Loading branch information
shahor02 authored Sep 11, 2024
1 parent 29072b4 commit daf4569
Show file tree
Hide file tree
Showing 5 changed files with 173 additions and 52 deletions.
14 changes: 7 additions & 7 deletions Detectors/GlobalTrackingWorkflow/study/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# granted to it by virtue of its status as an Intergovernmental Organization
# or submit itself to any jurisdiction.

add_compile_options(-O0 -g -fPIC)
# add_compile_options(-O0 -g -fPIC)

o2_add_library(GlobalTrackingStudy
SOURCES src/TPCTrackStudy.cxx
Expand All @@ -31,12 +31,12 @@ o2_add_library(GlobalTrackingStudy
O2::TPCWorkflow
O2::SimulationDataFormat)

o2_target_root_dictionary(
GlobalTrackingStudy
HEADERS include/GlobalTrackingStudy/V0Ext.h
include/GlobalTrackingStudy/TrackInfoExt.h
include/GlobalTrackingStudy/TrackMCStudyConfig.h
include/GlobalTrackingStudy/TrackMCStudyTypes.h
o2_target_root_dictionary(GlobalTrackingStudy
HEADERS include/GlobalTrackingStudy/V0Ext.h
include/GlobalTrackingStudy/TrackInfoExt.h
include/GlobalTrackingStudy/TrackMCStudyConfig.h
include/GlobalTrackingStudy/TrackMCStudyTypes.h
LINKDEF src/GlobalTrackingStudyLinkDef.h
)

o2_add_executable(study-workflow
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ namespace o2::trackstudy
{
struct TrackMCStudyConfig : o2::conf::ConfigurableParamHelper<TrackMCStudyConfig> {
float minPt = 0.05;
float maxTgl = 1.2;
float maxTgl = 1.5;
float minPtMC = 0.05;
float maxTglMC = 1.2;
float minRMC = 33.;
float maxTglMC = 1.5;
float maxRMC = 33.;
float maxPosTglMC = 2.;
float maxPVZOffset = 15.;
float decayMotherMaxT = 0.1; // max TOF in ns for mother particles to study
float decayMotherMaxT = 1.0f; // max TOF in ns for mother particles to study
bool requireITSorTPCTrackRefs = true;
int decayPDG[5] = {310, 3122, -1, -1, -1}; // decays to study, must end by -1
int decayPDG[5] = {310, 3122, 411, 421, -1}; // decays to study, must end by -1
O2ParamDef(TrackMCStudyConfig, "trmcconf");
};
} // namespace o2::trackstudy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,22 @@
#include "ReconstructionDataFormats/VtxTrackIndex.h"
#include "ReconstructionDataFormats/Track.h"
#include "SimulationDataFormat/MCCompLabel.h"
#include "Framework/Task.h"
#include "SimulationDataFormat/MCEventLabel.h"
#include "CommonConstants/LHCConstants.h"
#include "CommonDataFormat/TimeStamp.h"
#include "ReconstructionDataFormats/PrimaryVertex.h"
#include <array>

namespace o2::trackstudy
{
struct MCTrackInfo {

inline float getMCTimeMUS() const { return bcInTF * o2::constants::lhc::LHCBunchSpacingMUS; }

o2::track::TrackPar track{};
o2::MCCompLabel label{};
float occTPC = -1.f;
int occITS = -1.f;
int bcInTF = -1;
int pdg = 0;
int pdgParent = 0;
Expand All @@ -38,6 +46,9 @@ struct MCTrackInfo {
struct RecTrack {
o2::track::TrackParCov track{};
o2::dataformats::VtxTrackIndex gid{};
o2::dataformats::TimeStampWithError<float, float> ts{};
o2::MCEventLabel pvLabel{};
int pvID = -1;
uint8_t nClITS = 0;
uint8_t nClTPC = 0;
uint8_t pattITS = 0;
Expand All @@ -49,9 +60,12 @@ struct RecTrack {
struct TrackFamily { // set of tracks related to the same MC label
MCTrackInfo mcTrackInfo{};
std::vector<RecTrack> recTracks{};
o2::track::TrackParCov trackITSProp{};
o2::track::TrackParCov trackTPCProp{};
int8_t entITS = -1;
int8_t entTPC = -1;
int8_t entITSTPC = -1;
float tpcT0 = -999.;
bool contains(const o2::dataformats::VtxTrackIndex& ref) const
{
for (const auto& tr : recTracks) {
Expand All @@ -64,5 +78,25 @@ struct TrackFamily { // set of tracks related to the same MC label

ClassDefNV(TrackFamily, 1);
};

struct RecPV {
o2::dataformats::PrimaryVertex pv{};
o2::MCEventLabel mcEvLbl{};
ClassDefNV(RecPV, 1);
};

struct MCVertex {
float getX() const { return pos[0]; }
float getY() const { return pos[1]; }
float getZ() const { return pos[2]; }

std::array<float, 3> pos{0., 0., -1999.f};
float ts = 0;
int nTrackSel = 0; // number of selected MC charged tracks
int ID = -1;
std::vector<RecPV> recVtx{};
ClassDefNV(MCVertex, 1);
};

} // namespace o2::trackstudy
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,9 @@
#pragma link C++ class std::vector < o2::trackstudy::TrackFamily> + ;
#pragma link C++ class o2::trackstudy::MCTrackInfo + ;
#pragma link C++ class std::vector < o2::trackstudy::MCTrackInfo> + ;
#pragma link C++ class o2::trackstudy::RecPV + ;
#pragma link C++ class std::vector < o2::trackstudy::RecPV> + ;
#pragma link C++ class o2::trackstudy::MCVertex + ;
#pragma link C++ class std::vector < o2::trackstudy::MCVertex> + ;

#endif
Loading

0 comments on commit daf4569

Please sign in to comment.