52 void endJob()
override;
73 ecal_parts_.push_back(
"Barrel");
74 ecal_parts_.push_back(
"Endcap");
76 histFile_ =
new TFile(
"histos.root",
"RECREATE");
77 for (
unsigned int i = 0;
i < 2; ++
i) {
80 sprintf(t,
"%s_energy", ecal_parts_[
i].c_str());
81 ecal_et_[
i] =
new TH1I(t,
"Et", 255, 0, 255);
85 sprintf(titleTTF,
"%s_ttf", ecal_parts_[
i].c_str());
86 ecal_tt_[
i] =
new TH1I(titleTTF,
"TTF", 10, 0, 10);
90 sprintf(titleFG,
"%s_fgvb", ecal_parts_[
i].c_str());
91 ecal_fgvb_[
i] =
new TH1I(titleFG,
"FGVB", 10, 0, 10);
96 ecal_tp_token_ = consumes<EcalTrigPrimDigiCollection>(
edm::InputTag(label_, producer_));
116 for (
unsigned int i = 0;
i < tp.
product()->size();
i++) {
130 ecal_tt_[subdet]->Fill(d.
ttFlag());
142 for (
unsigned int i = 0;
i < 2; ++
i) {
143 ecal_et_[
i]->Write();
144 ecal_tt_[
i]->Write();
145 ecal_fgvb_[
i]->Write();
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
example_stream void analyze(const edm::Event &, const edm::EventSetup &) override
void analyze(const edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< EcalTrigPrimDigiCollection > ecal_tp_token_
int compressedEt() const
get the encoded/compressed Et of interesting sample
int ietaAbs() const
get the absolute value of the tower ieta
const EcalTrigTowerDetId & id() const
T const * product() const
T getParameter(std::string const &) const
TPGCheck(const edm::ParameterSet &)
EcalSubdetector subDet() const
get the subDetector associated to the Trigger Tower
bool fineGrain() const
get the fine-grain bit of interesting sample
std::vector< std::string > ecal_parts_
int ttFlag() const
get the Trigger tower Flag of interesting sample