Changeset 310 in svn for trunk/src/LHCOConverter.cc
- Timestamp:
- Mar 10, 2009, 11:52:16 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/LHCOConverter.cc
r307 r310 174 174 particle = (TRootParticle*) branch->At(i); 175 175 double temp = sqrt(particle->PT*particle->PT + particle->Pz * particle->Pz); 176 double jmass = (particle->E - temp) * (particle->E + temp); // prevents some numerical sensitivity177 176 TLorentzVector pmu; 178 177 pmu.SetPtEtaPhiE(particle->PT, particle->Eta, particle->Phi, particle->E); 179 jmass = pmu.M();178 float jmass = pmu.M(); 180 179 float ntrk = 0.0; 181 180 float btag =0; 182 181 double ratioE = 0; 183 182 184 if(lhcoID == lhcoElectronID) { TRootElectron elec(*((TRootElectron*) branch->At(i))); ntrk = elec.Charge; } 185 else if (lhcoID == lhcoMuonID) { TRootMuon muon(*((TRootMuon*) branch->At(i))); ntrk = muon.Charge; } 183 if(lhcoID == lhcoPhotonID){TRootPhoton gam(*((TRootPhoton*) branch->At(i))); jmass=0; ratioE = gam.EHoverEE;} 184 if(lhcoID == lhcoElectronID) { TRootElectron elec(*((TRootElectron*) branch->At(i))); ntrk = elec.Charge; ratioE = elec.EHoverEE;} 185 else if (lhcoID == lhcoMuonID) { TRootMuon muon(*((TRootMuon*) branch->At(i))); ntrk = muon.Charge; ratioE = muon.EHoverEE;} 186 186 else if (lhcoID == lhcoTauJetID) { TRootTauJet taujet(*((TRootTauJet*) branch->At(i))); ntrk = taujet.Charge; } 187 else if (lhcoID == lhcoJetID) { TRootJet jet(*((TRootJet*) branch->At(i))); ntrk = jet.NTracks; btag = jet.Btag; }187 else if (lhcoID == lhcoJetID) { TRootJet jet(*((TRootJet*) branch->At(i))); ntrk = jet.NTracks; btag = jet.Btag; ratioE = jet.EHoverEE;} 188 188 if(lhcoID != lhcoETmisID) { 189 189 outfile << fixed << setprecision(3)
Note:
See TracChangeset
for help on using the changeset viewer.