Fork me on GitHub

Changeset 288 in svn for trunk


Ignore:
Timestamp:
Mar 3, 2009, 12:45:22 AM (15 years ago)
Author:
Xavier Rouby
Message:

charge added

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/interface/LHCOConverter.h

    r275 r288  
    3535/// \file LHCOConverter
    3636/// \brief Converter from ExRootAnalysis to LHCO files
    37 
     37#include <sstream>
    3838#include <string>
    3939using namespace std;
     
    5353
    5454private:
    55   void BranchReader(const TClonesArray*, unsigned int&, unsigned short int ) const; // put it as a operator<<
     55  //ostringstream BranchReader(const TClonesArray*, unsigned int&, unsigned short int ) const; // put it as a operator<<
     56  void BranchReader(const TClonesArray*, unsigned int&, unsigned short int ) const;
    5657  const string inputfilename_;
    5758  string inputlogname_;
  • trunk/src/LHCOConverter.cc

    r284 r288  
    179179        pmu.SetPtEtaPhiE(particle->PT, particle->Eta, particle->Phi, particle->E);
    180180        jmass = pmu.M();
    181         unsigned int ntrk = 0;
     181        float ntrk = 0.0;
     182        if(lhcoID == lhcoElectronID) { TRootElectron elec(*((TRootElectron*) branch->At(i))); ntrk = elec.Charge; }
     183        else if (lhcoID == lhcoMuonID) { TRootMuon muon(*((TRootMuon*) branch->At(i))); ntrk = muon.Charge; }
     184        else if (lhcoID == lhcoTauJetID) { TRootTauJet taujet(*((TRootTauJet*) branch->At(i))); ntrk = taujet.Charge; }
    182185        float btag =0;
    183186        double ratioE = 0;
Note: See TracChangeset for help on using the changeset viewer.