#include <Validation/TPGSimulation/src/TPGCheck.cc>
Public Member Functions | |
TPGCheck (const edm::ParameterSet &) | |
~TPGCheck () | |
Private Member Functions | |
virtual void | analyze (const edm::Event &, const edm::EventSetup &) |
virtual void | beginJob () |
virtual void | endJob () |
Private Attributes | |
TH1I * | ecal_et_ [2] |
TH1I * | ecal_fgvb_ [2] |
std::vector< std::string > | ecal_parts_ |
TH1I * | ecal_tt_ [2] |
TFile * | histFile_ |
std::string | label_ |
std::string | producer_ |
Description: <one line="" class="" summary>="">
Implementation: <Notes on="" implementation>="">
Definition at line 47 of file TPGCheck.cc.
TPGCheck::TPGCheck | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 72 of file TPGCheck.cc.
References edm::ParameterSet::getParameter(), i, and lumiQTWidget::t.
{ //now do what ever initialization is needed ecal_parts_.push_back("Barrel"); ecal_parts_.push_back("Endcap"); histFile_=new TFile("histos.root","RECREATE"); for (unsigned int i=0;i<2;++i) { // Energy char t[30]; sprintf(t,"%s_energy",ecal_parts_[i].c_str()); ecal_et_[i]=new TH1I(t,"Et",255,0,255); // Trigger Tower flag char titleTTF[30]; sprintf(titleTTF,"%s_ttf",ecal_parts_[i].c_str()); ecal_tt_[i]=new TH1I(titleTTF,"TTF",10,0,10); // Fain Grain char titleFG[30]; sprintf(titleFG,"%s_fgvb",ecal_parts_[i].c_str()); ecal_fgvb_[i]=new TH1I(titleFG,"FGVB",10,0,10); } label_= iConfig.getParameter<std::string>("Label"); producer_= iConfig.getParameter<std::string>("Producer"); }
TPGCheck::~TPGCheck | ( | ) |
Definition at line 103 of file TPGCheck.cc.
void TPGCheck::analyze | ( | const edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [private, virtual] |
Implements edm::EDAnalyzer.
Definition at line 121 of file TPGCheck.cc.
References EcalTriggerPrimitiveDigi::compressedEt(), EcalTriggerPrimitiveDigi::fineGrain(), edm::Event::getByLabel(), i, EcalTriggerPrimitiveDigi::id(), EcalTrigTowerDetId::ietaAbs(), edm::Handle< T >::product(), EcalTrigTowerDetId::subDet(), and EcalTriggerPrimitiveDigi::ttFlag().
{ // Get input edm::Handle<EcalTrigPrimDigiCollection> tp; iEvent.getByLabel(label_,producer_,tp); for (unsigned int i=0;i<tp.product()->size();i++) { EcalTriggerPrimitiveDigi d=(*(tp.product()))[i]; int subdet=d.id().subDet()-1; // for endcap, regroup double TP-s that are generated for the 2 interior rings if (subdet==0) { ecal_et_[subdet]->Fill(d.compressedEt()); } else { if (d.id().ietaAbs()==27 || d.id().ietaAbs()==28) { if (i%2) ecal_et_[subdet]->Fill(d.compressedEt()*2.); } else ecal_et_[subdet]->Fill(d.compressedEt()); } ecal_tt_[subdet]->Fill(d.ttFlag()); ecal_fgvb_[subdet]->Fill(d.fineGrain()); } }
void TPGCheck::beginJob | ( | void | ) | [private, virtual] |
void TPGCheck::endJob | ( | void | ) | [private, virtual] |
TH1I* TPGCheck::ecal_et_[2] [private] |
Definition at line 59 of file TPGCheck.cc.
TH1I* TPGCheck::ecal_fgvb_[2] [private] |
Definition at line 61 of file TPGCheck.cc.
std::vector<std::string> TPGCheck::ecal_parts_ [private] |
Definition at line 66 of file TPGCheck.cc.
TH1I* TPGCheck::ecal_tt_[2] [private] |
Definition at line 60 of file TPGCheck.cc.
TFile* TPGCheck::histFile_ [private] |
Definition at line 63 of file TPGCheck.cc.
std::string TPGCheck::label_ [private] |
Definition at line 64 of file TPGCheck.cc.
std::string TPGCheck::producer_ [private] |
Definition at line 65 of file TPGCheck.cc.