New functors to place objects in a vector and to concatenate two vectors
This MR defines two new functors:
- SINGLE : takes an object of type T and return a
std::vector<T>
containing such object - CONCATENATE : takes two vectors
v1,v2
of the same typestd:vector<T>
and return a singlestd:vector<T>
with { v1_elements, v2_elements }
This will help to distinguish two particles with same ID and Charge when using ThorParticleSelection
, for example to compute ConeIsolation variables around each final state track
fields = {
"Tau" : "[tau+ -> mu+ mu+ mu-]CC",
"L1" : "[tau+ -> ^mu+ mu+ mu-]CC",
"L2" : "[tau+ -> mu+ ^mu+ mu-]CC",
"L3" : "[tau+ -> mu+ mu+ ^mu-]CC",
}
data = get_particles(f"/Event/HLT2/Hlt2RD_TauToMuMuMu/Particles")
L1_data = ThOrParticleSelection(
InputParticles=data, Functor=F.SINGLE @ F.VALUE @ F.FIND_DECAY(fields["L1"])
).OutputSelection
Edited by Simone Capelli
Merge request reports
Activity
added 48 commits
-
afe8e1c8...866c33d4 - 46 commits from branch
master
- dd15dd1a - new vector and concat functor
- 45cd45a6 - pre-commit fixes
-
afe8e1c8...866c33d4 - 46 commits from branch
added 1 commit
- 0d43b55a - implemented refactored version of the functors using TrivialFunctor
requested review from @graven
mentioned in issue Moore#927 (closed)
mentioned in issue Moore#936
- Resolved by Simone Capelli
- Resolved by Simone Capelli
- Resolved by Simone Capelli
- Resolved by Simone Capelli
added 1 commit
- 2c3aa5a4 - remove accidental changes to exampl_test.ref
Please register or sign in to reply