Hi I have the following issue -
Trying to make an executable file
g++ -I. `root-config --libs --cflags` -lRooFitCore -lRooFit -lRooStats -lTMVA -lXMLIO -lTreePlayer -lm -o maini root_root_converter_new.C
g++ -I. `root-config --libs --cflags` -lRooFitCore -lRooFit -lRooStats -lTMVA -lXMLIO -lTreePlayer -lm -o maini root_root_converter_new.C
root_root_converter_new.C: In function ‘int root_root_converter(int, char**)’:
root_root_converter_new.C:127:7: error: ‘Electron’ was not declared in this scope
Electron *reconele;
The programme I can send to you if needed.
The prog contains this
TClonesArray *branchElectron = treeReader1->UseBranch("Electron");
Electron *reconele;
Int_t nnele=Int_t(chain1->GetLeaf("Electron_size")->GetValue());
double maxelpt=0;
for(int j=0; j<nnele; j++)
{
reconele=(Electron*) branchElectron->At(j);
if(!reconele)continue;
// if(reconele->Charge==-1 || reconele->Charge==1)
if(reconele->Charge==1)
{
ele_pos_charge=reconele->Charge;
TLorentzVector tmpreconele;
tmpreconele.SetPtEtaPhiM(reconele->PT,reconele->Eta,reconele->Phi,0.00051);
if(tmpreconele.Pt()>maxelpt)
{
maxelpt=tmpreconele.Pt();
//cout<<maxelpt<<endl;
ele_pos_pt.push_back(tmpreconele.Pt());
ele_pos_eta.push_back(tmpreconele.Eta());
ele_pos_phi.push_back(tmpreconele.Phi());
ele_pos_e.push_back(tmpreconele.E());
}
}
}
Thanks,
Subhasish