Skip to content

Commit ca2d76f

Browse files
author
alandou
committed
V0 analysis - add process_switch checks in init() - clang fix
1 parent a27ea06 commit ca2d76f

4 files changed

Lines changed: 48 additions & 48 deletions

File tree

PWGLF/TableProducer/lambdakzerobuilder.cxx

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ using namespace o2::framework;
6666
using namespace o2::framework::expressions;
6767
using std::array;
6868

69-
//use parameters + cov mat non-propagated, aux info + (extension propagated)
69+
// use parameters + cov mat non-propagated, aux info + (extension propagated)
7070
using FullTracksExt = soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksCov, aod::TracksDCA>;
7171
using FullTracksExtMC = soa::Join<FullTracksExt, aod::McTrackLabels>;
7272
using FullTracksExtIU = soa::Join<aod::TracksIU, aod::TracksExtra, aod::TracksCovIU, aod::TracksDCA>;
@@ -98,8 +98,8 @@ struct lambdakzeroBuilder {
9898

9999
int mRunNumber;
100100
float d_bz;
101-
float maxSnp; //max sine phi for propagation
102-
float maxStep; //max step size (cm) for propagation
101+
float maxSnp; // max sine phi for propagation
102+
float maxStep; // max step size (cm) for propagation
103103

104104
// for debugging
105105
#ifdef MY_DEBUG
@@ -141,8 +141,8 @@ struct lambdakzeroBuilder {
141141
// using namespace analysis::lambdakzerobuilder;
142142
mRunNumber = 0;
143143
d_bz = 0;
144-
maxSnp = 0.85f; //could be changed later
145-
maxStep = 2.00f; //could be changed later
144+
maxSnp = 0.85f; // could be changed later
145+
maxStep = 2.00f; // could be changed later
146146

147147
ccdb->setURL("http://alice-ccdb.cern.ch");
148148
ccdb->setCaching(true);
@@ -233,7 +233,7 @@ struct lambdakzeroBuilder {
233233
#endif
234234
MY_DEBUG_MSG(isK0SfromLc, LOG(info) << "V0 builder: found K0S from Lc, posTrack --> " << labelPos << ", negTrack --> " << labelNeg);
235235

236-
//value 0.5: any considered V0
236+
// value 0.5: any considered V0
237237
registry.fill(HIST("hV0Criteria"), 0.5);
238238
if (isRun2) {
239239
if (!(V0.posTrack_as<MyTracks>().trackType() & o2::aod::track::TPCrefit)) {
@@ -247,7 +247,7 @@ struct lambdakzeroBuilder {
247247
continue; // TPC refit
248248
}
249249
}
250-
//Passes TPC refit
250+
// Passes TPC refit
251251
registry.fill(HIST("hV0Criteria"), 1.5);
252252
if (V0.posTrack_as<MyTracks>().tpcNClsCrossedRows() < mincrossedrows) {
253253
MY_DEBUG_MSG(isK0SfromLc, LOG(info) << "posTrack " << labelPos << " has " << V0.posTrack_as<MyTracks>().tpcNClsCrossedRows() << " crossed rows, cut at " << mincrossedrows);
@@ -259,7 +259,7 @@ struct lambdakzeroBuilder {
259259
v0dataLink(-1);
260260
continue;
261261
}
262-
//passes crossed rows
262+
// passes crossed rows
263263
registry.fill(HIST("hV0Criteria"), 2.5);
264264
if (fabs(V0.posTrack_as<MyTracks>().dcaXY()) < dcapostopv) {
265265
MY_DEBUG_MSG(isK0SfromLc, LOG(info) << "posTrack " << labelPos << " has dcaXY " << V0.posTrack_as<MyTracks>().dcaXY() << " , cut at " << dcanegtopv);
@@ -272,7 +272,7 @@ struct lambdakzeroBuilder {
272272
continue;
273273
}
274274
MY_DEBUG_MSG(isK0SfromLc, LOG(info) << "Filling good indices: posTrack --> " << labelPos << ", negTrack --> " << labelNeg);
275-
//passes DCAxy
275+
// passes DCAxy
276276
registry.fill(HIST("hV0Criteria"), 3.5);
277277

278278
// Candidate building part
@@ -297,7 +297,7 @@ struct lambdakzeroBuilder {
297297
continue;
298298
}
299299

300-
//passes diff coll check
300+
// passes diff coll check
301301
registry.fill(HIST("hV0Criteria"), 4.5);
302302

303303
// Act on copies for minimization
@@ -312,7 +312,7 @@ struct lambdakzeroBuilder {
312312
continue;
313313
}
314314

315-
//passes V0 fitter minimization successfully
315+
// passes V0 fitter minimization successfully
316316
registry.fill(HIST("hV0Criteria"), 5.5);
317317

318318
double finalXpos = fitter.getTrack(0).getX();
@@ -338,7 +338,7 @@ struct lambdakzeroBuilder {
338338
continue;
339339
}
340340

341-
//Passes step 2 of V0 fitter
341+
// Passes step 2 of V0 fitter
342342
registry.fill(HIST("hV0Criteria"), 6.5);
343343

344344
pTrack.getPxPyPzGlo(pvec0);
@@ -358,7 +358,7 @@ struct lambdakzeroBuilder {
358358
continue;
359359
}
360360

361-
//Passes DCA between daughters check
361+
// Passes DCA between daughters check
362362
registry.fill(HIST("hV0Criteria"), 7.5);
363363

364364
auto V0CosinePA = RecoDecay::cpa(array{collision.posX(), collision.posY(), collision.posZ()}, array{pos[0], pos[1], pos[2]}, array{pvec0[0] + pvec1[0], pvec0[1] + pvec1[1], pvec0[2] + pvec1[2]});
@@ -368,7 +368,7 @@ struct lambdakzeroBuilder {
368368
continue;
369369
}
370370

371-
//Passes CosPA check
371+
// Passes CosPA check
372372
registry.fill(HIST("hV0Criteria"), 8.5);
373373

374374
auto V0radius = RecoDecay::sqrtSumOfSquares(pos[0], pos[1]); // probably find better name to differentiate the cut from the variable
@@ -378,7 +378,7 @@ struct lambdakzeroBuilder {
378378
continue;
379379
}
380380

381-
//Passes radius check
381+
// Passes radius check
382382
registry.fill(HIST("hV0Criteria"), 9.5);
383383

384384
MY_DEBUG_MSG(isK0SfromLc, LOG(info) << "in builder 1, keeping K0S candidate: posTrack --> " << labelPos << ", negTrack --> " << labelNeg);
@@ -435,7 +435,7 @@ struct lambdakzeroBuilder {
435435
#endif
436436
MY_DEBUG_MSG(isK0SfromLc, LOG(info) << "V0 builder: found K0S from Lc, posTrack --> " << labelPos << ", negTrack --> " << labelNeg);
437437

438-
//value 0.5: any considered V0
438+
// value 0.5: any considered V0
439439
registry.fill(HIST("hV0Criteria"), 0.5);
440440
if (isRun2) {
441441
if (!(V0.posTrack_as<MyTracksIU>().trackType() & o2::aod::track::TPCrefit)) {
@@ -449,7 +449,7 @@ struct lambdakzeroBuilder {
449449
continue; // TPC refit
450450
}
451451
}
452-
//Passes TPC refit
452+
// Passes TPC refit
453453
registry.fill(HIST("hV0Criteria"), 1.5);
454454
if (V0.posTrack_as<MyTracksIU>().tpcNClsCrossedRows() < mincrossedrows) {
455455
MY_DEBUG_MSG(isK0SfromLc, LOG(info) << "posTrack " << labelPos << " has " << V0.posTrack_as<MyTracksIU>().tpcNClsCrossedRows() << " crossed rows, cut at " << mincrossedrows);
@@ -461,7 +461,7 @@ struct lambdakzeroBuilder {
461461
v0dataLink(-1);
462462
continue;
463463
}
464-
//passes crossed rows
464+
// passes crossed rows
465465
registry.fill(HIST("hV0Criteria"), 2.5);
466466
if (fabs(V0.posTrack_as<MyTracksIU>().dcaXY()) < dcapostopv) {
467467
MY_DEBUG_MSG(isK0SfromLc, LOG(info) << "posTrack " << labelPos << " has dcaXY " << V0.posTrack_as<MyTracksIU>().dcaXY() << " , cut at " << dcanegtopv);
@@ -474,7 +474,7 @@ struct lambdakzeroBuilder {
474474
continue;
475475
}
476476
MY_DEBUG_MSG(isK0SfromLc, LOG(info) << "Filling good indices: posTrack --> " << labelPos << ", negTrack --> " << labelNeg);
477-
//passes DCAxy
477+
// passes DCAxy
478478
registry.fill(HIST("hV0Criteria"), 3.5);
479479

480480
// Candidate building part
@@ -499,7 +499,7 @@ struct lambdakzeroBuilder {
499499
continue;
500500
}
501501

502-
//passes diff coll check
502+
// passes diff coll check
503503
registry.fill(HIST("hV0Criteria"), 4.5);
504504

505505
// Act on copies for minimization
@@ -514,7 +514,7 @@ struct lambdakzeroBuilder {
514514
continue;
515515
}
516516

517-
//passes V0 fitter minimization successfully
517+
// passes V0 fitter minimization successfully
518518
registry.fill(HIST("hV0Criteria"), 5.5);
519519

520520
double finalXpos = fitter.getTrack(0).getX();
@@ -540,7 +540,7 @@ struct lambdakzeroBuilder {
540540
continue;
541541
}
542542

543-
//Passes step 2 of V0 fitter
543+
// Passes step 2 of V0 fitter
544544
registry.fill(HIST("hV0Criteria"), 6.5);
545545

546546
pTrack.getPxPyPzGlo(pvec0);
@@ -560,7 +560,7 @@ struct lambdakzeroBuilder {
560560
continue;
561561
}
562562

563-
//Passes DCA between daughters check
563+
// Passes DCA between daughters check
564564
registry.fill(HIST("hV0Criteria"), 7.5);
565565

566566
auto V0CosinePA = RecoDecay::cpa(array{collision.posX(), collision.posY(), collision.posZ()}, array{pos[0], pos[1], pos[2]}, array{pvec0[0] + pvec1[0], pvec0[1] + pvec1[1], pvec0[2] + pvec1[2]});
@@ -570,7 +570,7 @@ struct lambdakzeroBuilder {
570570
continue;
571571
}
572572

573-
//Passes CosPA check
573+
// Passes CosPA check
574574
registry.fill(HIST("hV0Criteria"), 8.5);
575575

576576
auto V0radius = RecoDecay::sqrtSumOfSquares(pos[0], pos[1]); // probably find better name to differentiate the cut from the variable
@@ -580,7 +580,7 @@ struct lambdakzeroBuilder {
580580
continue;
581581
}
582582

583-
//Passes radius check
583+
// Passes radius check
584584
registry.fill(HIST("hV0Criteria"), 9.5);
585585

586586
MY_DEBUG_MSG(isK0SfromLc, LOG(info) << "in builder 1, keeping K0S candidate: posTrack --> " << labelPos << ", negTrack --> " << labelNeg);

PWGLF/TableProducer/lambdakzerofinder.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ struct lambdakzerofinderQa {
277277
},
278278
};
279279

280-
void init(InitContext const&)
280+
void init(InitContext const&)
281281
{
282282
if (processRun3 && processRun2) {
283283
LOGF(fatal, "processRun3 and processRun2 are both set to true; try again with only one of them set to true");

PWGLF/Tasks/cascadeanalysis.cxx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ using namespace o2::framework::expressions;
5353
using std::array;
5454

5555
struct cascadeQa {
56-
//Basic checks
56+
// Basic checks
5757
HistogramRegistry registry{
5858
"registry",
5959
{
@@ -79,14 +79,14 @@ struct cascadeQa {
7979
void process(aod::Collision const& collision, aod::CascDataExt const& Cascades)
8080
{
8181
for (auto& casc : Cascades) {
82-
if (casc.sign() < 0) { //FIXME: could be done better...
82+
if (casc.sign() < 0) { // FIXME: could be done better...
8383
registry.fill(HIST("hMassXiMinus"), casc.mXi());
8484
registry.fill(HIST("hMassOmegaMinus"), casc.mOmega());
8585
} else {
8686
registry.fill(HIST("hMassXiPlus"), casc.mXi());
8787
registry.fill(HIST("hMassOmegaPlus"), casc.mOmega());
8888
}
89-
//The basic eleven!
89+
// The basic eleven!
9090
registry.fill(HIST("hV0Radius"), casc.v0radius());
9191
registry.fill(HIST("hCascRadius"), casc.cascradius());
9292
registry.fill(HIST("hV0CosPA"), casc.v0cosPA(collision.posX(), collision.posY(), collision.posZ()));
@@ -128,9 +128,9 @@ struct cascadeAnalysis {
128128
}
129129
}
130130

131-
//Selection criteria
132-
Configurable<double> v0cospa{"v0cospa", 0.999, "V0 CosPA"}; //double -> N.B. dcos(x)/dx = 0 at x=0)
133-
Configurable<double> casccospa{"casccospa", 0.999, "Casc CosPA"}; //double -> N.B. dcos(x)/dx = 0 at x=0)
131+
// Selection criteria
132+
Configurable<double> v0cospa{"v0cospa", 0.999, "V0 CosPA"}; // double -> N.B. dcos(x)/dx = 0 at x=0)
133+
Configurable<double> casccospa{"casccospa", 0.999, "Casc CosPA"}; // double -> N.B. dcos(x)/dx = 0 at x=0)
134134
Configurable<float> dcav0dau{"dcav0dau", 1.0, "DCA V0 Daughters"};
135135
Configurable<float> dcacascdau{"dcacascdau", .3, "DCA Casc Daughters"};
136136
Configurable<float> dcanegtopv{"dcanegtopv", .1, "DCA Neg To PV"};
@@ -152,13 +152,13 @@ struct cascadeAnalysis {
152152
return;
153153
}
154154
for (auto& casc : Cascades) {
155-
//FIXME: dynamic columns cannot be filtered on?
155+
// FIXME: dynamic columns cannot be filtered on?
156156
if (casc.v0radius() > v0radius &&
157157
casc.cascradius() > cascradius &&
158158
casc.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) > v0cospa &&
159159
casc.casccosPA(collision.posX(), collision.posY(), collision.posZ()) > casccospa &&
160160
casc.dcav0topv(collision.posX(), collision.posY(), collision.posZ()) > dcav0topv) {
161-
if (casc.sign() < 0) { //FIXME: could be done better...
161+
if (casc.sign() < 0) { // FIXME: could be done better...
162162
if (TMath::Abs(casc.yXi()) < 0.5) {
163163
registry.fill(HIST("h3dMassXiMinus"), 0., casc.pt(), casc.mXi());
164164
}
@@ -187,13 +187,13 @@ struct cascadeAnalysis {
187187
return;
188188
}
189189
for (auto& casc : Cascades) {
190-
//FIXME: dynamic columns cannot be filtered on?
190+
// FIXME: dynamic columns cannot be filtered on?
191191
if (casc.v0radius() > v0radius &&
192192
casc.cascradius() > cascradius &&
193193
casc.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) > v0cospa &&
194194
casc.casccosPA(collision.posX(), collision.posY(), collision.posZ()) > casccospa &&
195195
casc.dcav0topv(collision.posX(), collision.posY(), collision.posZ()) > dcav0topv) {
196-
if (casc.sign() < 0) { //FIXME: could be done better...
196+
if (casc.sign() < 0) { // FIXME: could be done better...
197197
if (TMath::Abs(casc.yXi()) < 0.5) {
198198
registry.fill(HIST("h3dMassXiMinus"), collision.centRun2V0M(), casc.pt(), casc.mXi());
199199
}

PWGLF/Tasks/lambdakzeroanalysis.cxx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ using std::array;
5555
using MyTracks = soa::Join<aod::Tracks, aod::TracksExtra, aod::pidTPCPr>;
5656

5757
struct lambdakzeroQa {
58-
//Basic checks
58+
// Basic checks
5959
HistogramRegistry registry{
6060
"registry",
6161
{
@@ -129,8 +129,8 @@ struct lambdakzeroAnalysis {
129129
}
130130
}
131131

132-
//Selection criteria
133-
Configurable<double> v0cospa{"v0cospa", 0.995, "V0 CosPA"}; //double -> N.B. dcos(x)/dx = 0 at x=0)
132+
// Selection criteria
133+
Configurable<double> v0cospa{"v0cospa", 0.995, "V0 CosPA"}; // double -> N.B. dcos(x)/dx = 0 at x=0)
134134
Configurable<float> dcav0dau{"dcav0dau", 1.0, "DCA V0 Daughters"};
135135
Configurable<float> dcanegtopv{"dcanegtopv", .1, "DCA Neg To PV"};
136136
Configurable<float> dcapostopv{"dcapostopv", .1, "DCA Pos To PV"};
@@ -156,22 +156,22 @@ struct lambdakzeroAnalysis {
156156
registry.fill(HIST("hSelectedEventCounter"), 0.5);
157157

158158
for (auto& v0 : fullV0s) {
159-
//FIXME: could not find out how to filter cosPA and radius variables (dynamic columns)
159+
// FIXME: could not find out how to filter cosPA and radius variables (dynamic columns)
160160
if (v0.v0radius() > v0radius && v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) > v0cospa) {
161161
if (TMath::Abs(v0.yLambda()) < rapidity) {
162162
if (v0.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * RecoDecay::getMassPDG(kLambda0) < lifetimecut->get("lifetimecutLambda")) {
163163

164164
// Lambda
165-
if (TMath::Abs(v0.posTrack_as<MyTracks>().tpcNSigmaPr()) < TpcPidNsigmaCut) { //previous 900Gev pp analysis had nSigma< 5 for pt<0.7Gev and tpcNSigmaStorePi<3 for pt>0.7GeV; and no cut on K0S
166-
registry.fill(HIST("h3dMassLambda"), 0., v0.pt(), v0.mLambda()); //collision.centV0M() instead of 0. once available
165+
if (TMath::Abs(v0.posTrack_as<MyTracks>().tpcNSigmaPr()) < TpcPidNsigmaCut) { // previous 900Gev pp analysis had nSigma< 5 for pt<0.7Gev and tpcNSigmaStorePi<3 for pt>0.7GeV; and no cut on K0S
166+
registry.fill(HIST("h3dMassLambda"), 0., v0.pt(), v0.mLambda()); // collision.centV0M() instead of 0. once available
167167
registry.fill(HIST("hArmenterosPostAnalyserCuts"), v0.alpha(), v0.qtarm());
168168
if (saveDcaHist == 1) {
169169
registry.fill(HIST("h3dMassLambdaDca"), v0.dcaV0daughters(), v0.pt(), v0.mLambda());
170170
}
171171
}
172172

173173
// AntiLambda
174-
if (TMath::Abs(v0.negTrack_as<MyTracks>().tpcNSigmaPr()) < TpcPidNsigmaCut) { //previous 900Gev pp analysis had nSigma< 5 for pt<0.7Gev and tpcNSigmaStorePi<3 for pt>0.7GeV; and no cut on K0S
174+
if (TMath::Abs(v0.negTrack_as<MyTracks>().tpcNSigmaPr()) < TpcPidNsigmaCut) { // previous 900Gev pp analysis had nSigma< 5 for pt<0.7Gev and tpcNSigmaStorePi<3 for pt>0.7GeV; and no cut on K0S
175175
registry.fill(HIST("h3dMassAntiLambda"), 0., v0.pt(), v0.mAntiLambda());
176176
registry.fill(HIST("hArmenterosPostAnalyserCuts"), v0.alpha(), v0.qtarm());
177177
if (saveDcaHist == 1) {
@@ -181,7 +181,7 @@ struct lambdakzeroAnalysis {
181181
}
182182
}
183183

184-
//K0Short
184+
// K0Short
185185
if (TMath::Abs(v0.yK0Short()) < rapidity) {
186186
if (v0.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * RecoDecay::getMassPDG(kK0Short) < lifetimecut->get("lifetimecutK0S")) {
187187
if ((v0.qtarm() > paramArmenterosCut * TMath::Abs(v0.alpha())) || !boolArmenterosCut) {
@@ -209,13 +209,13 @@ struct lambdakzeroAnalysis {
209209
registry.fill(HIST("hSelectedEventCounter"), 0.5);
210210

211211
for (auto& v0 : fullV0s) {
212-
//FIXME: could not find out how to filter cosPA and radius variables (dynamic columns)
212+
// FIXME: could not find out how to filter cosPA and radius variables (dynamic columns)
213213
if (v0.v0radius() > v0radius && v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) > v0cospa) {
214214
if (TMath::Abs(v0.yLambda()) < rapidity) {
215215
if (v0.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * RecoDecay::getMassPDG(kLambda0) < lifetimecut->get("lifetimecutLambda")) {
216216

217217
// Lambda
218-
if (TMath::Abs(v0.posTrack_as<MyTracks>().tpcNSigmaPr()) < TpcPidNsigmaCut) { //previous 900Gev pp analysis had nSigma< 5 for pt<0.7Gev and tpcNSigmaStorePi<3 for pt>0.7GeV; and no cut on K0S
218+
if (TMath::Abs(v0.posTrack_as<MyTracks>().tpcNSigmaPr()) < TpcPidNsigmaCut) { // previous 900Gev pp analysis had nSigma< 5 for pt<0.7Gev and tpcNSigmaStorePi<3 for pt>0.7GeV; and no cut on K0S
219219
registry.fill(HIST("h3dMassLambda"), collision.centRun2V0M(), v0.pt(), v0.mLambda());
220220
registry.fill(HIST("hArmenterosPostAnalyserCuts"), v0.alpha(), v0.qtarm());
221221
if (saveDcaHist == 1) {
@@ -224,7 +224,7 @@ struct lambdakzeroAnalysis {
224224
}
225225

226226
// AntiLambda
227-
if (TMath::Abs(v0.negTrack_as<MyTracks>().tpcNSigmaPr()) < TpcPidNsigmaCut) { //previous 900Gev pp analysis had nSigma< 5 for pt<0.7Gev and tpcNSigmaStorePi<3 for pt>0.7GeV; and no cut on K0S
227+
if (TMath::Abs(v0.negTrack_as<MyTracks>().tpcNSigmaPr()) < TpcPidNsigmaCut) { // previous 900Gev pp analysis had nSigma< 5 for pt<0.7Gev and tpcNSigmaStorePi<3 for pt>0.7GeV; and no cut on K0S
228228
registry.fill(HIST("h3dMassAntiLambda"), collision.centRun2V0M(), v0.pt(), v0.mAntiLambda());
229229
registry.fill(HIST("hArmenterosPostAnalyserCuts"), v0.alpha(), v0.qtarm());
230230
if (saveDcaHist == 1) {
@@ -234,7 +234,7 @@ struct lambdakzeroAnalysis {
234234
}
235235
}
236236

237-
//K0Short
237+
// K0Short
238238
if (TMath::Abs(v0.yK0Short()) < rapidity) {
239239
if (v0.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * RecoDecay::getMassPDG(kK0Short) < lifetimecut->get("lifetimecutK0S")) {
240240
if ((v0.qtarm() > paramArmenterosCut * v0.alpha()) || !boolArmenterosCut) {

0 commit comments

Comments
 (0)