JeffersonLab / HDGeant4

Geant4 simulation for the GlueX experiment
4 stars 4 forks source link

Vertex generation used with BHgen #192

Closed eltonssmith closed 2 years ago

eltonssmith commented 3 years ago

We have realized that BHgen currently generates pairs only in a defined hydrogen target. This needs to be expanded for CPP, since this experiment does not have a hydrogen target. The CPP target is a solid 208Pb target placed at z=1cm. (The entire target and start counter are removed and reconfigured to hold the solid target —still to be designed). Therefore, no pairs are currently generated if we have the CPP geometry defined via the environment variable JANA_GEOMETRY_URL. The next step is to make the system more flexible, particularly for the CPP experiment.

Possible solutions: There are at least two things to consider:

  1. Vertex generation. One could use the command cards in the control.in file that are used for the particle gun. The SCAP and TGTWIDTH parameters seem to be appropriate and are already operational. Defining these separately from the geometry file is useful, since for testing and for systematic studies one may wish to generate events that are not uniformly distributed along the target. For example, one might wish to study events generated from windows along the beamline.
  2. We also talked about updating the generator to use nuclear targets (i.e. 208Pb specifically). One possibility would be to dig into the defined geometry and use materials specified there. However, that might limit flexibility and need to make additional assumptions. Another alternative would be to add a new command card, or add parameters to one of the above commands. In general I favor having the event generators to be as self-contained as possible.
T-Britton commented 3 years ago

There is a vertex volume option in MCwrapper…..may be able to leverage it:

VERTEX_VOLUME=ccdb:29.5 #defines the VERTEX card in geant. The first value should be a comma seperated string x,y,z,var_xx,var_xy,var_yy,dxdz,dydz and the second part is the length (only the length need be given)

Thomas Britton Staff Scientist, Scientific Computing Jefferson Lab

From: @.> Sent: Wednesday, July 7, 2021 2:47 PM To: @.> Cc: @.***> Subject: [EXTERNAL] [JeffersonLab/HDGeant4] Vertex generation used with BHgen (#192)

We have realized that BHgen currently generates pairs only in a defined hydrogen target. This needs to be expanded for CPP, since this experiment does not have a hydrogen target. The CPP target is a solid 208Pb target placed at z=1cm. (The entire target and start counter are removed and reconfigured to hold the solid target —still to be designed). Therefore, no pairs are currently generated if we have the CPP geometry defined via the environment variable JANA_GEOMETRY_URL. The next step is to make the system more flexible, particularly for the CPP experiment.

Possible solutions: There are at least two things to consider:

  1. Vertex generation. One could use the command cards in the control.in file that are used for the particle gun. The SCAP and TGTWIDTH parameters seem to be appropriate and are already operational. Defining these separately from the geometry file is useful, since for testing and for systematic studies one may wish to generate events that are not uniformly distributed along the target. For example, one might wish to study events generated from windows along the beamline.
  2. We also talked about updating the generator to use nuclear targets (i.e. 208Pb specifically). One possibility would be to dig into the defined geometry and use materials specified there. However, that might limit flexibility and need to make additional assumptions. Another alternative would be to add a new command card, or add parameters to one of the above commands. In general I favor having the event generators to be as self-contained as possible.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_JeffersonLab_HDGeant4_issues_192&d=DwMFaQ&c=CJqEzB1piLOyyvZjb8YUQw&r=ccFffx721N71hPpKcJGvJIqY9RM4gBTuzp9ir7rze5Q&m=ZwWBwa1Rx0FAWMsdbV3hm5vGRA75beCujh2_dJ-Slds&s=IZTELzPk9zkzfMcUy_HutLPZgKG_Pxe5gxAwFNQRJQo&e=, or unsubscribehttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AFRO2BGBOCU3YAV4GPUMOOTTWSOMZANCNFSM477G4XLQ&d=DwMFaQ&c=CJqEzB1piLOyyvZjb8YUQw&r=ccFffx721N71hPpKcJGvJIqY9RM4gBTuzp9ir7rze5Q&m=ZwWBwa1Rx0FAWMsdbV3hm5vGRA75beCujh2_dJ-Slds&s=pbkZuyA14k6nxUkx-K1LVEwTg4z4IZooQMDLNSICSjI&e=.

rjones30 commented 3 years ago

Hello Elton,

If you have a set of predefined volume names for your targets, with assigned materials, I can add these to the internal pairs generator and select the appropriate atomic/nuclear form factors to go with that target. It would be helpful if you could provide me with ready-made c++ methods for these two form factors so I do not have to develop my own and test them.

-Richard Jones

On Wed, Jul 7, 2021 at 2:47 PM eltonssmith @.***> wrote:

We have realized that BHgen currently generates pairs only in a defined hydrogen target. This needs to be expanded for CPP, since this experiment does not have a hydrogen target. The CPP target is a solid 208Pb target placed at z=1cm. (The entire target and start counter are removed and reconfigured to hold the solid target —still to be designed). Therefore, no pairs are currently generated if we have the CPP geometry defined via the environment variable JANA_GEOMETRY_URL. The next step is to make the system more flexible, particularly for the CPP experiment.

Possible solutions: There are at least two things to consider:

  1. Vertex generation. One could use the command cards in the control.in file that are used for the particle gun. The SCAP and TGTWIDTH parameters seem to be appropriate and are already operational. Defining these separately from the geometry file is useful, since for testing and for systematic studies one may wish to generate events that are not uniformly distributed along the target. For example, one might wish to study events generated from windows along the beamline.
  2. We also talked about updating the generator to use nuclear targets (i.e. 208Pb specifically). One possibility would be to dig into the defined geometry and use materials specified there. However, that might limit flexibility and need to make additional assumptions. Another alternative would be to add a new command card, or add parameters to one of the above commands. In general I favor having the event generators to be as self-contained as possible.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/JeffersonLab/HDGeant4/issues/192, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB3YKWHXNLFX5MHNQBX6ID3TWSOMPANCNFSM477G4XLQ .

eltonssmith commented 3 years ago

Richard, I assume the information in the ccdb xml file contains all the information you need on the CPP target:

/GEOMETRY> cat TargetCPP_HDDS.xml +------------+ | xml | | string | +------------+ | <?xml version="1.0" encoding="UTF-8"?>

<section name = "TargetCPP" version = "1.0" date = "2017-06-08" author = "David Lawrence" top_volume = "TARG" specification = "v1.0">

| +------------+ /GEOMETRY>

eltonssmith commented 3 years ago

Accidentally closed issue, so I reopened it.

eltonssmith commented 3 years ago

<section name = "TargetCPP" version = "1.0" date = "2017-06-08" author = "David Lawrence" top_volume = "TARG" specification = "v1.0">

eltonssmith commented 3 years ago
TargetCPP_HDDS
rjones30 commented 3 years ago

Elton, perfect, thanks! -Richard

On Wed, Jul 14, 2021 at 10:51 AM eltonssmith @.***> wrote:

Richard, I assume the information in the ccdb xml file contains all the information you need on the CPP target:

/GEOMETRY> cat TargetCPP_HDDS.xml +------------+ xml string +------------+

| +------------+ /GEOMETRY>

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/JeffersonLab/HDGeant4/issues/192#issuecomment-879960117, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB3YKWCLYOPPPGBN3VMMOK3TXWP7TANCNFSM477G4XLQ .

eltonssmith commented 2 years ago

The latest version of hdgeant4 (2.26.0) can now generate electron and muon pairs from the CPP vertex. Thanks to Richard! Below are dumps of four events using BHgen (electron pairs). The events are originating at z=1 cm, which is the position of the CPP lead target. The recoil is usually lead, but occasionally one sees a proton recoil.


Dump for four events using GENBEAM 'BHgen' 0.5

event= 1 beam type= Photon E= 9.89018821716 px= 0.000307428475935 py= -8.97805512068e-05 pz= 9.89018821716 event= 1 Polarization Px= -0.0287802889943 Py= 0.021339636296 Pz= 1.0883276218e-06 event= 1 t= -90.2397079468 x= -0.0856962054968 y= -0.0279575958848 z= -2400.0 event= 1 decay vertex= 1 parentid= 1 pdgtype= -11 type= Positron event= 1 E= 9.06293201447 px= 2.57681584358 py= 0.806453227997 pz= 8.65138053894 event= 1 t= -10.1507291794 x= 0.236936733127 y= -0.0344379916787 z= 1.00715494156 event= 1 decay vertex= 1 parentid= 1 pdgtype= 11 type= Electron event= 1 E= 0.803065359592 px= 0.347369492054 py= -0.0861840471625 pz= 0.718902289867 event= 1 t= -10.1507291794 x= 0.236936733127 y= -0.0344379916787 z= 1.00715494156 event= 1 decay vertex= 1 parentid= 1 pdgtype= 1000822080 type= Lead event= 1 E= 193.711776733 px= -2.92387795448 py= -0.720358967781 pz= 0.519905805588 event= 1 t= -10.1507291794 x= 0.236936733127 y= -0.0344379916787 z= 1.00715494156

event= 2 beam type= Photon E= 8.39611148834 px= 0.000193996616872 py= 2.03653107747e-05 pz= 8.39611148834 event= 2 Polarization Px= -0.0140810515732 Py= -0.137804493308 Pz= 6.59603927033e-07 event= 2 t= -98.2557373047 x= 0.104931160808 y= -0.0813229382038 z= -2400.0 event= 2 decay vertex= 1 parentid= 1 pdgtype= -11 type= Positron event= 2 E= 6.16203784943 px= -0.0225744172931 py= -0.374038845301 pz= 6.15063381195 event= 2 t= -18.166929245 x= 0.119494855404 y= -0.0262686964124 z= 1.0020993948 event= 2 decay vertex= 1 parentid= 1 pdgtype= 11 type= Electron event= 2 E= 2.23403191566 px= -0.0464618094265 py= 0.27264893055 pz= 2.21684503555 event= 2 t= -18.166929245 x= 0.119494855404 y= -0.0262686964124 z= 1.0020993948 event= 2 decay vertex= 1 parentid= 1 pdgtype= 1000822080 type= Lead event= 2 E= 193.687713623 px= 0.0692302286625 py= 0.101410277188 pz= 0.0286320950836 event= 2 t= -18.166929245 x= 0.119494855404 y= -0.0262686964124 z= 1.0020993948

event= 3 beam type= Photon E= 6.4943614006 px= 0.000148683568113 py= 0.000158074893989 pz= 6.4943614006 event= 3 Polarization Px= -0.0273150447756 Py= -0.344594091177 Pz= 9.01289149624e-06 event= 3 t= -66.1916122437 x= -0.00312815885991 y= -0.0908130556345 z= -2400.0 event= 3 decay vertex= 1 parentid= 1 pdgtype= -11 type= Positron event= 3 E= 4.48423671722 px= 0.284918814898 py= -0.190530687571 pz= 4.47111797333 event= 3 t= 13.8974466324 x= 0.283550560474 y= 0.00594867253676 z= 1.00952935219 event= 3 decay vertex= 1 parentid= 1 pdgtype= 11 type= Electron event= 3 E= 2.01008677483 px= -0.383051902056 py= 0.223181352019 pz= 1.96058917046 event= 3 t= 13.8974466324 x= 0.283550560474 y= 0.00594867253676 z= 1.00952935219 event= 3 decay vertex= 1 parentid= 1 pdgtype= 1000822080 type= Lead event= 3 E= 193.687713623 px= 0.0982817783952 py= -0.0324925892055 pz= 0.0626540407538 event= 3 t= 13.8974466324 x= 0.283550560474 y= 0.00594867253676 z= 1.00952935219

event= 4 beam type= Photon E= 9.87286281586 px= -0.000124752055854 py= -0.000148085571709 pz= 9.87286281586 event= 4 Polarization Px= 0.0058670132421 Py= 0.0045780222863 Pz= 1.42801638958e-07 event= 4 t= -98.2557373047 x= 0.0210974179208 y= -0.0155997127295 z= -2400.0 event= 4 decay vertex= 1 parentid= 1 pdgtype= -11 type= Positron event= 4 E= 2.89870047569 px= -0.324345558882 py= -0.116903401911 pz= 2.87812399864 event= 4 t= -18.1670341492 x= -0.00492067076266 y= -0.142042249441 z= 0.998958051205 event= 4 decay vertex= 1 parentid= 1 pdgtype= 11 type= Electron event= 4 E= 6.97415828705 px= 0.323910802603 py= 0.141857460141 pz= 6.96518754959 event= 4 t= -18.1670341492 x= -0.00492067076266 y= -0.142042249441 z= 0.998958051205 event= 4 decay vertex= 1 parentid= 1 pdgtype= 1000822080 type= Lead event= 4 E= 193.687683105 px= 0.000309994880809 py= -0.0251021366566 pz= 0.0295508056879 event= 4 t= -18.1670341492 x= -0.00492067076266 y= -0.142042249441 z= 0.998958051205