GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Bugs, Fixes, Releases » Stepsize in TPC Simulation with new external packages
Stepsize in TPC Simulation with new external packages [message #5492] Tue, 27 November 2007 15:40 Go to next message
Sebastian Neubert is currently offline  Sebastian Neubert
Messages: 282
Registered: March 2006
Location: Munich
first-grade participant

From: *e18.physik.tu-muenchen.de
Hi!

I have installed the new external packages. Now the G4 simulation does not work anymore as it did before. Specifically I do not get a stepsize limitation in the TPC anymore.
I tried to understand what changed in gconfig but did not get far.

Please Help me!
Sebastian.


Sebastian Neubert
Technische Universität München
Department Physik E18
sneubert@e18.physik.tu-muenchen.de
tel: +49-8928912592
Re: Stepsize in TPC Simulation with new external packages [message #5497 is a reply to message #5492] Tue, 27 November 2007 16:45 Go to previous messageGo to next message
Mohammad Al-Turany is currently offline  Mohammad Al-Turany
Messages: 518
Registered: April 2004
Location: GSI, Germany
first-grade participant
From: *gsi.de
Hi,

it seems that for some reason which I do not know the minimum step size defind in the geometry is lost in G4! I am trying to find out what is going on! I hope I will find it soon.

regards

Mohammad
Re: Stepsize in TPC Simulation with new external packages [message #5505 is a reply to message #5492] Tue, 27 November 2007 20:27 Go to previous messageGo to next message
Mohammad Al-Turany is currently offline  Mohammad Al-Turany
Messages: 518
Registered: April 2004
Location: GSI, Germany
first-grade participant
From: *dip.t-dialin.net
Hallo Sebastian,

It was the StepLimeter which is not activated in g4Config by default (because we use the SpecialCuts flag). So I added this to the g4Config.C and it is working again (he accept the limits you set in material definition). Just update your gconfig directory and it should work.

regards

Mohammad
Re: Stepsize in TPC Simulation with new external packages [message #5507 is a reply to message #5505] Tue, 27 November 2007 23:50 Go to previous messageGo to next message
Sebastian Neubert is currently offline  Sebastian Neubert
Messages: 282
Registered: March 2006
Location: Munich
first-grade participant

From: *dip.t-dialin.net
Cool! I'll try tomorrow!
Thanx Mohammad!!


Sebastian Neubert
Technische Universität München
Department Physik E18
sneubert@e18.physik.tu-muenchen.de
tel: +49-8928912592
Re: Stepsize in TPC Simulation with new external packages [message #5510 is a reply to message #5507] Wed, 28 November 2007 11:35 Go to previous messageGo to next message
Sebastian Neubert is currently offline  Sebastian Neubert
Messages: 282
Registered: March 2006
Location: Munich
first-grade participant

From: *e18.physik.tu-muenchen.de
Hi!

I just tried with G4 now. There is a stepsize limitation now. But it is 0.005 cm and it appears not to be correlated with what I put into the media file.

Hm... any idea?

Cheers! Sebastian.


Sebastian Neubert
Technische Universität München
Department Physik E18
sneubert@e18.physik.tu-muenchen.de
tel: +49-8928912592
Re: Stepsize in TPC Simulation with new external packages [message #5516 is a reply to message #5510] Wed, 28 November 2007 13:30 Go to previous messageGo to next message
Sebastian Neubert is currently offline  Sebastian Neubert
Messages: 282
Registered: March 2006
Location: Munich
first-grade participant

From: *e18.physik.tu-muenchen.de
Also G3 makes these small steps of only 0.005cm

Sebastian Neubert
Technische Universität München
Department Physik E18
sneubert@e18.physik.tu-muenchen.de
tel: +49-8928912592
Re: Stepsize in TPC Simulation with new external packages [message #5521 is a reply to message #5516] Wed, 28 November 2007 15:53 Go to previous messageGo to next message
Sebastian Neubert is currently offline  Sebastian Neubert
Messages: 282
Registered: March 2006
Location: Munich
first-grade participant

From: *e18.physik.tu-muenchen.de
I have tracked the values for the MaxStep size down into TG4GeometryManager.cxx

Here the G4UserLimit is created:

 G4UserLimits* limits = 0;
    if ( stemax > 0 ) {
      limits = new G4UserLimits();
      limits->SetMaxAllowedStep(stemax*cm);
      G4cout<<"MaxAllowedStep="<<stemax*cm<<G4endl;
    } 


If I put a value of 0.5 in the file, the value of stemax*cm is 5 !!

Sebastian.


Sebastian Neubert
Technische Universität München
Department Physik E18
sneubert@e18.physik.tu-muenchen.de
tel: +49-8928912592
Re: Stepsize in TPC Simulation with new external packages [message #5524 is a reply to message #5521] Wed, 28 November 2007 17:53 Go to previous messageGo to next message
Mohammad Al-Turany is currently offline  Mohammad Al-Turany
Messages: 518
Registered: April 2004
Location: GSI, Germany
first-grade participant
From: *gsi.de
Hallo Sebastian:

Quote:

I just tried with G4 now. There is a stepsize limitation now. But it is 0.005 cm and it appears not to be correlated with what I put into the media file.

Hm... any idea?


As far as I can see if I change the STEPMAX in the media file I can see it in TGeoManager and Also in TG4GeometryManager. In VMC_G4 only the STEPMAX can be set now, so if it is not enough for you we can ask Ivana about this.

So in my media file I put:

TPCmixture 3 20.1797 12.01 15.9994 10. 6. 8. 0.001 0.9 0.0 33 0.067
1 1 20. 0.001
99. 0.0775 0.0001 0.0000777
0

then I put this print out in the TG4GeometryManager:

G4cout << "Adding medium Id=" << mediumId << " name=" << mediumName << " limits=" << limits << " StepMax " << stemax << " StepMax cm "
<< stemax*cm << G4endl;

And As output I get:

Adding medium Id=8 name=TPCmixture limits=0x99c07a0 StepMax 0.0775 StepMax cm 0.775

which correspond exactly to what I put inside the media, and cm in G4 is 10 so the last number is also ok.

So it seems that it works as it is done. Is this now a problem for you that you cannot set the minimum step size yourself? should we discuss with Ivana about this and why she set only the maximum step?

Mohammad



Re: Stepsize in TPC Simulation with new external packages [message #5526 is a reply to message #5524] Wed, 28 November 2007 20:07 Go to previous messageGo to next message
Sebastian Neubert is currently offline  Sebastian Neubert
Messages: 282
Registered: March 2006
Location: Munich
first-grade participant

From: *dip.t-dialin.net
Hi Mohammad!

Yes! This I do also observe. Setting only the MaxStep is fine! Unfortunately this does not reflect in the data that is produced by geant. There it seems that the step-size is small than 0.05mm. I will post a plot here tomorrow.

Sebastian.


Sebastian Neubert
Technische Universität München
Department Physik E18
sneubert@e18.physik.tu-muenchen.de
tel: +49-8928912592
Re: Stepsize in TPC Simulation with new external packages [message #5536 is a reply to message #5526] Thu, 29 November 2007 18:58 Go to previous messageGo to next message
Sebastian Neubert is currently offline  Sebastian Neubert
Messages: 282
Registered: March 2006
Location: Munich
first-grade participant

From: *e18.physik.tu-muenchen.de
Hi!

It is working now. However I do not understand what went wrong and what I did to make it working. I changed something in the media file which was uncorrelated and now it seems to work. Hm...

Cheers. Sebastian.


Sebastian Neubert
Technische Universität München
Department Physik E18
sneubert@e18.physik.tu-muenchen.de
tel: +49-8928912592
Re: Stepsize in TPC Simulation with new external packages [message #5540 is a reply to message #5536] Fri, 30 November 2007 17:17 Go to previous messageGo to next message
Viola Michael is currently offline  Viola Michael
Messages: 5
Registered: August 2007
occasional visitor
From: *natpool.mwn.de
Hi!

I have a question concerning the stepsize limitation and the effects on De/dx. I have plotted the MC-Energyloss over Length
(Pion+, Mometum=0.5 Gev/c, 100 Events)
with Options
"specialCuts+specialControls" in G4Config.C, it looks fine to me, like a landau, as expected:
index.php?t=getfile&id=3993&private=0

I have plotted the stepsizes, too:
index.php?t=getfile&id=3991&private=0

And now my problem: i need stepsize limitation, i turned it on with Option:
"specialCuts+specialControls+stepLimiter" (everything else unchanged)
there is stepsize limitation, like i have befor with the old Release, but my de/dx-MC data is broken:
index.php?t=getfile&id=3992&private=0

(stepsize limitation works:)
index.php?t=getfile&id=3990&private=0

What do i have to do to fix this?

Thanks in advance!

Viola


Re: Stepsize in TPC Simulation with new external packages [message #5546 is a reply to message #5540] Mon, 03 December 2007 14:28 Go to previous messageGo to next message
Mohammad Al-Turany is currently offline  Mohammad Al-Turany
Messages: 518
Registered: April 2004
Location: GSI, Germany
first-grade participant
From: *gsi.de
Hallo,

I just make the comparison for dedx in the TPC, and what I see also a problem but a little bit deferent than yours! first I compared G3 with and without step limitation and the results where exactly the same. (see attached histograms ) To do this I modified the PndTpcDetector.cc so that
1. Sum the energy loss over all steps inside the TPC for each track
2. take the track length at the first step (Entering) and the track length at exiting, and put the difference in the TPCPoint.
3. select on one type of particles


index.php?t=getfile&id=3994&private=0

without step limit (remove AUTONULL and extra parameters from media file)

.index.php?t=getfile&id=3998&private=0

and this one with the limits!

So it is the same as expected. Now if I compare with the wonderful state of the art most advanced Monte Carlo engine I have the following plots for:

index.php?t=getfile&id=3995&private=0
with step limitation. And the next one without step limitation (remove the StepLimiter from g4Config.C):

index.php?t=getfile&id=3999&private=0


now comparing G4 results with and without step limitation:

index.php?t=getfile&id=4000&private=0

and this is not the whole story, if you compare with mu (5000 mu, 0.5 GeV) only G4 with and without step limitation you will see:

index.php?t=getfile&id=4001&private=0



So from all this I would say the shape of dedx is ok, but we have to understand the difference between G3 and G4 and the inconsistence behavior of G4!!


Re: Stepsize in TPC Simulation with new external packages [message #5548 is a reply to message #5546] Mon, 03 December 2007 16:49 Go to previous messageGo to next message
Mohammad Al-Turany is currently offline  Mohammad Al-Turany
Messages: 518
Registered: April 2004
Location: GSI, Germany
first-grade participant
From: *gsi.de
Hi,

Another intresting feature of G4!

changing the physicslist to QGSP_BERT and comparing

1. To G3 (G4 in Red, No step limit)

index.php?t=getfile&id=4002&private=0

2. To G4 with steplimit: (Steplimit in black)

index.php?t=getfile&id=4004&private=0

So it seems that the energy loss of charged particles is physics list dependent in G4??
Re: Stepsize in TPC Simulation with new external packages [message #5578 is a reply to message #5546] Thu, 13 December 2007 15:11 Go to previous messageGo to next message
Sebastian Neubert is currently offline  Sebastian Neubert
Messages: 282
Registered: March 2006
Location: Munich
first-grade participant

From: *e18.physik.tu-muenchen.de
Hi Mohammad!

The difference between G3 and G4 should be investigated. Maybe the G4 community could look at this.

However the way you constructed the TpcPoints is not what we can use. If I understand you correctly you get only the energyloss over the complete track piece in the tpc. What we need is an energy loss information every 5mm!
So please leave TpcDetector as it is and try to reproduce the problem!

What puzzles me is that with the old version of our external packages it worked! So something definitely has changed!

Cheers! Sebastian.


Sebastian Neubert
Technische Universität München
Department Physik E18
sneubert@e18.physik.tu-muenchen.de
tel: +49-8928912592
Re: Stepsize in TPC Simulation with new external packages [message #5579 is a reply to message #5578] Thu, 13 December 2007 15:30 Go to previous messageGo to next message
Mohammad Al-Turany is currently offline  Mohammad Al-Turany
Messages: 518
Registered: April 2004
Location: GSI, Germany
first-grade participant
From: *gsi.de
Hallo Sebastian,


Quote:

The difference between G3 and G4 should be investigated. Maybe the G4 community could look at this.


We are also investigating the energy loss in very thin Si layers and we have big differences between G3, G4 and Fluka we are also comparing with data! in this investigation we are already discussing with FLUKA team and some of G4 team who explain us that we should use G4.9 because they have made large corrections So maybe this explain what you see! any way we are still investigating this.


Quote:

However the way you constructed the TpcPoints is not what we can use. If I understand you correctly you get only the energyloss over the complete track piece in the tpc. What we need is an energy loss information every 5mm!
So please leave TpcDetector as it is and try to reproduce the problem!



I did not touch your code, I only change it in my local copy so do not worry about this!


Mohammad
Re: Stepsize in TPC Simulation with new external packages [message #5580 is a reply to message #5578] Thu, 13 December 2007 15:45 Go to previous messageGo to next message
Viola Michael is currently offline  Viola Michael
Messages: 5
Registered: August 2007
occasional visitor
From: *natpool.mwn.de
Hi!
To illustrate the stepsize dependence of the dedx shape, which is my problem, i have plotted the following:

index.php?t=getfile&id=4021&private=0

where red is 0.5 cm maximum stepsize, then comes 1.0, 1.5, 2.0, 2.5, 5.0, and the black line is no step size limitation.

( in the SetCuts.C macro i have set everything to zero expect energy loss)


Can there be done done something to avoid this or can someone explain this behaviour to me?

Thanks in advance!

Viola
Re: Stepsize in TPC Simulation with new external packages [message #5585 is a reply to message #5492] Fri, 14 December 2007 08:47 Go to previous messageGo to next message
Mohammad Al-Turany is currently offline  Mohammad Al-Turany
Messages: 518
Registered: April 2004
Location: GSI, Germany
first-grade participant
From: *gsi.de
Hallo,

In fact if I understand it well, you rigester in your proccess hit the Edep and flength for each step, and you draw this with the tree draw? if this is true then there is two problems with your plots:

1. Edep is the energy deposition in the volume and not the energy loss! Energy loss and energy deposition in a layer are not necessary equal, because of possible energy leak from the volume. Also you use low cuts, then significant part of energy loss is the production of delta-electrons which need to be counted.

2. fLength: is the track length and not the step length,

if this is true then one can understand your plot, the change in energy deposition (gas in your case)is much smaller than the track length when you change the step size and so with larger steps the whole distribution goes down.

So may be you can register the energy loss instead of deposited energy, which means you have to register the initial energy of your particle at entering a step and the final (at exiting). You need also to set the cuts back! We use usually 50 keV for delta electron production. and 1 MeV for all other.

regards

Mohammad
Re: Stepsize in TPC Simulation with new external packages [message #5586 is a reply to message #5585] Fri, 14 December 2007 12:57 Go to previous message
Viola Michael is currently offline  Viola Michael
Messages: 5
Registered: August 2007
occasional visitor
From: *natpool.mwn.de
Hi Mohammed!
thank you very much for you replies. Yes, i do use Edep, but i do not use flength. I use gMC->TrackStep() instead of TrackLength(). When i look at the distribution of PndTpcPoint.fLength almost all have a length of 0.5cm (for a step limit of 0.5).

With the delta electrons: Perhaps they are the problem: they take energy with them and so there is little dE left for the step. And the energy left goes done the shorter the step is. But i tried to go up with the cuts, i tried to turn the delta-rays off, but the low energy losses stays and only goes up when increasing step size.

I don't understand the part with the possible energy leak from the volume?

Perhaps this could solve my problem:
"So may be you can register the energy loss instead of deposited energy, which means you have to register the initial energy of your particle at entering a step and the final (at exiting)."
... but i have no idea how to do it (i only know the entering and exiting functions for a whole track) Can you please give a hint?

Thanks in advance!

Viola





Previous Topic: New release of external packages
Next Topic: Bugs with tpc in rel. 2006
Goto Forum:
  


Current Time: Mon Oct 07 06:59:05 CEST 2024

Total time taken to generate the page: 0.00865 seconds