GSI Helmholtzzentrum für Schwerionenforschung
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: PndDpmDirect initialization Momentum = 1.9 Seed = 4.29497e+09 Mode = 0 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
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.
Hi Martin, Thanks, it works! Best regards, Donghee