Changeset 6934875 in git
- Timestamp:
- Sep 23, 2016, 1:36:24 PM (8 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- 56562d0
- Parents:
- 6387aea
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
readers/DelphesPythia8.cpp
r6387aea r6934875 153 153 // from pythia8 example 21 154 154 155 void fillParticle(int id, double p t_max, double eta_max,155 void fillParticle(int id, double p_max, double eta_max, 156 156 Pythia8::Event &event, Pythia8::ParticleData &pdt, Pythia8::Rndm &rndm) 157 157 { … … 161 161 // Generate uniform pt and eta. 162 162 double pt, eta, phi, pp, ee, mm; 163 pt = pow(10, 1.0 + (log10(pt_max) - 1.0) * rndm.flat()); 163 164 //pmin = 0.1 GeV for single particles 165 pp = pow(10, - 1.0 + (log10(p_max) + 1.0) * rndm.flat()); 164 166 eta = (2.0 * rndm.flat() - 1.0) * eta_max; 165 167 phi = 2.0 * M_PI * rndm.flat(); 166 pp = pt * cosh(eta);167 168 mm = pdt.mSel(id); 168 169 ee = Pythia8::sqrtpos(pp*pp + mm*mm); 170 pt = pp / cosh(eta); 169 171 170 172 // Store the particle in the event record. … … 172 174 } 173 175 174 void fillPartons(int id, double p t_max, double eta_max,176 void fillPartons(int id, double p_max, double eta_max, 175 177 Pythia8::Event &event, Pythia8::ParticleData &pdt, Pythia8::Rndm &rndm) 176 178 { … … 179 181 event.reset(); 180 182 181 // Information on a q qbar system, to be hadronized.182 183 183 // Generate uniform pt and eta. 184 184 double pt, eta, phi, pp, ee, mm; 185 pt = pow(10, 1.0 + (log10(pt_max) - 1.0) * rndm.flat()); 185 186 //pmin = 1 GeV for jets 187 pp = pow(10, log10(p_max) * rndm.flat()); 186 188 eta = (2.0 * rndm.flat() - 1.0) * eta_max; 187 189 phi = 2.0 * M_PI * rndm.flat(); 188 pp = pt * cosh(eta); 189 mm = pdt.m0(id); 190 mm = pdt.mSel(id); 190 191 ee = Pythia8::sqrtpos(pp*pp + mm*mm); 191 192 pt = pp / cosh(eta); 193 194 if( (id == 4 || id == 5) && pt < 10.0) return; 195 192 196 if(id == 21) 193 197 { … … 338 342 if (pythia->flag("Main:spareFlag1")) 339 343 { 340 if (pythia->mode("Main:spareMode1") == 11 || pythia->mode("Main:spareMode1") == 13 || pythia->mode("Main:spareMode1") == 15 || pythia->mode("Main:spareMode1") == 22 )344 if (pythia->mode("Main:spareMode1") == 11 || pythia->mode("Main:spareMode1") == 13 || pythia->mode("Main:spareMode1") == 15 || pythia->mode("Main:spareMode1") == 22 || pythia->mode("Main:spareMode1") == 211 || pythia->mode("Main:spareMode1") == 2112) 341 345 { 342 346 fillParticle(pythia->mode("Main:spareMode1"), pythia->parm("Main:spareParm1"), pythia->parm("Main:spareParm2"), pythia->event, pythia->particleData, pythia->rndm);
Note:
See TracChangeset
for help on using the changeset viewer.