Skip to content

Commit 76b67ea

Browse files
authored
workflow splitted to contain also an event selection; configuration updated for the analysis challenge (#4353)
* optimizations for the table-reader task * Added a task for dilepton - hadron combinations in the tableReader workflow * Added an event selection task in the workflow; a few small fixes
1 parent 1536fe7 commit 76b67ea

File tree

5 files changed

+249
-172
lines changed

5 files changed

+249
-172
lines changed

Analysis/Core/include/Analysis/AnalysisCompositeCut.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ class AnalysisCompositeCut : public AnalysisCut
2525
public:
2626
AnalysisCompositeCut(bool useAND = kTRUE);
2727
AnalysisCompositeCut(const char* name, const char* title, bool useAND = kTRUE);
28+
AnalysisCompositeCut(const AnalysisCompositeCut& c) = default;
29+
AnalysisCompositeCut& operator=(const AnalysisCompositeCut& c) = default;
2830
~AnalysisCompositeCut() override;
2931

3032
void AddCut(AnalysisCut* cut) { fCutList.push_back(*cut); };
@@ -38,9 +40,6 @@ class AnalysisCompositeCut : public AnalysisCut
3840
bool fOptionUseAND; // true (default): apply AND on all cuts; false: use OR
3941
std::vector<AnalysisCut> fCutList; // list of cuts
4042

41-
AnalysisCompositeCut(const AnalysisCompositeCut& c);
42-
AnalysisCompositeCut& operator=(const AnalysisCompositeCut& c);
43-
4443
ClassDef(AnalysisCompositeCut, 1);
4544
};
4645

Analysis/Core/include/Analysis/VarManager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ class VarManager : public TObject
195195
~VarManager() override;
196196

197197
static float fgValues[kNVars]; // array holding all variables computed during analysis
198-
static void ResetValues(int startValue = 0, int endValue = kNVars);
198+
static void ResetValues(int startValue = 0, int endValue = kNVars, float* values = nullptr);
199199

200200
private:
201201
static bool fgUsedVars[kNVars]; // holds flags for when the corresponding variable is needed (e.g., in the histogram manager, in cuts, mixing handler, etc.)

Analysis/Core/src/AnalysisCompositeCut.cxx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,15 @@ bool AnalysisCompositeCut::IsSelected(float* values)
4141
//
4242
// apply cuts
4343
//
44-
std::vector<AnalysisCut>::iterator it = fCutList.begin();
4544
for (std::vector<AnalysisCut>::iterator it = fCutList.begin(); it < fCutList.end(); ++it) {
4645
if (fOptionUseAND && !(*it).IsSelected(values))
47-
return kFALSE;
46+
return false;
4847
if (!fOptionUseAND && (*it).IsSelected(values))
49-
return kTRUE;
48+
return true;
5049
}
5150

5251
if (fOptionUseAND)
53-
return kTRUE;
52+
return true;
5453
else
55-
return kFALSE;
54+
return false;
5655
}

Analysis/Core/src/VarManager.cxx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,15 @@ void VarManager::SetVariableDependencies()
4545
}
4646

4747
//__________________________________________________________________
48-
void VarManager::ResetValues(int startValue, int endValue)
48+
void VarManager::ResetValues(int startValue, int endValue, float* values)
4949
{
5050
//
5151
// reset all variables to an "innocent" value
5252
// NOTE: here we use -9999.0 as a neutral value, but depending on situation, this may not be the case
53+
if (!values)
54+
values = fgValues;
5355
for (Int_t i = startValue; i < endValue; ++i)
54-
fgValues[i] = -9999.;
56+
values[i] = -9999.;
5557
}
5658

5759
//__________________________________________________________________

0 commit comments

Comments
 (0)