Changeset 264 in svn
- Timestamp:
- Feb 11, 2009, 10:22:30 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 30 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Delphes.cpp
r260 r264 31 31 32 32 /// \file Delphes.cpp 33 /// \brief executable for theDelphes33 /// \brief Executable for Delphes 34 34 35 35 #include "TChain.h" … … 41 41 #include "ExRootTreeWriter.h" 42 42 #include "ExRootTreeBranch.h" 43 #include "ExRootProgressBar.h" 43 44 44 45 #include "DataConverter.h" … … 48 49 49 50 #include "SmearUtil.h" 51 #include "CaloUtil.h" 50 52 #include "BFieldProp.h" 51 53 #include "TriggerUtil.h" … … 56 58 #include <vector> 57 59 #include <iostream> 58 59 #include "Utilities/ExRootAnalysis/interface/ExRootProgressBar.h"60 60 61 61 using namespace std; … … 77 77 int main(int argc, char *argv[]) 78 78 { 79 unsigned int nnnn=0, mmmm=0; 80 79 81 int appargc = 2; 80 82 char *appName= new char[20]; … … 86 88 delete [] appName; 87 89 delete [] appOpt; 88 89 90 90 91 if(argc != 3 && argc != 4 && argc != 5) { … … 242 243 //Propagation of tracks in the B field 243 244 TrackPropagation *TRACP = new TrackPropagation(DET); 244 //TrackPropagation *TRACP = new TrackPropagation(DetDatacard);245 245 246 246 //Jet information 247 247 JetsUtil *JETRUN = new JetsUtil(DET); 248 //JetsUtil *JETRUN = new JetsUtil(DetDatacard);249 248 250 249 //VFD information 251 250 VeryForward * VFD = new VeryForward(DET); 252 //VeryForward * VFD = new VeryForward(DetDatacard);253 251 254 252 // data converters … … 299 297 ExRootTreeBranch *branchMuon = treeWriter->NewBranch("Muon", TRootMuon::Class()); 300 298 ExRootTreeBranch *branchPhoton = treeWriter->NewBranch("Photon", TRootPhoton::Class()); 301 ExRootTreeBranch *branchTracks = treeWriter->NewBranch("Tracks", TRootTracks::Class()); 299 //ExRootTreeBranch *branchTracks = treeWriter->NewBranch("Tracks", TRootTracks::Class()); 300 ExRootTreeBranch *branchTrack = treeWriter->NewBranch("Tracks", D_Track::Class()); 302 301 ExRootTreeBranch *branchETmis = treeWriter->NewBranch("ETmis", TRootETmis::Class()); 303 302 ExRootTreeBranch *branchCalo = treeWriter->NewBranch("CaloTower", TRootCalo::Class()); … … 306 305 ExRootTreeBranch *branchFP420 = treeWriter->NewBranch("FP420hits", TRootRomanPotHits::Class()); 307 306 308 TRootGenParticle *particle;309 307 TRootETmis *elementEtmis; 310 308 TRootElectron *elementElec; 311 309 TRootMuon *elementMu; 312 310 TRootPhoton *elementPhoton; 313 TRootTracks *elementTracks;311 D_Track * elementTrack; 314 312 TRootCalo *elementCalo; 315 313 … … 323 321 vector<TLorentzVector> TrackCentral; 324 322 vector<PhysicsTower> towers; 325 vector<ParticleUtil> electron; 326 vector<ParticleUtil> muon; 327 vector<ParticleUtil> gamma; 323 //vector<ParticleUtil> electron; 324 vector<D_Particle> electron; 325 //vector<ParticleUtil> muon; 326 vector<D_Particle> muon; 327 //vector<ParticleUtil> gamma; 328 vector<D_Particle> gamma; 328 329 329 330 TSimpleArray<TRootGenParticle> NFCentralQ; 330 float iPhi=0,iEta=0; 331 331 332 D_CaloList list_of_calorimeters; 333 D_CaloElement CentralCalo("centralcalo", 334 -DET->CEN_max_calo_cen, DET->CEN_max_calo_cen, 335 DET->ELG_Ccen, DET->ELG_Ncen, DET->ELG_Scen, 336 DET->HAD_Chcal, DET->HAD_Nhcal, DET->HAD_Shcal); 337 D_CaloElement ForwardCalo("forwardcalo", 338 DET->CEN_max_calo_cen, DET->CEN_max_calo_fwd, 339 DET->ELG_Cfwd, DET->ELG_Nfwd, DET->ELG_Sfwd, 340 DET->HAD_Chf, DET->HAD_Nhf, DET->HAD_Shf ); 341 D_CaloElement BackwardCalo("backwardcalo", 342 -DET->CEN_max_calo_fwd, -DET->CEN_max_calo_cen, 343 DET->ELG_Cfwd, DET->ELG_Nfwd, DET->ELG_Sfwd, 344 DET->HAD_Chf, DET->HAD_Nhf, DET->HAD_Shf ); 345 //D_CaloElement CastorCalo("castor",5.5,6.6,1,0,0,1,0,0); 346 list_of_calorimeters.addElement(CentralCalo); 347 list_of_calorimeters.addElement(ForwardCalo); 348 list_of_calorimeters.addElement(BackwardCalo); 349 //list_of_calorimeters.addElement(CastorCalo); 350 list_of_calorimeters.sortElements(); 332 351 333 352 … … 360 379 towers.clear(); 361 380 input_particles.clear(); 362 381 382 383 /* 384 if(0) { // OLD SMEARING ALGORITHM without energy flow 363 385 // 2.1 Loop over all particles in event 364 386 itGen.Reset(); 365 387 while( (particle = (TRootGenParticle*) itGen.Next()) ) { 366 388 int pid = abs(particle->PID); 389 float iPhi=0,iEta=0; 367 390 368 391 … … 381 404 // the ordering of conditions have been optimised for speed : put first the STATUS condition 382 405 if( (particle->Status == 1) && 383 ( (pid != pNU1) && (pid != pNU2) && (pid != pNU3)) &&406 (pid != pNU1) && (pid != pNU2) && (pid != pNU3) && 384 407 (fabs(particle->Eta) < DET->CEN_max_calo_fwd) 385 408 ) … … 431 454 if(genMomentumBfield.E() !=0 && pid != pMU) { 432 455 // in case the Bfield is not simulated, checks that charged particles have enough pt to reach the calos 433 if ( !DET->FLAG_bfield && charge!=0 && genMomentumBfield.Pt() <= DET->TRACK_ptmin ) { /* particules do not reach calos */ }456 if ( !DET->FLAG_bfield && charge!=0 && genMomentumBfield.Pt() <= DET->TRACK_ptmin ) {}// particules do not reach calos 434 457 else { // particles reach calos 435 458 // applies the calo segmentation and returns iEta & iPhi 436 459 DET->BinEtaPhi(genMomentumBfield.Phi(), genMomentumBfield.Eta(), iPhi, iEta); 437 if(iEta != -100 && iPhi != -100) {460 if(iEta != UNDEFINED && iPhi != UNDEFINED) { 438 461 momentumCaloSegmentation.SetPtEtaPhiE(genMomentumBfield.Pt(),iEta,iPhi,genMomentumBfield.E()); 439 462 elementCalo = (TRootCalo*) branchCalo->NewEntry(); … … 441 464 PhysicsTower Tower(LorentzVector(momentumCaloSegmentation.Px(),momentumCaloSegmentation.Py(),momentumCaloSegmentation.Pz(),momentumCaloSegmentation.E())); 442 465 towers.push_back(Tower); 443 } // if iEta != -100466 } // if iEta != UNDEFINED 444 467 } // else : when particles reach the calos 445 468 } // 2.1.2.3 calotowers 446 469 447 470 448 471 // 2.1.2.4 ********************* central detector: tracks … … 451 474 (genMomentumBfield.E()!=0) && 452 475 (fabs(genMomentumBfield.Eta()) < DET->CEN_max_tracker) && 453 (DET->FLAG_bfield || ( !DET->FLAG_bfield && genMomentum Bfield.Pt() > DET->TRACK_ptmin )) &&476 (DET->FLAG_bfield || ( !DET->FLAG_bfield && genMomentum.Pt() > DET->TRACK_ptmin )) && 454 477 // if bfield not simulated, pt should be high enough to be taken into account 455 478 ((rand()%100) < DET->TRACK_eff) && … … 475 498 VFD->RomanPots(treeWriter,branchRP220,branchFP420,particle); 476 499 } 477 478 } // 2.1 while : loop on all particles of the event. 479 500 } // IF OLD ALGORITHM (= no energy flow ) 501 502 503 504 505 else // IF NEW ALGORITHM with energy flow 506 */ 507 { 508 D_CaloTowerList list_of_active_towers; 509 D_CaloTowerList list_of_towers_with_photon; // to speed up the code: will only look in interesting towers for gamma candidates 510 511 // 2.1a Loop over all particles in event, to fill the towers 512 itGen.Reset(); 513 TRootGenParticle *particle; 514 while( (particle = (TRootGenParticle*) itGen.Next()) ) { 515 int pid = abs(particle->PID); 516 particle->Charge=Charge(pid); 517 particle->setFractions(); // init 518 519 520 // 2.1a.1********************* preparation for the b-tagging 521 //// This subarray is needed for the B-jet algorithm 522 // optimization for speed : put first PID condition, then ETA condition, then either pt or status 523 if( (pid <= pB || pid == pGLUON) &&// is it a light quark or a gluon, i.e. is it one of these : u,d,c,s,b,g ? 524 fabs(particle->Eta) < DET->CEN_max_tracker && 525 particle->Status != 1 && 526 particle->PT > DET->PT_QUARKS_MIN ) { 527 NFCentralQ.Add(particle); 528 } 529 530 // 2.1a.2********************* visible particles only 531 if( (particle->Status == 1) && (pid != pNU1) && (pid != pNU2) && (pid != pNU3) ){ 532 533 // 2.1a.2.1 Central solenoidal magnetic field 534 TRACP->bfield(particle); // fills in particle->EtaCalo et particle->PhiCalo 535 particle->SetEtaPhi(particle->EtaCalo,particle->PhiCalo); // ???? check this line 536 537 // 2.1a.2.2 Filling the calorimetric towers -- includes also forward detectors ? 538 // first checks if the charged particles reach the calo! 539 if( DET->FLAG_bfield || 540 particle->getCharge()==0 || 541 (!DET->FLAG_bfield && particle->getCharge()!=0 && particle->PT > DET->TRACK_ptmin)) 542 if( 543 (particle->EtaCalo > list_of_calorimeters.getEtamin() ) && 544 (particle->EtaCalo < list_of_calorimeters.getEtamax() ) 545 ) { 546 float iEta=UNDEFINED, iPhi=UNDEFINED; 547 DET->BinEtaPhi(particle->PhiCalo,particle->EtaCalo,iPhi,iEta); // fills in iPhi and iEta 548 if (iEta != UNDEFINED && iPhi != UNDEFINED) 549 { 550 D_CaloTower tower(iEta,iPhi); // new tower 551 tower.Set_Eem_Ehad_E_ET(particle->E*particle->getFem() , particle->E*particle->getFhad() ); 552 553 list_of_active_towers.addTower(tower); 554 // this list may contain several times the same calotower, as several particles 555 // may leave some energy in the same calotower 556 // After the loop on particles, identical cells in the list should be merged 557 } // iEta and iPhi must be defined 558 } 559 560 // 2.1a.2.3 charged particles in tracker: energy flow 561 // if bfield not simulated, pt should be high enough to be taken into account 562 // it is supposed here that DET->MAX_calo > DET->CEN_max_tracker > DET->CEN_max_mu > 0 563 if( particle->getCharge() !=0 && 564 fabs(particle->EtaCalo)< DET->CEN_max_tracker && // stays in the tracker -> track available 565 ( DET->FLAG_bfield || 566 (!DET->FLAG_bfield && particle->PT > DET->TRACK_ptmin) 567 ) 568 ) { 569 // 2.1a.2.3.1 Filling the particle properties + smearing 570 // Hypothesis: the final eta/phi are the ones from the generator, thanks to the track reconstruction 571 // This is the EnergyFlow hypothesis 572 particle->SetEtaPhi(particle->Eta,particle->Phi); 573 float sET=UNDEFINED; // smeared ET, computed from the smeared E -> needed for the tracks 574 575 // 2.1a.2.3.2 Muons 576 if (pid == pMU && fabs(particle->EtaCalo)< DET->CEN_max_mu && particle->PT > DET->PTCUT_muon ) { 577 TLorentzVector p; 578 float sPT = gRandom->Gaus(particle->PT, DET->MU_SmearPt*particle->PT ); 579 if (sPT > 0 && sPT > DET->PTCUT_muon) { 580 p.SetPtEtaPhiE(sPT,particle->Eta,particle->Phi,sPT*cosh(particle->Eta)); 581 muon.push_back(D_Particle(p,pMU,particle->EtaCalo,particle->PhiCalo)); 582 } 583 sET = (sPT >0)? sPT : 0; 584 } 585 // 2.1a.2.3.3 Electrons 586 else if (pid == pE) { 587 // Finds in which calorimeter the particle has gone, to know its resolution 588 589 D_CaloElement currentCalo = list_of_calorimeters.getElement(particle->EtaCalo); 590 if(currentCalo.getName() == dummyCalo.getName()) { 591 cout << "** Warning: the calo coverage behind the tracker is not complete! **" << endl; } 592 593 // final smeared EM energy // electromagnetic fraction F_em =1 for electrons; 594 float sE = currentCalo.getElectromagneticResolution().Smear(particle->E); 595 if (sE>0) { 596 sET = sE/cosh(particle->Eta); 597 // NB: ET is found via the calorimetry and not via the track curvature 598 599 TLorentzVector p; 600 p.SetPtEtaPhiE(sET,particle->Eta,particle->Phi,sE); 601 if (sET > DET->PTCUT_elec) 602 electron.push_back(D_Particle(p,particle->PID,particle->EtaCalo,particle->PhiCalo)); 603 } else { sET=0;} // if negative smeared energy -- needed for the tracks 604 } 605 // 2.1a.2.3.4 Other charged particles : smear them for the tracks! 606 else { //other particles 607 D_CaloElement currentCalo = list_of_calorimeters.getElement(particle->EtaCalo); 608 float sEem = currentCalo.getElectromagneticResolution().Smear(particle->E * particle->getFem()); 609 float sEhad = currentCalo.getHadronicResolution().Smear(particle->E * particle->getFhad()); 610 float sE = ( (sEem>0)? sEem : 0 ) + ( (sEhad>0)? sEhad : 0 ); 611 sET = sE/cosh(particle->EtaCalo); 612 } 613 614 // 2.1a.2.3.5 Tracks 615 if( (rand()%100) < DET->TRACK_eff && sET!=0) { 616 elementTrack = (D_Track*) branchTrack->NewEntry(); 617 elementTrack->Set(particle->Eta, particle->Phi, particle->EtaCalo, particle->PhiCalo, sET); 618 TrackCentral.push_back(elementTrack->GetFourVector()); // tracks at vertex! 619 // TODO!!! associates the tracks to the calo where it points to 620 // TODO!!! apply a smearing on the position of the origin of the track 621 // TODO!!! elementTracks->SetPositionOut(Xout,Yout,Zout); 622 } 623 } // 2.1a.2.3 : if tracker/energy-flow 624 // 2.1a.2.4 Photons 625 // stays in the tracker -> track available -> gamma ID 626 else if( (pid == pGAMMA) && fabs(particle->EtaCalo)< DET->CEN_max_tracker ) { 627 float iEta=UNDEFINED, iPhi=UNDEFINED; 628 DET->BinEtaPhi(particle->PhiCalo,particle->EtaCalo,iPhi,iEta); // fills in iPhi and iEta 629 D_CaloTower tower(iEta,iPhi); 630 // stores the list of towers where to apply the photon ID algorithm. Just a trick for a faster search 631 list_of_towers_with_photon.addTower(tower); 632 } 633 // 2.1a.2.5 : very forward detectors 634 else if (DET->FLAG_vfd==1) { 635 // for the moment, only protons are transported 636 // BUT !!! could be a beam of other particles! (heavy ions?) 637 // BUT ALSO !!! if very forward muons, or others! 638 VFD->RomanPots(treeWriter,branchRP220,branchFP420,particle); 639 VFD->ZDC(treeWriter,branchZDC,particle); 640 } 641 // 2.1a.2.6: Zero degree calorimeter 642 //else if(DET->FLAG_zdc==1) { 643 //VFD->ZDC(treeWriter,branchZDC,particle); 644 //} 645 646 } // 2.1a.2 : if visible particle 647 } // loop on all particles 2.1a 648 649 650 // 2.1b loop on all (activated) towers 651 // at this stage, list_of_active_towers may contain several times the same tower 652 // first step is to merge identical towers, by matching their (iEta,iPhi) 653 list_of_active_towers.mergeDuplicates(); 654 // Calotower smearing 655 list_of_active_towers.smearTowers(list_of_calorimeters); 656 657 for(unsigned int i=0; i<list_of_active_towers.size(); i++) { 658 float iEta = list_of_active_towers[i].getEta(); 659 float iPhi = list_of_active_towers[i].getPhi(); 660 float e = list_of_active_towers[i].getE(); 661 if(iEta != UNDEFINED && iPhi != UNDEFINED && e!=0) { 662 elementCalo = (TRootCalo*) branchCalo->NewEntry(); 663 elementCalo->set(list_of_active_towers[i]); 664 // not beautiful : should be improved! 665 TLorentzVector p; 666 p.SetPtEtaPhiE(list_of_active_towers[i].getET(), iEta, iPhi, e ); 667 PhysicsTower Tower(LorentzVector(p.Px(),p.Py(),p.Pz(),p.E())); 668 towers.push_back(Tower); 669 } 670 } // loop on towers 671 672 // 2.1c photon ID 673 // list_of_towers_with_photon is the list of towers with photon candidates 674 // already smeared ! 675 // sorts the vector and smears duplicates 676 list_of_towers_with_photon.mergeDuplicates(); 677 678 for(unsigned int i=0; i<list_of_towers_with_photon.size(); i++) { 679 float eta = list_of_towers_with_photon[i].getEta(); 680 float phi = list_of_towers_with_photon[i].getPhi(); 681 D_CaloTower cal(list_of_active_towers.getElement(eta,phi)); 682 if(cal.getEta() != UNDEFINED && cal.getPhi() != UNDEFINED && cal.getE() > 0) { 683 TLorentzVector p; 684 p.SetPtEtaPhiE(cal.getET(), eta,phi,cal.getE() ); 685 if (cal.getET() > DET->PTCUT_gamma) { gamma.push_back(D_Particle(p,pGAMMA,p.Eta(),p.Phi())); } 686 } 687 } // for -- list of photons 688 689 } // IF NEW ALGORITHM with energy flow 690 691 480 692 481 693 482 694 // 2.2 ********** Output preparation & complex objects *********** 483 484 695 // 2.2.1 ********************* sorting collections by decreasing pt 485 696 DET->SortedVector(electron); … … 487 698 elementElec = (TRootElectron*) branchElectron->NewEntry(); 488 699 elementElec->Set(electron[i].Px(),electron[i].Py(),electron[i].Pz(),electron[i].E()); 700 elementElec->EtaCalo = electron[i].EtaCalo(); 701 elementElec->PhiCalo = electron[i].PhiCalo(); 489 702 elementElec->Charge = sign(electron[i].PID()); 490 703 elementElec->IsolFlag = DET->Isolation(electron[i].Phi(),electron[i].Eta(),TrackCentral,2.0);//isolation based on tracks … … 495 708 elementMu->Charge = sign(muon[i].PID()); 496 709 elementMu->Set(muon[i].Px(),muon[i].Py(),muon[i].Pz(),muon[i].E()); 710 elementMu->EtaCalo = muon[i].EtaCalo(); 711 elementMu->PhiCalo = muon[i].PhiCalo(); 497 712 elementMu->IsolFlag = DET->Isolation(muon[i].Phi(),muon[i].Eta(),TrackCentral,2.0); 498 713 } … … 501 716 elementPhoton = (TRootPhoton*) branchPhoton->NewEntry(); 502 717 elementPhoton->Set(gamma[i].Px(),gamma[i].Py(),gamma[i].Pz(),gamma[i].E()); 718 elementPhoton->EtaCalo = gamma[i].EtaCalo(); 719 elementPhoton->PhiCalo = gamma[i].PhiCalo(); 503 720 } 504 721 … … 522 739 elementEtmis->Py = (-PTmis).Py(); 523 740 524 // 2.2.3 ************* B-tag, tau jets741 // 2.2.3 ************* jets, B-tag, tau jets 525 742 sorted_jets=JETRUN->RunJets(input_particles); 526 743 JETRUN->RunJetBtagging(treeWriter, branchJet,sorted_jets,NFCentralQ); … … 529 746 treeWriter->Fill(); 530 747 } // 2. Loop over all events ('for' loop) 531 748 749 532 750 cout <<"** **"<< endl; 533 751 cout <<"** Exiting detector simulation... **"<< endl; … … 649 867 delete treeReader; 650 868 delete DET; 651 //delete TRIGT;869 delete TRIGT; 652 870 delete TRACP; 653 871 delete JETRUN; -
trunk/Examples/Trigger_Only.cpp
r260 r264 94 94 95 95 //read the datacard input file 96 string TrigDatacard(" ");96 string TrigDatacard("data/trigger.dat"); 97 97 if(argc==3) TrigDatacard =argv[2]; 98 98 -
trunk/Examples/src/Analysis_Ex.cc
r260 r264 155 155 D1 = gen->D1; // particle 1st daughter 156 156 D2 = gen->D2; // particle 2nd daughter 157 Charge = gen-> Charge; // electrical charge157 Charge = gen->getCharge(); // electrical charge 158 158 159 159 T = gen->T; // particle vertex position (t component) … … 334 334 for(Int_t i=0;i < numElec; i++)Lept[i].SetPxPyPzE(el[i]->Px,el[i]->Py,el[i]->Pz,el[i]->E); 335 335 for(Int_t k = numElec; k < (numElec+mu.GetEntries()); k++)Lept[k].SetPxPyPzE(mu[k-numElec]->Px,mu[k-numElec]->Py,mu[k-numElec]->Pz,mu[k-numElec]->E); 336 336 cout<<"normalement il y a quelque chose... "<<endl; 337 337 //Example how to white a branch in the output file 338 338 inv_mass=(TRootInvm*) INVMASS->NewEntry(); -
trunk/README
r206 r264 104 104 - dans ParticleUtil 105 105 eta,phi et eta_calo,phi_calo 106 - TRootParticle::SetEtaPhiEET : pas fini 106 107 -
trunk/Resolutions.cpp
r260 r264 1 /*********************************************************************** 2 ** ** 3 ** /----------------------------------------------\ ** 4 ** | Delphes, a framework for the fast simulation | ** 5 ** | of a generic collider experiment | ** 6 ** \----------------------------------------------/ ** 7 ** ** 8 ** ** 9 ** This package uses: ** 10 ** ------------------ ** 11 ** FastJet algorithm: Phys. Lett. B641 (2006) [hep-ph/0512210] ** 12 ** Hector: JINST 2:P09005 (2007) [physics.acc-ph:0707.1198v2] ** 13 ** FROG: [hep-ex/0901.2718v1] ** 14 ** ** 15 ** ------------------------------------------------------------------ ** 16 ** ** 17 ** Main authors: ** 18 ** ------------- ** 19 ** ** 20 ** Severine Ovyn Xavier Rouby ** 21 ** severine.ovyn@uclouvain.be xavier.rouby@cern ** 22 ** ** 23 ** Center for Particle Physics and Phenomenology (CP3) ** 24 ** Universite catholique de Louvain (UCL) ** 25 ** Louvain-la-Neuve, Belgium ** 26 ** ** 27 ** Copyright (C) 2008-2009, ** 28 ** All rights reserved. ** 29 ** ** 30 ***********************************************************************/ 1 /* 2 ---- FastSim ---- 3 A Fast Simulator for general purpose LHC detector 4 S. Ovyn ~~~~ severine.ovyn@uclouvain.be 5 6 Center for Particle Physics and Phenomenology (CP3) 7 Universite Catholique de Louvain (UCL) 8 Louvain-la-Neuve, Belgium 9 */ 10 11 /// \file Smearing.cpp 12 /// \brief executable for the FastSim 31 13 32 14 #include "TChain.h" … … 47 29 #include "JetsUtil.h" 48 30 #include "BFieldProp.h" 31 32 //#include "PseudoJet.hh" 33 //#include "ClusterSequence.hh" 49 34 50 35 #include<vector> … … 75 60 if(abs(gen1->PID)==15) 76 61 { 77 cout<<"au moins on a un tau "<<endl;78 62 int d1=gen1->D1; 79 63 int d2=gen1->D2; 80 cout<<"il a des filles? "<<endl;81 64 if((d1 < array.GetEntries()) && (d1 > 0) && (d2 < array.GetEntries()) && (d2 > 0)) 82 65 { 83 66 tauhad=true; 84 67 for(int d=d1; d < d2+1; d++) 85 { cout<<abs(array[d]->PID)<<" "<<endl;68 { 86 69 if(abs(array[d]->PID)== pE || abs(array[d]->PID)== pMU)tauhad=false; 87 70 } … … 115 98 { 116 99 TLorentzVector Att; 117 Att.SetP xPyPzE(jet->Px,jet->Py,jet->Pz,jet->E);100 Att.SetPtEtaPhiE(jet->PT,jet->Eta,jet->Phi,jet->E); 118 101 if(DeltaR(JET.Phi(),JET.Eta(),Att.Phi(),Att.Eta()) < deltaRtest) 119 102 { … … 137 120 { 138 121 TLorentzVector Att; 139 Att.SetP xPyPzE(elec->Px,elec->Py,elec->Pz,elec->E);122 Att.SetPtEtaPhiE(elec->PT,elec->Eta,elec->Phi,elec->E); 140 123 if(DeltaR(ELEC.Phi(),ELEC.Eta(),Att.Phi(),Att.Eta()) < deltaRtest) 141 124 { … … 313 296 case pE: // all electrons with eta < DET->MAX_CALO_FWD 314 297 PairingElec(recoMomentum,genMomentum,branchElec); 315 if(recoMomentum. Pt()>1){298 if(recoMomentum.E()!=0){ 316 299 elementElec=(RESOLELEC*) branchelec->NewEntry(); 317 300 elementElec->E = genMomentum.E(); … … 331 314 332 315 } // while 333 316 334 317 //compute missing transverse energy from calo towers 335 318 TIter itCalo((TCollection*)branchTowers); … … 340 323 while( (calo = (TRootCalo*) itCalo.Next()) ) 341 324 { 342 //Att.SetPxPyPzE(towers[i].fourVector.px, towers[i].fourVector.py, towers[i].fourVector.pz, towers[i].fourVector.E);343 Att.SetPtEtaPhiE(calo->PT,calo->Eta,calo->Phi,calo->E);344 towers.push_back(Att);345 if(fabs(Att.Eta()) < DET->CEN_max_calo_fwd)346 {347 ScalarEt = ScalarEt + Att.Et();348 PTmisReco = PTmisReco + Att;349 }350 }351 325 if(calo->E !=0){ 326 Att.SetPtEtaPhiE(calo->getET(),calo->Eta,calo->Phi,calo->E); 327 towers.push_back(Att); 328 if(fabs(Att.Eta()) < DET->CEN_max_calo_fwd) 329 { 330 ScalarEt = ScalarEt + calo->getET(); 331 PTmisReco = PTmisReco + Att; 332 } 333 } 334 } 352 335 elementEtmis= (ETMIS*) branchetmis->NewEntry(); 353 336 elementEtmis->Et = (PTmisGEN).Pt(); … … 363 346 364 347 TSimpleArray<TRootGenParticle> TausHadr = TauHadr(branchGen); 365 cout<<"nombre de tau-jets "<<TausHadr.GetEntries()<<endl;366 348 367 349 TLorentzVector JETreco(0,0,0,0); … … 397 379 if( (EnergySmallCone(towers,JETT.Eta(),JETT.Phi(),DET->TAU_energy_scone,DET->JET_seed)/JETT.E()) > 0.95 398 380 && (NumTracks(branchTracks,DET->TAU_track_pt,JETT.Eta(),JETT.Phi(),DET->TAU_track_scone))==1)numTauRec++; 399 400 381 } 401 382 } … … 404 385 405 386 } // for itJet : loop on all jets 387 //cout<<"i"<<endl; 406 388 407 389 treeWriter->Fill(); 408 390 } // Loop over all events 409 391 treeWriter->Write(); 410 411 412 392 float frac = numTauRec/numTau; 393 cout<<numTauRec<<endl; 394 cout<<numTau<<endl; 413 395 414 396 cout << "** Exiting..." << endl; -
trunk/TODO
r226 r264 18 18 - copy constructors des classes ; passage par reference ; gprof tool <-> option -gp 19 19 - valgrind <-> -g <-> definitely lost / probably lost 20 - include.cpp de frog???20 - pourquoi doit-on inclure les fichiers.cpp de frog??? 21 21 - TreeClassesLinkDef ??? 22 - libHector.so = libUtilities.so !!!!! 23 - FLAG_zdc <-> pas complet, notamment dans le fichier log -
trunk/Utilities/ExRootAnalysis/interface/BlockClasses.h
r220 r264 13 13 * present in the data members of the Block TRoot class. 14 14 * 15 * $Date: 2009-02- 02 11:32:12$16 * $Revision: 1.1 1$15 * $Date: 2009-02-11 09:19:14 $ 16 * $Revision: 1.12 $ 17 17 * 18 18 * … … 24 24 #include "TObject.h" 25 25 #include "BlockCompare.h" 26 #include "interface/D_Constants.h" 27 #include "interface/CaloUtil.h" 26 28 27 29 class TSortableObject: public TObject … … 147 149 float Pz; // particle momentum vector (z component) in GeV 148 150 149 float PT; // particle transverse momentum in GeV150 151 float Eta; // particle pseudorapidity 151 152 float Phi; // particle azimuthal angle in rad 152 153 154 float EtaCalo; // particle pseudorapidity when entering the calo, 155 float PhiCalo; // particle azimuthal angle in rad when entering the calo 156 153 157 void Set(const TLorentzVector& momentum); 154 158 void Set(const float px, const float py, const float pz, const float e); 155 static TCompare *fgCompare; //! 156 const TCompare *GetCompare() const { return fgCompare; } 159 void SetEtaPhi(const float eta, const float phi) {Eta=eta; Phi=phi;}; 160 void SetEtaPhiCalo(const float eta, const float phi) {EtaCalo=eta; PhiCalo=phi;}; 161 void SetEtaPhiEET(const float eta, const float phi, const float e, const float et); 162 static TCompare *fgCompare; //! 163 const TCompare *GetCompare() const { return fgCompare; } 164 //void SetEem_Ehad(const float sE_em, const float sE_had) {} ; // sets E_em and E_had, computes E and ET 165 float PT; // particle transverse momentum in GeV 166 //const float getEtaGen() const {return _EtaGen;} 167 //const float getPhiGen() const {return _PhiGen;} 168 169 170 //protected: 171 //float EGen, _EtaGen, _PhiGen; // from the generator: energy, eta, phi 157 172 158 173 ClassDef(TRootParticle, 1) … … 165 180 166 181 public: 167 TRootGenParticle() { };182 TRootGenParticle() {_initialised=false;} 168 183 int PID; // particle HEP ID number [RawHepEventParticle::pid()] 169 184 int Status; // particle status [RawHepEventParticle::status()] … … 172 187 int D1; // particle 1st daughter [RawHepEventParticle::daughter1() - 1] 173 188 int D2; // particle 2nd daughter [RawHepEventParticle::daughter2() - 1] 174 float Charge; // electrical charge175 189 176 190 float T; // particle vertex position (t component) [RawHepEventParticle::t()] … … 179 193 float Z; // particle vertex position (z component) [RawHepEventParticle::z()] 180 194 float M; 181 static TCompare *fgCompare; //! 182 195 void setFractions(); 196 const float getCharge() const {return Charge;}; 197 const float getFem() {if(!_initialised) setFractions(); return _Fem;} 198 const float getFhad() {if(!_initialised) setFractions(); return _Fhad;} 199 200 float Charge; // electrical charge 201 202 static TCompare *fgCompare; //! 203 protected: 204 float _Fem, _Fhad; // fractions of energy deposit 205 bool _initialised; 183 206 ClassDef(TRootGenParticle, 1) 184 207 }; 208 185 209 186 210 //------------------------------------------------------------------------------ … … 225 249 //--------------------------------------------------------------------------- 226 250 227 class TRootTracks: public TRootParticle 228 { 229 public: 230 TRootTracks() : Etaout(0), Phiout(0) {}; 231 static TCompare *fgCompare; //! 232 251 class D_Track : public TSortableObject { 252 //class D_Track : public TRootParticle { 253 public: 254 D_Track(); // needed for storage in ExRootAnalysis 255 D_Track(const D_Track& track); 256 D_Track(const float inEta, const float inPhi, const float outEta, const float outPhi, const float pt); 257 D_Track& operator=(const D_Track& track); 258 void Set(const float inEta, const float inPhi, const float outEta, const float outPhi, const float pt); 259 const TLorentzVector GetFourVector() const; 260 const float getEta() const {return Eta;} 261 const float getPhi() const {return Phi;} 262 const float getEtaOuter() const {return EtaOuter;} 263 const float getPhiOuter() const {return PhiOuter;} 264 const float getE() const {return E;} 265 const float getPx() const {return Px;} 266 const float getPy() const {return Py;} 267 const float getPz() const {return Pz;} 268 const float getPT() const {return PT;} 269 270 static TCompare *fgCompare; //! 271 const TCompare *GetCompare() const { return fgCompare; } 272 protected: 273 float Eta, Phi; // (eta,phi) at the beginning of the track 274 float EtaOuter, PhiOuter; // (eta,phi) at the end of the track 275 float PT, E, Px, Py, Pz; // transverse momentum 276 ClassDef(D_Track, 1) 277 }; 278 279 280 class TRootTracks: public TRootParticle { 281 public: 282 TRootTracks() {} // : Etaout(0), Phiout(0) {}; 283 static TCompare *fgCompare; //! 284 TRootTracks(const D_Track& track); 285 float E; // particle energy in GeV 286 float Px; // particle momentum vector (x component) in GeV 287 float Py; // particle momentum vector (y component) in GeV 288 float Pz; // particle momentum vector (z component) in GeV 289 290 float Eta; // particle pseudorapidity 291 float Phi; // particle azimuthal angle in rad 292 293 float EtaCalo; // particle pseudorapidity when entering the calo, 294 float PhiCalo; // particle azimuthal angle in rad when entering the calo 233 295 // float X, Y, Z; // coordinates of the beginning of the track 234 296 // float Xout, Yout, Zout; // coordinates of the end of the track 235 float Etaout, Phiout; // coordinates of the end of the track297 //float Etaout, Phiout; // coordinates of the end of the track 236 298 // void SetPosition(const float x, const float y, const float z) {X=x; Y=y; Z=z;} 237 299 // void SetPositionOut(const float x, const float y, const float z) {Xout=x; Yout=y; Zout=z;} … … 241 303 //--------------------------------------------------------------------------- 242 304 243 class TRootCalo: public TRootParticle 244 { 305 /*class TRootCalo: public TRootParticle 245 306 public: 246 307 TRootCalo() {}; … … 248 309 249 310 ClassDef(TRootCalo, 1) 311 }; 312 */ 313 314 //class TRootCalo: public TSortableObject { 315 class TRootCalo: public TRootParticle { 316 public: 317 TRootCalo() ; 318 TRootCalo(const TRootCalo& cal); 319 TRootCalo& operator=(const TRootCalo& cal); 320 void set(const D_CaloTower& cal); 321 static TCompare *fgCompare; //! 322 // const TCompare *GetCompare() const { return fgCompare; } 323 const float getET() const {return ET;} 324 325 protected: 326 //float Eta, Phi; // segmented eta, phi 327 float E_em, E_had; // electromagnetic and hadronic components of the tower energy 328 //float E; 329 float ET; // total energy and transverse energy 330 ClassDef(TRootCalo, 1) 250 331 }; 251 332 … … 340 421 }; 341 422 342 //---------------------------------------------------------------------------343 344 423 #endif // BLOCKCLASSES_H 345 424 -
trunk/Utilities/ExRootAnalysis/src/BlockClasses.cc
r220 r264 11 11 * to preserve mother-dautherlinks between particles. 12 12 * 13 * $Date: 2009-02- 02 11:32:01$14 * $Revision: 1. 7$13 * $Date: 2009-02-11 09:19:14 $ 14 * $Revision: 1.8 $ 15 15 * 16 16 * … … 22 22 #include "BlockCompare.h" 23 23 #include "TLorentzVector.h" 24 #include <cmath> 24 25 25 26 TCompare *TRootGenParticle::fgCompare = 0; … … 38 39 TCompare *TRootRomanPotHits::fgCompare =0; 39 40 TCompare *TRootTrigger::fgCompare =0; 41 //TCompare *D_CaloTower::fgCompare=0; 42 TCompare *D_Track::fgCompare=0; 40 43 41 44 void TRootParticle::Set(const TLorentzVector& momentum) { … … 61 64 } 62 65 66 void TRootParticle::SetEtaPhiEET(const float eta, const float phi, const float e, const float et) { 67 Eta = eta; Phi = phi; E = e; PT = et; 68 //float theta = 2* atan(exp(-Eta); 69 Px = PT*cos(Phi); 70 Py = PT*sin(Phi); 71 } 63 72 73 74 void TRootGenParticle::setFractions() { 75 switch(abs(PID)) { 76 default: _Fem = 0; _Fhad=1; break; 77 case(pE): 78 case(pGAMMA): 79 case(pPI0): 80 _Fem = 1; _Fhad=0; break; 81 case(pNU1): 82 case(pNU2): 83 case(pNU3): 84 case(pMU): 85 _Fem =0; _Fhad=0; break; 86 case(pK0S): 87 case(pLAMBDA): 88 _Fem=0.3; _Fhad=0.7; break; 89 } 90 _initialised=true; 91 } 92 93 float Eta, Phi; // (eta,phi) at the beginning of the track 94 float EtaOuter, PhiOuter; // (eta,phi) at the end of the track 95 float PT, E, Px, Py, Pz; 96 97 D_Track::D_Track() : 98 Eta(UNDEFINED), Phi(UNDEFINED), EtaOuter(UNDEFINED), PhiOuter(UNDEFINED), 99 PT(UNDEFINED), E(UNDEFINED), Px(UNDEFINED), Py(UNDEFINED), Pz(UNDEFINED) {} 100 101 D_Track::D_Track(const float inEta, const float inPhi, const float outEta, const float outPhi, const float pt) : 102 Eta(inEta), Phi(inPhi), EtaOuter(outEta), PhiOuter(outPhi), 103 PT(pt) { 104 TLorentzVector p; p.SetPtEtaPhiE(PT,Eta,Phi,PT*cosh(Eta)); 105 Px = p.Px(); Py = p.Py(); Pz = p.Pz(); E=p.E(); 106 } 107 108 D_Track::D_Track(const D_Track& track) : 109 Eta(track.Eta), Phi(track.Phi), 110 EtaOuter(track.EtaOuter), PhiOuter(track.PhiOuter), 111 PT(track.PT), E(track.E), Px(track.Px), Py(track.Py), Pz(track.Pz) {} 112 113 D_Track& D_Track::operator=(const D_Track& track) { 114 if(this == &track) return *this; 115 Eta = track.Eta; Phi = track.Phi; 116 EtaOuter = track.EtaOuter; PhiOuter = track.PhiOuter; 117 PT = track.PT; E = track.E; Px = track.Px; Py= track.Py; Pz =track.Pz; 118 return *this; 119 } 120 121 void D_Track::Set(const float inEta, const float inPhi, const float outEta, const float outPhi, const float pt) { 122 Eta= inEta; Phi=inPhi; EtaOuter=outEta; PhiOuter=outPhi; PT=pt; 123 TLorentzVector p; p.SetPtEtaPhiE(PT,Eta,Phi,PT*cosh(Eta)); 124 Px = p.Px(); Py = p.Py(); Pz = p.Pz(); E=p.E(); 125 } 126 127 const TLorentzVector D_Track::GetFourVector() const { 128 TLorentzVector v; 129 v.SetPtEtaPhiE(PT,Eta,Phi,PT*cosh(Eta)); 130 return TLorentzVector(v); 131 } 132 133 TRootCalo::TRootCalo() : 134 E_em(UNDEFINED), E_had(UNDEFINED), ET(UNDEFINED) {} 135 //Eta(UNDEFINED), Phi(UNDEFINED), E_em(UNDEFINED), E_had(UNDEFINED), E(UNDEFINED), ET(UNDEFINED) {} 136 137 TRootCalo::TRootCalo(const TRootCalo& cal) { 138 E_em=cal.E_em; E_had=cal.E_had; ET=cal.ET; 139 //Eta =cal.Eta; Phi=cal.Phi; E_em=cal.E_em; E_had=cal.E_had; E=cal.E; ET=cal.ET; 140 } 141 142 TRootCalo& TRootCalo::operator=(const TRootCalo& cal) { 143 if(this==&cal) return *this; 144 Eta =cal.Eta; Phi=cal.Phi; E_em=cal.E_em; E_had=cal.E_had; E=cal.E; ET=cal.ET; 145 return *this; 146 } 147 148 void TRootCalo::set(const D_CaloTower& cal) { 149 Eta =cal.getEta(); Phi=cal.getPhi(); 150 E_em=cal.getEem(); E_had=cal.getEhad(); 151 E =cal.getE(); ET =cal.getET(); 152 EtaCalo = cal.getEta(); 153 PhiCalo = cal.getPhi(); 154 } 155 156 157 TRootTracks::TRootTracks(const D_Track& track) : 158 E(track.getE()), Px(track.getPx()), Py(track.getPy()), Pz(track.getPz()), 159 Eta(track.getEta()), Phi(track.getPhi()), 160 /*Etaout(track.getEtaOuter()),*/ EtaCalo(track.getEtaOuter()), /*Phiout(track.getPhiOuter()),*/ PhiCalo(track.getPhiOuter()) {} 161 -
trunk/Utilities/ExRootAnalysis/src/BlockClassesLinkDef.h
r67 r264 4 4 * Lists classes to be included in cint dicitonary 5 5 * 6 * $Date: 200 8-12-02 11:14:45$7 * $Revision: 1. 2$6 * $Date: 2009-02-11 09:19:14 $ 7 * $Revision: 1.3 $ 8 8 * 9 9 * … … 13 13 14 14 #include "Utilities/ExRootAnalysis/interface/BlockClasses.h" 15 #include "interface/D_Constants.h" 15 16 16 17 #ifdef __CINT__ … … 39 40 #pragma link C++ class TRootLHEFEvent+; 40 41 #pragma link C++ class TRootLHEFParticle+; 42 #pragma link C++ class D_Track+; 43 //#pragma link C++ class D_CaloTower+; 41 44 42 45 -
trunk/Utilities/FROG/config.txt
r112 r264 3 3 InputVisFile ={../../DelphesToFrog.vis}; 4 4 5 GeomToDisplay = {910000000,920000000,930000000,940000000};5 //GeomToDisplay = {910000000,920000000,930000000,940000000}; 6 6 EventToDisplay = {21000000}; 7 7 -
trunk/Utilities/Hector/src/H_AbstractBeamLine.cc
r234 r264 485 485 /// @param offset In meters 486 486 487 extern intrelative_energy;487 extern bool relative_energy; 488 488 if(!relative_energy) { 489 489 vector<H_OpticalElement*>::iterator element_i; -
trunk/VERSION
r261 r264 1 1.4beta 1 x.y -
trunk/data/DataCardDet.dat
r259 r264 11 11 ELG_Scen 0.05 // S term for central ECAL 12 12 ELG_Ncen 0.25 // N term for central ECAL 13 ELG_Ccen 0.005 // C term for central ECAL14 ELG_ Sfwd 2.084 // S term for FCAL15 ELG_ Nfwd 0.0 // N term for FCAL16 ELG_ Cfwd 0.107 // C term for FCAL13 ELG_Ccen 0.005 // C term for central ECAL 14 ELG_Cfwd 0.107 // S term for forward ECAL 15 ELG_Sfwd 2.084 // C term for forward ECAL 16 ELG_Nfwd 0.0 // N term for central ECAL 17 17 18 18 # Energy resolution for hadrons in ecal/hcal/hf 19 19 # \sigma/E = C + N/E + S/\sqrt{E}, E in GeV 20 HAD_Shcal 1.5 // S term for central HCAL 20 HAD_Shcal 1.5 // S term for central HCAL // hadronic calorimeter 21 21 HAD_Nhcal 0. // N term for central HCAL 22 22 HAD_Chcal 0.05 // C term for central HCAL 23 HAD_Shf 2.7 // S term for FCAL24 HAD_Nhf 0. // N term for FCAL25 HAD_Chf 0.13 // C term for FCAL23 HAD_Shf 2.7 // S term for HF // forward calorimeter 24 HAD_Nhf 0. // N term for HF 25 HAD_Chf 0.13 // C term for HF 26 26 27 27 # Muon smearing … … 29 29 30 30 # Tracking efficiencies 31 TRACK_ptmin 0. 9// minimal pt needed to reach the calorimeter in GeV31 TRACK_ptmin 0.0 // minimal pt needed to reach the calorimeter in GeV 32 32 TRACK_eff 100 // efficiency associated to the tracking (%) 33 33 … … 48 48 49 49 # Thresholds for reconstructed objetcs, Pt in GeV 50 PTCUT_elec 10.051 PTCUT_muon 10.052 PTCUT_jet 20.053 PTCUT_gamma 10.054 PTCUT_taujet 10.050 PTCUT_elec 0.0 51 PTCUT_muon 0.0 52 PTCUT_jet 0.0 53 PTCUT_gamma 0.0 54 PTCUT_taujet 0.0 55 55 56 56 # General jet variable … … 65 65 66 66 # FLAGS 67 FLAG_bfield 1//1 to run the bfield propagation else 067 FLAG_bfield 0 //1 to run the bfield propagation else 0 68 68 FLAG_vfd 1 //1 to run the very forward detectors else 0 69 69 FLAG_trigger 1 //1 to run the trigger selection else 0 … … 88 88 RP_420_s 420 // distance of the RP to the IP, in meters 89 89 RP_420_x 0.004 // distance of the RP to the beam, in meters 90 RP_beam1Card data/LHCB1IR5_v6.500.tfs91 RP_beam2Card data/LHCB2IR5_v6.500.tfs92 RP_IP_name IP593 94 90 95 91 # In case FROG event display allowed -
trunk/data/DataCardDet_CMS.dat
r259 r264 29 29 30 30 # Tracking efficiencies 31 TRACK_ptmin 0. 9// minimal pt needed to reach the calorimeter in GeV31 TRACK_ptmin 0.0 // minimal pt needed to reach the calorimeter in GeV 32 32 TRACK_eff 100 // efficiency associated to the tracking (%) 33 33 … … 67 67 FLAG_bfield 1 //1 to run the bfield propagation else 0 68 68 FLAG_vfd 1 //1 to run the very forward detectors else 0 69 FLAG_trigger 1//1 to run the trigger selection else 070 FLAG_frog 1//1 to run the FROG event display69 FLAG_trigger 0 //1 to run the trigger selection else 0 70 FLAG_frog 0 //1 to run the FROG event display 71 71 72 72 # In case BField propagation allowed -
trunk/data/trigger.dat
r249 r264 1 TRIGGER CARD # DO NOT REMOVE THIS IS A TAG!1 #TRIGGER CARD # DO NOT REMOVE THIS IS A TAG! 2 2 3 3 -
trunk/interface/BFieldProp.h
r260 r264 53 53 54 54 // Propagation and bfield are very similar. At the end, after code cleaning, 55 // onl ebfield will remain in this class55 // only bfield will remain in this class 56 56 void Propagation(const TRootGenParticle *Part,TLorentzVector &genMomentum); 57 void bfield( const TRootGenParticle *Part, float& etacalo, float& phicalo);57 void bfield(TRootGenParticle *Part); // fills in Part->EtaCalo and Part->PhiCalo 58 58 59 59 -
trunk/interface/FrogUtil.h
r260 r264 34 34 35 35 36 /// \file FrogUtil.h 37 /// \brief FrogDisplay class 38 36 39 #include "SmearUtil.h" 37 40 #include "FROG_Events.h" -
trunk/interface/SmearUtil.h
r260 r264 40 40 #include "TLorentzVector.h" 41 41 42 #include "D_Constants.h" 43 #include "CaloUtil.h" 42 44 #include "BlockClasses.h" 43 45 #include "TSimpleArray.h" … … 46 48 using namespace std; 47 49 48 class ParticleUtil{50 class D_Particle { 49 51 50 52 public: 51 ParticleUtil(const TLorentzVector &genMomentum, int pid); 52 53 float E() {return _e;} // particle energy [GeV] 54 float Px() {return _px;} // horizontal coordinate of momentum [GeV] 55 float Py() {return _py;} // vertical coordinate of momentum [GeV] 56 float Pz() {return _pz;} // longitudinal coordinate of momentum [GeV] 57 float Pt() {return _pt;} // transverse momentum [GeV] 58 float EtaCalo() {return _etaCalo;} // pseudorapidity 59 float Eta() {return _eta;} // pseudorapidity 60 float PhiCalo() {return _phiCalo;} // azimuthal angle 61 float Phi() {return _phi;} // azimuthal angle 62 int PID() {return _pid;} // particle energy in [GeV] 53 D_Particle(const TLorentzVector & p, const int pid, const float etacalo, const float phicalo) : 54 _fourmomentum(p), _pid(pid), _etaCalo(etacalo), _phiCalo(phicalo) {} 55 //D_Particle(const float e, const float eta, const float phi, const float pt, const int pid) : 56 // _pid(pid), _etaCalo(UNDEFINED), _phiCalo(UNDEFINED) { TLorentzVector p; p.SetPtEtaPhiE(pt,eta,phi,e); _fourmomentum = p; } 57 D_Particle(const float px, const float py, const float pz, const float e, const int pid) : 58 _fourmomentum(px,py,pz,e), _pid(pid), _etaCalo(UNDEFINED), _phiCalo(UNDEFINED) {} 59 60 const float E() const {return _fourmomentum.E();} // particle energy [GeV] 61 const float Px() const {return _fourmomentum.Px();} // horizontal coordinate of momentum [GeV] 62 const float Py() const {return _fourmomentum.Py();} // vertical coordinate of momentum [GeV] 63 const float Pz() const {return _fourmomentum.Pz();} // longitudinal coordinate of momentum [GeV] 64 const float Pt() const {return _fourmomentum.Pt();} // transverse momentum [GeV] 65 const float EtaCalo() const {return _etaCalo;} // pseudorapidity 66 const float Eta() const {return _fourmomentum.Eta();} // pseudorapidity 67 const float PhiCalo() const {return _phiCalo;} // azimuthal angle 68 const float Phi() const {return _fourmomentum.Phi();} // azimuthal angle 69 const int PID() const {return _pid;} // particle energy in [GeV] 70 const TLorentzVector& getFourMomentum() const {return _fourmomentum;} 63 71 64 72 private: 65 float _e, _px, _py, _pz, _pt; 66 float _eta, _etaCalo, _phi, _phiCalo; 73 TLorentzVector _fourmomentum; 67 74 int _pid; 75 float _etaCalo, _phiCalo; 68 76 }; 69 70 #ifndef __PI__71 #define __PI__72 extern const float pi = 3.14159265358979312;73 #endif74 77 75 78 class RESOLution … … 93 96 float VFD_s_zdc; // distance of the Zero Degree Calorimeter, from the Interaction poin, in [m] 94 97 95 float 96 float 97 float 98 float 98 float RP_220_s; // distance of the RP to the IP, in meters 99 float RP_220_x; // distance of the RP to the beam, in meters 100 float RP_420_s; // distance of the RP to the IP, in meters 101 float RP_420_x; // distance of the RP to the beam, in meters 99 102 string RP_beam1Card; // 100 103 string RP_beam2Card; // … … 186 189 int FLAG_bfield; //flag for bfield propagation 187 190 int FLAG_vfd; //flag for very forward detector 191 int FLAG_zdc; //flag for very forward detector 188 192 189 193 int NEvents_Frog; … … 191 195 192 196 // to sort a vector 193 void SortedVector(vector<ParticleUtil> &vect); 197 //void SortedVector(vector<ParticleUtil> &vect); 198 void SortedVector(vector<D_Particle> &vect); 194 199 195 200 /// Reads the data card for the initialisation of the parameters … … 227 232 228 233 }; 229 230 231 // particles PID (PDG ID)232 const int pU = 1; // c quark233 const int pD = 2; // b quark234 const int pS = 3; // s quark235 const int pC = 4; // c quark236 const int pB = 5; // b quark237 const int pE = 11; // e238 const int pNU1 = 12; // nu_e239 const int pMU = 13; // mu240 const int pNU2 = 14; // nu_mu241 const int pTAU = 15; // tau242 const int pNU3 = 16; // nu_tau243 const int pGLUON = 21; // gluon244 const int pGAMMA = 22; // gamma245 const int pW = 24; // W246 const int pP = 2212; // proton247 const int pN = 2112; // neutron248 const int pPI0 = 111; // pi_0249 const int pK0L = 130; // K^0_L250 const int pK0S = 310; // K^0_S251 const int pLAMBDA = 3122; // Lambda252 const int pSIGMA0 = 3212; // Sigma^0253 const int pDELTA0 = 2114; // Delta^0254 255 const double speed_of_light = 299792458; // m/s256 const float UNDEFINED=-9999.;257 258 234 259 235 // ** returns the sign (+1 or -1) or an integer -
trunk/interface/TreeClasses.h
r222 r264 1 1 #ifndef TreeClasses_h 2 2 #define TreeClasses_h 3 4 /*********************************************************************** 5 ** ** 6 ** /----------------------------------------------\ ** 7 ** | Delphes, a framework for the fast simulation | ** 8 ** | of a generic collider experiment | ** 9 ** \----------------------------------------------/ ** 10 ** ** 11 ** ** 12 ** This package uses: ** 13 ** ------------------ ** 14 ** FastJet algorithm: Phys. Lett. B641 (2006) [hep-ph/0512210] ** 15 ** Hector: JINST 2:P09005 (2007) [physics.acc-ph:0707.1198v2] ** 16 ** FROG: [hep-ex/0901.2718v1] ** 17 ** ** 18 ** ------------------------------------------------------------------ ** 19 ** ** 20 ** Main authors: ** 21 ** ------------- ** 22 ** ** 23 ** Severine Ovyn Xavier Rouby ** 24 ** severine.ovyn@uclouvain.be xavier.rouby@cern ** 25 ** ** 26 ** Center for Particle Physics and Phenomenology (CP3) ** 27 ** Universite catholique de Louvain (UCL) ** 28 ** Louvain-la-Neuve, Belgium ** 29 ** ** 30 ** Copyright (C) 2008-2009, ** 31 ** All rights reserved. ** 32 ** ** 33 ***********************************************************************/ 34 3 35 4 36 #include "TObject.h" -
trunk/interface/TriggerUtil.h
r260 r264 47 47 public: 48 48 49 TriggerBit() {};49 TriggerBit(); 50 50 TriggerBit(const TriggerBit& tb); 51 51 TriggerBit& operator=(const TriggerBit& tb); … … 87 87 88 88 void TriggerCardReader(const string& filename="data/trigger.dat"); 89 // avant, ça s'appellait TriggerReader 90 // appelle la méthode TriggerBit::GetTrigCondition 91 92 89 93 void PrintTriggerTable(const string& LogName); 94 // fait un cout des triggers bits, c'est toujours pratique 95 // appelle la méthode TriggerBit::PriniTrigCondition 96 90 97 bool GetGlobalResult(TClonesArray *branchElecTrig, TClonesArray *branchMuonTrig, 91 98 TClonesArray *branchJetTrig, TClonesArray *branchTauJetTrig, … … 93 100 94 101 void WriteResult(); 102 // sauve dans le TTree 103 // ce nom est stupide, faut le changer 95 104 96 105 private: 106 //bool Evaluate( int event_i ); 107 // boucle sur list_of_trigger_bits, comme on a dit 108 // appelle la methode TriggerBit::Evaluate ou TriggerBit::GetResult (à voir) 109 // renvoie la réponse globale du trigger 110 // à la fin, mettre has_been_evaluated = true; 111 // voir le NB ci-dessous 97 112 98 113 vector<TriggerBit> list_of_trigger_bits; 99 114 bool has_been_evaluated; 100 115 bool GlobalResult; 116 int event_i; 101 117 102 118 }; -
trunk/routines/plot_performances.C
r197 r264 1 /*********************************************************************** 2 ** ** 3 ** /----------------------------------------------\ ** 4 ** | Delphes, a framework for the fast simulation | ** 5 ** | of a generic collider experiment | ** 6 ** \----------------------------------------------/ ** 7 ** ** 8 ** ** 9 ** This package uses: ** 10 ** ------------------ ** 11 ** FastJet algorithm: Phys. Lett. B641 (2006) [hep-ph/0512210] ** 12 ** Hector: JINST 2:P09005 (2007) [physics.acc-ph:0707.1198v2] ** 13 ** FROG: [hep-ex/0901.2718v1] ** 14 ** ** 15 ** ------------------------------------------------------------------ ** 16 ** ** 17 ** Main authors: ** 18 ** ------------- ** 19 ** ** 20 ** Severine Ovyn Xavier Rouby ** 21 ** severine.ovyn@uclouvain.be xavier.rouby@cern ** 22 ** ** 23 ** Center for Particle Physics and Phenomenology (CP3) ** 24 ** Universite catholique de Louvain (UCL) ** 25 ** Louvain-la-Neuve, Belgium ** 26 ** ** 27 ** Copyright (C) 2008-2009, ** 28 ** All rights reserved. ** 29 ** ** 30 ***********************************************************************/ 31 32 1 33 #include "interface/FuncDef.h" 2 34 #include "TGraph.h" -
trunk/routines/resolutions.C
r258 r264 328 328 void General() 329 329 { 330 //JetResol();331 //ElecResol();332 //ETmisResol();333 TauJetInfo();334 335 } 336 337 330 JetResol(); 331 ElecResol(); 332 ETmisResol(); 333 //TauJetInfo(); 334 335 } 336 337 -
trunk/src/BFieldProp.cc
r260 r264 36 36 37 37 //------------------------------------------------------------------------------ 38 extern const float UNDEFINED; 38 39 39 40 TrackPropagation::TrackPropagation(){ … … 315 316 316 317 317 void TrackPropagation::bfield( const TRootGenParticle *Part, float& etacalo, float& phicalo) {318 void TrackPropagation::bfield(TRootGenParticle *Part) { 318 319 319 320 // initialisation, valid for z_max==0, R_max==0 and q==0 320 etacalo = Part->Eta; 321 phicalo = -atan2(Part->Px,Part->Py); 321 Part->EtaCalo = Part->Eta; 322 Part->PhiCalo = Part->Phi;//-atan2(Part->Px,Part->Py); 323 324 if (!DET->FLAG_bfield ) return; 322 325 323 326 q = Charge(Part->PID); … … 386 389 Eta_t = - log(tan(Theta_t/2.)); 387 390 } else{ 388 Theta_t=0; Eta_t = 9999;391 Theta_t=0; Eta_t = UNDEFINED; 389 392 } 390 393 /* Not needed here. but these formulae are correct ------- … … 399 402 momentum.SetPxPyPzE(Px_t,Py_t,Pz_t,E_t); 400 403 */ 401 etacalo = Eta_t;402 phicalo = Phi_t;404 Part->EtaCalo = Eta_t; 405 Part->PhiCalo = Phi_t; 403 406 return; 404 407 // test zone --- … … 436 439 437 440 } else { // if B_x or B_y are non zero: longer computation 438 441 //cout << "bfield de loic\n"; 439 442 float Xvertex1 = Part->X; 440 443 float Yvertex1 = Part->Y; … … 511 514 if(x!=0 && y!=0 && z!=0) { 512 515 Theta = atan2(sqrt(r2),z); 513 etacalo = -log(tan(Theta/2.));514 phicalo = atan2(y,x);516 Part->EtaCalo = -log(tan(Theta/2.)); 517 Part->PhiCalo = atan2(y,x); 515 518 //momentum.SetPtEtaPhiE(Part->PT,eta,phi,Part->E); 516 519 } -
trunk/src/HEPEVTConverter.cc
r245 r264 1 /*********************************************************************** 2 ** ** 3 ** /----------------------------------------------\ ** 4 ** | Delphes, a framework for the fast simulation | ** 5 ** | of a generic collider experiment | ** 6 ** \----------------------------------------------/ ** 7 ** ** 8 ** ** 9 ** This package uses: ** 10 ** ------------------ ** 11 ** FastJet algorithm: Phys. Lett. B641 (2006) [hep-ph/0512210] ** 12 ** Hector: JINST 2:P09005 (2007) [physics.acc-ph:0707.1198v2] ** 13 ** FROG: [hep-ex/0901.2718v1] ** 14 ** ** 15 ** ------------------------------------------------------------------ ** 16 ** ** 17 ** Main authors: ** 18 ** ------------- ** 19 ** ** 20 ** Severine Ovyn Xavier Rouby ** 21 ** severine.ovyn@uclouvain.be xavier.rouby@cern ** 22 ** ** 23 ** Center for Particle Physics and Phenomenology (CP3) ** 24 ** Universite catholique de Louvain (UCL) ** 25 ** Louvain-la-Neuve, Belgium ** 26 ** ** 27 ** Copyright (C) 2008-2009, ** 28 ** All rights reserved. ** 29 ** ** 30 ***********************************************************************/ 31 32 1 33 #include <iostream> 2 34 #include <utility> -
trunk/src/LHEFConverter.cc
r246 r264 1 /*********************************************************************** 2 ** ** 3 ** /----------------------------------------------\ ** 4 ** | Delphes, a framework for the fast simulation | ** 5 ** | of a generic collider experiment | ** 6 ** \----------------------------------------------/ ** 7 ** ** 8 ** ** 9 ** This package uses: ** 10 ** ------------------ ** 11 ** FastJet algorithm: Phys. Lett. B641 (2006) [hep-ph/0512210] ** 12 ** Hector: JINST 2:P09005 (2007) [physics.acc-ph:0707.1198v2] ** 13 ** FROG: [hep-ex/0901.2718v1] ** 14 ** ** 15 ** ------------------------------------------------------------------ ** 16 ** ** 17 ** Main authors: ** 18 ** ------------- ** 19 ** ** 20 ** Severine Ovyn Xavier Rouby ** 21 ** severine.ovyn@uclouvain.be xavier.rouby@cern ** 22 ** ** 23 ** Center for Particle Physics and Phenomenology (CP3) ** 24 ** Universite catholique de Louvain (UCL) ** 25 ** Louvain-la-Neuve, Belgium ** 26 ** ** 27 ** Copyright (C) 2008-2009, ** 28 ** All rights reserved. ** 29 ** ** 30 ***********************************************************************/ 31 32 1 33 #include <iostream> 2 34 #include <fstream> -
trunk/src/STDHEPConverter.cc
r245 r264 1 /* 2 ---- Delphes ---- 3 A Fast Simulator for general purpose LHC detector 4 S. Ovyn ~~~~ severine.ovyn@uclouvain.be 5 6 Center for Particle Physics and Phenomenology (CP3) 7 Universite Catholique de Louvain (UCL) 8 Louvain-la-Neuve, Belgium 9 */ 1 /*********************************************************************** 2 ** ** 3 ** /----------------------------------------------\ ** 4 ** | Delphes, a framework for the fast simulation | ** 5 ** | of a generic collider experiment | ** 6 ** \----------------------------------------------/ ** 7 ** ** 8 ** ** 9 ** This package uses: ** 10 ** ------------------ ** 11 ** FastJet algorithm: Phys. Lett. B641 (2006) [hep-ph/0512210] ** 12 ** Hector: JINST 2:P09005 (2007) [physics.acc-ph:0707.1198v2] ** 13 ** FROG: [hep-ex/0901.2718v1] ** 14 ** ** 15 ** ------------------------------------------------------------------ ** 16 ** ** 17 ** Main authors: ** 18 ** ------------- ** 19 ** ** 20 ** Severine Ovyn Xavier Rouby ** 21 ** severine.ovyn@uclouvain.be xavier.rouby@cern ** 22 ** ** 23 ** Center for Particle Physics and Phenomenology (CP3) ** 24 ** Universite catholique de Louvain (UCL) ** 25 ** Louvain-la-Neuve, Belgium ** 26 ** ** 27 ** Copyright (C) 2008-2009, ** 28 ** All rights reserved. ** 29 ** ** 30 ***********************************************************************/ 31 10 32 11 33 #include <iostream> -
trunk/src/SmearUtil.cc
r261 r264 30 30 ***********************************************************************/ 31 31 32 32 33 /// \file SmearUtil.cc 33 34 /// \brief RESOLution class, and some generic definitions … … 42 43 #include <iomanip> 43 44 using namespace std; 44 45 46 ParticleUtil::ParticleUtil(const TLorentzVector &genMomentum, int pid) {47 _pid=pid;48 _e = genMomentum.E();49 _px = genMomentum.Px();50 _py = genMomentum.Py();51 _pz = genMomentum.Pz();52 _pt = genMomentum.Pt();53 54 //_e, _px, _py, _pz, _pt;55 //float _eta, _etaCalo, _phi, _phiCalo;56 //int _pid;57 }58 45 59 46 //------------------------------------------------------------------------------ … … 78 65 // Energy resolution for hadrons in ecal/hcal/hf 79 66 // \sigma/E = C + N/E + S/\sqrt{E} 80 HAD_Shcal = 1.5; // S term for central HCAL 67 HAD_Shcal = 1.5; // S term for central HCAL 81 68 HAD_Nhcal = 0.; // N term for central HCAL 82 69 HAD_Chcal = 0.05; // C term for central HCAL 83 HAD_Shf = 2.7; // S term for FCAL 70 HAD_Shf = 2.7; // S term for FCAL 84 71 HAD_Nhf = 0.; // N term for FCAL 85 72 HAD_Chf = 0.13; // C term for FCAL … … 128 115 FLAG_bfield = 1; //1 to run the bfield propagation else 0 129 116 FLAG_vfd = 1; //1 to run the very forward detectors else 0 117 FLAG_zdc = 1; //1 to run the zero degree calorimeter else 0 130 118 FLAG_trigger = 1; //1 to run the trigger selection else 0 131 119 FLAG_frog = 1; //1 to run the FROG event display … … 186 174 RP_cross_y = 0.0; 187 175 RP_cross_ang = 142.5; 188 189 190 176 191 177 } … … 250 236 FLAG_bfield = DET.FLAG_bfield; 251 237 FLAG_vfd = DET.FLAG_vfd; 238 FLAG_zdc = DET.FLAG_zdc; 252 239 FLAG_trigger = DET.FLAG_trigger; 253 240 FLAG_frog = DET.FLAG_frog; … … 279 266 RP_IP_name = DET.RP_IP_name; 280 267 281 282 268 // In case FROG event display allowed 283 269 NEvents_Frog = DET.NEvents_Frog; … … 364 350 FLAG_bfield = DET.FLAG_bfield; 365 351 FLAG_vfd = DET.FLAG_vfd; 352 FLAG_zdc = DET.FLAG_zdc; 366 353 FLAG_trigger = DET.FLAG_trigger; 367 354 FLAG_frog = DET.FLAG_frog; … … 504 491 505 492 else if(strstr(temp_string.c_str(),"FLAG_vfd")) {curstring >> varname >> ivalue; FLAG_vfd = ivalue;} 493 else if(strstr(temp_string.c_str(),"FLAG_zdc")) {curstring >> varname >> ivalue; FLAG_zdc = ivalue;} 506 494 else if(strstr(temp_string.c_str(),"FLAG_trigger")) {curstring >> varname >> ivalue; FLAG_trigger = ivalue;} 507 495 else if(strstr(temp_string.c_str(),"FLAG_frog")) {curstring >> varname >> ivalue; FLAG_frog = ivalue;} … … 604 592 if(FLAG_vfd==1){ 605 593 f_out<<"#********************************** *"<<"\n"; 606 f_out<<"# Very forward detector switche son *"<<"\n";594 f_out<<"# Very forward detector switched on *"<<"\n"; 607 595 f_out<<"#********************************** *"<<"\n"; 608 596 f_out<<"* *"<<"\n"; … … 639 627 f_out << left << setw(44) <<"* Angle of beam crossing:"<<"" 640 628 << left << setw(6) <<RP_cross_ang <<""<< right << setw(20)<<"! not in datacard *"<<"\n"; 641 642 629 f_out<<"* *"<<"\n"; 643 630 } 644 631 else { 645 632 f_out<<"#*********************************** *"<<"\n"; 646 f_out<<"# Very forward detector switche soff *"<<"\n";633 f_out<<"# Very forward detector switched off *"<<"\n"; 647 634 f_out<<"#*********************************** *"<<"\n"; 648 635 f_out<<"* *"<<"\n"; … … 692 679 if(FLAG_bfield==1){ 693 680 f_out<<"#*************************** *"<<"\n"; 694 f_out<<"# Magnetic field switche son *"<<"\n";681 f_out<<"# Magnetic field switched on *"<<"\n"; 695 682 f_out<<"#*************************** *"<<"\n"; 696 683 f_out<<"* *"<<"\n"; … … 713 700 else { 714 701 f_out<<"#**************************** *"<<"\n"; 715 f_out<<"# Magnetic field switche soff *"<<"\n";702 f_out<<"# Magnetic field switched off *"<<"\n"; 716 703 f_out<<"#**************************** *"<<"\n"; 717 704 f_out << left << setw(55) <<"* Minimal pT needed to reach the calorimeter [GeV]: "<<"" … … 953 940 //****************************************************************************************** 954 941 955 void RESOLution::SortedVector(vector<ParticleUtil> &vect) 942 //void RESOLution::SortedVector(vector<ParticleUtil> &vect) 943 void RESOLution::SortedVector(vector<D_Particle> &vect) 956 944 { 957 945 int i,j = 0; … … 966 954 if ( vect[j].Pt() > vect[j-1].Pt() ) 967 955 { 968 ParticleUtil tmp = vect[j-1]; 956 //ParticleUtil tmp = vect[j-1]; 957 D_Particle tmp = vect[j-1]; 969 958 vect[j-1] = vect[j]; 970 959 vect[j] = tmp; … … 1062 1051 //********** returns a segmented value for eta and phi, for calo towers ***** 1063 1052 void RESOLution::BinEtaPhi(const float phi, const float eta, float& iPhi, float& iEta){ 1064 iEta = -100;1065 int index= -100;1053 iEta = UNDEFINED; 1054 int index= iUNDEFINED; 1066 1055 for (unsigned int i=1; i< TOWER_number+1; i++) { 1067 1056 if(fabs(eta)>TOWER_eta_edges[i-1] && fabs(eta)<TOWER_eta_edges[i]) { … … 1072 1061 } 1073 1062 } 1074 if(index== -100) return;1075 iPhi = -100;1063 if(index==UNDEFINED) return; 1064 iPhi = UNDEFINED; 1076 1065 float dphi = TOWER_dphi[index]*pi/180.; 1077 1066 for (unsigned int i=1; i < 360/TOWER_dphi[index]; i++ ) { … … 1085 1074 if (phi > pi-dphi) iPhi = pi-dphi; 1086 1075 } 1076 1077 1087 1078 1088 1079 //**************************** Returns the delta Phi **************************** -
trunk/src/TreeClasses.cc
r219 r264 1 /*********************************************************************** 2 ** ** 3 ** /----------------------------------------------\ ** 4 ** | Delphes, a framework for the fast simulation | ** 5 ** | of a generic collider experiment | ** 6 ** \----------------------------------------------/ ** 7 ** ** 8 ** ** 9 ** This package uses: ** 10 ** ------------------ ** 11 ** FastJet algorithm: Phys. Lett. B641 (2006) [hep-ph/0512210] ** 12 ** Hector: JINST 2:P09005 (2007) [physics.acc-ph:0707.1198v2] ** 13 ** FROG: [hep-ex/0901.2718v1] ** 14 ** ** 15 ** ------------------------------------------------------------------ ** 16 ** ** 17 ** Main authors: ** 18 ** ------------- ** 19 ** ** 20 ** Severine Ovyn Xavier Rouby ** 21 ** severine.ovyn@uclouvain.be xavier.rouby@cern ** 22 ** ** 23 ** Center for Particle Physics and Phenomenology (CP3) ** 24 ** Universite catholique de Louvain (UCL) ** 25 ** Louvain-la-Neuve, Belgium ** 26 ** ** 27 ** Copyright (C) 2008-2009, ** 28 ** All rights reserved. ** 29 ** ** 30 ***********************************************************************/ 31 32 1 33 #include "TreeClasses.h" 2 34 -
trunk/src/TreeClassesLinkDef.h
r219 r264 1 /*********************************************************************** 2 ** ** 3 ** /----------------------------------------------\ ** 4 ** | Delphes, a framework for the fast simulation | ** 5 ** | of a generic collider experiment | ** 6 ** \----------------------------------------------/ ** 7 ** ** 8 ** ** 9 ** This package uses: ** 10 ** ------------------ ** 11 ** FastJet algorithm: Phys. Lett. B641 (2006) [hep-ph/0512210] ** 12 ** Hector: JINST 2:P09005 (2007) [physics.acc-ph:0707.1198v2] ** 13 ** FROG: [hep-ex/0901.2718v1] ** 14 ** ** 15 ** ------------------------------------------------------------------ ** 16 ** ** 17 ** Main authors: ** 18 ** ------------- ** 19 ** ** 20 ** Severine Ovyn Xavier Rouby ** 21 ** severine.ovyn@uclouvain.be xavier.rouby@cern ** 22 ** ** 23 ** Center for Particle Physics and Phenomenology (CP3) ** 24 ** Universite catholique de Louvain (UCL) ** 25 ** Louvain-la-Neuve, Belgium ** 26 ** ** 27 ** Copyright (C) 2008-2009, ** 28 ** All rights reserved. ** 29 ** ** 30 ***********************************************************************/ 31 32 1 33 #include "interface/TreeClasses.h" 2 34 -
trunk/src/TriggerUtil.cc
r260 r264 132 132 133 133 //************************************************************************* 134 TriggerBit::TriggerBit() { 135 } 134 136 135 137 TriggerBit::~TriggerBit() { … … 143 145 EtmisValues.clear(); 144 146 GammaValues.clear(); 145 146 147 } 147 148 … … 153 154 IElecValues.push_back(tb.IElecValues[i]); 154 155 155 156 156 for(unsigned int i=0; i<tb.MuonValues.size(); i++) 157 157 MuonValues.push_back(tb.MuonValues[i]); … … 165 165 for(unsigned int i=0; i<tb.BjetValues.size(); i++) 166 166 BjetValues.push_back(tb.BjetValues[i]); 167 168 167 169 168 for(unsigned int i=0; i<tb.TauJetValues.size(); i++) … … 218 217 TClonesArray *branchPhotonTrig, TClonesArray *branchETmisTrig) 219 218 { 220 221 219 TSimpleArray<TRootJet> bjets=SubArrayBjets(branchJetTrig); 222 220 TSimpleArray<TRootElectron> Ielectron=SubArrayIElec(branchElecTrig); 223 221 TSimpleArray<TRootMuon> Imuon=SubArrayIMuon(branchMuonTrig); 224 222 225 223 int elec_size = ElecValues.size(); 226 224 int Ielec_size = IElecValues.size(); … … 263 261 } 264 262 265 266 263 if(muon_size!=0){ 267 264 TRootMuon *muon; … … 287 284 if(jet->PT < JetValues[i])Result=false;}} 288 285 289 if(jet_size!=0){290 TRootJet *jet;291 for(int i=0;i<jet_size;i++){292 jet = (TRootJet*)branchJetTrig->At(i);293 if(jet->PT < JetValues[i])Result=false;}}294 295 286 if(bjet_size!=0) 296 287 { … … 304 295 } 305 296 306 307 297 if(taujet_size!=0){ 308 298 TRootTauJet *taujet; … … 338 328 vector<string> BjetSequences; 339 329 340 /// char *result =NULL;341 330 char * result = new char[256]; 342 331 result = strtok( (char*) trigger_algorithm.c_str(),"&"); … … 354 343 result = strtok( NULL,"&"); 355 344 } 356 delete result;345 delete [] result; 357 346 358 347 ElecValues = GetCuts(ElecSequences); … … 368 357 } 369 358 359 370 360 void TriggerBit::PrintTrigCondition(const string& LogName,const int i) 371 361 { … … 379 369 int etmis_size = TriggerBit::EtmisValues.size(); 380 370 int bjets_size = TriggerBit::BjetValues.size(); 381 371 382 372 ofstream f_out(LogName.c_str(),ios::app); 383 373 … … 439 429 } 440 430 return OrderedValue; 431 441 432 } 442 433 … … 480 471 } 481 472 482
Note:
See TracChangeset
for help on using the changeset viewer.