![]() |
|
|||
File indexing completed on 2024-04-06 12:11:16
0001 #ifndef FastSimulation_ProtonTaggerFilter_H 0002 #define FastSimulation_ProtonTaggerFilter_H 0003 0004 /// Fast simulation of near-beam detector acceptance. 0005 0006 /** 0007 * This class defines an EDFilter which does the following: 0008 * - reads generated data (edm::HepMCProduct) from edm::Event 0009 * - selects forward protons 0010 * - determines (by means of AcceptanceTableHelper) the acceptance 0011 * of near-beam detectors: FP420 and TOTEM 0012 * - returns a boolean value representing whether the proton(s) were seen 0013 * with certain detectors, several options are available to choose 0014 * between FP420/TOTEM detectors and their combinations 0015 * 0016 * Originally this code was meant as the FastTotem module from ORCA-based FAMOS, 0017 * ported to the CMSSW framework. However it was eventually re-written from scratch. 0018 * Nevelrtheless, the physics performace is just the same as one of FastTotem, 0019 * as it (currently) uses the same acceptance tables. 0020 * 0021 * Author: Dmitry Zaborov 0022 */ 0023 0024 // Version: $Id: ProtonTaggerFilter.h,v 1.1 2008/11/25 17:34:15 beaudett Exp $ 0025 0026 #include "FWCore/Framework/interface/stream/EDFilter.h" 0027 0028 #include "FastSimulation/ForwardDetectors/plugins/AcceptanceTableHelper.h" 0029 0030 #include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h" 0031 #include "HepMC/GenEvent.h" 0032 0033 #include "TFile.h" 0034 0035 class ProtonTaggerFilter : public edm::stream::EDFilter<> { 0036 public: 0037 /// default constructor 0038 explicit ProtonTaggerFilter(edm::ParameterSet const& p); 0039 0040 /// empty destructor 0041 ~ProtonTaggerFilter() override = default; 0042 0043 /// startup function of the EDFilter 0044 virtual void beginJob(); 0045 0046 /// endjob function of the EDFilter 0047 virtual void endJob() {} 0048 0049 /// decide if the event is accepted by the proton taggers 0050 bool filter(edm::Event& e, const edm::EventSetup& c) override; 0051 0052 private: 0053 /// tokens to access the collections 0054 const edm::EDGetTokenT<edm::HepMCProduct> tokGen_; 0055 const edm::EDGetTokenT<edm::HepMCProduct> tokPile_; 0056 0057 /// choose which of the detectors (FP420/TOTEM/both) will be used for beam 1 0058 const unsigned int beam1mode; 0059 0060 /// choose which of the detectors (FP420/TOTEM/both) will be used for beam 2 0061 const unsigned int beam2mode; 0062 0063 /// choose how to combine data from the two beams (ask for 1/2 proton) 0064 const unsigned int beamCombiningMode; 0065 0066 /// Objects which actually compute the acceptance (one per detector or combination of detectors) 0067 AcceptanceTableHelper helper420beam1; 0068 AcceptanceTableHelper helper420beam2; 0069 AcceptanceTableHelper helper220beam1; 0070 AcceptanceTableHelper helper220beam2; 0071 AcceptanceTableHelper helper420a220beam1; 0072 AcceptanceTableHelper helper420a220beam2; 0073 }; 0074 0075 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.2.1 LXR engine. The LXR team |
![]() ![]() |