Skip to content

Commit 264c2a9

Browse files
KangkanGoswamiglegras
authored andcommitted
Add TRD support and local gain/noise handling in AODProducerWorkflowSpec
This commit enables the workflow to process TRD-specific calibration and noise information, allowing for more accurate reconstruction and analysis of TRD signals in AOD production.
1 parent c590fd7 commit 264c2a9

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

Detectors/AOD/include/AODProducerWorkflow/AODProducerWorkflowSpec.h

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
#include "DataFormatsGlobalTracking/RecoContainer.h"
2020
#include "DataFormatsPHOS/Cell.h"
2121
#include "DataFormatsTRD/TrackTRD.h"
22+
#include "TRDBase/PadCalibrationsAliases.h"
23+
#include "DataFormatsTRD/NoiseCalibration.h"
2224
#include "DetectorsBase/GRPGeomHelper.h"
2325
#include "DetectorsBase/Propagator.h"
2426
#include "Framework/DataProcessorSpec.h"
@@ -215,7 +217,7 @@ enum struct AODProducerStreamerFlags : uint8_t {
215217
class AODProducerWorkflowDPL : public Task
216218
{
217219
public:
218-
AODProducerWorkflowDPL(GID::mask_t src, std::shared_ptr<DataRequest> dataRequest, std::shared_ptr<o2::base::GRPGeomRequest> gr, bool enableSV, bool useMC = true, bool enableFITextra = false) : mUseMC(useMC), mEnableSV(enableSV), mEnableFITextra(enableFITextra), mInputSources(src), mDataRequest(dataRequest), mGGCCDBRequest(gr) {}
220+
AODProducerWorkflowDPL(GID::mask_t src, std::shared_ptr<DataRequest> dataRequest, std::shared_ptr<o2::base::GRPGeomRequest> gr, bool enableSV, bool useMC = true, bool enableFITextra = false, bool enableTRDextra = false) : mUseMC(useMC), mEnableSV(enableSV), mEnableFITextra(enableFITextra), mEnableTRDextra(enableTRDextra), mInputSources(src), mDataRequest(dataRequest), mGGCCDBRequest(gr) {}
219221
~AODProducerWorkflowDPL() override = default;
220222
void init(InitContext& ic) final;
221223
void run(ProcessingContext& pc) final;
@@ -250,6 +252,9 @@ class AODProducerWorkflowDPL : public Task
250252
o2::dataformats::MeanVertexObject mVtx;
251253
float mMaxPropXiu{5.0f}; // max X_IU for which track is to be propagated if mPropTracks is true. (other option: o2::constants::geom::XTPCInnerRef + 0.1f)
252254

255+
const o2::trd::LocalGainFactor* mTRDLocalGain; // TRD local gain factors from krypton calibration
256+
const o2::trd::NoiseStatusMCM* mTRDNoiseMap; // TRD noise map
257+
253258
std::unordered_set<GIndex> mGIDUsedBySVtx;
254259
std::unordered_set<GIndex> mGIDUsedByStr;
255260

@@ -261,6 +266,7 @@ class AODProducerWorkflowDPL : public Task
261266
bool mUseSigFiltMC = false; // enable signal filtering for MC with embedding
262267
bool mEnableSV = true; // enable secondary vertices
263268
bool mEnableFITextra = false;
269+
bool mEnableTRDextra = false;
264270
bool mFieldON = false;
265271
const float cSpeed = 0.029979246f; // speed of light in TOF units
266272

@@ -525,6 +531,9 @@ class AODProducerWorkflowDPL : public Task
525531
template <typename TracksQACursorType>
526532
void addToTracksQATable(TracksQACursorType& tracksQACursor, TrackQA& trackQAInfoHolder);
527533

534+
template <typename TRDsExtraCursorType>
535+
void addToTRDsExtra(const o2::globaltracking::RecoContainer& recoData, TRDsExtraCursorType& trdExtraCursor, const GIndex& trkIdx, int trkTableIdx);
536+
528537
template <typename mftTracksCursorType, typename AmbigMFTTracksCursorType>
529538
void addToMFTTracksTable(mftTracksCursorType& mftTracksCursor, AmbigMFTTracksCursorType& ambigMFTTracksCursor,
530539
GIndex trackID, const o2::globaltracking::RecoContainer& data, int collisionID,
@@ -544,7 +553,7 @@ class AODProducerWorkflowDPL : public Task
544553
// helper for track tables
545554
// * fills tables collision by collision
546555
// * interaction time is for TOF information
547-
template <typename TracksCursorType, typename TracksCovCursorType, typename TracksExtraCursorType, typename TracksQACursorType, typename AmbigTracksCursorType,
556+
template <typename TracksCursorType, typename TracksCovCursorType, typename TracksExtraCursorType, typename TracksQACursorType, typename TRDsExtraCursorType, typename AmbigTracksCursorType,
548557
typename MFTTracksCursorType, typename MFTTracksCovCursorType, typename AmbigMFTTracksCursorType,
549558
typename FwdTracksCursorType, typename FwdTracksCovCursorType, typename AmbigFwdTracksCursorType, typename FwdTrkClsCursorType>
550559
void fillTrackTablesPerCollision(int collisionID,
@@ -556,6 +565,7 @@ class AODProducerWorkflowDPL : public Task
556565
TracksCovCursorType& tracksCovCursor,
557566
TracksExtraCursorType& tracksExtraCursor,
558567
TracksQACursorType& tracksQACursor,
568+
TRDsExtraCursorType& trdsExtraCursor,
559569
AmbigTracksCursorType& ambigTracksCursor,
560570
MFTTracksCursorType& mftTracksCursor,
561571
MFTTracksCovCursorType& mftTracksCovCursor,
@@ -680,7 +690,7 @@ class AODProducerWorkflowDPL : public Task
680690
};
681691

682692
/// create a processor spec
683-
framework::DataProcessorSpec getAODProducerWorkflowSpec(GID::mask_t src, bool enableSV, bool enableST, bool useMC, bool CTPConfigPerRun, bool enableFITextra);
693+
framework::DataProcessorSpec getAODProducerWorkflowSpec(GID::mask_t src, bool enableSV, bool enableST, bool useMC, bool CTPConfigPerRun, bool enableFITextra, bool enableTRDextra);
684694

685695
// helper interface for calo cells to "befriend" emcal and phos cells
686696
class CellHelper

0 commit comments

Comments
 (0)