GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Event Generators » [CLOSED] Specific event selection in Dpm generator
Re: Specific event selection in Dpm generator [message #15371 is a reply to message #13049] Wed, 28 August 2013 18:28 Go to previous messageGo to previous message
MartinJGaluska is currently offline  MartinJGaluska
Messages: 203
Registered: March 2010
Location: Germany
first-grade participant
From: *physik.uni-giessen.de
Hello all,

we ran now into the same problem as Donghee did more than a year ago (in the sense that we also wanted to filter the events which are produced by the dpm generator) while performing a background study. A solution was found pretty fast for our specific problem, but I believe that it would make sense to have a more general solution. Therefore, I implemented a filter for PndDpmDirect which can handle pretty general requests from the simulation macro in the form:

Dpm->AddFilterMinMax( 1, 5, 11, -211 ); // request at least 1 and at most 5 e- OR pi-
Dpm->AddFilterMinMax( 1, 5, -11, 211 ); // AND request at least 1 and at most 5 e+ OR pi+
Dpm->AddFilterMinMax( 3, 9999, 22 ); // AND request at least 3 and at most 9999 gamma


The standard behaviour is the same as before (i.e. no event filtering).

You can tell PndDpmDirect how often it should try to find a suitable event before giving up:
Dpm->SetFilterMaxTries(99999);


and it can tell you at the end of the simulation macro how many events dpm simulated in total to get the number of filtered events that you wanted as well as how many events reached the limit of tries without success:

if( UseDpm ){
cout << Dpm->GetNumberOfSimulatedEvents() << " events were simulated in dpm\n";
cout << Dpm->GetNumberOfFilterFailedEvents() << " unsuccessful attempts to find an event that suits your filters\n\n";
}


The code is currently still in testing and if you agree I would like to upload it to the trunk once it was tested to be reliable.

------------
EDIT:
Here was a paragraph about a restriction of the code which is obsolete now.

The restriction that you can add a filter for a specific pdg code ONLY ONCE has been removed in versions later than 2013-10-21:
------------

I am looking forward to reading your feedback.

Kind regards,
Martin

[Updated on: Wed, 09 April 2014 11:12]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: EvtGen workshop
Next Topic: No old EVtGen anymore
Goto Forum:
  


Current Time: Fri Apr 26 02:25:26 CEST 2024

Total time taken to generate the page: 0.00883 seconds