Skip to content

Commit b740191

Browse files
committed
Please consider the following formatting changes
1 parent b6b1b56 commit b740191

1 file changed

Lines changed: 99 additions & 93 deletions

File tree

PWGJE/TableProducer/tableDiffWake.cxx

Lines changed: 99 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@
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
@@ -42,7 +42,7 @@
4242
TRACK DATA
4343
-------------------------------------------------------------------------------------------
4444
BEFORE 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)
4646
ColID int32_t 4 [same]
4747
Charge short 2 [same]
4848
Px, Py, Pz float 3x4 P unsigned long 8
@@ -71,33 +71,34 @@ OVERALL COMPRESSION 40b->36b
7171
*/
7272

7373
//--------------------------------------------------------
74-
namespace o2::aod {
74+
namespace o2::aod
75+
{
7576
namespace testcol
7677
{
77-
// Event properties
78-
DECLARE_SOA_COLUMN(GI, gi, int64_t);
79-
DECLARE_SOA_COLUMN(RN, rn, int); // run number
80-
DECLARE_SOA_COLUMN(Cent, cent, float); // FT0C centrality
81-
DECLARE_SOA_COLUMN(Mult, mult, int); // TPC multiplicity
82-
DECLARE_SOA_COLUMN(Occu, occu, int); // Occupancy ITS
83-
DECLARE_SOA_COLUMN(OccuFT0, occuft0, float); // Occupancy FT0C amplitudes
84-
DECLARE_SOA_COLUMN(VertexX, vertexX, float);
85-
DECLARE_SOA_COLUMN(VertexY, vertexY, float);
86-
DECLARE_SOA_COLUMN(VertexZ, vertexZ, float);
87-
DECLARE_SOA_COLUMN(Psi2, psi2, short);
88-
DECLARE_SOA_COLUMN(Psi3, psi3, short);
89-
}
78+
// Event properties
79+
DECLARE_SOA_COLUMN(GI, gi, int64_t);
80+
DECLARE_SOA_COLUMN(RN, rn, int); // run number
81+
DECLARE_SOA_COLUMN(Cent, cent, float); // FT0C centrality
82+
DECLARE_SOA_COLUMN(Mult, mult, int); // TPC multiplicity
83+
DECLARE_SOA_COLUMN(Occu, occu, int); // Occupancy ITS
84+
DECLARE_SOA_COLUMN(OccuFT0, occuft0, float); // Occupancy FT0C amplitudes
85+
DECLARE_SOA_COLUMN(VertexX, vertexX, float);
86+
DECLARE_SOA_COLUMN(VertexY, vertexY, float);
87+
DECLARE_SOA_COLUMN(VertexZ, vertexZ, float);
88+
DECLARE_SOA_COLUMN(Psi2, psi2, short);
89+
DECLARE_SOA_COLUMN(Psi3, psi3, short);
90+
} // namespace testcol
9091
namespace testtrack
9192
{
9293

93-
// Track properties
94-
DECLARE_SOA_COLUMN(ColID, colid, int32_t); // Collision ID
95-
DECLARE_SOA_COLUMN(Charge, charge, short);
96-
DECLARE_SOA_COLUMN(P, p, unsigned long);
97-
DECLARE_SOA_COLUMN(DEdx, dedx, unsigned short);
98-
DECLARE_SOA_COLUMN(DCAXY, dcaxy, short);
99-
DECLARE_SOA_COLUMN(DCAZ, dcaz, short);
100-
}
94+
// Track properties
95+
DECLARE_SOA_COLUMN(ColID, colid, int32_t); // Collision ID
96+
DECLARE_SOA_COLUMN(Charge, charge, short);
97+
DECLARE_SOA_COLUMN(P, p, unsigned long);
98+
DECLARE_SOA_COLUMN(DEdx, dedx, unsigned short);
99+
DECLARE_SOA_COLUMN(DCAXY, dcaxy, short);
100+
DECLARE_SOA_COLUMN(DCAZ, dcaz, short);
101+
} // namespace testtrack
101102
DECLARE_SOA_TABLE(TableCol, "AOD", "TABLECOL",
102103
testcol::GI,
103104
testcol::RN,
@@ -117,7 +118,7 @@ DECLARE_SOA_TABLE(TableTrack, "AOD", "TABLETRACK",
117118
testtrack::DEdx,
118119
testtrack::DCAXY,
119120
testtrack::DCAZ);
120-
}
121+
} // namespace o2::aod
121122
//--------------------------------------------------------
122123
using namespace o2;
123124
using 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;
@@ -145,8 +146,8 @@ struct tableDiffWake {
145146
}
146147

147148
using bcs = aod::BCs;
148-
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,
149+
void process(soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Cs, aod::TPCMults, aod::QvectorFT0Cs>::iterator const& col,
150+
soa::Join<aod::TracksIU, aod::TracksExtra, aod::TracksDCA, aod::TrackSelection> const& tracks,
150151
bcs const&)
151152
{
152153
// Event selection corresponds to sel8FullPbPb
@@ -181,76 +182,81 @@ struct tableDiffWake {
181182
eventHighpT = true;
182183
break;
183184
}
184-
}
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);
185+
}
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

205-
// Track cut
206-
if (!track.isGlobalTrack())
207-
continue; // General track cuts
207+
// Track cut
208+
if (!track.isGlobalTrack())
209+
continue; // General track cuts
208210

209-
histos.fill(HIST("etaHistogram"), track.eta());
210-
histos.fill(HIST("pTHistogram"), track.pt());
211+
histos.fill(HIST("etaHistogram"), track.eta());
212+
histos.fill(HIST("pTHistogram"), track.pt());
211213

212-
//------------ Translate values to less memory consuming values --------------------
213-
// Px, Py, Pz
214-
ULong64_t Substitute_p = 0;
215-
Long64_t Particle_px = (track.px() * 6000);
216-
if (Particle_px < 0)
217-
Substitute_p |= (ULong64_t)1 << 20;
218-
if (Particle_px < 0)
219-
Particle_px = (-1) * Particle_px;
220-
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;
223-
};
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-
};
214+
//------------ Translate values to less memory consuming values --------------------
215+
// Px, Py, Pz
216+
ULong64_t Substitute_p = 0;
217+
Long64_t Particle_px = (track.px() * 6000);
218+
if (Particle_px < 0)
219+
Substitute_p |= (ULong64_t)1 << 20;
220+
if (Particle_px < 0)
221+
Particle_px = (-1) * Particle_px;
222+
for (Int_t i_bit = 0; i_bit < 20; i_bit++) {
223+
if ((Particle_px & ((Long64_t)1 << i_bit)))
224+
Substitute_p |= (ULong64_t)1 << i_bit;
225+
};
226+
Long64_t Particle_py = (track.py() * 6000);
227+
if (Particle_py < 0)
228+
Substitute_p |= (ULong64_t)1 << 41;
229+
if (Particle_py < 0)
230+
Particle_py = (-1) * Particle_py;
231+
for (Int_t i_bit = 21; i_bit < 41; i_bit++) {
232+
if ((Particle_py & ((Long64_t)1 << (i_bit - 21))))
233+
Substitute_p |= (ULong64_t)1 << i_bit;
234+
};
235+
Long64_t Particle_pz = (track.pz() * 6000);
236+
if (Particle_pz < 0)
237+
Substitute_p |= (ULong64_t)1 << 62;
238+
if (Particle_pz < 0)
239+
Particle_pz = (-1) * Particle_pz;
240+
for (Int_t i_bit = 42; i_bit < 62; i_bit++) {
241+
if ((Particle_pz & ((Long64_t)1 << (i_bit - 42))))
242+
Substitute_p |= (ULong64_t)1 << i_bit;
243+
};
238244

239-
//dEdx
240-
UShort_t Substitute_dEdx = (UShort_t)(track.tpcSignal()*10);
245+
// dEdx
246+
UShort_t Substitute_dEdx = (UShort_t)(track.tpcSignal() * 10);
241247

242-
//DCA
243-
Short_t Substitute_DCAXY = (Short_t)(track.dcaXY()*100);
244-
Short_t Substitute_DCAZ = (Short_t)(track.dcaZ()*100);
248+
// DCA
249+
Short_t Substitute_DCAXY = (Short_t)(track.dcaXY() * 100);
250+
Short_t Substitute_DCAZ = (Short_t)(track.dcaZ() * 100);
245251

246-
//--------------- Fill track table ------------------
247-
testtrack(track.collisionId(),
248-
track.sign(),
249-
Substitute_p,
250-
Substitute_dEdx,
251-
Substitute_DCAXY,
252-
Substitute_DCAZ);
253-
}
252+
//--------------- Fill track table ------------------
253+
testtrack(track.collisionId(),
254+
track.sign(),
255+
Substitute_p,
256+
Substitute_dEdx,
257+
Substitute_DCAXY,
258+
Substitute_DCAZ);
259+
}
254260
}
255261
};
256262

0 commit comments

Comments
 (0)