subroutine hgeakey implicit none * * modified on 19/01/2005 by R. Holzmann * c----------------------------------------------------------------------------- * The data card file gffkey.dat is an example for a possible * choice of data key configuration. It will be called by default * when the program starts. The following keys are defined: * c----------------------------------------------------------------------------- * SWIT 0 0 0 0 0 0 0 0 0 0 ==> assigns ISWIT(1:10) can also be assigned * interactively with * GEANT command swit * ISWIT(2) =1 ==> CALL GSXYZ controls handling of GEANT tracking information * 2 ==> CALL GPCXYZ * 3 ==> CALL GDXYZ * 4 ==> plot charged tracks only c----------------------------------------------------------------------------- * RUNG 0 1 ==> set run number = 0 and first event number = 1 * c----------------------------------------------------------------------------- * KINE N ==> generates N particle(s) from vertex sampled according * to parameters pkine(1:10) (see varangle.F) * PKINE(1)=THETAMIN, PKINE(2)=THETAMAX, (in deg) * PKINE(3)=PHIMIN, PKINE(4)=PHIMAX, (in deg) * PKINE(5)=PMIN, PKINE(6)=PMAX, (in MeV/c) * PKINE(7)=ID2*1000+ID1, PKINE(8)=alphamin, * PKINE(9)=alphamax, PKINE(10)=beta (in deg) * * alpha is the opening angle of a pair, beta the orientation of * the pair plane (if <0 || >360, uniform between 0-360 deg) * For pairs, 2 ids can be given, e.g. pi+pi- = 8009 * c----------------------------------------------------------------------------- * PMCK 1 ==> gukine calls kinegen which calls passEvent() to get event from * Root level c----------------------------------------------------------------------------- * PMCF 1 ==> gukine calls filegen to read evenst from file(s) * c----------------------------------------------------------------------------- * PMC1 30 float params ==> control event generator #1 = cosmics * PMC2-8 30 float params ==> control event generator #2-#8 = thermal source(s) * PMC9 30 float params ==> control event generator #9 * c***************************************************************************** * JVER(1) 0 ==> vertex = (0,0,0) * 1 ==> emission from different target segments read from data base * 2 ==> emission from square volume defined by tgtpar(1..3) * 3 ==> emission defined by JVER(2) and JVER(3) * * JVER(2) 1 ==> z vertex sampled uniformely (params in tgtpar(i)) * 2 ==> z vertex sampled exponentially * 3 ==> z vertex discrete * * JVER(3) 1 ==> x,y vertex sampled uniformely (params in tgtpa(i)) * 2 ==> x,y vertex sampled according to beam profile (beampar(i)) * c***************************************************************************** * The key BEAM controls beam parameters (size, energy, energy spread, pos) * * BEAM 0.7 1.4 1000.0 1.0 0.0 0.0 (mm, mm, MeV, MeV, mm, mm) * BEAMPAR(1:6) = sigX sigY Ebeam sigEbeam posx posy * c----------------------------------------------------------------------------- * The key TARG controls 9 target parameters (in mm) * * TARG TGTPAR(1:9) (see makevertex.F for details) * c----------------------------------------------------------------------------- * ULEN LUNIT ==> output multiplier for lengths (default = 10.0 for mm) * c----------------------------------------------------------------------------- * FMAP 0 ==> zero field * 1 ==> old field map read from LUN=27 * 2 ==> TOSCA field map read from LUN=31 (default) * FPOL 1.0 ==> field polarity = + * -1.0 ==> field polarity = - * * MACC 1 ==> compute acceptance matrix acc(p,theta,phi) * c----------------------------------------------------------------------------- * SECO 0 x ==> No Storing of secondaries * 1 x ==> Normal storing in temporary stack * 2 x ==> Secondaries produced in front of Mirror * stored with new Vertex and Itra (Track number) * 3 x ==> All secondaries stored with new Vertex and Itra * * SECO x 0 ==> All secondaries go to the output tree * x 1 ==> Only primary tracks, tracks making hits and all their * ancestors are written to file (use only with x > 0) * c----------------------------------------------------------------------------- * MXST maxnst ==> set maximum number of steps allowed in GSTRACK (def=10000) * c----------------------------------------------------------------------------- * SPLIT nplit ==> split level of ROOT tree (n=0,1 or 2) * c----------------------------------------------------------------------------- * FILE -1 ==> generate PAW ntuple files (needs to be compiled accordingly) * 0 ==> no output file * 1 ==> ROOT tree file (default) * c----------------------------------------------------------------------------- * VERS 1 ==> set event version (to follow ideosyncrasy of HADES DAQ!) * (default=0) c----------------------------------------------------------------------------- * LOOP nmaxloop nleptpair nogamma (example 100 2 1, default 0 0 0 ) * Repeats each event at max nmaxloop until n lepton pairs are * detected in acceptance. * example: eta ->gg (Pluto). Conversion probability per gamma * in targted+RICH is arround 1%. If you require both gamma to be * converted into e+e- in acceptance only about once per 10000 events * such a case would happen. This rare cases are enhanced by repeating * a given input event until the result is detected in the output. The * loop is stopped latest at nmaxloop. For each input event is exactly * one event in the output, at the maximum number of repeats the event is * accepted anyway) * * nmaxloop : repeat each input event at max nmaxloop times * nleptpair: number of e+e- pairs in output (in the example 1 or 2, dependend * if you want to work with 1 gamma in ECAL and 1 or 2 e+e- in acceptance) * All primary gammas have to be either in ECAL or e+e- in acceptance * Bare in mind repeating events will have only effect on e+e- from * conversion since this is a statistical process. Gammas are not * changed. * nogamma : simulations can be speed up if all primary gammas should * be converted in front of MDCs. In that case the flag (=1) * will skip the event in stepping already if a primary gamma * is entering MDC. In the example eta->gg->e+e- e+e- speed gain * is about a factor 3 * Output : To get some handle on the number of processed events additional * information is stored in the EventHeader * HEventHeader::getTimeInSpillOld() returns the number of processed * events up to this point. * HEventHeader::getDownscaling() returns the number of repeats * until success (1 - nmaxloop). For pure simulations this values * are not used. For embedding into real data this values will not * be available. c----------------------------------------------------------------------------- #include "user.inc" #include "pmc.inc" #include "fields.inc" #include "geatarget.inc" #include "kinetups.inc" #include "branchings.inc" #include "geant321/gctrak.inc" #include "eventbuffer.inc" call ffkey('JVER',jver,3,'integer') ! read vertex options call ffkey('BEAM',beampar,6,'real') ! read beam geometry and energy call ffkey('TARG',tgtpar,9,'real') ! read target volume params call ffkey('FMAP',imap,1,'integer') ! read field map call ffkey('FPOL',fpol,1,'real') ! magnetic field polarity call ffkey('SECO',iseco,2,'integer') ! controls storage of secondaries call ffkey('MXST',maxnst,1,'integer') ! nb of steps allowed in GSTRACK call ffkey('MACC',imacc,1,'integer') ! compute acceptance matrix call ffkey('SPLIT',nsplit,1,'integer') ! split level of ROOT tree call ffkey('FILE',itup,1,'integer') ! select output mode call ffkey('ULEN',lunit,1,'real') ! output multiplier for lengths call ffkey('PMCF',pmcf,1,'integer') ! switch on filegen call ffkey('PMCK',pmck,1,'integer') ! switch on kinegen call ffkey('PMC1',pmc1, 30,'real') ! parameters of first generator call ffkey('PMC2',pmc2, 30,'real') ! parameters of second generator call ffkey('PMC3',pmc3, 30,'real') ! parameters of third generator call ffkey('PMC4',pmc4, 30,'real') ! parameters of fourth generator call ffkey('PMC5',pmc5, 30,'real') ! parameters of fifth generator call ffkey('PMC6',pmc6, 30,'real') ! parameters of sixth generator call ffkey('PMC7',pmc7, 30,'real') ! parameters of seventh generator call ffkey('PMC8',pmc8, 30,'real') ! parameters of eigth generator call ffkey('PMC9',pmc9, 30,'real') ! parameters of ninth generator call ffkey('PI0',brpi0, 2,'real') ! new pi0 branchings (sum=100%!) call ffkey('ETA',breta, 6,'real') ! new eta branchings call ffkey('OMEG',bromeg, 6,'real') ! new omega branchings call ffkey('RHO',brrho, 6,'real') ! new rho branchings call ffkey('PHI',brphi, 6,'real') ! new phi branchings call ffkey('ETAP',bretap, 6,'real') ! new eta prime branchings call ffkey('VERS',evtversion,1,'integer') ! set event version number call ffkey('LOOP',ievtloop,3,'integer') ! set nmaxloop1 nlept1 nogamma1 from eventbuffer.inc return end