- Timestamp:
- Feb 11, 2009, 10:22:30 AM (16 years ago)
- Location:
- trunk/src
- Files:
-
- 2 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
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.