GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Fast Simulations » [OK] Event Filter in FastSim
[OK] Event Filter in FastSim [message #16706] Sat, 24 May 2014 13:00 Go to next message
Klaus Götzen is currently offline  Klaus Götzen
Messages: 293
Registered: June 2006
Location: GSI
first-grade participant
From: *adsl.alicedsl.de
Hi all,


since the more general event filter apparently cannot be enabled so simple, I introduced a rather simple event filter in PndFastSim itself (in trunk and scrut14). It is not intensively tested so far, but you might give it a try (and help validating it).

It offers simple multiplicity cuts (trk+, trk-, gamma, pi0, eta, Ks - see below in the code) and a single invariant mass filter. Concerning particle species, no filtering has been implemented on pdg codes intentionally to not spoil PID performance in the later analysis. The filtering happens on the PndStack before smearing, mergeing or rejecting particles.

You could copy the code snippet below to your simfast_opt.C somewhere before fRun->AddTask to use it. I'd suggest to first use it for signal events (which should survive!), and then do a rough comparison for background with and without filtering to check whether everything is fine.


Best,
Klaus

//set event filters
bool useFilter=true;
if (useFilter)
{
      // Filters are:
      // -----------
      // Multiplicity filter: fastSim->SetMultFilter(type, min, max); 
      // requires min <= mult <= max
      
      // available types are:
      
      //  "+"   : positive charged particles
      //  "-"   : negative charged particles
      //  "gam" : gammas
      //  "pi0" : pi0 candidates ( -> 2 gammas); mass window 0.135 +- 0.03 GeV
      //  "eta" : eta candidates ( -> 2 gammas); mass window 0.547 +- 0.04 GeV 
      //  "ks"  : K_S candidates ( -> pi+ pi-);  mass window 0.497 +- 0.04 GeV
      
      fastSim->SetMultFilter("+",   2,1000);  // at least 2 trk+
      fastSim->SetMultFilter("-",   2,1000);  // at least 2 trk-
      fastSim->SetMultFilter("gam", 0,   4);  // at most 4 gammas

      // Invariant Mass filter: fastSim->SetInvMassFilter(comb, m_min, m_max, mult);
    
      // requires at least mult combined candidates with m_min < m < m_max
	      
      // comb is a TString describing the combinatoric
      // - particle codes are: e+ e- mu+ mu- pi+ pi- k+ k- p+ p- gam pi0 ks eta
      // - codes must be separated exactly with a single blank; no extra blank somewhere else!
      // - for charged final states only the mass is set; no pdg code selection is done! 
      // - optional a 'cc' added at the end also takes into account charge conjugation;
      //   not to be used with symmetric channels like pi+ pi- pi0, K+ K-, etc.!!
      
      // Examples: 
      // - ("k+ k-", 0.98, 1.1, 2)       : forms K+ K- candidate and requires >=2 in the given window
      // - ("ks k+ pi- cc", 2.8, 3.2,1 ) : forms ks k+ pi- / ks k- pi+ cands and req. at least one in window
     
      fastSim->SetInvMassFilter("e+ e-",2.8,3.3,1);  // look for J/psi -> e+ e- candidate
}


[Updated on: Fri, 12 September 2014 10:38] by Moderator

Report message to a moderator

Re: Event Filter in FastSim [message #16707 is a reply to message #16706] Sat, 24 May 2014 13:38 Go to previous messageGo to next message
MartinJGaluska is currently offline  MartinJGaluska
Messages: 203
Registered: March 2010
Location: Germany
first-grade participant
From: *pools.arcor-ip.net
Hello,

just to comment on the status of the (more general) event filter:

The code has been ready and working for several weeks now. However, I had to change the event filter code, unfortunately, because it was decided that the changes to the external packages should be as minimal as possible. In the end I only needed to add one method to FairGenericStack.

While doing the necessary changes, I also added a filter on invariant masses. I uploaded the code last Monday in trunk/pgenerators/eventFilter, but it is not compiled by default, because the trunk needs to be pointed to modified external packages. I am waiting for Stefano to do that and will upload the modified LinkDef and CMakeLists to trunk/pgenerators/ once that has been done. The same procedure could also be done for the scrut release.

Kind regards,
Martin
Re: Event Filter in FastSim [message #16708 is a reply to message #16707] Sat, 24 May 2014 17:54 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *ip71.fastwebnet.it
I have just changed the base link in the trunk, now you can turn on the compilation of the event filter.
I would wait to have some independet check before moving the change to the scrut14, since the release must be stable.
Re: Event Filter in FastSim [message #16709 is a reply to message #16708] Sun, 25 May 2014 09:06 Go to previous message
MartinJGaluska is currently offline  MartinJGaluska
Messages: 203
Registered: March 2010
Location: Germany
first-grade participant
From: *pools.arcor-ip.net
Hello all,

now the general event filter is also available to be used and it is compiled by default in trunk. While we are waiting for Katja to write a tutorial which will be located here:

https://panda-wiki.gsi.de/foswiki/bin/view/Computing/PandaRootEventFilte rTutorial

I have uploaded two example macros in the folder trunk/macros/eventFilter in which the usage of the filter is demonstrated.

Kind regards,
Martin

[Updated on: Sun, 25 May 2014 09:08]

Report message to a moderator

Previous Topic: STT only parameters in simfast_opt.C
Next Topic: [FIXED] Fixed bug in fsim
Goto Forum:
  


Current Time: Fri Dec 20 05:40:31 CET 2024

Total time taken to generate the page: 0.00938 seconds