24 m_gctinp_tag(iConfig.getUntrackedParameter<edm::InputTag>(
"rctInputTag", edm::InputTag(
"rctDigis"))),
25 m_energy_tag(iConfig.getUntrackedParameter<edm::InputTag>(
"gctInputTag", edm::InputTag(
"gctDigis")))
52 double lsbForEt = jfPars.product()->getRgnEtLsbGeV();
53 double lsbForHt = jfPars.product()->getHtLsbGeV();
55 unsigned httJetThreshold =
static_cast<int>(jfPars.product()->getHtJetEtThresholdGeV()/lsbForHt);
56 unsigned htmJetThreshold =
static_cast<int>(jfPars.product()->getMHtJetEtThresholdGeV()/lsbForHt);
82 for (L1GctEtTotalCollection::const_iterator jbx=sumEtColl->begin(); jbx!=sumEtColl->end(); jbx++) {
83 if (jbx->bx()==0) { etTot =
static_cast<double>(jbx->et()); }
87 for (L1GctEtHadCollection::const_iterator jbx=sumHtColl->begin(); jbx!=sumHtColl->end(); jbx++) {
88 if (jbx->bx()==0) { etHad =
static_cast<double>(jbx->et()); }
93 for (L1GctEtMissCollection::const_iterator jbx=missEtColl->begin(); jbx!=missEtColl->end(); jbx++) {
95 etMiss =
static_cast<double>(jbx->et());
96 int phibin = jbx->phi();
97 if (phibin>=36) phibin -= 72;
98 double etMPhi =
static_cast<double>(phibin);
100 etMAng = (etMPhi+0.5)*
M_PI/36.;
104 double etTotFromRegions = 0.0;
105 double exTotFromRegions = 0.0;
106 double eyTotFromRegions = 0.0;
107 for (L1CaloRegionCollection::const_iterator jrg=inputColl->begin(); jrg!=inputColl->end(); jrg++) {
109 double rgEt =
static_cast<double>(jrg->et()) * lsbForEt;
110 double rgPhibin =
static_cast<double>(jrg->id().iphi());
111 double rgPh = (rgPhibin + 0.5)*
M_PI/9.;
113 etTotFromRegions += rgEt;
114 exTotFromRegions += rgEt*
cos(rgPh);
115 eyTotFromRegions += rgEt*
sin(rgPh);
119 double htMissGct = 0.0;
120 double htMissAng = 0.0;
121 double htMissGeV = 0.0;
122 for (L1GctHtMissCollection::const_iterator jbx=missHtColl->begin(); jbx!=missHtColl->end(); jbx++) {
124 htMissGct =
static_cast<double>(jbx->et());
125 htMissGeV = htMissScale->et(jbx->et());
126 int phibin = jbx->phi();
127 if (phibin>=9) phibin -= 18;
128 double htMPhi =
static_cast<double>(phibin);
129 htMissAng = (htMPhi+0.5)*
M_PI/9.;
133 double htFromJets = 0.0;
134 double hxFromJets = 0.0;
135 double hyFromJets = 0.0;
136 for (L1GctInternJetDataCollection::const_iterator
jet=internalJetsColl->begin();
jet!=internalJetsColl->end();
jet++) {
137 if (
jet->bx()==0 && !
jet->empty()) {
138 unsigned jetEtGct =
jet->et();
139 double jetEt =
static_cast<double>(jetEtGct);
140 int phibin =
jet->regionId().iphi();
141 if (phibin>=9) phibin -= 18;
143 double jetAng = (
static_cast<double>(phibin))*
M_PI/9.;
144 if (jetEtGct>httJetThreshold) {
147 if (jetEtGct>htmJetThreshold) {
148 hxFromJets += jetEt*
cos(jetAng);
149 hyFromJets += jetEt*
sin(jetAng);
154 double dPhiMetMht =
deltaPhi(etMAng,htMissAng);
165 if (htMissGct<126.5) {
182 if (htMissGct<126.5) {
195 for (L1GctHFRingEtSumsCollection::const_iterator es = HFEtSumsColl->begin(); es != HFEtSumsColl->end(); es++) {
204 for (L1GctHFBitCountsCollection::const_iterator bc = HFCountsColl->begin(); bc != HFCountsColl->end(); bc++) {
240 100, -100., 100., 100, -100., 100.);
246 100, -100., 100., 100, -100., 100.);
248 100, 0., 1000., 100, 0., 1000.);
250 100, 0., 500., 100, 0., 500.);
254 100, 0., 500., 100, 0., 500.);
256 100, 0., 500., 100, 0., 500.);
259 theDPhiVsMissEt = dir0.
make<TH2F>(
"theDPhiVsMissEt",
"Angle difference MET-MHT vs MET magnitude",
261 theDPhiVsMissHt = dir0.
make<TH2F>(
"theDPhiVsMissHt",
"Angle difference MET-MHT vs MHT magnitude",
265 128, 0., 2048., 128, 0., 2048.);
267 128, 0., 512., 128, 0., 512.);
271 128, -256., 256., 128, -256., 256.);
273 128, -256., 256., 128, -256., 256.);
TH1F * theHfRing1EtSumPositiveEta
TH2F * theMissHxVsInternalJetsSum
TH2F * theMissHtVsInternalJetsSum
double deltaPhi(float phi1, float phi2)
#define DEFINE_FWK_MODULE(type)
Sin< T >::type sin(const T &t)
TH2F * theHtVsInternalJetsSum
L1GctValidation(const edm::ParameterSet &)
TH2F * theMissHyVsInternalJetsSum
TH1F * theHfRing1CountPositiveEta
TH1F * theHfRing0EtSumPositiveEta
TH1F * theHfRing0CountNegativeEta
Cos< T >::type cos(const T &t)
TH2F * theSumEtVsInputRegions
edm::InputTag m_energy_tag
TH2F * theMissEtAngleVsInputRegions
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
TH1F * theHfRing1EtSumNegativeEta
edm::InputTag m_gctinp_tag
TH1F * theHfRing1CountNegativeEta
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
TH1F * theHfRing0CountPositiveEta
T * make() const
make new ROOT object
TH2F * theMissHtPhiVsInternalJetsSum
TH1F * theHfRing0EtSumNegativeEta
TH2F * theMissEtVsMissHtAngle
virtual void analyze(const edm::Event &, const edm::EventSetup &)
TH2F * theMissEtMagVsInputRegions
TH2F * theMissHtMagVsInputRegions