69 for (L1GctEtTotalCollection::const_iterator jbx = sumEtColl->begin(); jbx != sumEtColl->end(); jbx++) {
71 etTot =
static_cast<double>(jbx->et());
76 for (L1GctEtHadCollection::const_iterator jbx = sumHtColl->begin(); jbx != sumHtColl->end(); jbx++) {
78 etHad =
static_cast<double>(jbx->et());
84 for (L1GctEtMissCollection::const_iterator jbx = missEtColl->begin(); jbx != missEtColl->end(); jbx++) {
86 etMiss =
static_cast<double>(jbx->et());
87 int phibin = jbx->phi();
90 double etMPhi =
static_cast<double>(phibin);
92 etMAng = (etMPhi + 0.5) *
M_PI / 36.;
96 double etTotFromRegions = 0.0;
97 double exTotFromRegions = 0.0;
98 double eyTotFromRegions = 0.0;
99 for (L1CaloRegionCollection::const_iterator jrg =
inputColl->begin(); jrg !=
inputColl->end(); jrg++) {
100 if (jrg->bx() == 0) {
101 double rgEt =
static_cast<double>(jrg->et()) * lsbForEt;
102 double rgPhibin =
static_cast<double>(jrg->id().iphi());
103 double rgPh = (rgPhibin + 0.5) *
M_PI / 9.;
105 etTotFromRegions += rgEt;
106 exTotFromRegions += rgEt *
cos(rgPh);
107 eyTotFromRegions += rgEt *
sin(rgPh);
111 double htMissGct = 0.0;
112 double htMissAng = 0.0;
113 double htMissGeV = 0.0;
114 for (L1GctHtMissCollection::const_iterator jbx = missHtColl->begin(); jbx != missHtColl->end(); jbx++) {
115 if (jbx->bx() == 0) {
116 htMissGct =
static_cast<double>(jbx->et());
117 htMissGeV = htMissScale->
et(jbx->et());
118 int phibin = jbx->phi();
121 double htMPhi =
static_cast<double>(phibin);
122 htMissAng = (htMPhi + 0.5) *
M_PI / 9.;
126 double htFromJets = 0.0;
127 double hxFromJets = 0.0;
128 double hyFromJets = 0.0;
129 for (L1GctInternJetDataCollection::const_iterator
jet = internalJetsColl->begin();
jet != internalJetsColl->end();
131 if (
jet->bx() == 0 && !
jet->empty()) {
132 unsigned jetEtGct =
jet->et();
133 double jetEt =
static_cast<double>(jetEtGct);
134 int phibin =
jet->regionId().iphi();
138 double jetAng = (
static_cast<double>(phibin)) *
M_PI / 9.;
139 if (jetEtGct > httJetThreshold) {
142 if (jetEtGct > htmJetThreshold) {
143 hxFromJets += jetEt *
cos(jetAng);
144 hyFromJets += jetEt *
sin(jetAng);
149 double dPhiMetMht =
deltaPhi(etMAng, htMissAng);
160 if (htMissGct < 126.5) {
168 sqrt(exTotFromRegions * exTotFromRegions + eyTotFromRegions * eyTotFromRegions));
171 sqrt(exTotFromRegions * exTotFromRegions + eyTotFromRegions * eyTotFromRegions));
179 if (htMissGct < 126.5) {
192 for (L1GctHFRingEtSumsCollection::const_iterator es = HFEtSumsColl->begin(); es != HFEtSumsColl->end(); es++) {
201 for (L1GctHFBitCountsCollection::const_iterator bc = HFCountsColl->begin(); bc != HFCountsColl->end(); bc++) {
217 theSumEtInLsb = dir0.
make<TH1F>(
"SumEtInLsb",
"Total Et (GCT units)", 128, 0., 2048.);
218 theSumHtInLsb = dir0.
make<TH1F>(
"SumHtInLsb",
"Total Ht (GCT units)", 128, 0., 2048.);
219 theMissEtInLsb = dir0.
make<TH1F>(
"MissEtInLsb",
"Missing Et magnitude (GCT units)", 128, 0., 1024.);
220 theMissHtInLsb = dir0.
make<TH1F>(
"MissHtInLsb",
"Missing Ht magnitude (GCT units)", 128, 0., 127.);
221 theSumEtInGeV = dir0.
make<TH1F>(
"SumEtInGeV",
"Total Et (in GeV)", 100, 0., 1000.);
222 theSumHtInGeV = dir0.
make<TH1F>(
"SumHtInGeV",
"Total Ht (in GeV)", 100, 0., 1000.);
223 theMissEtInGeV = dir0.
make<TH1F>(
"MissEtInGeV",
"Missing Et magnitude (in GeV)", 100, 0., 500.);
225 theMissEtVector = dir0.
make<TH2F>(
"MissEtVector",
"Missing Ex vs Missing Ey", 100, -100., 100., 100, -100., 100.);
226 theMissHtInGeV = dir0.
make<TH1F>(
"MissHtInGeV",
"Missing Ht magnitude (in GeV)", 100, 0., 500.);
228 theMissHtVector = dir0.
make<TH2F>(
"MissHtVector",
"Missing Hx vs Missing Hy", 100, -100., 100., 100, -100., 100.);
230 dir0.
make<TH2F>(
"SumEtVsInputRegions",
"Total Et vs sum of input regions", 100, 0., 1000., 100, 0., 1000.);
232 "MissEtMagVsInputRegions",
"Missing Et magnitude vs sum of input regions", 100, 0., 500., 100, 0., 500.);
234 "MissEtAngleVsInputRegions",
"Missing Et angle vs sum of input regions", 72, -
M_PI,
M_PI, 72, -
M_PI,
M_PI);
236 "MissHtMagVsInputRegions",
"Missing Ht magnitude vs sum of input regions", 100, 0., 500., 100, 0., 500.);
237 theMissEtVsMissHt = dir0.
make<TH2F>(
"MissEtVsMissHt",
"Missing Et vs Missing Ht", 100, 0., 500., 100, 0., 500.);
239 "MissEtVsMissHtAngle",
"Angle correlation Missing Et vs Missing Ht", 72, -
M_PI,
M_PI, 72, -
M_PI,
M_PI);
241 dir0.
make<TH2F>(
"theDPhiVsMissEt",
"Angle difference MET-MHT vs MET magnitude", 72, -
M_PI,
M_PI, 100, 0., 500.);
243 dir0.
make<TH2F>(
"theDPhiVsMissHt",
"Angle difference MET-MHT vs MHT magnitude", 72, -
M_PI,
M_PI, 100, 0., 500.);
246 "HtVsInternalJetsSum",
"Ht vs scalar sum of jet Et values (in GeV)", 128, 0., 2048., 128, 0., 2048.);
248 "MissHtVsInternalJetsSum",
"Missing Ht vs vector sum of jet Et values (in GeV)", 128, 0., 512., 128, 0., 512.);
250 "Angle correlation Missing Ht vs vector sum of jet Et values",
258 "Missing Ht x component vs sum of jet Et values (in GeV)",
266 "Missing Ht y component vs sum of jet Et values (in GeV)",
static const std::string kSharedResource
TH1F * theHfRing1EtSumPositiveEta
TH2F * theMissHxVsInternalJetsSum
TH2F * theMissHtVsInternalJetsSum
double getRgnEtLsbGeV() const
#define DEFINE_FWK_MODULE(type)
double getHtLsbGeV() const
Sin< T >::type sin(const T &t)
TH2F * theHtVsInternalJetsSum
L1GctValidation(const edm::ParameterSet &)
double getHtJetEtThresholdGeV() const
edm::ESGetToken< L1CaloEtScale, L1HtMissScaleRcd > m_htMissScaleToken
TH2F * theMissHyVsInternalJetsSum
TH1F * theHfRing1CountPositiveEta
T * make(const Args &...args) const
make new ROOT object
TH1F * theHfRing0EtSumPositiveEta
T const * product() const
TH1F * theHfRing0CountNegativeEta
double et(const uint16_t rank) const
convert from rank to physically meaningful quantity
edm::ESGetToken< L1GctJetFinderParams, L1GctJetFinderParamsRcd > m_jfParsToken
Cos< T >::type cos(const T &t)
TH2F * theSumEtVsInputRegions
edm::InputTag m_energy_tag
TH2F * theMissEtAngleVsInputRegions
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
TH1F * theHfRing1EtSumNegativeEta
edm::InputTag m_gctinp_tag
TH1F * theHfRing1CountNegativeEta
void analyze(const edm::Event &, const edm::EventSetup &) override
~L1GctValidation() override
edm::ESGetToken< L1CaloEtScale, L1HfRingEtScaleRcd > m_hfRingEtScaleToken
TH1F * theHfRing0CountPositiveEta
TH2F * theMissHtPhiVsInternalJetsSum
TH1F * theHfRing0EtSumNegativeEta
TH2F * theMissEtVsMissHtAngle
TH2F * theMissEtMagVsInputRegions
double getMHtJetEtThresholdGeV() const
TH2F * theMissHtMagVsInputRegions