Cutting events with corrupt RICH scalers in analyses

 Following Chris Powell's work, which he RICH scalers at an S&C meeting, to resolve the problem with RICH scalers I have Finding a cut for corrupt scalers in Run 8 dAu, I have implemented some code to remove events with corrupt RICH scalers from the P08ic and P08ie productions of Run 8 dAu. The code can be used two ways:

  1. As a static method:
      gROOT->Macro("loadMuDst.C");
      gSystem->Load("StMuAnalysisMaker");
      ...
      for_loop_over_MuDst_events {
        ...
        if (!StMuScalerCutter::accept(mudst->event())) continue;
        ...
      }
    
  2. As a maker. For those who use a chain:
      gROOT->Macro("loadMuDst.C");
      gSystem->Load("StMuAnalysisMaker");
      StChain chain;
      StMuDstMaker maker1(...);
      StMuScalerCutter maker2();
      maker2.SetAttr(".Privilege",1);
      ...
      for_loop_over_MuDst_events {
        ...
        int result = chain.Make();
        if (result == kStSkip) continue;
        ...
      }
    
    ...and for those who don't use a chain:
      gROOT->Macro("loadMuDst.C");
      gSystem->Load("StMuAnalysisMaker");
      StMuDstMaker maker1(...);
      StMuScalerCutter maker2();
      ...
      for_loop_over_MuDst_events {
        ...
        int result1 = maker1.Make();
        int result2 = maker2.Make();
        if (result2 == kStSkip) continue;
        ...
      }
    
I hope this is useful. Feedback is welcome. Note that this is relevant only for events with TPC/TPX, but I did not write any code to determine whether these detectors are in the data; that is left to the user if the user cares.

The code is located in StRoot/StMuAnalysisMaker and should be available in DEV starting February 5, 2009.

Many thanks go to Chris for his work on this topic.

-Gene