key4hep / k4geo

DD4hep based geometry models for lepton collider detectors (Formerly known as lcgeo)
GNU General Public License v3.0
8 stars 60 forks source link

Minimum energy cut for GuineaPig primaries #64

Closed luisaleperez closed 7 years ago

luisaleperez commented 7 years ago

Hello all,

I am working for ILC in the simulation of machine induced backgrounds, specifically 2-photon* processes. Recently a GuineaPig reader was implemented in DD4hep (DDG4//plugins/Geant4EventReaderGuineaPig.cpp). I have been testing it by building a very simple (an artificial) GuienaPig input file with a single particle on it. The format in this file is a follows,

E betax betay betaz x y z

where, E is the signed energy in GeV, which is positive (negative) for electrons (positrons), bx,by,bz, is the speed modulo the speed of light (beta = v/c), and x,y,z the coordinates of the creation vertex (in nanometres). In my simple test I created a GuineaPig file with a single line as follows,

E 1.0 0.0 .0.0 0.0 0.0 0.0

i.e. a particle created at the origin with a momentum direction along the X-axis. I noticed that when E < 0.010 (i.e. < 10 MeV) the particle is not simulated and it is when E >= 0.010.

You can take a look of my code at desy here,

/afs/desy.de/user/l/laperez/ILC_Developments/6Mar2017/ILDConfig/trunk/StandardConfig/lcgeo_current

I ran ddsim as follows,

ddsim --inputFiles ./MyTest_v2.pairs --outputFile=./GuineaPig_1evt_TEST.slcio --compactFile $lcgeo_DIR/ILD/compact/ILD_o1_v05/ILD_o1_v05.xml --steeringFile=./ddsim_steer_GuineaPig.py

where MyTest_v2.pairs is the test GuineaPig input file, and ddsim_steer_GuineaPig.py is an steering file adapted for this simulation (just simulate one event).

Does anyone knows if there is a threshold cut on the minimum energy of a primary particle to be simulated.

Many thanks,

Alejandro

andresailer commented 7 years ago

How do you conclude that the particle was not simulated?

andresailer commented 7 years ago

I cannot access your afs folder, permission denied

luisaleperez commented 7 years ago

Hello,

I conclude that the particles are not simulation because just after the simulation I visualize it with ced2go as follows,

ced2go -s 1 -d $lcgeo_DIR//ILD/compact/ILD_o1_v05/ILD_o1_v05.xml GuineaPig_1evt_TEST.slcio

as the primary in the MyTest_v2.paris file is only visualized if its energy is higher than or equal to 0.010 (i.e. 10 MeV).

Maybe there is a threshold for the visualization. Could it be?

I changed the rights of my directory. Could you try to look into it now?

Cheers,

Alejandro

andresailer commented 7 years ago

A better check to see if something is simulated is looking directly at the MCParticle collection I simulated 100/10/9 MeV electrons, notice the SimStatus is set for all of them as is an endpoint, all of them were simulated.

--------------- print out of MCParticle collection ---------------

  flag:  0x0
  simulator status bits: [sbvtcls]  s: created in simulation b: backscatter v: vertex is not endpoint of parent t: decayed in tracker c: decayed in calorimeter l: has left detector s: stopped o: overlay

[   id   ]index|      PDG |    px,     py,        pz    | px_ep,   py_ep , pz_ep      | energy  |gen|[simstat ]| vertex x,     y   ,   z     | endpoint x,    y  ,   z     |    mass |  charge |            spin             | colorflow | [parents] - [daughters]

[00000048]    0|        11| 1.00e-01, 0.00e+00, 0.00e+00| 0.00e+00, 0.00e+00, 0.00e+00| 1.00e-01| 1 |[   t  s ]| 0.00e+00, 0.00e+00, 0.00e+00|-5.27e+01, 1.36e+02,-1.89e+03| 5.11e-04|-1.00e+00| 0.00e+00, 0.00e+00, 0.00e+00|  (0, 0)   | [] - [3,4]
[00000049]    1|        11| 1.00e-02, 0.00e+00, 0.00e+00| 2.63e-03, 6.91e-04,-2.90e-04| 1.00e-02| 1 |[   t    ]| 0.00e+00, 0.00e+00, 0.00e+00| 9.26e-02, 8.43e+00,-4.74e+02| 5.11e-04|-1.00e+00| 0.00e+00, 0.00e+00, 0.00e+00|  (0, 0)   | [] - []
[00000050]    2|        11| 9.00e-03, 0.00e+00, 0.00e+00|-2.53e-04, 3.20e-03, 6.01e-04| 9.01e-03| 1 |[    c   ]| 0.00e+00, 0.00e+00, 0.00e+00| 2.98e+00, 1.08e+01, 2.89e+03| 5.11e-04|-1.00e+00| 0.00e+00, 0.00e+00, 0.00e+00|  (0, 0)   | [] - []
[00000051]    3|        22|-2.10e-02,-5.35e-02,-2.30e-03|-0.00e+00,-0.00e+00,-0.00e+00| 5.75e-02| 0 |[s v c s ]|-8.29e+01, 1.34e+02, 1.53e+00|-8.38e+02,-1.79e+03,-8.11e+01| 0.00e+00| 0.00e+00| 0.00e+00, 0.00e+00, 0.00e+00|  (0, 0)   | [0] - []
[00000052]    4|        11| 5.40e-04,-1.77e-03,-4.05e-04| 0.00e+00,-0.00e+00, 0.00e+00| 1.96e-03| 0 |[s vt  s ]|-7.35e+01, 1.38e+02,-6.62e+01|-7.29e+01, 1.38e+02,-6.70e+01| 5.11e-04|-1.00e+00| 0.00e+00, 0.00e+00, 0.00e+00|  (0, 0)   | [0] - []

If you don't event trust the MCParticle output set /tracking/verbose 1 in the geant shell

I still can't access your files.

luisaleperez commented 7 years ago

Could you please explain me how can I see the information of the MCParticle collection. Sorry, I am new in the ILCSoft.

Thanks.

andresailer commented 7 years ago

use the dumpevent command

dumpevent GuineaPig_1evt_TEST.slcio 1 
luisaleperez commented 7 years ago

Ok. I just launched the following GuinePig input file

+0.0010  1.0   0.0   0.0   0.0     0.0    0.0
+0.0080  1.0   0.0   0.0   0.0     0.0    0.0
+0.0100  1.0   0.0   0.0   0.0     0.0    0.0
+0.0150  1.0   0.0   0.0   0.0     0.0    0.0

i.e., all particle at the origin and with +X-axis direction, all electrons with energies of 1, 8, 10 and 15 MeV. This is what I get when I run the dumpevent comment, just show you the MCParticle collection

--------------- print out of MCParticle collection --------------- 

  flag:  0x0
  simulator status bits: [sbvtcls]  s: created in simulation b: backscatter v: vertex is not endpoint of parent t: decayed in tracker c: decayed in calorimeter l: has left detector s: stopped o: overlay

[   id   ]index|      PDG |    px,     py,        pz    | px_ep,   py_ep , pz_ep      | energy  |gen|[simstat ]| vertex x,     y   ,   z     | endpoint x,    y  ,   z     |    mass |  charge |            spin   
          | colorflow | [parents] - [daughters]

[00000048]    0|        11| 1.01e-03, 0.00e+00, 0.00e+00| 1.75e-04, 9.93e-04, 9.13e-10| 1.13e-03| 1 |[   t    ]| 0.00e+00, 0.00e+00, 0.00e+00| 5.71e-02,-4.76e-01,-5.49e-05| 5.11e-04|-1.00e+00| 0.00e+00, 0.00e+00
, 0.00e+00|  (0, 0)   | [] - [] 
[00000049]    1|        11| 8.06e-03, 0.00e+00, 0.00e+00| 0.00e+00,-0.00e+00,-0.00e+00| 8.07e-03| 1 |[   t  s ]| 0.00e+00, 0.00e+00, 0.00e+00|-3.88e+00, 1.34e+01, 4.55e+01| 5.11e-04|-1.00e+00| 0.00e+00, 0.00e+00
, 0.00e+00|  (0, 0)   | [] - [4] 
[00000050]    2|        11| 1.01e-02, 0.00e+00, 0.00e+00| 0.00e+00,-0.00e+00, 0.00e+00| 1.01e-02| 1 |[   t  s ]| 0.00e+00, 0.00e+00, 0.00e+00|-1.30e+01,-1.28e+01,-2.70e+01| 5.11e-04|-1.00e+00| 0.00e+00, 0.00e+00
, 0.00e+00|  (0, 0)   | [] - [] 
[00000051]    3|        11| 1.51e-02, 0.00e+00, 0.00e+00| 0.00e+00, 0.00e+00,-0.00e+00| 1.51e-02| 1 |[   t  s ]| 0.00e+00, 0.00e+00, 0.00e+00|-7.92e+01,-8.37e+01,-1.52e+03| 5.11e-04|-1.00e+00| 0.00e+00, 0.00e+00
, 0.00e+00|  (0, 0)   | [] - [] 
[00000052]    4|        11|-1.41e-03,-5.39e-04, 1.89e-03| 0.00e+00, 0.00e+00, 0.00e+00| 2.47e-03| 0 |[s vt  s ]|-5.88e+00, 1.55e+01, 4.63e+01|-6.78e+00, 1.42e+01, 9.31e+01| 5.11e-04|-1.00e+00| 0.00e+00, 0.00e+00
, 0.00e+00|  (0, 0)   | [1] - []

This mainly concludes that ddsim is simulation particle with energies smaller than 10MeV. My mistake. But, why I can not see particle with energy smaller than 10 MeV when using ced2go?

Any ways, it is not very important.

Many thanks for your help. Should I close this issue?

Edit Andre: added triple tick marks