CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
L1RCTRelValAnalyzer Class Reference

#include <L1Trigger/RegionalCaloTrigger/plugins/L1RCTRelValAnalyzer.cc>

Inheritance diagram for L1RCTRelValAnalyzer:
edm::EDAnalyzer

Public Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
 L1RCTRelValAnalyzer (const edm::ParameterSet &)
 
 ~L1RCTRelValAnalyzer ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

Private Attributes

TH1F * h_emIeta
 
TH1F * h_emIphi
 
TH2F * h_emIsoOccIetaIphi
 
TH2F * h_emNonIsoOccIetaIphi
 
TH1F * h_emRank
 
TH2F * h_regionOccIetaIphi
 
TH1F * h_regionSum
 
TH2F * h_regionSumIetaIphi
 
edm::InputTag rctEmCandsLabel
 
edm::InputTag rctRegionsLabel
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

Detailed Description

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 45 of file L1RCTRelValAnalyzer.h.

Constructor & Destructor Documentation

L1RCTRelValAnalyzer::L1RCTRelValAnalyzer ( const edm::ParameterSet iConfig)
explicit

Definition at line 25 of file L1RCTRelValAnalyzer.cc.

References h_emIeta, h_emIphi, h_emIsoOccIetaIphi, h_emNonIsoOccIetaIphi, h_emRank, h_regionOccIetaIphi, h_regionSum, h_regionSumIetaIphi, and TFileDirectory::make().

25  :
26  rctEmCandsLabel(iConfig.getParameter<edm::InputTag>("rctEmCandsLabel")),
27  rctRegionsLabel(iConfig.getParameter<edm::InputTag>("rctRegionsLabel"))
28 {
29  //now do what ever initialization is needed
30 
32  h_emRank = fs->make<TH1F>( "emRank", "emRank", 64, 0., 64. );
33  h_emIeta = fs->make<TH1F>( "emOccupancyIeta", "emOccupancyIeta", 22, 0., 22. );
34  h_emIphi = fs->make<TH1F>( "emOccupancyIphi", "emOccupancyIphi", 18, 0., 18. );
35  h_emIsoOccIetaIphi = fs->make<TH2F>( "emIsoOccupancy2D", "emIsoOccupancy2D", 22, 0., 22.,
36  18, 0., 18. );
37  h_emNonIsoOccIetaIphi = fs->make<TH2F>( "emNonIsoOccupancy2D", "emNonIsoOccupancy2D", 22, 0.,
38  22., 18, 0., 18. );
39 
40  h_regionSum = fs->make<TH1F>( "regionSum", "regionSum", 100, 0., 100. );
41  h_regionSumIetaIphi = fs->make<TH2F>( "regionSumEtWeighted2D", "regionSumEtWeighted2D", 22,
42  0., 22., 18, 0., 18. );
43  h_regionOccIetaIphi = fs->make<TH2F>( "regionOccupancy2D", "regionOccupancy2D",
44  22, 0., 22., 18, 0., 18. );
45 }
T getParameter(std::string const &) const
edm::InputTag rctEmCandsLabel
edm::InputTag rctRegionsLabel
T * make() const
make new ROOT object
L1RCTRelValAnalyzer::~L1RCTRelValAnalyzer ( )

Definition at line 48 of file L1RCTRelValAnalyzer.cc.

49 {
50 
51  // do anything here that needs to be done at destruction time
52  // (e.g. close files, deallocate resources etc.)
53 
54 }

Member Function Documentation

void L1RCTRelValAnalyzer::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
virtual

Implements edm::EDAnalyzer.

Definition at line 63 of file L1RCTRelValAnalyzer.cc.

References edm::EventSetup::get(), edm::Event::getByLabel(), h_emIeta, h_emIphi, h_emIsoOccIetaIphi, h_emNonIsoOccIetaIphi, h_emRank, h_regionOccIetaIphi, h_regionSum, h_regionSumIetaIphi, rctEmCandsLabel, and rctRegionsLabel.

64 {
65  using namespace edm;
66 #ifdef THIS_IS_AN_EVENT_EXAMPLE
68  iEvent.getByLabel("example",pIn);
69 #endif
70 
71 #ifdef THIS_IS_AN_EVENTSETUP_EXAMPLE
72  ESHandle<SetupData> pSetup;
73  iSetup.get<SetupRecord>().get(pSetup);
74 #endif
75 
76  // as in L1GctTestAnalyzer.cc
77  Handle<L1CaloEmCollection> rctEmCands;
79 
80  L1CaloEmCollection::const_iterator em;
81  L1CaloRegionCollection::const_iterator rgn;
82 
83  iEvent.getByLabel(rctEmCandsLabel, rctEmCands);
84  iEvent.getByLabel(rctRegionsLabel, rctRegions);
85 
86  for (em=rctEmCands->begin(); em!=rctEmCands->end(); em++)
87  {
88  if ((*em).rank() > 0)
89  {
90  h_emRank->Fill( (*em).rank() );
91  h_emIeta->Fill( (*em).regionId().ieta() );
92  h_emIphi->Fill( (*em).regionId().iphi() );
93  if ((*em).isolated())
94  {
95  h_emIsoOccIetaIphi->Fill( (*em).regionId().ieta(),
96  (*em).regionId().iphi() );
97  }
98  else
99  {
100  h_emNonIsoOccIetaIphi->Fill( (*em).regionId().ieta(),
101  (*em).regionId().iphi() );
102  }
103  }
104  }
105 
106  for (rgn=rctRegions->begin(); rgn!=rctRegions->end(); rgn++){
107  if ( (*rgn).et() > 0 )
108  {
109  h_regionSum->Fill( (*rgn).et() );
110  h_regionSumIetaIphi->Fill( (*rgn).gctEta(), (*rgn).gctPhi(),
111  (*rgn).et() );
112  h_regionOccIetaIphi->Fill( (*rgn).gctEta(), (*rgn).gctPhi() );
113  }
114  }
115 }
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
edm::InputTag rctEmCandsLabel
edm::InputTag rctRegionsLabel
const T & get() const
Definition: EventSetup.h:55

Member Data Documentation

TH1F* L1RCTRelValAnalyzer::h_emIeta
private

Definition at line 58 of file L1RCTRelValAnalyzer.h.

Referenced by analyze(), and L1RCTRelValAnalyzer().

TH1F* L1RCTRelValAnalyzer::h_emIphi
private

Definition at line 59 of file L1RCTRelValAnalyzer.h.

Referenced by analyze(), and L1RCTRelValAnalyzer().

TH2F* L1RCTRelValAnalyzer::h_emIsoOccIetaIphi
private

Definition at line 60 of file L1RCTRelValAnalyzer.h.

Referenced by analyze(), and L1RCTRelValAnalyzer().

TH2F* L1RCTRelValAnalyzer::h_emNonIsoOccIetaIphi
private

Definition at line 61 of file L1RCTRelValAnalyzer.h.

Referenced by analyze(), and L1RCTRelValAnalyzer().

TH1F* L1RCTRelValAnalyzer::h_emRank
private

Definition at line 57 of file L1RCTRelValAnalyzer.h.

Referenced by analyze(), and L1RCTRelValAnalyzer().

TH2F* L1RCTRelValAnalyzer::h_regionOccIetaIphi
private

Definition at line 65 of file L1RCTRelValAnalyzer.h.

Referenced by analyze(), and L1RCTRelValAnalyzer().

TH1F* L1RCTRelValAnalyzer::h_regionSum
private

Definition at line 63 of file L1RCTRelValAnalyzer.h.

Referenced by analyze(), and L1RCTRelValAnalyzer().

TH2F* L1RCTRelValAnalyzer::h_regionSumIetaIphi
private

Definition at line 64 of file L1RCTRelValAnalyzer.h.

Referenced by analyze(), and L1RCTRelValAnalyzer().

edm::InputTag L1RCTRelValAnalyzer::rctEmCandsLabel
private

Definition at line 54 of file L1RCTRelValAnalyzer.h.

Referenced by analyze().

edm::InputTag L1RCTRelValAnalyzer::rctRegionsLabel
private

Definition at line 55 of file L1RCTRelValAnalyzer.h.

Referenced by analyze().