GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Event Generators » Event filter II
Event filter II [message #17484] Mon, 10 November 2014 07:48 Go to next message
donghee is currently offline  donghee
Messages: 385
Registered: January 2009
Location: Germnay
first-grade participant
From: *dip0.t-ipconnect.de
Hi Martin,

I am not trying to sort events for pi+pi- or pi+pi-pi0 at DPM

I tried with below to get pi+pi-
Quote:

FairEvtFilterOnSingleParticleCounts* fil= new FairEvtFilterOnSingleParticleCounts("fil");
fil->AndMinMaxPdgCodes(1,1,211,-211);
primGen->AndFilter(fil);


Bet in the MCinfo the inital particles are not only pi+pi- as I expected.
pi+pi- plus some extras are in the entry. That means that the concept is wrong for pi+pi- selection.


Therefore I tried to do with one more constrain.
Quote:

FairEvtFilterOnSingleParticleCounts* fil= new FairEvtFilterOnSingleParticleCounts("fil");
fil->AndMinMaxPdgCodes(1,1,211,-211);
fil->AndMaxAllParticles(2);
primGen->AndFilter(fil);

I used maximum allowed particles as 2, but unfortunately happens the crash with following message
Quote:

===========================================================
#5 0x00002b86e240184e in TDatabasePDG::GetParticle(int) const ()
from /cvmfs/fairroot.gsi.de/fairsoft/apr13/lib/root/libEG.so
#6 0x00002b86ea00a624 in FairEvtFilter::GetCharge (this=0x1af0780,
inPdgCode=211, pdgCodeCharge=0x7fffa99d6870)
at /hera/panda/donghee/pandaroot/pandaroot_oct14/pgenerators/eventFilter/Fa irEvtFilter.cxx:64
#7 0x00002b86ea00daf8 in FairEvtFilterOnSingleParticleCounts::CountCharge (
this=0x1af0780, particle=0xce27f00)
at /hera/panda/donghee/pandaroot/pandaroot_oct14/pgenerators/eventFilter/Fa irEvtFilterOnSinglePa
rticleCounts.cxx:524
#8 0x00002b86ea00e002 in FairEvtFilterOnSingleParticleCounts::EventMatches (
this=0x1af0780, evtNr=1)
at /hera/panda/donghee/pandaroot/pandaroot_oct14/pgenerators/eventFilter/Fa irEvtFilterOnSinglePa
rticleCounts.cxx:612
#9 0x00002b86ea00758c in FairFilteredPrimaryGenerator::GenerateEvent (
this=0x1ae2d70, pStack=0x5804450)
at /hera/panda/donghee/pandaroot/pandaroot_oct14/pgenerators/eventFilter/Fa irFilteredPrimaryGene
rator.cxx:187
#10 0x00002b86e513d5a1 in FairMCApplication::GeneratePrimaries (this=0x1b3d010)
at /hera/panda/donghee/pandaroot/pandaroot_oct14/base/sim/FairMCApplication .cxx:792
#11 0x00002b86ea7aabf3 in g3trig_ ()
from /cvmfs/fairroot.gsi.de/fairsoft/apr13/lib/libgeant321.so
#12 0x00002b86eaaf7e4c in TGeant3::ProcessRun(int) ()
from /cvmfs/fairroot.gsi.de/fairsoft/apr13/lib/libgeant321.so
#13 0x00002b86e513a8f0 in FairMCApplication::RunMC (this=0x1b3d010,
nofEvents=1000)
at /hera/panda/donghee/pandaroot/pandaroot_oct14/base/sim/FairMCApplication .cxx:246
#14 0x00002b86e512aed0 in FairRunSim::Run (this=0x17dbf10, NEvents=1000,
NotUsed=0)
at /hera/panda/donghee/pandaroot/pandaroot_oct14/base/steer/FairRunSim.cxx: 372
===========================================================


Do you have an idea or simple solution to aviod this problem?
Best wishes,
Donghee
Re: Event filter II [message #17486 is a reply to message #17484] Mon, 10 November 2014 10:58 Go to previous messageGo to next message
MartinJGaluska is currently offline  MartinJGaluska
Messages: 203
Registered: March 2010
Location: Germany
first-grade participant
From: *pool.mediaWays.net
Good morning Donghee,

thanks for reporting the crash. It occured in the code that finds the charge for a certain pdg code. I will have to look into the problem as this code was definitely working when I last tested the event filter code.

The first issue you reported is a misconception of what the following code does.
Quote:

FairEvtFilterOnSingleParticleCounts* fil= new FairEvtFilterOnSingleParticleCounts("fil");
fil->AndMinMaxPdgCodes(1,1,211,-211);
primGen->AndFilter(fil);


Please have a look at the tutorial (section "Pdg Codes") or the comments inside the source code.

//////////////////
71	        // User interfaces -- Pdg Code Min and Max
72	        //////////////////
73	        // Use this for grouping up to 8 pdgCodes into 1 groupId
74	        // all particles belonging to the groupId are regarded as being indistinguishable
75	        // min defines how many particles you want in your events AT LEAST
76	        // max defines how many particles you want in your events AT MOST
77	        // the min and max numbers are used for all particles with one of the above pdgCodes
78	        // returns kTRUE if the filter was added, otherwise returns kFALSE
79	        Bool_t AndMinMaxPdgCodes( Int_t min, Int_t max, Int_t pdgCode1, Int_t pdgCode2=kInvalidPdgCode, Int_t pdgCode3=kInvalidPdgCode, Int_t pdgCode4=kInvalidPdgCode, Int_t pdgCode5=kInvalidPdgCode, Int_t pdgCode6=kInvalidPdgCode, Int_t pdgCode7=kInvalidPdgCode, Int_t pdgCode8=kInvalidPdgCode );
80


In short your code is asking that exactly one (pi- OR pi+) is present in the events. Nothing else.

The second suggestion is a bit more correct as you also ask for exactly 2 particles to be present in the events, but it is still not what you want. Here is the code that should do what you ask for:

FairEvtFilterOnSingleParticleCounts* fil= new FairEvtFilterOnSingleParticleCounts("fil");
fil->AndMinMaxPdgCodes(1,1,211); // exactly one pi+ in primary particles
fil->AndMinMaxPdgCodes(1,1,-211); // exactly one pi- in primary particles
fil->AndMinMaxAllParticles(2,2); // exactly 2 primary particles in event
primGen->AndFilter(fil);


I assume that will also lead to a crash as long as I have not fixed the issue in FairEvtFilter::GetCharge.

Kind regards,
Martin

[Updated on: Mon, 10 November 2014 11:01]

Report message to a moderator

Re: Event filter II [message #17487 is a reply to message #17486] Mon, 10 November 2014 13:59 Go to previous messageGo to next message
MartinJGaluska is currently offline  MartinJGaluska
Messages: 203
Registered: March 2010
Location: Germany
first-grade participant
From: *physik.uni-giessen.de
I have found the problem and fixed it in trunk.

I will ask Stefano to apply the patch in the release.

Kind regards,
Martin

Re: Event filter II [message #17488 is a reply to message #17487] Mon, 10 November 2014 14:42 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *to.infn.it
Fixed also in the oct13 release.
Re: Event filter II [message #17496 is a reply to message #17488] Mon, 10 November 2014 23:50 Go to previous messageGo to next message
Elisabetta Prencipe (2) is currently offline  Elisabetta Prencipe (2)
Messages: 214
Registered: February 2013
first-grade participant
From: *cern.ch
Hello Martin,

I am trying to use the new version of the EvtFilter. I did an update to the trunk rev-25545 just today.
What happens is that if I run n_event>1000 (simulation with DPM), at the level of the digitization a crash occurs.
In general , we used to run n = 2500 per job, and if never created trouble.

The problem looks it occurs with FairEvtFilterOnSingleParticleCounts::Streamer.

Here attached is my sim_complete.C and the dec file. Could you please try to reproduce my problem, and fix it?

Thank you very much for your help!

Elisabetta
  • Attachment: sim_complete.C
    (Size: 7.22KB, Downloaded 267 times)
  • Attachment: DPM2317.dec
    (Size: 0.13KB, Downloaded 269 times)
Re: Event filter II [message #17497 is a reply to message #17496] Tue, 11 November 2014 00:45 Go to previous messageGo to next message
Elisabetta Prencipe (2) is currently offline  Elisabetta Prencipe (2)
Messages: 214
Registered: February 2013
first-grade participant
From: *cern.ch
Hi again,

I fogot to mention:

I tried also with the new rel-oct14. I get the error in the sim process:

Error: Can't call FairPrimaryGenerator::AndFilter(mmInvDsm) in current scope sim_complete.C:192:
Possible candidates are...
(in FairPrimaryGenerator)
*** Interpreter error recovered ***


that happens in the line where in the macro is called "AndFilter":


// logically combine event filters
primGen->AndFilter(mmInvDsm);
primGen->AndFilter(mmInvDsp);

what did it chnange compared to the trunk rev-25545?

Thanks Elisabetta
Re: Event filter II [message #17498 is a reply to message #17497] Tue, 11 November 2014 09:21 Go to previous messageGo to next message
MartinJGaluska is currently offline  MartinJGaluska
Messages: 203
Registered: March 2010
Location: Germany
first-grade participant
From: *pool.mediaWays.net
Hello Elisabetta,

answering your second post first: I was asked to move all the event filter related code of FairPrimaryGenerator to its own class which I called FairFilteredPrimaryGenerator.
FairFilteredPrimaryGenerator can be used with and without event filtering as it just adds code to FairPrimaryGenerator.

Therefore please try using

FairFilteredPrimaryGenerator* primGen = new FairFilteredPrimaryGenerator();


instead of

FairPrimaryGenerator* primGen = new FairPrimaryGenerator();


as explained here.

Does that also "fix" the problem you described in your first post?

Kind regards,
Martin
Re: Event filter II [message #17499 is a reply to message #17498] Tue, 11 November 2014 09:27 Go to previous message
Elisabetta Prencipe (2) is currently offline  Elisabetta Prencipe (2)
Messages: 214
Registered: February 2013
first-grade participant
From: *cern.ch
Hi Martin,

it lookes that in the release oct13 I do not get any more troubles with the digi macro, now.

Thank you for your help and suggestion,

Elisabetta
Previous Topic: p barp -> pi0 eta
Next Topic: Ftf Direct Generator
Goto Forum:
  


Current Time: Fri Oct 04 20:49:21 CEST 2024

Total time taken to generate the page: 0.00788 seconds