Skip to content

Commit fbd7bce

Browse files
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 a657810 commit fbd7bce

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

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;
@@ -248,6 +250,9 @@ class AODProducerWorkflowDPL : public Task
248250
o2::dataformats::MeanVertexObject mVtx;
249251
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)
250252

253+
const o2::trd::LocalGainFactor* mTRDLocalGain; // TRD local gain factors from krypton calibration
254+
const o2::trd::NoiseStatusMCM* mTRDNoiseMap; // TRD noise map
255+
251256
std::unordered_set<GIndex> mGIDUsedBySVtx;
252257
std::unordered_set<GIndex> mGIDUsedByStr;
253258

@@ -259,6 +264,7 @@ class AODProducerWorkflowDPL : public Task
259264
bool mUseSigFiltMC = false; // enable signal filtering for MC with embedding
260265
bool mEnableSV = true; // enable secondary vertices
261266
bool mEnableFITextra = false;
267+
bool mEnableTRDextra = false;
262268
bool mFieldON = false;
263269
const float cSpeed = 0.029979246f; // speed of light in TOF units
264270

@@ -523,6 +529,9 @@ class AODProducerWorkflowDPL : public Task
523529
template <typename TracksQACursorType>
524530
void addToTracksQATable(TracksQACursorType& tracksQACursor, TrackQA& trackQAInfoHolder);
525531

532+
template <typename TRDsExtraCursorType>
533+
void addToTRDsExtra(const o2::globaltracking::RecoContainer& recoData, TRDsExtraCursorType& trdExtraCursor, const GIndex& trkIdx, int trkTableIdx);
534+
526535
template <typename mftTracksCursorType, typename AmbigMFTTracksCursorType>
527536
void addToMFTTracksTable(mftTracksCursorType& mftTracksCursor, AmbigMFTTracksCursorType& ambigMFTTracksCursor,
528537
GIndex trackID, const o2::globaltracking::RecoContainer& data, int collisionID,
@@ -542,7 +551,7 @@ class AODProducerWorkflowDPL : public Task
542551
// helper for track tables
543552
// * fills tables collision by collision
544553
// * interaction time is for TOF information
545-
template <typename TracksCursorType, typename TracksCovCursorType, typename TracksExtraCursorType, typename TracksQACursorType, typename AmbigTracksCursorType,
554+
template <typename TracksCursorType, typename TracksCovCursorType, typename TracksExtraCursorType, typename TracksQACursorType, typename TRDsExtraCursorType, typename AmbigTracksCursorType,
546555
typename MFTTracksCursorType, typename MFTTracksCovCursorType, typename AmbigMFTTracksCursorType,
547556
typename FwdTracksCursorType, typename FwdTracksCovCursorType, typename AmbigFwdTracksCursorType, typename FwdTrkClsCursorType>
548557
void fillTrackTablesPerCollision(int collisionID,
@@ -554,6 +563,7 @@ class AODProducerWorkflowDPL : public Task
554563
TracksCovCursorType& tracksCovCursor,
555564
TracksExtraCursorType& tracksExtraCursor,
556565
TracksQACursorType& tracksQACursor,
566+
TRDsExtraCursorType& trdsExtraCursor,
557567
AmbigTracksCursorType& ambigTracksCursor,
558568
MFTTracksCursorType& mftTracksCursor,
559569
MFTTracksCovCursorType& mftTracksCovCursor,
@@ -678,7 +688,7 @@ class AODProducerWorkflowDPL : public Task
678688
};
679689

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

683693
// helper interface for calo cells to "befriend" emcal and phos cells
684694
class CellHelper

0 commit comments

Comments
 (0)