Back to home page

sPhenix code displayed by LXR

 
 

    


Warning, /analysis/JS-Jet/BeamBackgroundFilterAndQA/README.md is written in an unsupported language. File is not indexed.

0001 # Beam Background Filter and QA
0002 
0003 ### Authors:
0004 Hanpu Jiang, Derek Anderson, Noah Applegate, Joey Clement
0005 
0006 ### Description:
0007 Development repo for a F4A module to filter out events with significant beam
0008 background (e.g. the so-called "streak events") and produce a few relevant 
0009 QA histograms. The module is designed in such a way that additional filters
0010 can be added with relatively minimal overhead.
0011 
0012 There are currently two filters:
0013 
0014   - **`The Null Filter,`** which does nothing, but provides a template
0015     for other other filters; and
0016   - **`The Streak Sideband Filter,`** which checks for cases in the
0017     OHCal where you have a continuous row of towers along eta above
0018     some threshold in energy.
0019 
0020 Note that others are expected to be added in the future, and that these
0021 filters can be used in other modules. For example, the streak sideband
0022 filter could be deployed in an analysis module like so:
0023 
0024 ```
0025 // in your .h file
0026 #include <beambackgroundfilterandqa/StreakSidebandFilter.h>
0027 
0028 class MyModule : SubsysReco {
0029   //... other stuff ...//
0030 
0031   public:
0032     void InitFilter(const StreakSidebandFilter::Config& cfg);
0033 
0034   private:
0035     StreakSidebandFilter m_filter;
0036 
0037 }
0038 
0039 // in your .cc file
0040 
0041 //... other stuff ...//
0042 
0043 void MyModule::InitFilter(const StreakSidebandFilter::Config& cfg) {
0044   m_filter = StreakSidebandFilter(cfg, "MyFilter");
0045   m_filter.BuildHistograms();
0046 }
0047 
0048 void MyModule::process_event(PHCompositeNode* topNode) {
0049   foundBkgd = m_filter.ApplyFilter(topNode);
0050   if (foundBkgd) {
0051     //... do stuff ...//
0052   }
0053 }
0054 ```
0055 
0056 The user has the option to either throw away or keep events in which
0057 a filter has identified beam background. In either case, the results
0058 of each filter (and the overall result) are stored as integer flags in
0059 `recoConsts` with the value of 0 for NO beam background and 1 FOR
0060 beam background. The module `TestPHFlags` illustrates how to
0061 retrieve these flags in downstream modules.
0062 
0063 
0064 Lastly, the overall code structure is:
0065 
0066   - **`BaseBeamBackgroundFilter.h:`** A base class for all filters to
0067     be applied, consolidates common functionality across filters. New
0068     filters must inherit from this.
0069   - **`{Null,StreakSideband}Filter.{cc,h}`:** The actual filters to
0070     be applied.
0071   - **`BeamBackgroundFilterAndQA.{cc,h}`:** The actual F4A module
0072     which organizes and runs all of the specified filters.
0073   - **`BeamBackgroundFilterAndQADefs.h`:** A namespace to collect
0074     a variety of useful methods used throughout the module and its
0075     componenets.
0076 
0077