Skip to content

Commit 25d674a

Browse files
committed
Updated format tableDiffWake 2
1 parent 5edc2ad commit 25d674a

1 file changed

Lines changed: 78 additions & 78 deletions

File tree

PWGJE/TableProducer/tableDiffWake.cxx

Lines changed: 78 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -75,29 +75,29 @@ namespace o2::aod
7575
{
7676
namespace testcol
7777
{
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);
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);
9090
} // namespace testcol
9191
namespace testtrack
9292
{
9393

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);
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);
101101
} // namespace testtrack
102102
DECLARE_SOA_TABLE(TableCol, "AOD", "TABLECOL",
103103
testcol::Gi,
@@ -116,8 +116,8 @@ DECLARE_SOA_TABLE(TableTrack, "AOD", "TABLETRACK",
116116
testtrack::Charge,
117117
testtrack::P,
118118
testtrack::Dedx,
119-
testtrack::DCAXY,
120-
testtrack::DCAZ);
119+
testtrack::Dcaxy,
120+
testtrack::Dcaz);
121121
} // namespace o2::aod
122122
//--------------------------------------------------------
123123
using namespace o2;
@@ -127,9 +127,9 @@ struct tableDiffWake {
127127

128128
HistogramRegistry histos{"histos", {}, OutputObjHandlingPolicy::AnalysisObject};
129129
Configurable<int> nBinsPt{"nBinsPt", 100, "N bins in pT histo"};
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"};
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"};
133133

134134
Produces<o2::aod::TableCol> testcol;
135135
Produces<o2::aod::TableTrack> testtrack;
@@ -146,8 +146,8 @@ struct tableDiffWake {
146146
}
147147

148148
using bcs = aod::BCs;
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,
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,
151151
bcs const&)
152152
{
153153
// Event selection corresponds to sel8FullPbPb
@@ -182,13 +182,13 @@ struct tableDiffWake {
182182
eventHighpT = true;
183183
break;
184184
}
185-
}
185+
}
186186
if (!eventHighpT)
187187
return;
188188
//------------------------------------------------------------
189189
// 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);
190+
Short_t Substitute_ep2 = (Short_t)(ep2 * 1000);
191+
Short_t Substitute_ep3 = (Short_t)(ep3 * 1000);
192192

193193
testcol(col.globalIndex(),
194194
run,
@@ -204,63 +204,63 @@ struct tableDiffWake {
204204

205205
for (auto& track : tracks) {
206206

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

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

214-
//------------ Translate values to less memory consuming values --------------------
215-
// Px, Py, Pz
216-
ULong64_t Substitute_p = 0;
214+
//------------ Translate values to less memory consuming values --------------------
215+
// Px, Py, Pz
216+
ULong64_t Substitute_p = 0;
217217

218-
Long64_t Particle_px = (track.px() * 6000);
219-
if (Particle_px < 0)
220-
Substitute_p |= (ULong64_t)1 << 20;
221-
if (Particle_px < 0)
222-
Particle_px = (-1) * Particle_px;
223-
for (Int_t i_bit = 0; i_bit < 20; i_bit++) {
224-
if ((Particle_px & ((Long64_t)1 << i_bit)))
225-
Substitute_p |= (ULong64_t)1 << i_bit;
226-
};
218+
Long64_t Particle_px = (track.px() * 6000);
219+
if (Particle_px < 0)
220+
Substitute_p |= (ULong64_t)1 << 20;
221+
if (Particle_px < 0)
222+
Particle_px = (-1) * Particle_px;
223+
for (Int_t i_bit = 0; i_bit < 20; i_bit++) {
224+
if ((Particle_px & ((Long64_t)1 << i_bit)))
225+
Substitute_p |= (ULong64_t)1 << i_bit;
226+
};
227227

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-
};
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+
};
238238

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-
};
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+
};
249249

250-
//dEdx
251-
UShort_t Substitute_dEdx = (UShort_t)(track.tpcSignal()*10);
250+
//dEdx
251+
UShort_t Substitute_dEdx = (UShort_t)(track.tpcSignal() * 10);
252252

253-
//DCA
254-
Short_t Substitute_DCAXY = (Short_t)(track.dcaXY()*100);
255-
Short_t Substitute_DCAZ = (Short_t)(track.dcaZ()*100);
253+
//DCA
254+
Short_t Substitute_DCAXY = (Short_t)(track.dcaXY() * 100);
255+
Short_t Substitute_DCAZ = (Short_t)(track.dcaZ() * 100);
256256

257-
//--------------- Fill track table ------------------
258-
testtrack(track.collisionId(),
259-
track.sign(),
260-
Substitute_p,
261-
Substitute_dEdx,
262-
Substitute_DCAXY,
263-
Substitute_DCAZ);
257+
//--------------- Fill track table ------------------
258+
testtrack(track.collisionId(),
259+
track.sign(),
260+
Substitute_p,
261+
Substitute_dEdx,
262+
Substitute_DCAXY,
263+
Substitute_DCAZ);
264264
}
265265
}
266266
};

0 commit comments

Comments
 (0)