Changeset 384 in svn
- Timestamp:
- May 15, 2009, 7:28:55 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 3 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 } -
trunk/src/JetsUtil.cc
r350 r384 134 134 // sort jets into increasing pt 135 135 sorted_jets = sorted_by_pt(inclusive_jets); 136 137 136 //Bin tracks to make the link 138 137 float iEtaTrack[TrackCentral.size()]; 139 138 float iPhiTrack[TrackCentral.size()]; 140 139 for(unsigned int t = 0; t < TrackCentral.size(); t++) 141 { 142 DET->BinEtaPhi(TrackCentral[t].PhiOuter,TrackCentral[t].EtaOuter,iPhiTrack[t],iEtaTrack[t]); 143 } 140 { 141 if(!DET->JET_Eflow) 142 DET->BinEtaPhi(TrackCentral[t].PhiOuter,TrackCentral[t].EtaOuter,iPhiTrack[t],iEtaTrack[t]); 143 else { 144 iPhiTrack[t] = TrackCentral[t].PhiOuter; iEtaTrack[t] = TrackCentral[t].EtaOuter; 145 } 146 } 144 147 int numTrackJet; 145 148 for (unsigned int i = 0; i < sorted_jets.size(); i++) -
trunk/src/SmearUtil.cc
r383 r384 577 577 else if(strstr(temp_string.c_str(),"JET_jetalgo")) {curstring >> varname >> ivalue;JET_jetalgo = ivalue;} 578 578 else if(strstr(temp_string.c_str(),"JET_seed")) {curstring >> varname >> value; JET_seed = value;} 579 else if(strstr(temp_string.c_str(),"JET_Eflow")) {curstring >> varname >> value; JET_Eflow =value;}579 else if(strstr(temp_string.c_str(),"JET_Eflow")) {curstring >> varname >> ivalue; JET_Eflow = ivalue;} 580 580 581 581 else if(strstr(temp_string.c_str(),"BTAG_b")) {curstring >> varname >> ivalue;BTAG_b = ivalue;} … … 638 638 f_out <<"** of a generic collider experiment **"<< endl; 639 639 f_out <<"** **"<< endl; 640 f_out <<"** --- Version 1. 4beta of Delphes ---**"<< endl;641 f_out <<"** Last date of change: 9 February 2009**"<< endl;640 f_out <<"** --- Version 1.6 of Delphes --- **"<< endl; 641 f_out <<"** Last date of change: 7 May 2009 **"<< endl; 642 642 f_out <<"** **"<< endl; 643 643 f_out <<"** **"<< endl;
Note:
See TracChangeset
for help on using the changeset viewer.