Changeset ea0f50d in git
- Timestamp:
- Aug 23, 2016, 5:39:52 PM (8 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- 7bb13cd
- Parents:
- 7b48085
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
examples/Pythia8/configParticleGun.cmnd
r7b48085 rea0f50d 3 3 ! 1) Settings used in the main program. 4 4 5 Main:numberOfEvents = 10000 5 Main:numberOfEvents = 10000 ! number of events to generate 6 6 Main:timesAllowErrors = 3 ! how many aborts before run stops 7 Main:spareFlag1 = on ! true means particle gun 8 Main:spareMode1 = ID ! 1-5 - di-quark, 21 - di-gluon, 11 - single electron, 13 - single muon, 22 - single photon 9 Main:spareParm1 = 10000 ! max pt 7 Main:spareFlag1 = on ! true means particle gun 8 Main:spareMode1 = ID ! 1-5 - di-quark, 21 - di-gluon, 11 - single electron, 13 - single muon, 15 - single tau, 22 - single photon 9 Main:spareParm1 = 10000 ! max pt 10 Main:spareParm2 = 2.5 ! max eta 10 11 11 12 ! 2) Settings related to output in init(), next() and stat(). -
readers/DelphesPythia8.cpp
r7b48085 rea0f50d 153 153 // from pythia8 example 21 154 154 155 void fillParticle(int id, double ee_max, double thetaIn, double phiIn,156 Pythia8::Event & event, Pythia8::ParticleData& pdt, Pythia8::Rndm& rndm, bool atRest = false) {157 155 void fillParticle(int id, double pt_max, double eta_max, 156 Pythia8::Event &event, Pythia8::ParticleData &pdt, Pythia8::Rndm &rndm) 157 { 158 158 // Reset event record to allow for new event. 159 159 event.reset(); 160 160 161 // Angles uniform in solid angle.162 double cThe, sThe, phi, ee;163 cThe = 2. * rndm.flat() - 1.;164 sThe = Pythia8::sqrtpos(1. - cThe * cThe);165 phi = 2. * M_PI * rndm.flat();166 ee = pow(10,1+(log10(ee_max)-1)*rndm.flat());167 doublemm = pdt.mSel(id);168 double pp = Pythia8::sqrtpos(ee*ee -mm*mm);161 // Generate uniform pt and eta. 162 double pt, eta, phi, pp, ee, mm; 163 pt = pow(10, 1.0 + (log10(pt_max) - 1.0) * rndm.flat()); 164 eta = (2.0 * rndm.flat() - 1.0) * eta_max; 165 phi = 2.0 * M_PI * rndm.flat(); 166 pp = pt * cosh(eta); 167 mm = pdt.mSel(id); 168 ee = Pythia8::sqrtpos(pp*pp + mm*mm); 169 169 170 170 // Store the particle in the event record. 171 event.append( id, 1, 0, 0, pp * sThe * cos(phi), pp * sThe * sin(phi), pp * cThe, ee, mm); 172 171 event.append(id, 1, 0, 0, pt * cos(phi), pt * sin(phi), pt * sinh(eta), ee, mm); 173 172 } 174 173 175 void fillPartons(int type, double ee_max, Pythia8::Event& event, Pythia8::ParticleData& pdt, 176 Pythia8::Rndm& rndm) { 174 void fillPartons(int id, double pt_max, double eta_max, 175 Pythia8::Event &event, Pythia8::ParticleData &pdt, Pythia8::Rndm &rndm) 176 { 177 177 178 178 // Reset event record to allow for new event. 179 179 event.reset(); 180 180 181 // Angles uniform in solid angle.182 double cThe, sThe, phi, ee;183 184 181 // Information on a q qbar system, to be hadronized. 185 182 186 cThe = 2. * rndm.flat() - 1.; 187 sThe = Pythia8::sqrtpos(1. - cThe * cThe); 188 phi = 2. * M_PI * rndm.flat(); 189 ee = pow(10,1+(log10(ee_max)-1)*rndm.flat()); 190 double mm = pdt.m0(type); 191 double pp = Pythia8::sqrtpos(ee*ee - mm*mm); 192 if (type == 21) 193 { 194 event.append( 21, 23, 101, 102, pp * sThe * cos(phi), pp * sThe * sin(phi), pp * cThe, ee); 195 event.append( 21, 23, 102, 101, -pp * sThe * cos(phi), -pp * sThe * sin(phi), -pp * cThe, ee); 183 // Generate uniform pt and eta. 184 double pt, eta, phi, pp, ee, mm; 185 pt = pow(10, 1.0 + (log10(pt_max) - 1.0) * rndm.flat()); 186 eta = (2.0 * rndm.flat() - 1.0) * eta_max; 187 phi = 2.0 * M_PI * rndm.flat(); 188 pp = pt * cosh(eta); 189 mm = pdt.m0(id); 190 ee = Pythia8::sqrtpos(pp*pp + mm*mm); 191 192 if(id == 21) 193 { 194 event.append(21, 23, 101, 102, pt * cos(phi), pt * sin(phi), pt * sinh(eta), ee); 195 event.append(21, 23, 102, 101, -pt * cos(phi), -pt * sin(phi), -pt * sinh(eta), ee); 196 196 } 197 197 else 198 198 { 199 event.append( type, 23, 101, 0, pp * sThe * cos(phi), pp * sThe * sin(phi), pp * cThe, ee, mm);200 event.append( -type, 23, 0, 101, -pp * sThe * cos(phi), -pp * sThe * sin(phi), -pp * cThe, ee, mm);199 event.append(id, 23, 101, 0, pt * cos(phi), pt * sin(phi), pt * sinh(eta), ee, mm); 200 event.append(-id, 23, 0, 101, -pt * cos(phi), -pt * sin(phi), -pt * sinh(eta), ee, mm); 201 201 } 202 202 } … … 340 340 if (pythia->mode("Main:spareMode1") == 11 || pythia->mode("Main:spareMode1") == 13 || pythia->mode("Main:spareMode1") == 15 || pythia->mode("Main:spareMode1") == 22) 341 341 { 342 fillParticle( pythia->mode("Main:spareMode1"), pythia->parm("Main:spareParm1"), -1., 0.,pythia->event, pythia->particleData, pythia->rndm, 0);342 fillParticle(pythia->mode("Main:spareMode1"), pythia->parm("Main:spareParm1"), pythia->parm("Main:spareParm2"), pythia->event, pythia->particleData, pythia->rndm); 343 343 } 344 else fillPartons( pythia->mode("Main:spareMode1"), pythia->parm("Main:spareParm1"), pythia->event, pythia->particleData, pythia->rndm); 344 else 345 { 346 fillPartons(pythia->mode("Main:spareMode1"), pythia->parm("Main:spareParm1"), pythia->parm("Main:spareParm2"), pythia->event, pythia->particleData, pythia->rndm); 347 } 345 348 } 346 349
Note:
See TracChangeset
for help on using the changeset viewer.