GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Event Generators » Event filter
Event filter [message #17480] Sat, 08 November 2014 18:33 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 want to sort pi+pi- data sample from DPM, and you show us the effective way.
I follow in my simulation macro something like this with PANDAroot oct14 release version.
Quote:

PndDpmDirect *Dpm= new PndDpmDirect(mom,0);
primGen->AddGenerator(Dpm);

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



But I got the error when I am trying to use AndFilter().
Quote:

<I> PndDpmDirect initialization
<I> Momentum = 1.9
<I> Seed = 4.29497e+09
<I> Mode = 0
<I> Theta min = 3.15789
Error: Can't call FairPrimaryGenerator::AndFilter(fil) in current scope /hera/panda/donghee/pandaroot/pandaroot_oct14/macro/softrig/prod_sim_fil ter.C:171:
Possible candidates are...
(in FairPrimaryGenerator)
*** Interpreter error recovered ***


Do you have any idea? Do I need to compile something to let work?

Best wishes,
Donghee

Re: Event filter [message #17481 is a reply to message #17480] Sat, 08 November 2014 20:41 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 Donghee,

please try using

FairFilteredPrimaryGenerator* primGen = new FairFilteredPrimaryGenerator();


instead of

FairPrimaryGenerator* primGen = new FairPrimaryGenerator();


as explained here.

Kind regards,
Martin

PS: I had 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.

[Updated on: Sat, 08 November 2014 20:44]

Report message to a moderator

Re: Event filter [message #17482 is a reply to message #17481] Sat, 08 November 2014 20:46 Go to previous message
donghee is currently offline  donghee
Messages: 385
Registered: January 2009
Location: Germnay
first-grade participant
From: *dip0.t-ipconnect.de
Hi Martin,

Thanks, it works!

Best regards,
Donghee
Previous Topic: p barp -> pi0 gamma
Next Topic: p barp -> pi0 eta
Goto Forum:
  


Current Time: Thu Mar 28 17:36:01 CET 2024

Total time taken to generate the page: 0.00660 seconds