Skip to content

Commit bc549a5

Browse files
fix filtering and minor edits (#5245)
1 parent d421a94 commit bc549a5

File tree

2 files changed

+23
-9
lines changed

2 files changed

+23
-9
lines changed

Analysis/Tasks/PWGLF/lambdakzeroanalysis.cxx

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,12 @@ struct lambdakzeroanalysis {
9090
Configurable<float> dcanegtopv{"dcanegtopv", .1, "DCA Neg To PV"};
9191
Configurable<float> dcapostopv{"dcapostopv", .1, "DCA Pos To PV"};
9292
Configurable<float> v0radius{"v0radius", 5.0, "v0radius"};
93+
Configurable<float> rapidity{"rapidity", 0.5, "rapidity"};
9394

94-
Filter preFilterV0 = aod::v0data::dcapostopv > dcapostopv&&
95-
aod::v0data::dcanegtopv > dcanegtopv&& aod::v0data::dcaV0daughters < dcav0dau;
95+
// Filter preFilterV0 = aod::v0data::dcapostopv > dcapostopv&&
96+
// aod::v0data::dcanegtopv > dcanegtopv&& aod::v0data::dcaV0daughters < dcav0dau; we can use this again once (and if) math expressions can be used there
9697

97-
void process(soa::Join<aod::Collisions, aod::EvSels, aod::Cents>::iterator const& collision, soa::Filtered<aod::V0DataExt> const& fullV0s)
98+
void process(soa::Join<aod::Collisions, aod::EvSels, aod::Cents>::iterator const& collision, aod::V0DataExt const& fullV0s)
9899
{
99100
if (!collision.alias()[kINT7]) {
100101
return;
@@ -106,11 +107,20 @@ struct lambdakzeroanalysis {
106107
for (auto& v0 : fullV0s) {
107108
//FIXME: could not find out how to filter cosPA and radius variables (dynamic columns)
108109
if (v0.v0radius() > v0radius && v0.v0cosPA(collision.posX(), collision.posY(), collision.posZ()) > v0cospa) {
109-
if (TMath::Abs(v0.yLambda()) < 0.5) {
110+
if (fabs(v0.dcapostopv()) < dcapostopv) {
111+
continue;
112+
}
113+
if (fabs(v0.dcanegtopv()) < dcanegtopv) {
114+
continue;
115+
}
116+
if (fabs(v0.dcaV0daughters()) > dcav0dau) {
117+
continue;
118+
}
119+
if (TMath::Abs(v0.yLambda()) < rapidity) {
110120
h3dMassLambda->Fill(collision.centV0M(), v0.pt(), v0.mLambda());
111121
h3dMassAntiLambda->Fill(collision.centV0M(), v0.pt(), v0.mAntiLambda());
112122
}
113-
if (TMath::Abs(v0.yK0Short()) < 0.5) {
123+
if (TMath::Abs(v0.yK0Short()) < rapidity) {
114124
h3dMassK0Short->Fill(collision.centV0M(), v0.pt(), v0.mK0Short());
115125
}
116126
}

Analysis/Tasks/PWGLF/lambdakzerobuilder.cxx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ struct lambdakzeroprefilterpairs {
8181
Configurable<float> dcanegtopv{"dcanegtopv", .1, "DCA Neg To PV"};
8282
Configurable<float> dcapostopv{"dcapostopv", .1, "DCA Pos To PV"};
8383
Configurable<int> mincrossedrows{"mincrossedrows", 70, "min crossed rows"};
84-
Configurable<bool> tpcrefit{"tpcrefit", 1, "demand TPC refit"};
84+
Configurable<int> tpcrefit{"tpcrefit", 1, "demand TPC refit"};
8585

8686
OutputObj<TH1F> hGoodIndices{TH1F("hGoodIndices", "", 4, 0, 4)};
8787

@@ -132,7 +132,7 @@ struct lambdakzerobuilder {
132132

133133
//Configurables
134134
Configurable<double> d_bz{"d_bz", -5.0, "bz field"};
135-
Configurable<double> d_UseAbsDCA{"d_UseAbsDCA", kTRUE, "Use Abs DCAs"};
135+
// Configurable<int> d_UseAbsDCA{"d_UseAbsDCA", 1, "Use Abs DCAs"}; uncomment this once we want to use the weighted DCA
136136

137137
//Selection criteria
138138
Configurable<double> v0cospa{"v0cospa", 0.995, "V0 CosPA"}; //double -> N.B. dcos(x)/dx = 0 at x=0)
@@ -156,7 +156,7 @@ struct lambdakzerobuilder {
156156
fitter.setMinRelChi2Change(0.9);
157157
fitter.setMaxDZIni(1e9);
158158
fitter.setMaxChi2(1e9);
159-
fitter.setUseAbsDCA(d_UseAbsDCA);
159+
fitter.setUseAbsDCA(true); // use d_UseAbsDCA once we want to use the weighted DCA
160160

161161
hEventCounter->Fill(0.5);
162162
std::array<float, 3> pVtx = {collision.posX(), collision.posY(), collision.posZ()};
@@ -189,11 +189,15 @@ struct lambdakzerobuilder {
189189
}
190190

191191
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]});
192-
193192
if (V0CosinePA < v0cospa) {
194193
continue;
195194
}
196195

196+
auto V0radius = RecoDecay::sqrtSumOfSquares(pos[0], pos[1]); //probably find better name to differentiate the cut from the variable
197+
if (V0radius < v0radius) {
198+
continue;
199+
}
200+
197201
hV0Candidate->Fill(1.5);
198202
v0data(
199203
V0.posTrack_as<FullTracksExt>().globalIndex(),

0 commit comments

Comments
 (0)