hi im very new to root & delphes. im trying to modify the tutorial https://cp3.irmp.ucl.ac.be/projects/delphes/wiki/WorkBook/TutorialBologna
im trying to sort the PT after the cuts with
std::sort(electrons->PT.begin(), electrons->PT.end(), std::greater<int>());
but ending up with error
error: no member named 'PT' in 'std::__1::vector<const Electron *,
std::__1::allocator<const Electron *> >'___
here is some part of my code
// Create object of class ExRootTreeReader
ExRootTreeReader *treeReader = new ExRootTreeReader(&chain);
Long64_t numberOfEntries = treeReader->GetEntries();
// Get pointers to branches used in this analysis
TClonesArray *branchParticle = treeReader->UseBranch("Particle");
TClonesArray *branchElectron = treeReader->UseBranch("Electron");
TClonesArray *branchMuon = treeReader->UseBranch("Muon");
//Declare variable
const Electron *elec1, *elec2, *elec3, *elec4;
const Muon *muon1, *muon2, *muon3, *muon4;
vector<const Electron*> *electrons = new vector<const Electron*>();;
vector<const Muon*> *muons = new vector<const Muon*>();;
// Loop over all events begins
for(Int_t entry = 0; entry < numberOfEntries; ++entry)
{
// print event number in the file
if(entry%100==0) cout << "Reading Event " << entry << endl;
// Load selected branches with data from specified event
treeReader->ReadEntry(entry);
electrons -> clear();
muons -> clear();
// Select leptons e||mu with pT > 5 || 7 GeV and |eta| < 2.5 || 2.4
CollectionFilter(*branchElectron, *electrons , 5.0 , 2.5);
CollectionFilter(*branchMuon , *muons , 7.0 , 2.4);
//sort the PT from highest to lowest
std::sort(electrons->PT.begin(), electrons->PT.end(), std::greater<int>());
// sort Muon PT, High to low
std::sort(muons->PT.begin(), muons->PT.end(), std::greater<int>());
```
i think i am declaring the vectors wrongly, any suggestions on how i can fix this? thanks
_Please read [tips for efficient and successful posting](https://root-forum.cern.ch/t/tips-for-efficient-and-successful-posting/28292) and [posting code](https://root-forum.cern.ch/t/posting-code-read-this-first/28293)_
_ROOT Version:6.22
_Platform:mac osx catalina 15.15.7
_Compiler:Apple clang version 11.0.3 (clang-1103.0.32.29)