Skip to content

Commit 23a81a7

Browse files
authored
Matching of TRD tracks with ITS and TPC (#1579)
* TRD Tracks matching with ITS and TPC * TRD tracks matching with ITS and TPC * Adding tracklets info from matched tracks * Formatting the task * fix problem with macos * fix format * fix pad col for tracklets
1 parent eda2af8 commit 23a81a7

4 files changed

Lines changed: 406 additions & 1 deletion

File tree

Modules/TRD/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
add_library(O2QcTRD)
44

5-
target_sources(O2QcTRD PRIVATE src/TrackletsCheck.cxx src/TrackletsTask.cxx src/PulseHeightCheck.cxx src/PulseHeight.cxx src/RawData.cxx src/DigitsTask.cxx
5+
target_sources(O2QcTRD PRIVATE src/PulseHeightTrackMatch.cxx src/TrackletsCheck.cxx src/TrackletsTask.cxx src/PulseHeightCheck.cxx src/PulseHeight.cxx src/RawData.cxx src/DigitsTask.cxx
66
src/DigitsCheck.cxx src/TRDTrending.cxx src/TrendingTaskConfigTRD.cxx src/PulseHeightPostProcessing.cxx)
77

88
target_include_directories(
@@ -20,6 +20,7 @@ install(TARGETS O2QcTRD
2020

2121
add_root_dictionary(O2QcTRD
2222
HEADERS
23+
include/TRD/PulseHeightTrackMatch.h
2324
include/TRD/TrackletsCheck.h
2425
include/TRD/TrackletsTask.h
2526
include/TRD/PulseHeightCheck.h

Modules/TRD/include/TRD/LinkDef.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,5 @@
1313
#pragma link C++ class o2::quality_control_modules::trd::TrackletsCheck + ;
1414
#pragma link C++ class o2::quality_control::postprocessing::TRDTrending + ;
1515
#pragma link C++ class o2::quality_control::postprocessing::PulseHeightPostProcessing + ;
16+
#pragma link C++ class o2::quality_control_modules::trd::PulseHeightTrackMatch+;
1617
#endif
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
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+
///
13+
/// \file PulseHeightTrackMatch.h
14+
/// \author Vikash Sumberia
15+
///
16+
17+
#ifndef QC_MODULE_TRD_TRDPULSEHEIGHTTRACKMATCH_H
18+
#define QC_MODULE_TRD_TRDPULSEHEIGHTTRACKMATCH_H
19+
20+
#include "QualityControl/TaskInterface.h"
21+
#include <array>
22+
#include "DataFormatsTRD/NoiseCalibration.h"
23+
#include "DataFormatsTRD/Digit.h"
24+
#include "DataFormatsTRD/Constants.h"
25+
#include "TRDQC/StatusHelper.h"
26+
27+
class TH1F;
28+
class TH2F;
29+
class TH1D;
30+
class TH2D;
31+
class TLine;
32+
class TProfile;
33+
class TProfile2D;
34+
35+
using namespace o2::quality_control::core;
36+
37+
namespace o2::quality_control_modules::trd
38+
{
39+
40+
/// \brief Example Quality Control DPL Task
41+
/// \author My Name
42+
class PulseHeightTrackMatch final : public TaskInterface
43+
{
44+
public:
45+
/// \brief Constructor
46+
PulseHeightTrackMatch() = default;
47+
/// Destructor
48+
~PulseHeightTrackMatch() override;
49+
50+
// Definition of the methods for the template method pattern
51+
void initialize(o2::framework::InitContext& ctx) override;
52+
void startOfActivity(Activity& activity) override;
53+
void startOfCycle() override;
54+
void monitorData(o2::framework::ProcessingContext& ctx) override;
55+
void endOfCycle() override;
56+
void endOfActivity(Activity& activity) override;
57+
void reset() override;
58+
void buildHistograms();
59+
void drawLinesMCM(TH2F* histo);
60+
void drawTrdLayersGrid(TH2F* hist);
61+
void retrieveCCDBSettings();
62+
void drawLinesOnPulseHeight(TH1F* h);
63+
void fillLinesOnHistsPerLayer(int iLayer);
64+
void drawHashOnLayers(int layer, int hcid, int col, int rowstart, int rowend);
65+
void buildChamberIgnoreBP();
66+
bool isChamberToBeIgnored(unsigned int sm, unsigned int stack, unsigned int layer);
67+
68+
private:
69+
// limits
70+
bool mSkipSharedDigits;
71+
unsigned int mPulseHeightThreshold;
72+
std::pair<float, float> mDriftRegion;
73+
std::pair<float, float> mPulseHeightPeakRegion;
74+
long int mTimestamp;
75+
std::shared_ptr<TH1F> mParsingTimePerTF;
76+
std::shared_ptr<TH1F> mDigitsPerEvent;
77+
std::shared_ptr<TH1F> mTrackletsPerEvent;
78+
std::shared_ptr<TH1F> mTracksPerEvent;
79+
std::shared_ptr<TH1F> mTrackletsPerMatchedTrack;
80+
std::shared_ptr<TH1F> mTriggerPerTF;
81+
std::shared_ptr<TH1F> mTriggerWDigitPerTF;
82+
std::shared_ptr<TProfile> mPulseHeightpro = nullptr;
83+
std::shared_ptr<TProfile2D> mPulseHeightperchamber = nullptr;
84+
std::vector<TH2F*> mLayers;
85+
86+
// information pulled from ccdb
87+
o2::trd::NoiseStatusMCM* mNoiseMap = nullptr;
88+
o2::trd::HalfChamberStatusQC* mChamberStatus = nullptr;
89+
std::string mChambersToIgnore;
90+
std::bitset<o2::trd::constants::MAXCHAMBER> mChambersToIgnoreBP;
91+
};
92+
93+
} // namespace o2::quality_control_modules::trd
94+
95+
#endif // QC_MODULE_TRD_TRDPULSEHEIGHTTRACKMATCH_H

0 commit comments

Comments
 (0)