Skip to content

Commit cd63cc9

Browse files
authored
MRRTF-202: QC for matched muon tracks (#1505)
* [MUON] introduced a generic object for forward muon tracks The generic MuonTrack objects provides a generic interface for accessing the parameters of muon tracks regardless of their actual type (MCH-only, MCH+MCH or refitted MFT+MCH(+MID)) * [MUON] added common interface class for histogram plotters * [MUON] added plotter class for matched forward tracks The plotter automatically creates and fills plots for the different matching combinations (MCH, MCH+MID, MFT+MCH, MFT+MCH+MID). * [MUON] updated task for matched muon tracks Reference configuration files for the different matching combinations are also included. * [MUON] always compute pDCA using MCH track parameters
1 parent 9e57ca6 commit cd63cc9

12 files changed

Lines changed: 939 additions & 384 deletions

Modules/MUON/Common/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ set(SRCS
66
src/Helpers.cxx
77
src/MergeableTH1Ratio.cxx
88
src/MergeableTH2Ratio.cxx
9+
src/HistPlotter.cxx
10+
src/MuonTrack.cxx
911
src/TrackPlotter.cxx
1012
src/TracksCheck.cxx
1113
src/TracksTask.cxx
@@ -14,6 +16,8 @@ set(SRCS
1416
set(HEADERS
1517
include/MUONCommon/MergeableTH1Ratio.h
1618
include/MUONCommon/MergeableTH2Ratio.h
19+
include/MUONCommon/HistPlotter.h
20+
include/MUONCommon/MuonTrack.h
1721
include/MUONCommon/TrackCheck.h
1822
include/MUONCommon/TrackPlotter.h
1923
include/MUONCommon/TracksTask.h
@@ -29,7 +33,7 @@ target_include_directories(
2933
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
3034
)
3135

32-
target_link_libraries(${MODULE_NAME} PUBLIC O2QualityControl O2::MCHMappingImpl4 O2::DataFormatsMCH O2::MCHTracking O2::MCHRawElecMap O2::ReconstructionDataFormats O2::MCHGeometryTransformer)
36+
target_link_libraries(${MODULE_NAME} PUBLIC O2QualityControl O2::MCHMappingImpl4 O2::DataFormatsMCH O2::MCHTracking O2::MCHRawElecMap O2::ReconstructionDataFormats O2::MCHGeometryTransformer O2::DataFormatsGlobalTracking)
3337

3438
# Digit.h is moving from MCHBase to DataFormatsMCH : let's handle both
3539
# gracefully for the moment...
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"qc": {
3+
"config": {
4+
"database": {
5+
"implementation": "CCDB",
6+
"host": "ccdb-test.cern.ch:8080",
7+
"username": "not_applicable",
8+
"password": "not_applicable",
9+
"name": "not_applicable"
10+
},
11+
"Activity": {
12+
"number": "42",
13+
"type": "2"
14+
}
15+
},
16+
"tasks": {
17+
"MUONTracks": {
18+
"active": "true",
19+
"className": "o2::quality_control_modules::muon::TracksTask",
20+
"moduleName": "QcMUONCommon",
21+
"detectorName": "GLO",
22+
"cycleDurationSeconds": "600",
23+
"maxNumberCycles": "-1",
24+
"dataSource": {
25+
"type": "direct",
26+
"query": "trackMCH:MCH/TRACKS;trackMCHROF:MCH/TRACKROFS;trackMCHTRACKCLUSTERS:MCH/TRACKCLUSTERS;mchtrackdigits:MCH/CLUSTERDIGITS;trackMID:MID/TRACKS;trackMIDROF:MID/TRACKROFS;trackMIDTRACKCLUSTERS:MID/TRACKCLUSTERS;trackClMIDROF:MID/TRCLUSROFS;matchMCHMID:GLO/MTC_MCHMID"
27+
},
28+
"taskParameters": {
29+
"maxTracksPerTF": "600",
30+
"GID" : "MCH,MID,MCH-MID"
31+
},
32+
"location": "remote"
33+
}
34+
}
35+
}
36+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"qc": {
3+
"config": {
4+
"database": {
5+
"implementation": "CCDB",
6+
"host": "ccdb-test.cern.ch:8080",
7+
"username": "not_applicable",
8+
"password": "not_applicable",
9+
"name": "not_applicable"
10+
},
11+
"Activity": {
12+
"number": "42",
13+
"type": "2"
14+
}
15+
},
16+
"tasks": {
17+
"MUONTracks": {
18+
"active": "true",
19+
"className": "o2::quality_control_modules::muon::TracksTask",
20+
"moduleName": "QcMUONCommon",
21+
"detectorName": "GLO",
22+
"cycleDurationSeconds": "600",
23+
"maxNumberCycles": "-1",
24+
"dataSource": {
25+
"type": "direct",
26+
"query": "trackMCH:MCH/TRACKS;trackMCHROF:MCH/TRACKROFS;trackMCHTRACKCLUSTERS:MCH/TRACKCLUSTERS;mchtrackdigits:MCH/CLUSTERDIGITS;trackMFT:MFT/TRACKS;trackMFTROF:MFT/MFTTrackROF;trackMFTClIdx:MFT/TRACKCLSID;alpparMFT:MFT/ALPIDEPARAM;fwdtracks:GLO/GLFWD"
27+
},
28+
"taskParameters": {
29+
"maxTracksPerTF": "600",
30+
"GID" : "MCH,MFT,MFT-MCH"
31+
},
32+
"location": "remote"
33+
}
34+
}
35+
}
36+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"qc": {
3+
"config": {
4+
"database": {
5+
"implementation": "CCDB",
6+
"host": "ccdb-test.cern.ch:8080",
7+
"username": "not_applicable",
8+
"password": "not_applicable",
9+
"name": "not_applicable"
10+
},
11+
"Activity": {
12+
"number": "42",
13+
"type": "2"
14+
}
15+
},
16+
"tasks": {
17+
"MUONTracks": {
18+
"active": "true",
19+
"className": "o2::quality_control_modules::muon::TracksTask",
20+
"moduleName": "QcMUONCommon",
21+
"detectorName": "GLO",
22+
"cycleDurationSeconds": "600",
23+
"maxNumberCycles": "-1",
24+
"dataSource": {
25+
"type": "direct",
26+
"query": "trackMCH:MCH/TRACKS;trackMCHROF:MCH/TRACKROFS;trackMCHTRACKCLUSTERS:MCH/TRACKCLUSTERS;mchtrackdigits:MCH/CLUSTERDIGITS;trackMFT:MFT/TRACKS;trackMFTROF:MFT/MFTTrackROF;trackMFTClIdx:MFT/TRACKCLSID;alpparMFT:MFT/ALPIDEPARAM;trackMID:MID/TRACKS;trackMIDROF:MID/TRACKROFS;trackMIDTRACKCLUSTERS:MID/TRACKCLUSTERS;trackClMIDROF:MID/TRCLUSROFS;matchMCHMID:GLO/MTC_MCHMID;fwdtracks:GLO/GLFWD"
27+
},
28+
"taskParameters": {
29+
"maxTracksPerTF": "600",
30+
"GID" : "MCH,MFT,MID,MFT-MCH,MCH-MID,MFT-MCH-MID"
31+
},
32+
"location": "remote"
33+
}
34+
}
35+
}
36+
}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2+
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3+
// All rights not expressly granted are reserved.
4+
//
5+
// This software is distributed under the terms of the GNU General Public
6+
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7+
//
8+
// In applying this license CERN does not waive the privileges and immunities
9+
// granted to it by virtue of its status as an Intergovernmental Organization
10+
// or submit itself to any jurisdiction.
11+
12+
#ifndef QC_MODULE_MUON_COMMON_HIST_PLOTTER_H
13+
#define QC_MODULE_MUON_COMMON_HIST_PLOTTER_H
14+
15+
#include "QualityControl/ObjectsManager.h"
16+
#include <TObject.h>
17+
#include <string>
18+
#include <vector>
19+
20+
namespace o2::quality_control_modules::muon
21+
{
22+
23+
class HistPlotter
24+
{
25+
public:
26+
HistPlotter() = default;
27+
~HistPlotter() = default;
28+
29+
public:
30+
struct HistInfo {
31+
TObject* object;
32+
std::string drawOptions;
33+
std::string displayHints;
34+
};
35+
36+
/** reset all histograms */
37+
void reset();
38+
39+
std::vector<HistInfo>& histograms() { return mHistograms; }
40+
41+
const std::vector<HistInfo>& histograms() const { return mHistograms; }
42+
43+
void publish(std::shared_ptr<o2::quality_control::core::ObjectsManager> objectsManager);
44+
45+
private:
46+
std::vector<HistInfo> mHistograms;
47+
};
48+
49+
} // namespace o2::quality_control_modules::muon
50+
51+
#endif
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2+
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3+
// All rights not expressly granted are reserved.
4+
//
5+
// This software is distributed under the terms of the GNU General Public
6+
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7+
//
8+
// In applying this license CERN does not waive the privileges and immunities
9+
// granted to it by virtue of its status as an Intergovernmental Organization
10+
// or submit itself to any jurisdiction.
11+
12+
#ifndef QC_MODULE_MUON_COMMON_TRACK_H
13+
#define QC_MODULE_MUON_COMMON_TRACK_H
14+
15+
#include <CommonDataFormat/InteractionRecord.h>
16+
#include <DataFormatsGlobalTracking/RecoContainer.h>
17+
#include <DataFormatsMCH/TrackMCH.h>
18+
#include <ReconstructionDataFormats/TrackMCHMID.h>
19+
#include <ReconstructionDataFormats/GlobalFwdTrack.h>
20+
#include <MCHTracking/TrackParam.h>
21+
#include <Math/Vector4D.h>
22+
#include <memory>
23+
24+
namespace o2::quality_control_modules::muon
25+
{
26+
27+
class MuonTrack
28+
{
29+
public:
30+
MuonTrack(const o2::mch::TrackMCH* track, const o2::globaltracking::RecoContainer& recoCont);
31+
MuonTrack(const o2::dataformats::TrackMCHMID* track, const o2::globaltracking::RecoContainer& recoCont);
32+
MuonTrack(const o2::dataformats::GlobalFwdTrack* track, const o2::globaltracking::RecoContainer& recoCont);
33+
34+
void init();
35+
36+
ROOT::Math::PxPyPzMVector getMuonMomentum() const { return mMuonMomentum; }
37+
ROOT::Math::PxPyPzMVector getMuonMomentumAtVertex() const { return mMuonMomentumAtVertex; }
38+
double getP() const
39+
{
40+
return mMuonMomentum.P();
41+
}
42+
double getDCA() const { return mDCA; }
43+
double getPDCAMCH() const { return mPDCAMCH; }
44+
double getRAbs() const { return mRAbs; }
45+
double getChi2OverNDF() const { return mChi2OverNDF; }
46+
47+
/// get the interaction record associated to this track
48+
InteractionRecord getIR() const { return mIR; }
49+
/// get the interaction record associated to the MFT track
50+
InteractionRecord getIRMFT() const { return mIRMFT; }
51+
/// get the interaction record associated to the MCH track
52+
InteractionRecord getIRMCH() const { return mIRMCH; }
53+
/// get the interaction record associated to the MID track
54+
InteractionRecord getIRMID() const { return mIRMID; }
55+
56+
/// get the interaction record associated to the MFT track
57+
int getTrackIdMFT() const { return mTrackIdMFT; }
58+
/// get the interaction record associated to the MCH track
59+
int getTrackIdMCH() const { return mTrackIdMCH; }
60+
/// get the interaction record associated to the MID track
61+
int getTrackIdMID() const { return mTrackIdMID; }
62+
63+
bool hasMFT() const { return (mTrackIdMFT >= 0); }
64+
bool hasMCH() const { return (mTrackIdMCH >= 0); }
65+
bool hasMID() const { return (mTrackIdMID >= 0); }
66+
67+
/// get the muon sign
68+
short getSign() const { return mSign; }
69+
70+
static constexpr double sAbsZBeg = -90.; ///< Position of the begining of the absorber (cm)
71+
static constexpr double sAbsZEnd = -505.; ///< Position of the end of the absorber (cm)
72+
73+
private:
74+
o2::mch::TrackParam mTrackParameters;
75+
o2::mch::TrackParam mTrackParametersMCH;
76+
77+
ROOT::Math::PxPyPzMVector mMuonMomentum;
78+
ROOT::Math::PxPyPzMVector mMuonMomentumAtVertex;
79+
80+
float mDCA{ 0 };
81+
float mPDCAMCH{ 0 };
82+
float mRAbs{ 0 };
83+
float mChi2OverNDF{ 0 };
84+
85+
InteractionRecord mIR{}; ///< associated interaction record
86+
InteractionRecord mIRMFT{}; ///< MFT interaction record
87+
InteractionRecord mIRMCH{}; ///< MCH interaction record
88+
InteractionRecord mIRMID{}; ///< MID interaction record
89+
90+
int mTrackIdMFT{ -1 };
91+
int mTrackIdMCH{ -1 };
92+
int mTrackIdMID{ -1 };
93+
94+
short mSign;
95+
};
96+
97+
} // namespace o2::quality_control_modules::muon
98+
99+
#endif

0 commit comments

Comments
 (0)