Changeset 1345 in svn for trunk/modules/TreeWriter.cc
- Timestamp:
- Dec 21, 2013, 3:00:11 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/TreeWriter.cc
r1325 r1345 95 95 continue; 96 96 } 97 97 98 98 itClassMap = fClassMap.find(branchClass); 99 99 if(itClassMap == fClassMap.end()) … … 115 115 void TreeWriter::Finish() 116 116 { 117 118 117 } 119 118 … … 161 160 GenParticle *entry = 0; 162 161 Double_t pt, signPz, cosTheta, eta, rapidity; 163 162 163 const Double_t c_light = 2.99792458E8; 164 164 165 // loop over all particles 165 166 iterator.Reset(); … … 208 209 entry->Y = position.Y(); 209 210 entry->Z = position.Z(); 210 entry->T = position.T() ;211 entry->T = position.T()*1.0E-3/c_light; 211 212 } 212 213 } … … 219 220 Candidate *candidate = 0; 220 221 Vertex *entry = 0; 222 223 const Double_t c_light = 2.99792458E8; 221 224 222 225 // loop over all vertices … … 231 234 entry->Y = position.Y(); 232 235 entry->Z = position.Z(); 233 entry->T = position.T() ;236 entry->T = position.T()*1.0E-3/c_light; 234 237 } 235 238 } … … 244 247 Track *entry = 0; 245 248 Double_t pt, signz, cosTheta, eta, rapidity; 246 249 const Double_t c_light = 2.99792458E8; 250 247 251 // loop over all tracks 248 252 iterator.Reset(); … … 271 275 entry->YOuter = position.Y(); 272 276 entry->ZOuter = position.Z(); 277 entry->TOuter = position.T()*1.0E-3/c_light; 273 278 274 279 const TLorentzVector &momentum = candidate->Momentum; … … 290 295 entry->Y = initialPosition.Y(); 291 296 entry->Z = initialPosition.Z(); 297 entry->T = initialPosition.T()*1.0E-3/c_light; 292 298 293 299 entry->Particle = particle; … … 303 309 Tower *entry = 0; 304 310 Double_t pt, signPz, cosTheta, eta, rapidity; 305 311 const Double_t c_light = 2.99792458E8; 312 306 313 // loop over all towers 307 314 iterator.Reset(); … … 309 316 { 310 317 const TLorentzVector &momentum = candidate->Momentum; 311 318 const TLorentzVector &position = candidate->Position; 319 312 320 pt = momentum.Pt(); 313 321 cosTheta = TMath::Abs(momentum.CosTheta()); … … 331 339 entry->Edges[2] = candidate->Edges[2]; 332 340 entry->Edges[3] = candidate->Edges[3]; 333 341 342 entry->T = position.T()*1.0E-3/c_light; 343 334 344 FillParticles(candidate, &entry->Particles); 335 345 } … … 344 354 Photon *entry = 0; 345 355 Double_t pt, signPz, cosTheta, eta, rapidity; 346 356 const Double_t c_light = 2.99792458E8; 357 347 358 array->Sort(); 348 359 … … 353 364 TIter it1(candidate->GetCandidates()); 354 365 const TLorentzVector &momentum = candidate->Momentum; 366 const TLorentzVector &position = candidate->Position; 367 355 368 356 369 pt = momentum.Pt(); … … 366 379 entry->PT = pt; 367 380 entry->E = momentum.E(); 368 381 382 entry->T = position.T()*1.0E-3/c_light; 383 369 384 entry->EhadOverEem = candidate->Eem > 0.0 ? candidate->Ehad/candidate->Eem : 999.9; 370 385 … … 381 396 Electron *entry = 0; 382 397 Double_t pt, signPz, cosTheta, eta, rapidity; 383 398 const Double_t c_light = 2.99792458E8; 399 384 400 array->Sort(); 385 401 … … 389 405 { 390 406 const TLorentzVector &momentum = candidate->Momentum; 391 407 const TLorentzVector &position = candidate->Position; 408 392 409 pt = momentum.Pt(); 393 410 cosTheta = TMath::Abs(momentum.CosTheta()); … … 401 418 entry->Phi = momentum.Phi(); 402 419 entry->PT = pt; 403 420 421 entry->T = position.T()*1.0E-3/c_light; 422 404 423 entry->Charge = candidate->Charge; 405 424 … … 418 437 Muon *entry = 0; 419 438 Double_t pt, signPz, cosTheta, eta, rapidity; 420 439 440 const Double_t c_light = 2.99792458E8; 441 421 442 array->Sort(); 422 443 … … 426 447 { 427 448 const TLorentzVector &momentum = candidate->Momentum; 449 const TLorentzVector &position = candidate->Position; 450 428 451 429 452 pt = momentum.Pt(); … … 442 465 entry->PT = pt; 443 466 467 entry->T = position.T()*1.0E-3/c_light; 468 469 // cout<<entry->PT<<","<<entry->T<<endl; 470 444 471 entry->Charge = candidate->Charge; 445 472 … … 457 484 Double_t pt, signPz, cosTheta, eta, rapidity; 458 485 Double_t ecalEnergy, hcalEnergy; 459 486 const Double_t c_light = 2.99792458E8; 487 460 488 array->Sort(); 461 489 … … 465 493 { 466 494 TIter itConstituents(candidate->GetCandidates()); 467 const TLorentzVector &momentum = candidate->Momentum; 468 495 496 const TLorentzVector &momentum = candidate->Momentum; 497 const TLorentzVector &position = candidate->Position; 498 469 499 pt = momentum.Pt(); 470 500 cosTheta = TMath::Abs(momentum.CosTheta()); … … 479 509 entry->PT = pt; 480 510 511 entry->T = position.T()*1.0E-3/c_light; 512 481 513 entry->Mass = momentum.M(); 482 514
Note:
See TracChangeset
for help on using the changeset viewer.