# \#vecops

**URL:** https://root-forum.cern.ch/tag/vecops/28.md

[Latest](https://root-forum.cern.ch/latest.md) · [Categories](https://root-forum.cern.ch/categories.md) · [Tags](https://root-forum.cern.ch/tags.md)

---

## [Filtering individual elements of vector branch with RDataFrame](https://root-forum.cern.ch/t/filtering-individual-elements-of-vector-branch-with-rdataframe/51926)

<div class="topic-metadata">

**Author:** [@hepFanatic](https://root-forum.cern.ch/u/hepFanatic)\
**Replies:** 2\
**Last updated:** [October 11, 2022, 7:54pm UTC](https://root-forum.cern.ch/t/filtering-individual-elements-of-vector-branch-with-rdataframe/51926 "2022-10-11T19:54:13Z")

</div>

Hi! Using a RDataFrame is there a way to filter a dataframe according to individual elements of a vector branch? (Rather than creating many Define()) I have tried RVecOps::All() and RVecOps::Any(), in this manner ROOT.…

---

## [Std methods for ROOT::VecOps::RVec?](https://root-forum.cern.ch/t/std-methods-for-root-rvec/49546)

<div class="topic-metadata">

**Author:** [@FoxWise](https://root-forum.cern.ch/u/FoxWise)\
**Replies:** 2\
**Last updated:** [April 11, 2022, 7:39pm UTC](https://root-forum.cern.ch/t/std-methods-for-root-rvec/49546 "2022-04-11T19:39:42Z")

</div>

Hi all, I wonder if it would be easy to implement all std methods to be able to run smoothly with RVec? I would find it very useful. What I mean is able to run something like this: import ROOT df = ROOT.RDataFrame(1…

---

## [Call method for every object in RVec in a single line](https://root-forum.cern.ch/t/call-method-for-every-object-in-rvec-in-a-single-line/49428)

<div class="topic-metadata">

**Author:** [@FoxWise](https://root-forum.cern.ch/u/FoxWise)\
**Replies:** 1\
**Last updated:** [March 31, 2022, 3:48pm UTC](https://root-forum.cern.ch/t/call-method-for-every-object-in-rvec-in-a-single-line/49428 "2022-03-31T15:48:14Z")

</div>

Hi all, I have a std::vector\<XYZVector\> stored in TTree. Is there an easy way to get absolute momentum XYZVector.R() for each element of the array within RDataFrame? The one I am currently using is: ROOT.gInterpreter…

---

## [Elegant ways to get a TH2D from a vector?](https://root-forum.cern.ch/t/elegant-ways-to-get-a-th2d-from-a-vector/45151)

<div class="topic-metadata">

**Author:** [@Gramotey](https://root-forum.cern.ch/u/Gramotey)\
**Replies:** 8\
**Last updated:** [June 8, 2021, 12:36am UTC](https://root-forum.cern.ch/t/elegant-ways-to-get-a-th2d-from-a-vector/45151 "2021-06-08T00:36:24Z")

</div>

Dear All – I have my algo providing me with vectors of 3600 values, that make up 60x60 pixels with values that are small additive portions of my final 360 x 360 image. Is there any elegant and most importantly, fast way…

---

## [Creating and Sorting Vectors of Collections](https://root-forum.cern.ch/t/creating-and-sorting-vectors-of-collections/43002)

<div class="topic-metadata">

**Author:** [@vcroft](https://root-forum.cern.ch/u/vcroft)\
**Replies:** 26\
**Last updated:** [February 3, 2021, 8:37am UTC](https://root-forum.cern.ch/t/creating-and-sorting-vectors-of-collections/43002 "2021-02-03T08:37:27Z")

</div>

Howdy, quick question here (I think) I’m getting confused by my VecOps I’m reading in a tree and creating a collection from it: df1 = rdf.Define("l0", "ROOT::Math::PtEtaPhiMVector(lepton\_pt.at(0,-999),lepton\_eta.at(0,0…

---

## [VecOps Construct with ROOT::Math::LorentzVector example](https://root-forum.cern.ch/t/vecops-construct-with-root-lorentzvector-example/41595)

<div class="topic-metadata">

**Author:** [@zhubacek](https://root-forum.cern.ch/u/zhubacek)\
**Replies:** 4\
**Last updated:** [September 28, 2020, 7:46am UTC](https://root-forum.cern.ch/t/vecops-construct-with-root-lorentzvector-example/41595 "2020-09-28T07:46:03Z")

</div>

Hello, Following the question in https://root-forum.cern.ch/t/creating-a-column-of-std-vector-root-ptetaphievector-with-rdataframe/34151 I switched to ROOT 6.22.02, but the Construct example doesn’t work for me: (http…

---

## [PyROOT & RDataFrame: Filter-function does not return bool](https://root-forum.cern.ch/t/pyroot-rdataframe-filter-function-does-not-return-bool/31077)

<div class="topic-metadata">

**Author:** [@filbab](https://root-forum.cern.ch/u/filbab)\
**Replies:** 5\
**Last updated:** [November 1, 2018, 10:50am UTC](https://root-forum.cern.ch/t/pyroot-rdataframe-filter-function-does-not-return-bool/31077 "2018-11-01T10:50:29Z")

</div>

Hi, I tried using RDataFrame in PyROOT using ROOT 6.14.04. Running on lxplus using: ’ lsetup “root 6.14” ’ My code: import ROOT datatree = ROOT.TChain("trees\_SRDV\_") datatree.Add("path/trees.root") cut\_volume = "DV…
