1616
1717#include < Framework/ASoA.h>
1818#include < Framework/AnalysisDataModel.h>
19+ #include < Framework/AnalysisHelpers.h>
1920#include < Framework/AnalysisTask.h>
2021#include < Framework/HistogramRegistry.h>
2122#include < Framework/HistogramSpec.h>
2223#include < Framework/InitContext.h>
2324#include < Framework/OutputObjHeader.h>
2425#include < Framework/runDataProcessing.h>
25- #include < Framework/AnalysisHelpers.h>
2626// For centrality:
27- #include " Common/DataModel/EventSelection.h"
2827#include " Common/DataModel/Centrality.h"
28+ #include " Common/DataModel/EventSelection.h"
2929// For TPC Mult
3030#include " Common/DataModel/Multiplicity.h"
3131// For DCA and TrackSelection
4242TRACK DATA
4343-------------------------------------------------------------------------------------------
4444BEFORE COMPRESSION AFTER COMPRESSION
45- Name Data Type Size(b) Name Data Type Size(b)
45+ Name Data Type Size(b) Name Data Type Size(b)
4646ColID int32_t 4 [same]
4747Charge short 2 [same]
4848Px, Py, Pz float 3x4 P unsigned long 8
@@ -71,53 +71,54 @@ OVERALL COMPRESSION 40b->36b
7171*/
7272
7373// --------------------------------------------------------
74- namespace o2 ::aod {
74+ namespace o2 ::aod
75+ {
7576namespace testcol
7677{
7778 // Event properties
78- DECLARE_SOA_COLUMN (GI , gi, int64_t );
79- DECLARE_SOA_COLUMN (RN , rn, int ); // run number
79+ DECLARE_SOA_COLUMN (Gi , gi, int64_t );
80+ DECLARE_SOA_COLUMN (Rn , rn, int ); // run number
8081 DECLARE_SOA_COLUMN (Cent, cent, float ); // FT0C centrality
8182 DECLARE_SOA_COLUMN (Mult, mult, int ); // TPC multiplicity
8283 DECLARE_SOA_COLUMN (Occu, occu, int ); // Occupancy ITS
83- DECLARE_SOA_COLUMN (OccuFT0 , occuft0, float ); // Occupancy FT0C amplitudes
84+ DECLARE_SOA_COLUMN (Occuft0 , occuft0, float ); // Occupancy FT0C amplitudes
8485 DECLARE_SOA_COLUMN (VertexX, vertexX, float );
8586 DECLARE_SOA_COLUMN (VertexY, vertexY, float );
8687 DECLARE_SOA_COLUMN (VertexZ, vertexZ, float );
8788 DECLARE_SOA_COLUMN (Psi2, psi2, short );
8889 DECLARE_SOA_COLUMN (Psi3, psi3, short );
89- }
90+ } // namespace testcol
9091namespace testtrack
9192{
9293
9394 // Track properties
94- DECLARE_SOA_COLUMN (ColID , colid, int32_t ); // Collision ID
95+ DECLARE_SOA_COLUMN (Colid , colid, int32_t ); // Collision ID
9596 DECLARE_SOA_COLUMN (Charge, charge, short );
9697 DECLARE_SOA_COLUMN (P, p, unsigned long );
97- DECLARE_SOA_COLUMN (DEdx , dedx, unsigned short );
98+ DECLARE_SOA_COLUMN (Dedx , dedx, unsigned short );
9899 DECLARE_SOA_COLUMN (DCAXY , dcaxy, short );
99100 DECLARE_SOA_COLUMN (DCAZ , dcaz, short );
100- }
101+ } // namespace testtrack
101102DECLARE_SOA_TABLE (TableCol, " AOD" , " TABLECOL" ,
102- testcol::GI ,
103- testcol::RN ,
103+ testcol::Gi ,
104+ testcol::Rn ,
104105 testcol::Cent,
105106 testcol::Mult,
106107 testcol::Occu,
107- testcol::OccuFT0 ,
108+ testcol::Occuft0 ,
108109 testcol::VertexX,
109110 testcol::VertexY,
110111 testcol::VertexZ,
111112 testcol::Psi2,
112113 testcol::Psi3);
113114DECLARE_SOA_TABLE (TableTrack, " AOD" , " TABLETRACK" ,
114- testtrack::ColID ,
115+ testtrack::Colid ,
115116 testtrack::Charge,
116117 testtrack::P,
117- testtrack::DEdx ,
118+ testtrack::Dedx ,
118119 testtrack::DCAXY ,
119120 testtrack::DCAZ );
120- }
121+ } // namespace o2::aod
121122// --------------------------------------------------------
122123using namespace o2 ;
123124using namespace o2 ::framework;
@@ -126,9 +127,9 @@ struct tableDiffWake {
126127
127128 HistogramRegistry histos{" histos" , {}, OutputObjHandlingPolicy::AnalysisObject};
128129 Configurable<int > nBinsPt{" nBinsPt" , 100 , " N bins in pT histo" };
129- Configurable<double > pT_thresh{" pT_thresh" ,20.0 ," pT threshold" };
130- Configurable<float > cent_max{" cent_max" ,10 ," centrality" };
131- Configurable<float > z_vert_cut{" z_vert_cut" ,10.0 ," z_vertex cut" };
130+ Configurable<double > pT_thresh{" pT_thresh" ,20.0 ," pT threshold" };
131+ Configurable<float > cent_max{" cent_max" ,10 ," centrality" };
132+ Configurable<float > z_vert_cut{" z_vert_cut" ,10.0 ," z_vertex cut" };
132133
133134 Produces<o2::aod::TableCol> testcol;
134135 Produces<o2::aod::TableTrack> testtrack;
@@ -146,7 +147,7 @@ struct tableDiffWake {
146147
147148 using bcs = aod::BCs;
148149 void process (soa::Join<aod::Collisions, aod::EvSels,aod::CentFT0Cs, aod::TPCMults, aod::QvectorFT0Cs>::iterator const & col,
149- soa::Join<aod::TracksIU,aod::TracksExtra, aod::TracksDCA, aod::TrackSelection> const & tracks,
150+ soa::Join<aod::TracksIU,aod::TracksExtra, aod::TracksDCA, aod::TrackSelection> const & tracks,
150151 bcs const &)
151152 {
152153 // Event selection corresponds to sel8FullPbPb
@@ -182,80 +183,90 @@ struct tableDiffWake {
182183 break ;
183184 }
184185 }
185- if (!eventHighpT) return ;
186- // ------------------------------------------------------------
187- // Translate values to less memory consuming values
188- Short_t Substitute_ep2 = (Short_t)(ep2*1000 );
189- Short_t Substitute_ep3 = (Short_t)(ep3*1000 );
186+ if (!eventHighpT)
187+ return ;
188+ // ------------------------------------------------------------
189+ // Translate values to less memory consuming values
190+ Short_t Substitute_ep2 = (Short_t)(ep2*1000 );
191+ Short_t Substitute_ep3 = (Short_t)(ep3*1000 );
190192
191- testcol (col.globalIndex (),
192- run,
193- col.centFT0C (),
194- col.multTPC (),
195- col.trackOccupancyInTimeRange (),
196- col.ft0cOccupancyInTimeRange (),
197- col.posX (),
198- col.posY (),
199- col.posZ (),
200- Substitute_ep2,
201- Substitute_ep3);
193+ testcol (col.globalIndex (),
194+ run,
195+ col.centFT0C (),
196+ col.multTPC (),
197+ col.trackOccupancyInTimeRange (),
198+ col.ft0cOccupancyInTimeRange (),
199+ col.posX (),
200+ col.posY (),
201+ col.posZ (),
202+ Substitute_ep2,
203+ Substitute_ep3);
202204
203- for (auto & track : tracks) {
205+ for (auto & track : tracks) {
204206
205207 // Track cut
206208 if (!track.isGlobalTrack ())
207- continue ; // General track cuts
209+ continue ; // General track cuts
208210
209211 histos.fill (HIST (" etaHistogram" ), track.eta ());
210212 histos.fill (HIST (" pTHistogram" ), track.pt ());
211213
212214 // ------------ Translate values to less memory consuming values --------------------
213215 // Px, Py, Pz
214216 ULong64_t Substitute_p = 0 ;
217+
215218 Long64_t Particle_px = (track.px () * 6000 );
216219 if (Particle_px < 0 )
217- Substitute_p |= (ULong64_t)1 << 20 ;
220+ Substitute_p |= (ULong64_t)1 << 20 ;
218221 if (Particle_px < 0 )
219- Particle_px = (-1 ) * Particle_px;
222+ Particle_px = (-1 ) * Particle_px;
220223 for (Int_t i_bit = 0 ; i_bit < 20 ; i_bit++) {
221- if ((Particle_px & ((Long64_t)1 << i_bit)))
222- Substitute_p |= (ULong64_t)1 << i_bit;
224+ if ((Particle_px & ((Long64_t)1 << i_bit)))
225+ Substitute_p |= (ULong64_t)1 << i_bit;
223226 };
224- Long64_t Particle_py = (track.py ()*6000 );
225- if (Particle_py < 0 ) Substitute_p |=(ULong64_t)1 << 41 ;
226- if (Particle_py < 0 ) Particle_py = (-1 )*Particle_py;
227- for (Int_t i_bit = 21 ; i_bit < 41 ;i_bit++)
228- {
229- if ((Particle_py & ((Long64_t)1 << (i_bit-21 )))) Substitute_p |= (ULong64_t)1 << i_bit;
230- };
231- Long64_t Particle_pz = (track.pz ()*6000 );
232- if (Particle_pz < 0 ) Substitute_p |=(ULong64_t)1 << 62 ;
233- if (Particle_pz < 0 ) Particle_pz = (-1 )*Particle_pz;
234- for (Int_t i_bit = 42 ; i_bit < 62 ;i_bit++)
235- {
236- if ((Particle_pz & ((Long64_t)1 << (i_bit-42 )))) Substitute_p |= (ULong64_t)1 << i_bit;
237- };
238227
239- // dEdx
240- UShort_t Substitute_dEdx = (UShort_t)(track.tpcSignal ()*10 );
228+ Long64_t Particle_py = (track.py ()*6000 );
229+ if (Particle_py < 0 )
230+ Substitute_p |=(ULong64_t)1 << 41 ;
231+ if (Particle_py < 0 )
232+ Particle_py = (-1 )*Particle_py;
233+ for (Int_t i_bit = 21 ; i_bit < 41 ;i_bit++)
234+ {
235+ if ((Particle_py & ((Long64_t)1 << (i_bit-21 ))))
236+ Substitute_p |= (ULong64_t)1 << i_bit;
237+ };
241238
242- // DCA
243- Short_t Substitute_DCAXY = (Short_t)(track.dcaXY ()*100 );
244- Short_t Substitute_DCAZ = (Short_t)(track.dcaZ ()*100 );
239+ Long64_t Particle_pz = (track.pz ()*6000 );
240+ if (Particle_pz < 0 )
241+ Substitute_p |=(ULong64_t)1 << 62 ;
242+ if (Particle_pz < 0 )
243+ Particle_pz = (-1 )*Particle_pz;
244+ for (Int_t i_bit = 42 ; i_bit < 62 ;i_bit++)
245+ {
246+ if ((Particle_pz & ((Long64_t)1 << (i_bit-42 ))))
247+ Substitute_p |= (ULong64_t)1 << i_bit;
248+ };
245249
246- // --------------- Fill track table ------------------
247- testtrack (track.collisionId (),
248- track.sign (),
249- Substitute_p,
250- Substitute_dEdx,
251- Substitute_DCAXY,
252- Substitute_DCAZ);
253- }
250+ // dEdx
251+ UShort_t Substitute_dEdx = (UShort_t)(track.tpcSignal ()*10 );
252+
253+ // DCA
254+ Short_t Substitute_DCAXY = (Short_t)(track.dcaXY ()*100 );
255+ Short_t Substitute_DCAZ = (Short_t)(track.dcaZ ()*100 );
256+
257+ // --------------- Fill track table ------------------
258+ testtrack (track.collisionId (),
259+ track.sign (),
260+ Substitute_p,
261+ Substitute_dEdx,
262+ Substitute_DCAXY,
263+ Substitute_DCAZ);
264+ }
254265 }
255266};
256267
257268WorkflowSpec defineDataProcessing (ConfigContext const & cfgc)
258269{
259- return WorkflowSpec{
260- adaptAnalysisTask<tableDiffWake>(cfgc)};
270+ return WorkflowSpec{
271+ adaptAnalysisTask<tableDiffWake>(cfgc)};
261272}
0 commit comments