Changeset 321 in svn for trunk/src/LHCOConverter.cc
- Timestamp:
- Mar 11, 2009, 12:53:50 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/LHCOConverter.cc
r316 r321 205 205 case lhcoMuonID: { 206 206 cout << "ERROR: LHCOConverter: for muons use LHCOConverter::BranchReaderMuon!\n"; 207 TRootMuon muon(*((TRootMuon*) branch->At(i)));208 ntrk = muon.Charge; ratioE = muon.EHoverEE;209 207 } break; 210 208 case lhcoETmisID: { 211 209 cout << "ERROR: LHCOConverter: for ETmis use LHCOConverter::BranchReaderETmis!\n"; 212 TRootMuon muon(*((TRootMuon*) branch->At(i)));213 ntrk = muon.Charge; ratioE = muon.EHoverEE;214 210 } break; 215 211 … … 284 280 } // loop on jets 285 281 282 int ratio = 0; char ratio_string[3]; 283 if(muon->EtRatio != UNDEFINED) ratio = static_cast<int>(muon->EtRatio); 284 if(ratio<0) sprintf(ratio_string,"00"); 285 else if(ratio<10) sprintf(ratio_string,"0%d",ratio); 286 else if(ratio<100)sprintf(ratio_string,"%d",ratio); 287 else { cout << "Error: muon EtRatio > 99" << endl; sprintf(ratio_string,"99"); } 286 288 // output 287 289 outfile << fixed << setprecision(3) … … 293 295 << setw(7) << jmass <<" " // invariant mass 294 296 << setw(7) << (float)muon->Charge <<" " // -1 for mu-, +1 for mu+ 295 << setw(7) << (float)closest_jet_ID << " " 296 << setw(7) << muon->EHoverEE <<" " // E_had/E_em 297 << setw(7) << (float)closest_jet_ID << " "; 298 outfile << fixed << setprecision(0) 299 << setw(4) << floor(muon->IsolPt) << "." << ratio_string<<" "; // E_had/E_em 300 outfile << fixed << setprecision(3) 297 301 << setw(7) << 0.0 << setw(7) << 0.0 // dummy/dummy 298 302 << endl;
Note:
See TracChangeset
for help on using the changeset viewer.