Go to the documentation of this file.00001 #ifndef L1RCTProducer_h
00002 #define L1RCTProducer_h
00003
00004 #include "FWCore/Framework/interface/EDProducer.h"
00005 #include "DataFormats/Common/interface/EDProduct.h"
00006
00007 #include "DataFormats/Common/interface/Handle.h"
00008 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00009 #include "FWCore/Framework/interface/EventSetup.h"
00010 #include "FWCore/Framework/interface/Event.h"
00011 #include "FWCore/Framework/interface/ESHandle.h"
00012
00013 #include "DataFormats/L1CaloTrigger/interface/L1CaloCollections.h"
00014 #include "DataFormats/EcalDigi/interface/EcalDigiCollections.h"
00015 #include "DataFormats/HcalDigi/interface/HcalDigiCollections.h"
00016
00017
00018 #include "CondFormats/L1TObjects/interface/L1CaloEcalScale.h"
00019 #include "CondFormats/DataRecord/interface/L1CaloEcalScaleRcd.h"
00020 #include "CondFormats/L1TObjects/interface/L1CaloHcalScale.h"
00021 #include "CondFormats/DataRecord/interface/L1CaloHcalScaleRcd.h"
00022
00023
00024 #include "CondFormats/L1TObjects/interface/L1RCTParameters.h"
00025 #include "CondFormats/DataRecord/interface/L1RCTParametersRcd.h"
00026 #include "CondFormats/L1TObjects/interface/L1RCTChannelMask.h"
00027 #include "CondFormats/DataRecord/interface/L1RCTChannelMaskRcd.h"
00028 #include "CondFormats/L1TObjects/interface/L1RCTNoisyChannelMask.h"
00029 #include "CondFormats/DataRecord/interface/L1RCTNoisyChannelMaskRcd.h"
00030
00031 #include "CondFormats/RunInfo/interface/RunInfo.h"
00032 #include "CondFormats/DataRecord/interface/RunSummaryRcd.h"
00033
00034
00035 #include "L1Trigger/RegionalCaloTrigger/interface/L1RCT.h"
00036 #include "L1Trigger/RegionalCaloTrigger/interface/L1RCTLookupTables.h"
00037
00038 #include "CondFormats/L1TObjects/interface/L1CaloEtScale.h"
00039 #include "CondFormats/DataRecord/interface/L1EmEtScaleRcd.h"
00040
00041
00042 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00043 #include <string>
00044
00045 class L1RCT;
00046 class L1RCTLookupTables;
00047
00048 class L1RCTProducer : public edm::EDProducer
00049 {
00050 public:
00051 explicit L1RCTProducer(const edm::ParameterSet& ps);
00052 virtual ~L1RCTProducer();
00053 virtual void beginRun(edm::Run& r, const edm::EventSetup& c);
00054 virtual void beginLuminosityBlock(edm::LuminosityBlock& lumiSeg,
00055 const edm::EventSetup& context) ;
00056 virtual void produce(edm::Event& e, const edm::EventSetup& c);
00057
00058
00059 void updateConfiguration(const edm::EventSetup&);
00060
00061
00062 private:
00063 L1RCTLookupTables* rctLookupTables;
00064 L1RCT* rct;
00065 bool useEcal;
00066 bool useHcal;
00067 std::vector<edm::InputTag> ecalDigis;
00068 std::vector<edm::InputTag> hcalDigis;
00069 std::vector<int> bunchCrossings;
00070
00071
00072
00073 L1RCTChannelMask* fedUpdatedMask;
00074
00075
00076 enum crateSection{
00077 c_min,
00078 ebOddFed = c_min,
00079 ebEvenFed,
00080 eeFed,
00081 hbheFed,
00082 hfFed,
00083 c_max = hfFed
00084 };
00085
00086
00087
00088 static const int crateFED[18][5];
00089 static const int minBarrel = 1;
00090 static const int maxBarrel = 17;
00091 static const int minEndcap = 17;
00092 static const int maxEndcap = 28;
00093 static const int minHF = 29;
00094 static const int maxHF =32;
00095
00096
00097
00098
00099
00100
00101
00102 };
00103
00104
00105 #endif