1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
|
#ifndef EventFilter_L1GlobalTriggerRawToDigi_L1GtTriggerMenuLiteProducer_h
#define EventFilter_L1GlobalTriggerRawToDigi_L1GtTriggerMenuLiteProducer_h
/**
* \class L1GtTriggerMenuLiteProducer
*
*
* Description: L1GtTriggerMenuLite producer.
*
* Implementation:
* Read the L1 trigger menu, the trigger masks and the prescale factor sets
* from event setup and save a lite version (top level menu, trigger masks
* for physics partition and prescale factor set) in Run Data.
*
* \author: Vasile Mihai Ghete - HEPHY Vienna
*
*
*/
// system include files
#include <memory>
// user include files
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/one/EDProducer.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/MakerMacros.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/Utilities/interface/InputTag.h"
#include "FWCore/Utilities/interface/ESGetToken.h"
#include "CondFormats/L1TObjects/interface/L1GtTriggerMenuFwd.h"
#include "CondFormats/L1TObjects/interface/L1GtTriggerMask.h"
#include "CondFormats/DataRecord/interface/L1GtTriggerMaskAlgoTrigRcd.h"
#include "CondFormats/DataRecord/interface/L1GtTriggerMaskTechTrigRcd.h"
#include "CondFormats/L1TObjects/interface/L1GtPrescaleFactors.h"
#include "CondFormats/DataRecord/interface/L1GtPrescaleFactorsAlgoTrigRcd.h"
#include "CondFormats/DataRecord/interface/L1GtPrescaleFactorsTechTrigRcd.h"
#include "CondFormats/L1TObjects/interface/L1GtStableParameters.h"
#include "CondFormats/DataRecord/interface/L1GtStableParametersRcd.h"
#include "CondFormats/L1TObjects/interface/L1GtTriggerMenu.h"
#include "CondFormats/DataRecord/interface/L1GtTriggerMenuRcd.h"
// forward declarations
class L1GtStableParameters;
class L1GtTriggerMenu;
class L1GtTriggerMask;
class L1GtPrescaleFactors;
// class declaration
class L1GtTriggerMenuLiteProducer : public edm::one::EDProducer<edm::BeginRunProducer> {
public:
/// constructor(s)
explicit L1GtTriggerMenuLiteProducer(const edm::ParameterSet&);
/// destructor
~L1GtTriggerMenuLiteProducer() override;
private:
/// retrieve all the relevant L1 trigger event setup records
/// and cache them to improve the speed
void retrieveL1EventSetup(const edm::EventSetup&);
void beginJob() final;
void beginRunProduce(edm::Run&, const edm::EventSetup&) final;
void produce(edm::Event&, const edm::EventSetup&) final;
void endJob() override;
private:
/// cached stuff
/// stable parameters
const L1GtStableParameters* m_l1GtStablePar;
unsigned long long m_l1GtStableParCacheID;
/// number of physics triggers
unsigned int m_numberPhysTriggers;
/// number of technical triggers
unsigned int m_numberTechnicalTriggers;
// trigger menu
const L1GtTriggerMenu* m_l1GtMenu;
unsigned long long m_l1GtMenuCacheID;
const AlgorithmMap* m_algorithmMap;
const AlgorithmMap* m_algorithmAliasMap;
const AlgorithmMap* m_technicalTriggerMap;
/// trigger masks
const L1GtTriggerMask* m_l1GtTmAlgo;
unsigned long long m_l1GtTmAlgoCacheID;
const L1GtTriggerMask* m_l1GtTmTech;
unsigned long long m_l1GtTmTechCacheID;
const std::vector<unsigned int>* m_triggerMaskAlgoTrig;
const std::vector<unsigned int>* m_triggerMaskTechTrig;
/// prescale factors
const L1GtPrescaleFactors* m_l1GtPfAlgo;
unsigned long long m_l1GtPfAlgoCacheID;
const L1GtPrescaleFactors* m_l1GtPfTech;
unsigned long long m_l1GtPfTechCacheID;
const std::vector<std::vector<int> >* m_prescaleFactorsAlgoTrig;
const std::vector<std::vector<int> >* m_prescaleFactorsTechTrig;
/// EventSetup Tokens
const edm::ESGetToken<L1GtStableParameters, L1GtStableParametersRcd> m_l1GtStableParamToken;
const edm::ESGetToken<L1GtPrescaleFactors, L1GtPrescaleFactorsAlgoTrigRcd> m_l1GtPfAlgoToken;
const edm::ESGetToken<L1GtPrescaleFactors, L1GtPrescaleFactorsTechTrigRcd> m_l1GtPfTechToken;
const edm::ESGetToken<L1GtTriggerMask, L1GtTriggerMaskAlgoTrigRcd> m_l1GtTmAlgoToken;
const edm::ESGetToken<L1GtTriggerMask, L1GtTriggerMaskTechTrigRcd> m_l1GtTmTechToken;
const edm::ESGetToken<L1GtTriggerMenu, L1GtTriggerMenuRcd> m_l1GtMenuToken;
private:
/// index of physics DAQ partition
unsigned int m_physicsDaqPartition;
};
#endif // EventFilter_L1GlobalTriggerRawToDigi_L1GtTriggerMenuLiteProducer_h
|