Changeset 374 in svn
- Timestamp:
- May 10, 2009, 8:23:32 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/data/DetectorCard.dat
r330 r374 15 15 ELG_Nfwd 0.0 // N term for FCAL 16 16 ELG_Cfwd 0.107 // C term for FCAL 17 ELG_Szdc 0.70 // S term for ZDC 18 ELG_Nzdc 0.0 // N term for ZDC 19 ELG_Czdc 0.08 // C term for ZDC 17 20 18 21 # Energy resolution for hadrons in ecal/hcal/hf … … 24 27 HAD_Nhf 0. // N term for FCAL 25 28 HAD_Chf 0.13 // C term for FCAL 29 HAD_Szdc 1.38 // S term for ZDC 30 HAD_Nzdc 0. // N term for ZDC 31 HAD_Czdc 0.13 // C term for ZDC 32 33 # Time resolution for ZDC/RP220/RP420 34 ZDC_T_resolution 0 // in s 35 RP220_T_resolution 0 // in s 36 RP420_T_resolution 0 // in s 26 37 27 38 # Muon smearing … … 47 58 # 48 59 49 # Thresholds for reconstructed obje tcs, Pt in GeV60 # Thresholds for reconstructed objects, Pt in GeV 50 61 PTCUT_elec 10.0 51 62 PTCUT_muon 10.0 … … 53 64 PTCUT_gamma 10.0 54 65 PTCUT_taujet 10.0 66 67 # Thresholds for reconstructed objects in ZDC, E in GeV 68 ZDC_gamma_E 20 69 ZDC_n_E 50 55 70 56 71 # Charged lepton isolation. Pt and Et in GeV -
trunk/data/DetectorCard_ATLAS.dat
r331 r374 15 15 ELG_Nfwd 1.1533 // N term for central FCAL #http://villaolmo.mib.infn.it/ICATPP9th_2005/Calorimetry/Schram.p.pdf 16 16 ELG_Cfwd 0.0313 // C term for forward FCAL #http://villaolmo.mib.infn.it/ICATPP9th_2005/Calorimetry/Schram.p.pdf 17 ELG_Szdc 0.70 // S term for ZDC 18 ELG_Nzdc 0.0 // N term for ZDC 19 ELG_Czdc 0.08 // C term for ZDC 20 17 21 18 22 # Energy resolution for hadrons in ecal/hcal/hf … … 24 28 HAD_Nhf 0. // N term for FCAL #http://villaolmo.mib.infn.it/ICATPP9th_2005/Calorimetry/Schram.p.pdf 25 29 HAD_Chf 0.0524 // C term for FCAL #http://villaolmo.mib.infn.it/ICATPP9th_2005/Calorimetry/Schram.p.pdf 30 HAD_Szdc 1.38 // S term for ZDC 31 HAD_Nzdc 0. // N term for ZDC 32 HAD_Czdc 0.13 // C term for ZDC 33 34 # Time resolution for ZDC/RP220/RP420 35 ZDC_T_resolution 0 // in s 36 RP220_T_resolution 0 // in s 37 RP420_T_resolution 0 // in s 26 38 27 39 # Muon smearing … … 53 65 PTCUT_gamma 10.0 54 66 PTCUT_taujet 10.0 67 68 # Thresholds for reconstructed objects in ZDC, E in GeV 69 ZDC_gamma_E 20 70 ZDC_n_E 50 55 71 56 72 # Charged lepton isolation. Pt and Et in GeV -
trunk/data/DetectorCard_CMS.dat
r331 r374 15 15 ELG_Nfwd 0.0 // N term for FCAL 16 16 ELG_Cfwd 0.107 // C term for FCAL 17 ELG_Szdc 0.70 // S term for ZDC 18 ELG_Nzdc 0.0 // N term for ZDC 19 ELG_Czdc 0.08 // C term for ZDC 20 17 21 18 22 # Energy resolution for hadrons in ecal/hcal/hf … … 24 28 HAD_Nhf 0. // N term for FCAL 25 29 HAD_Chf 0.13 // C term for FCAL 30 HAD_Szdc 1.38 // S term for ZDC 31 HAD_Nzdc 0. // N term for ZDC 32 HAD_Czdc 0.13 // C term for ZDC 33 34 # Time resolution for ZDC/RP220/RP420 35 ZDC_T_resolution 0 // in s 36 RP220_T_resolution 0 // in s 37 RP420_T_resolution 0 // in s 26 38 27 39 # Muon smearing … … 53 65 PTCUT_gamma 10.0 54 66 PTCUT_taujet 10.0 67 68 # Thresholds for reconstructed objects in ZDC, E in GeV 69 ZDC_gamma_E 20 70 ZDC_n_E 50 55 71 56 72 # Charged lepton isolation. Pt and Et in GeV -
trunk/interface/SmearUtil.h
r350 r374 117 117 float ELG_Sfwd; // S term for forward ECAL 118 118 float ELG_Cfwd; // C term for forward ECAL 119 float ELG_Nfwd; // N term for central ECAL 119 float ELG_Nfwd; // N term for forward ECAL 120 float ELG_Szdc; // S term for zdc-em sections 121 float ELG_Czdc; // C term for zdc-em sections 122 float ELG_Nzdc; // N term for zdc-em sections 120 123 121 124 //energy resolution for hadrons in ecal/hcal/hf … … 127 130 float HAD_Nhf; // N term for central HF 128 131 float HAD_Chf; // C term for central HF 129 132 float HAD_Szdc; // S term for zdc-had sections 133 float HAD_Czdc; // C term for zdc-had sections 134 float HAD_Nzdc; // N term for zdc-had sections 135 130 136 // muon smearing 131 137 float MU_SmearPt; 138 139 // time resolution 140 float ZDC_T_resolution; 141 float RP220_T_resolution; 142 float RP420_T_resolution; 132 143 133 144 //Magnetic Field information … … 153 164 float PTCUT_taujet; 154 165 166 float ZDC_gamma_E; // minimal energy of photons for reconstruction in ZDC 167 float ZDC_n_E; // minimal energy of neutrons for reconstruction in ZDC 168 155 169 float ISOL_PT; //minimal pt of tracks for isolation criteria 156 170 float ISOL_Cone; //Cone for isolation criteria 157 171 float ISOL_Calo_ET; //minimal tower energy for isolation criteria 158 172 unsigned int ISOL_Calo_Grid; //Grid size (N x N) for calorimetric isolation 173 159 174 160 175 //General jet variable -
trunk/interface/VeryForward.h
r260 r374 7 7 ** | Delphes, a framework for the fast simulation | ** 8 8 ** | of a generic collider experiment | ** 9 ** \------------- ---------------------------------/ **9 ** \------------- arXiv:0903.2225v1 ------------/ ** 10 10 ** ** 11 11 ** ** … … 61 61 void RomanPots(ExRootTreeWriter *treeWriter, ExRootTreeBranch *branchRP220,ExRootTreeBranch *branchFP420,TRootGenParticle *particle) ; 62 62 63 64 private: 65 RESOLution *DET; 66 float d_max; 67 H_BeamLine* beamline1; 68 H_BeamLine* beamline2; 63 69 bool relative_energy; 64 70 int kickers_on; 65 71 66 private:67 H_BeamLine* beamline1;68 H_BeamLine* beamline2;69 RESOLution *DET;70 72 71 73 }; -
trunk/src/SmearUtil.cc
r350 r374 62 62 ELG_Nfwd = 0.0; // N term for FCAL 63 63 ELG_Cfwd = 0.107; // C term for FCAL 64 ELG_Szdc = 0.70; // S term for ZDC 65 ELG_Nzdc = 0.0; // N term for ZDC 66 ELG_Czdc = 0.08; // C term for ZDC 64 67 65 68 // Energy resolution for hadrons in ecal/hcal/hf … … 71 74 HAD_Nhf = 0.; // N term for FCAL 72 75 HAD_Chf = 0.13; // C term for FCAL 76 HAD_Szdc = 1.38; // S term for ZDC 77 HAD_Nzdc = 0.; // N term for ZDC 78 HAD_Czdc = 0.13; // C term for ZDC 73 79 74 80 // Muon smearing 75 81 MU_SmearPt = 0.01; 82 83 // time resolution 84 ZDC_T_resolution = 0; // resolution for time measurement [s] 85 RP220_T_resolution = 0; 86 RP420_T_resolution = 0; 76 87 77 88 // Tracking efficiencies … … 95 106 96 107 97 // Thresholds for reconstructed objetcs 108 // Thresholds for reconstructed objetcs (GeV) 98 109 PTCUT_elec = 10.0; 99 110 PTCUT_muon = 10.0; … … 101 112 PTCUT_gamma = 10.0; 102 113 PTCUT_taujet = 10.0; 114 115 ZDC_gamma_E = 20; // GeV 116 ZDC_n_E = 50; // GeV 103 117 104 118 // Isolation … … 199 213 ELG_Sfwd = DET.ELG_Sfwd; 200 214 ELG_Nfwd = DET.ELG_Nfwd; 201 202 // Energy resolution for hadrons in ecal/hcal/hf 215 ELG_Czdc = DET.ELG_Czdc; 216 ELG_Szdc = DET.ELG_Szdc; 217 ELG_Nzdc = DET.ELG_Nzdc; 218 219 // Energy resolution for hadrons in ecal/hcal/hf/zdc 203 220 HAD_Shcal = DET.HAD_Shcal; 204 221 HAD_Nhcal = DET.HAD_Nhcal; … … 207 224 HAD_Nhf = DET.HAD_Nhf; 208 225 HAD_Chf = DET.HAD_Chf; 226 HAD_Szdc = DET.HAD_Szdc; 227 HAD_Nzdc = DET.HAD_Nzdc; 228 HAD_Czdc = DET.HAD_Czdc; 229 230 // time resolution 231 ZDC_T_resolution = DET.ZDC_T_resolution; // resolution for time measurement [s] 232 RP220_T_resolution = DET.RP220_T_resolution; 233 RP420_T_resolution = DET.RP420_T_resolution; 209 234 210 235 // Muon smearing … … 229 254 PTCUT_gamma = DET.PTCUT_gamma; 230 255 PTCUT_taujet = DET.PTCUT_taujet; 256 257 ZDC_gamma_E = DET.ZDC_gamma_E; 258 ZDC_n_E = DET.ZDC_n_E; 231 259 232 260 // Isolation … … 321 349 ELG_Sfwd = DET.ELG_Sfwd; 322 350 ELG_Nfwd = DET.ELG_Nfwd; 351 ELG_Czdc = DET.ELG_Czdc; 352 ELG_Szdc = DET.ELG_Szdc; 353 ELG_Nzdc = DET.ELG_Nzdc; 323 354 324 355 // Energy resolution for hadrons in ecal/hcal/hf … … 329 360 HAD_Nhf = DET.HAD_Nhf; 330 361 HAD_Chf = DET.HAD_Chf; 362 HAD_Szdc = DET.HAD_Szdc; 363 HAD_Nzdc = DET.HAD_Nzdc; 364 HAD_Czdc = DET.HAD_Czdc; 365 366 // time resolution 367 ZDC_T_resolution = DET.ZDC_T_resolution; // resolution for time measurement [s] 368 RP220_T_resolution = DET.RP220_T_resolution; 369 RP420_T_resolution = DET.RP420_T_resolution; 331 370 332 371 // Muon smearing … … 351 390 PTCUT_gamma = DET.PTCUT_gamma; 352 391 PTCUT_taujet = DET.PTCUT_taujet; 392 393 ZDC_gamma_E = DET.ZDC_gamma_E; 394 ZDC_n_E = DET.ZDC_n_E; 353 395 354 396 // Isolation … … 475 517 else if(strstr(temp_string.c_str(),"ELG_Cfwd")) {curstring >> varname >> value; ELG_Cfwd = value;} 476 518 else if(strstr(temp_string.c_str(),"ELG_Nfwd")) {curstring >> varname >> value; ELG_Nfwd = value;} 519 else if(strstr(temp_string.c_str(),"ELG_Szdc")) {curstring >> varname >> value; ELG_Szdc = value;} 520 else if(strstr(temp_string.c_str(),"ELG_Czdc")) {curstring >> varname >> value; ELG_Czdc = value;} 521 else if(strstr(temp_string.c_str(),"ELG_Nzdc")) {curstring >> varname >> value; ELG_Nzdc = value;} 522 477 523 else if(strstr(temp_string.c_str(),"HAD_Shcal")) {curstring >> varname >> value; HAD_Shcal = value;} 478 524 else if(strstr(temp_string.c_str(),"HAD_Nhcal")) {curstring >> varname >> value; HAD_Nhcal = value;} … … 481 527 else if(strstr(temp_string.c_str(),"HAD_Nhf")) {curstring >> varname >> value; HAD_Nhf = value;} 482 528 else if(strstr(temp_string.c_str(),"HAD_Chf")) {curstring >> varname >> value; HAD_Chf = value;} 529 else if(strstr(temp_string.c_str(),"HAD_Szdc")) {curstring >> varname >> value; HAD_Szdc = value;} 530 else if(strstr(temp_string.c_str(),"HAD_Nzdc")) {curstring >> varname >> value; HAD_Nzdc = value;} 531 else if(strstr(temp_string.c_str(),"HAD_Czdc")) {curstring >> varname >> value; HAD_Czdc = value;} 532 else if(strstr(temp_string.c_str(),"ZDC_T_resolution")) {curstring >> varname >> value; ZDC_T_resolution = value;} 533 else if(strstr(temp_string.c_str(),"RP220_T_resolution")) {curstring >> varname >> value; RP220_T_resolution = value;} 534 else if(strstr(temp_string.c_str(),"RP420_T_resolution")) {curstring >> varname >> value; RP420_T_resolution = value;} 483 535 else if(strstr(temp_string.c_str(),"MU_SmearPt")) {curstring >> varname >> value; MU_SmearPt = value;} 484 536 … … 503 555 else if(strstr(temp_string.c_str(),"PTCUT_gamma")) {curstring >> varname >> value; PTCUT_gamma = value;} 504 556 else if(strstr(temp_string.c_str(),"PTCUT_taujet")) {curstring >> varname >> value; PTCUT_taujet = value;} 557 else if(strstr(temp_string.c_str(),"ZDC_gamma_E")) {curstring >> varname >> value; ZDC_gamma_E = value;} 558 else if(strstr(temp_string.c_str(),"ZDC_n_E")) {curstring >> varname >> value; ZDC_n_E = value;} 505 559 506 560 else if(strstr(temp_string.c_str(),"ISOL_PT")) {curstring >> varname >> value; ISOL_PT = value;} … … 694 748 f_out << left << setw(30) <<"* C term for FCAL: "<<"" 695 749 << left << setw(30) <<ELG_Cfwd <<""<< right << setw(10)<<"*"<<"\n"; 750 f_out << left << setw(30) <<"* S term for ZDC: "<<"" 751 << left << setw(30) <<ELG_Szdc <<""<< right << setw(10)<<"*"<<"\n"; 752 f_out << left << setw(30) <<"* N term for ZDC: "<<"" 753 << left << setw(30) <<ELG_Nzdc <<""<< right << setw(10)<<"*"<<"\n"; 754 f_out << left << setw(30) <<"* C term for ZDC: "<<"" 755 << left << setw(30) <<ELG_Czdc <<""<< right << setw(10)<<"*"<<"\n"; 756 696 757 f_out<<"* *"<<"\n"; 697 758 f_out<<"#***************************** *"<<"\n"; … … 711 772 f_out << left << setw(30) <<"* C term for FCAL: "<<"" 712 773 << left << setw(30) <<HAD_Chf <<""<< right << setw(10)<<"*"<<"\n"; 774 f_out << left << setw(30) <<"* S term for ZDC: "<<"" 775 << left << setw(30) <<HAD_Szdc <<""<< right << setw(10)<<"*"<<"\n"; 776 f_out << left << setw(30) <<"* N term for ZDC: "<<"" 777 << left << setw(30) <<HAD_Nzdc <<""<< right << setw(10)<<"*"<<"\n"; 778 f_out << left << setw(30) <<"* C term for ZDC: "<<"" 779 << left << setw(30) <<HAD_Czdc <<""<< right << setw(10)<<"*"<<"\n"; 780 781 f_out<<"* *"<<"\n"; 782 f_out<<"#************************* *"<<"\n"; 783 f_out<<"# Time smearing parameters *"<<"\n"; 784 f_out<<"#************************* *"<<"\n"; 785 f_out<<"* *"<<"\n"; 786 f_out << left << setw(55) <<"* Time resolution for ZDC : "<<"" 787 << left << setw(5) <<ZDC_T_resolution <<""<< right << setw(10)<<"*"<<"\n"; 788 f_out << left << setw(55) <<"* Time resolution for RP220 : "<<"" 789 << left << setw(5) <<RP220_T_resolution <<""<< right << setw(10)<<"*"<<"\n"; 790 f_out << left << setw(55) <<"* Time resolution for RP420 : "<<"" 791 << left << setw(5) <<RP420_T_resolution <<""<< right << setw(10)<<"*"<<"\n"; 792 f_out<<"* *"<<"\n"; 793 713 794 f_out<<"* *"<<"\n"; 714 795 f_out<<"#************************* *"<<"\n"; … … 786 867 f_out << left << setw(40) <<"* Minimum pT for photons: "<<"" 787 868 << left << setw(20) <<PTCUT_gamma <<""<< right << setw(10)<<"*"<<"\n"; 869 f_out << left << setw(40) <<"* Minimum E for photons in ZDC: "<<"" 870 << left << setw(20) <<ZDC_gamma_E <<""<< right << setw(10)<<"*"<<"\n"; 871 f_out << left << setw(40) <<"* Minimum E for neutrons in ZDC: "<<"" 872 << left << setw(20) <<ZDC_n_E <<""<< right << setw(10)<<"*"<<"\n"; 873 788 874 f_out<<"* *"<<"\n"; 789 875 f_out<<"#******************* *"<<"\n"; -
trunk/src/VeryForward.cc
r361 r374 4 4 ** | Delphes, a framework for the fast simulation | ** 5 5 ** | of a generic collider experiment | ** 6 ** \------------- ---------------------------------/ **6 ** \------------- arXiv:0903.2225v1 ------------/ ** 7 7 ** ** 8 8 ** ** … … 39 39 40 40 //------------------------------------------------------------------------------ 41 42 VeryForward::VeryForward() { 43 DET = new RESOLution(); 44 beamline1 = new H_BeamLine(1,500.); 45 beamline2 = new H_BeamLine(1,500.); 46 init(); 47 //Initialisation of Hector 48 relative_energy = true; // should always be true 49 kickers_on = 1; // should always be 1 50 51 } 52 53 VeryForward::VeryForward(const string& DetDatacard) { 54 DET = new RESOLution(); 41 VeryForward::VeryForward() : 42 DET(new RESOLution()), d_max(1.+std::max(DET->RP_420_s,DET->RP_220_s)), 43 beamline1(new H_BeamLine(1,d_max)), beamline2(new H_BeamLine(1,d_max)), 44 relative_energy(true), // should always be true 45 kickers_on(1) // should always be 1 46 { 47 init(); //Initialisation of Hector 48 } 49 50 VeryForward::VeryForward(const string& DetDatacard) : 51 DET(new RESOLution()) 52 { 55 53 DET->ReadDataCard(DetDatacard); 56 beamline1 = new H_BeamLine(1,500.); 57 beamline2 = new H_BeamLine(1,500.); 58 init(); 59 //Initialisation of Hector 60 relative_energy = true; // should always be true 61 kickers_on = 1; // should always be 1 62 63 } 64 65 VeryForward::VeryForward(const RESOLution * DetDatacard) { 66 DET = new RESOLution(*DetDatacard); 67 beamline2 = new H_BeamLine(1,500.); 68 beamline1 = new H_BeamLine(1,500.); 69 70 init(); 71 //Initialisation of Hector 72 relative_energy = true; // should always be true 73 kickers_on = 1; // should always be 1 74 75 } 76 77 VeryForward::VeryForward(const VeryForward& vf) { 78 DET = new RESOLution(*(vf.DET)); 79 beamline1 = new H_BeamLine(*(vf.beamline1)); 80 beamline2 = new H_BeamLine(*(vf.beamline2)); 54 const float d_max = 1.+std::max(DET->RP_420_s,DET->RP_220_s); 55 beamline1 = new H_BeamLine(1,d_max); 56 beamline2 = new H_BeamLine(1,d_max); 57 init(); //Initialisation of Hector 58 relative_energy = true; // should always be true 59 kickers_on = 1; // should always be 1 60 } 61 62 VeryForward::VeryForward(const RESOLution * DetDatacard) : 63 DET(new RESOLution(*DetDatacard)), d_max(1.+std::max(DET->RP_420_s,DET->RP_220_s)), 64 beamline1(new H_BeamLine(1,d_max)), beamline2(new H_BeamLine(1,d_max)), 65 relative_energy(true), // should always be true 66 kickers_on(1) // should always be 1 67 { 68 init(); //Initialisation of Hector 69 } 70 71 VeryForward::VeryForward(const VeryForward& vf) : 72 DET(new RESOLution(*(vf.DET))), d_max(vf.d_max), 73 beamline1(new H_BeamLine(*(vf.beamline1))), beamline2(new H_BeamLine(*(vf.beamline2))), 74 relative_energy(vf.relative_energy), 75 kickers_on(vf.kickers_on) { 81 76 } 82 77 … … 84 79 if (this==&vf) return *this; 85 80 DET = new RESOLution(*(vf.DET)); 81 d_max = vf.d_max; 86 82 beamline1 = new H_BeamLine(*(vf.beamline1)); 87 83 beamline2 = new H_BeamLine(*(vf.beamline2)); 84 relative_energy =vf.relative_energy; 85 kickers_on = vf.kickers_on; 88 86 return *this; 89 87 } … … 94 92 relative_energy = true; // should always be true 95 93 kickers_on = 1; // should always be 1 96 // user should provide : (1) optics file for each beamline, and IPname,97 // and offset data (s,x) for optical elements98 94 beamline1->fill(DET->RP_beam1Card,1,DET->RP_IP_name); 99 95 beamline1->offsetElements(DET->RP_offsetEl_s,-DET->RP_offsetEl_x); … … 114 110 115 111 116 void VeryForward::ZDC(ExRootTreeWriter *treeWriter, ExRootTreeBranch *branchZDC, TRootGenParticle *particle)112 void VeryForward::ZDC(ExRootTreeWriter *treeWriter, ExRootTreeBranch *branchZDC, TRootGenParticle *particle) 117 113 { 118 int pid=abs(particle->PID);119 114 TRootZdcHits *elementZdc; 120 TLorentzVector genMomentum; 115 float energy = particle->E; 116 //TLorentzVector genMomentum; 117 121 118 // Zero degree calorimeter, for forward neutrons and photons 122 if (particle->Status ==1 && (pid == pN || pid == pGAMMA ) && fabs(particle->Eta) > DET->VFD_min_zdc ) { 123 genMomentum.SetPxPyPzE(particle->Px, particle->Py, particle->Pz, particle->E); 124 // !!!!!!!!! vérifier que particle->Z est bien en micromÚtres!!! 125 // !!!!!!!!! vérifier que particle->T est bien en secondes!!! 126 // !!!!!!!!! pas de smearing ! on garde trop d'info ! 119 if (particle->Status ==1 && ( (particle->PID==pN && energy>DET->ZDC_n_E) || 120 (particle->PID==pGAMMA && energy>DET->ZDC_gamma_E) ) 121 && fabs(particle->Eta) > DET->VFD_min_zdc ) { 127 122 elementZdc = (TRootZdcHits*) branchZDC->NewEntry(); 128 elementZdc->Set(genMomentum); 129 130 // time of flight t is t = T + d/[ cos(theta) v ] 131 //double tx = acos(particle->Px/particle->Pz); 132 //double ty = acos(particle->Py/particle->Pz); 133 //double theta = (1E-6)*sqrt( pow(tx,2) + pow(ty,2) ); 134 //double flight_distance = (DET->ZDC_S - particle->Z*(1E-6))/cos(theta) ; // assumes that Z is in micrometers 135 double flight_distance = DET->VFD_s_zdc - particle->Z*(1E-6); 136 // assumes also that the emission angle is so small that 1/(cos theta) = 1 137 elementZdc->T = particle->T + flight_distance/speed_of_light; // assumes highly relativistic particles 138 //cout << "ZDC: T = " << particle->T << " ; " << flight_distance/speed_of_light << endl; 123 124 // 1) energy smearing 125 float energyS = -1.; 126 if (particle->PID == pGAMMA) 127 energyS = gRandom->Gaus(particle->E, sqrt( pow(DET->ELG_Nzdc,2) + 128 pow(DET->ELG_Czdc*particle->E,2) + 129 pow(DET->ELG_Szdc*sqrt(particle->E),2) )); 130 else // smearing with hadronic resolution 131 energyS = gRandom->Gaus(particle->E, sqrt( pow(DET->HAD_Nzdc,2) + 132 pow(DET->HAD_Czdc*particle->E,2) + 133 pow(DET->HAD_Szdc*sqrt(particle->E),2) )); 134 elementZdc->E = energyS; 135 136 137 // 2) time of flight t is t = T + d/[ cos(theta) v ] 138 float cos_theta = 1; //very good approximation, if eta_zdc >3 139 if (DET->VFD_min_zdc<3) { // if smaller eta -> make the complete calculation 140 double tx = atan(particle->Px/particle->Pz); 141 double ty = atan(particle->Py/particle->Pz); 142 double theta = sqrt( pow(tx,2) + pow(ty,2) ); 143 //cout << "tx = " << tx << " ty = " << ty << " theta = " << theta << " cos(theta) = " << cos(theta) << endl; 144 // NB: in practice, eta= 8 <-> theta 0.038° <-> 7x10^-4 rad <-> cos(theta) ~1 145 // eta = 2.6 <-> cos(theta) = 0.99 146 // eta = 3.0 <-> cos(theta) = 0.995 147 cos_theta = cos(theta); 148 } 149 // units from StdHEP : Z [mm] T[mm/c] 150 // units from Delphes : VFD_s_zdc [m] speed_of_light [m/s] 151 double flight_distance = (DET->VFD_s_zdc - particle->Z*(1E-3))/cos_theta ; 152 double flight_time = (flight_distance + 1E-3 * particle->T )/speed_of_light; // assumes highly relativistic particles, [s] 153 double timeS = gRandom->Gaus(flight_time,DET->ZDC_T_resolution); 154 elementZdc->T = timeS; 155 156 // 3) side: which ZDC has been hit? 139 157 elementZdc->side = sign(particle->Eta); 140 141 158 159 // 4) object nature : e.m. (photon) or had (neutron) ? 160 elementZdc->hadronic_hit = (bool) (particle->PID==pN); 142 161 } 143 162 … … 148 167 149 168 TRootRomanPotHits* elementRP220; 150 TRoot RomanPotHits* elementFP420;169 TRootForwardTaggerHits* elementFP420; 151 170 152 171 TLorentzVector genMomentum; … … 177 196 elementRP220->Ty = (1E-6)*p1.getTY(); // [rad] 178 197 elementRP220->S = p1.getS(); // [m] 179 // in first approximation only ! this number is always lower than the real distance-of-flight 180 double flight_distance = p1.getS() - particle->Z*(1E-6); 181 elementRP220->T = particle->T + flight_distance/speed_of_light; // assumes highly relativistic particles 182 //cout << "T = " << particle->T << " ; " << flight_distance/speed_of_light << endl; 183 elementRP220->E = p1.getE(); // not yet implemented 184 elementRP220->q2 = -1; // not yet implemented 185 elementRP220->side = sign(particle->Eta); 198 199 /* time of flight t is t = T + d/[ cos(theta) v ] 200 // nb: here we assume a straight path to the detector, which is not the case! 201 // this time estimate is always underestimated (while exact for the ZDC case) 202 float cos_theta = 1; //very good approximation, if CEN_max_calo_fwd >3 203 if (DET->CEN_max_calo_fwd<3) { // if smaller eta -> make the complete calculation 204 double tx = atan(particle->Px/particle->Pz); 205 double ty = atan(particle->Py/particle->Pz); 206 double theta = sqrt( pow(tx,2) + pow(ty,2) ); 207 //cout << "tx = " << tx << " ty = " << ty << " theta = " << theta << " cos(theta) = " << cos(theta) << endl; 208 // NB: in practice, eta= 8 <-> theta 0.038° <-> 7x10^-4 rad <-> cos(theta) ~1 209 // eta = 2.6 <-> cos(theta) = 0.99 210 // eta = 3.0 <-> cos(theta) = 0.995 211 cos_theta = cos(theta); 212 } 213 // units from StdHEP : Z [mm] T[mm/c] 214 // units from Delphes : p1.getS [m] speed_of_light [m/s] 215 //double flight_distance = (p1.getS() - particle->Z*(1E-3))/cos_theta ; 216 //elementRP220->T = (flight_distance + 1E-3 * particle->T )/speed_of_light; // assumes highly relativistic particles, [s] 217 */ 218 elementRP220->E = p1.getE(); // not yet implemented 219 elementRP220->q2 = -1; // not yet implemented 220 elementRP220->side = sign(particle->Eta); 186 221 187 222 } else if (p1.getStoppingElement()->getName()=="rp420_1" || p1.getStoppingElement()->getName()=="rp420_2") { 188 223 p1.propagate(DET->RP_420_s); 189 elementFP420 = (TRoot RomanPotHits*) branchFP420->NewEntry();224 elementFP420 = (TRootForwardTaggerHits*) branchFP420->NewEntry(); 190 225 elementFP420->X = (1E-6)*p1.getX(); // [m] 191 226 elementFP420->Y = (1E-6)*p1.getY(); // [m] … … 193 228 elementFP420->Ty = (1E-6)*p1.getTY(); // [rad] 194 229 elementFP420->S = p1.getS(); // [m] 195 // in first approximation only ! this number is always lower than the real distance-of-flight 196 double flight_distance = p1.getS() - particle->Z*(1E-6); 197 //cout << "T = " << particle->T << " ; " << flight_distance/speed_of_light << endl; 198 elementFP420->T = particle->T + flight_distance/speed_of_light; 230 231 // time of flight t is t = T + d/[ cos(theta) v ] 232 // nb: here we assume a straight path to the detector, which is not the case! 233 // this time estimate is always underestimated (while exact for the ZDC case) 234 float cos_theta = 1; //very good approximation, if CEN_max_calo_fwd >3 235 if (DET->CEN_max_calo_fwd<3) { // if smaller eta -> make the complete calculation 236 double tx = atan(particle->Px/particle->Pz); 237 double ty = atan(particle->Py/particle->Pz); 238 double theta = sqrt( pow(tx,2) + pow(ty,2) ); 239 //cout << "tx = " << tx << " ty = " << ty << " theta = " << theta << " cos(theta) = " << cos(theta) << endl; 240 // NB: in practice, eta= 8 <-> theta 0.038° <-> 7x10^-4 rad <-> cos(theta) ~1 241 // eta = 2.6 <-> cos(theta) = 0.99 242 // eta = 3.0 <-> cos(theta) = 0.995 243 cos_theta = cos(theta); 244 } 245 // units from StdHEP : Z [mm] T[mm/c] 246 // units from Delphes : p1.getS [m] speed_of_light [m/s] 247 double flight_distance = (p1.getS() - particle->Z*(1E-3))/cos_theta ; 248 elementFP420->T = (flight_distance + 1E-3 * particle->T )/speed_of_light; // assumes highly relativistic particles, [s] 199 249 elementFP420->E = p1.getE(); // not yet implemented 200 250 elementFP420->q2 = -1; // not yet implemented
Note:
See TracChangeset
for help on using the changeset viewer.