@@ -98,6 +98,7 @@ class TPCTimeSeries : public Task
9898 mSampleTsallis = ic.options ().get <bool >(" sample-unbinned-tsallis" );
9999 mXOuterMatching = ic.options ().get <float >(" refX-for-outer-ITS" );
100100 mUseMinBiasTrigger = !ic.options ().get <bool >(" disable-min-bias-trigger" );
101+ mMaxOccupancyHistBins = ic.options ().get <int >(" max-occupancy-bins" );
101102
102103 if (mUnbinnedWriter ) {
103104 for (int iThread = 0 ; iThread < mNThreads ; ++iThread) {
@@ -180,6 +181,12 @@ class TPCTimeSeries : public Task
180181 auto primMatchedTracks = mTPCOnly ? gsl::span<o2::dataformats::VtxTrackIndex>() : recoData.getPrimaryVertexMatchedTracks (); // Global ID's for associated tracks
181182 auto primMatchedTracksRef = mTPCOnly ? gsl::span<o2::dataformats::VtxTrackRef>() : recoData.getPrimaryVertexMatchedTrackRefs (); // references from vertex to these track IDs
182183
184+ // get occupancy map
185+ mBufferDCA .mOccupancyMapTPC = std::vector<unsigned int >(recoData.occupancyMapTPC .begin (), recoData.occupancyMapTPC .end ());
186+ if (mBufferDCA .mOccupancyMapTPC .size () > mMaxOccupancyHistBins ) {
187+ mBufferDCA .mOccupancyMapTPC .resize (mMaxOccupancyHistBins );
188+ }
189+
183190 // TOF clusters
184191 const auto & tofClusters = mTPCOnly ? gsl::span<o2::tof::Cluster>() : recoData.getTOFClusters ();
185192
@@ -1031,6 +1038,7 @@ class TPCTimeSeries : public Task
10311038 bool mUseMinBiasTrigger {false }; // /< use minimum bias trigger for skimmed data (accept fraction of tracks with nCl < 80)
10321039 long mTimeMS {}; // /< time in MS of current TF
10331040 int mRun {}; // /< run number
1041+ int mMaxOccupancyHistBins {912 }; // /< maximum number of occupancy bins
10341042
10351043 // / check if track passes coarse cuts
10361044 bool acceptTrack (const TrackTPC& track) const { return std::abs (track.getTgl ()) < mMaxTgl ; }
@@ -1738,6 +1746,7 @@ o2::framework::DataProcessorSpec getTPCTimeSeriesSpec(const bool disableWriter,
17381746 bool useMC = false ;
17391747 GID::mask_t srcTracks = tpcOnly ? GID::getSourcesMask (" TPC" ) : GID::getSourcesMask (" TPC,ITS,ITS-TPC,ITS-TPC-TRD,ITS-TPC-TOF,ITS-TPC-TRD-TOF" );
17401748 dataRequest->requestTracks (srcTracks, useMC);
1749+ dataRequest->requestClusters (GID::getSourcesMask (" TPC" ), useMC);
17411750 if (!tpcOnly) {
17421751 dataRequest->requestPrimaryVertices (useMC);
17431752 }
@@ -1798,7 +1807,8 @@ o2::framework::DataProcessorSpec getTPCTimeSeriesSpec(const bool disableWriter,
17981807 {" sample-unbinned-tsallis" , VariantType::Bool, false , {" Perform sampling of unbinned data based on Tsallis function" }},
17991808 {" sampling-factor" , VariantType::Float, 0 .001f , {" Sampling factor in case sample-unbinned-tsallis is used" }},
18001809 {" disable-min-bias-trigger" , VariantType::Bool, false , {" Disable the minimum bias trigger for skimmed data" }},
1801- {" out-file-unbinned" , VariantType::String, " time_series_tracks.root" , {" name of the output file for the unbinned data" }}}};
1810+ {" out-file-unbinned" , VariantType::String, " time_series_tracks.root" , {" name of the output file for the unbinned data" }},
1811+ {" max-occupancy-bins" , VariantType::Int, 912 , {" Maximum number of occupancy bins" }}}};
18021812}
18031813
18041814} // namespace tpc
0 commit comments