Changeset 384 in svn for trunk/Delphes.cpp
- Timestamp:
- May 15, 2009, 7:28:55 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Delphes.cpp
r382 r384 99 99 } 100 100 101 102 103 104 101 cout << endl << endl; 105 102 … … 180 177 string line; 181 178 ifstream infile(inputFileList.c_str()); 179 if(!infile.good()) { 180 cout << "** ERROR: Input list (" << left << setw(13) << inputFileList << ") not found. Exiting... **"<< endl; 181 cout <<"*********************************************************************"<< endl; 182 exit(1); 183 } 182 184 infile >> line; // the first line determines the type of input files 183 185 … … 390 392 NTrackJet.clear(); 391 393 392 394 // 'list_of_active_towers' contains the exact list of calorimetric towers which have some deposits inside (E>0). 395 // The towers of this list will be smeared according to the calo resolution, afterwards 393 396 D_CaloTowerList list_of_active_towers; 397 398 // 'list_of_towers_with_photon' and 'list_of_centowers_with_neutrals' are list of towers, whose energy is **not** computed. 399 // They are only used to store the eta/phi of some towers, in order to search later inside 'list_of_active_towers'. 400 // 'list_of_towers_with_photon' contains the towers hit by photons only 401 // 'list_of_centowers_with_neutrals' is used to the jet-E-flow calculation: contains the towers with eta < CEN_max_tracker, 402 // i.e. towers behind the tracker. 394 403 D_CaloTowerList list_of_towers_with_photon; // to speed up the code: will only look in interesting towers for gamma candidates 395 396 404 405 D_CaloTowerList list_of_centowers_with_neutrals; // list of towers with neutral particles : for jet E-flow 406 float etamax_calocoverage_behindtracker = DET->CEN_max_tracker; // finds the extension in eta of the furthest 407 for (unsigned int i=1; i< DET->TOWER_number+1; i++) { // cell (at least) partially behind the tracker 408 if(DET->TOWER_eta_edges[i] > DET->CEN_max_tracker) break; 409 etamax_calocoverage_behindtracker = DET->TOWER_eta_edges[i]; 410 } 397 411 // 2.1a Loop over all particles in event, to fill the towers 398 412 itGen.Reset(); … … 472 486 { 473 487 p.SetPtEtaPhiE(sPT,particle->Eta,particle->Phi,sPT*cosh(particle->Eta)); 474 muon.push_back(D_Particle(p,p article->PID,particle->EtaCalo,particle->PhiCalo));488 muon.push_back(D_Particle(p,pMU,particle->EtaCalo,particle->PhiCalo)); 475 489 } 476 490 sET = (sPT >0)? sPT : 0; … … 498 512 if (sET > DET->PTCUT_elec) 499 513 electron.push_back(D_Particle(p,particle->PID,particle->EtaCalo,particle->PhiCalo)); 514 //if(DET->JET_Eflow) input_particles.push_back(fastjet::PseudoJet(p.Px(),p.Py(),p.Pz(),p.E())); 500 515 } 501 516 else { sET=0;} // if negative smeared energy -- needed for the tracks … … 517 532 elementTrack->Set(particle->Eta, particle->Phi, particle->EtaCalo, particle->PhiCalo, sET, particle->Charge); 518 533 TrackCentral.push_back(*elementTrack); // tracks at vertex! 534 if(DET->JET_Eflow) 535 input_particles.push_back(fastjet::PseudoJet(particle->Px,particle->Py,particle->Pz,particle->E)); 519 536 // TODO!!! apply a smearing on the position of the origin of the track 520 537 // TODO!!! elementTracks->SetPositionOut(Xout,Yout,Zout); … … 531 548 list_of_towers_with_photon.addTower(tower); 532 549 } 533 // 2.1a.2.5 : very forward detectors 550 // 2.1a.2.5 Neutrals within tracker -- for jet energy flow 551 else if( particle->Charge ==0 && fabs(particle->EtaCalo)< etamax_calocoverage_behindtracker) 552 { 553 float iEta=UNDEFINED, iPhi=UNDEFINED; 554 DET->BinEtaPhi(particle->PhiCalo,particle->EtaCalo,iPhi,iEta); // fills in iPhi and iEta 555 D_CaloTower tower(iEta,iPhi); 556 list_of_centowers_with_neutrals.addTower(tower); 557 } 558 // 2.1a.2.6 : very forward detectors 534 559 else 535 560 { … … 551 576 delete particle; 552 577 }// loop on all particles 2.1a 553 554 578 555 579 // 2.1b loop on all (activated) towers 556 580 // at this stage, list_of_active_towers may contain several times the same tower … … 580 604 } // loop on towers 581 605 582 583 584 585 606 // 2.1c photon ID 607 // list_of_towers_with_photon is the list of towers with photon candidates 608 // already smeared ! 609 // sorts the vector and smears duplicates 586 610 list_of_towers_with_photon.mergeDuplicates(); 587 611 for(unsigned int i=0; i<list_of_towers_with_photon.size(); i++) { 588 612 float eta = list_of_towers_with_photon[i].getEta(); 589 613 float phi = list_of_towers_with_photon[i].getPhi(); 590 D_CaloTower cal(list_of_active_towers.getElement(eta,phi)); 614 D_CaloTower cal(list_of_active_towers.getElement(eta,phi)); //// <---------- buh??????? 591 615 if(cal.getEta() != UNDEFINED && cal.getPhi() != UNDEFINED && cal.getE() > 0) 592 616 { … … 596 620 } 597 621 } // for -- list of photons 598 622 623 // 2.1d jet-E-flow -- taking into account the neutrals within tracker 624 if(DET->JET_Eflow) { 625 list_of_centowers_with_neutrals.mergeDuplicates(); 626 for(unsigned int i=0; i<list_of_centowers_with_neutrals.size(); i++) { 627 float eta = list_of_centowers_with_neutrals[i].getEta(); 628 float phi = list_of_centowers_with_neutrals[i].getPhi(); 629 D_CaloTower cal(list_of_active_towers.getElement(eta,phi)); 630 if(cal.getEta() != UNDEFINED && cal.getPhi() != UNDEFINED && cal.getE() > 0) 631 { 632 TLorentzVector p; 633 p.SetPtEtaPhiE(cal.getET(), eta,phi,cal.getE() ); 634 //cout << "**************list: " << p.Px() << " " << p.Py() << " " << p.Pz() << " " << p.E() << endl; 635 input_particles.push_back(fastjet::PseudoJet(p.Px(),p.Py(),p.Pz(),p.E())); 636 } 637 } // for - list_of_centowers 638 } // JET_Eflow 639 599 640 // 2.2 ********** Output preparation & complex objects *********** 600 641 // 2.2.1 ********************* sorting collections by decreasing pt … … 652 693 // create a fastjet::PseudoJet with these components and put it onto 653 694 // back of the input_particles vector 654 input_particles.push_back(fastjet::PseudoJet(towers[i].fourVector.px,towers[i].fourVector.py,towers[i].fourVector.pz,towers[i].fourVector.E)); 695 if(!DET->JET_Eflow) 696 input_particles.push_back(fastjet::PseudoJet(towers[i].fourVector.px,towers[i].fourVector.py,towers[i].fourVector.pz,towers[i].fourVector.E)); 697 else { if(fabs(Att.Eta()) > DET->CEN_max_tracker) 698 input_particles.push_back(fastjet::PseudoJet(towers[i].fourVector.px,towers[i].fourVector.py,towers[i].fourVector.pz,towers[i].fourVector.E)); 699 } 655 700 } 656 701 }
Note:
See TracChangeset
for help on using the changeset viewer.