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,v2of 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