CMS 3D CMS Logo

L1RCTRelValAnalyzer Class Reference

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

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

Inheritance diagram for L1RCTRelValAnalyzer:

edm::EDAnalyzer

List of all members.

Public Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 L1RCTRelValAnalyzer (const edm::ParameterSet &)
 ~L1RCTRelValAnalyzer ()

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


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 27 of file L1RCTRelValAnalyzer.cc.

References h_emIeta, h_emIphi, h_emIsoOccIetaIphi, h_emNonIsoOccIetaIphi, h_emRank, h_regionOccIetaIphi, h_regionSum, and h_regionSumIetaIphi.

00027                                                                        :
00028   rctEmCandsLabel(iConfig.getParameter<edm::InputTag>("rctEmCandsLabel")),
00029   rctRegionsLabel(iConfig.getParameter<edm::InputTag>("rctRegionsLabel"))
00030 {
00031    //now do what ever initialization is needed
00032 
00033   edm::Service<TFileService> fs;
00034   h_emRank = fs->make<TH1F>( "emRank", "emRank", 64, 0., 64. );
00035   h_emIeta = fs->make<TH1F>( "emOccupancyIeta", "emOccupancyIeta", 22, 0., 22. );
00036   h_emIphi = fs->make<TH1F>( "emOccupancyIphi", "emOccupancyIphi", 18, 0., 18. );
00037   h_emIsoOccIetaIphi = fs->make<TH2F>( "emIsoOccupancy2D", "emIsoOccupancy2D", 22, 0., 22.,
00038                                        18, 0., 18. );
00039   h_emNonIsoOccIetaIphi = fs->make<TH2F>( "emNonIsoOccupancy2D", "emNonIsoOccupancy2D", 22, 0., 
00040                                           22., 18, 0., 18. );
00041   
00042   h_regionSum = fs->make<TH1F>( "regionSum", "regionSum", 100, 0., 100. );
00043   h_regionSumIetaIphi = fs->make<TH2F>( "regionSumEtWeighted2D", "regionSumEtWeighted2D", 22, 
00044                                           0., 22., 18, 0., 18. );
00045   h_regionOccIetaIphi = fs->make<TH2F>( "regionOccupancy2D", "regionOccupancy2D", 
00046                                         22, 0., 22., 18, 0., 18. );
00047 }

L1RCTRelValAnalyzer::~L1RCTRelValAnalyzer (  ) 

Definition at line 50 of file L1RCTRelValAnalyzer.cc.

00051 {
00052 
00053    // do anything here that needs to be done at destruction time
00054    // (e.g. close files, deallocate resources etc.)
00055 
00056 }


Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 65 of file L1RCTRelValAnalyzer.cc.

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

00066 {
00067    using namespace edm;
00068 #ifdef THIS_IS_AN_EVENT_EXAMPLE
00069    Handle<ExampleData> pIn;
00070    iEvent.getByLabel("example",pIn);
00071 #endif
00072 
00073 #ifdef THIS_IS_AN_EVENTSETUP_EXAMPLE
00074    ESHandle<SetupData> pSetup;
00075    iSetup.get<SetupRecord>().get(pSetup);
00076 #endif
00077 
00078    // as in L1GctTestAnalyzer.cc
00079    Handle<L1CaloEmCollection> rctEmCands;
00080    Handle<L1CaloRegionCollection> rctRegions;
00081 
00082    L1CaloEmCollection::const_iterator em;
00083    L1CaloRegionCollection::const_iterator rgn;
00084 
00085    iEvent.getByLabel(rctEmCandsLabel, rctEmCands);
00086    iEvent.getByLabel(rctRegionsLabel, rctRegions);
00087 
00088    for (em=rctEmCands->begin(); em!=rctEmCands->end(); em++)
00089      {
00090        if ((*em).rank() > 0)
00091          {
00092            h_emRank->Fill( (*em).rank() );
00093            h_emIeta->Fill( (*em).regionId().ieta() );
00094            h_emIphi->Fill( (*em).regionId().iphi() );
00095            if ((*em).isolated())
00096              {
00097                h_emIsoOccIetaIphi->Fill( (*em).regionId().ieta(),
00098                                         (*em).regionId().iphi() );
00099              }
00100            else
00101              {
00102                h_emNonIsoOccIetaIphi->Fill( (*em).regionId().ieta(),
00103                                            (*em).regionId().iphi() );
00104              }
00105          }
00106      }
00107    
00108    for (rgn=rctRegions->begin(); rgn!=rctRegions->end(); rgn++){
00109      if ( (*rgn).et() > 0 )
00110        {
00111          h_regionSum->Fill( (*rgn).et() );
00112          h_regionSumIetaIphi->Fill( (*rgn).gctEta(), (*rgn).gctPhi(),
00113                                       (*rgn).et() );
00114          h_regionOccIetaIphi->Fill( (*rgn).gctEta(), (*rgn).gctPhi() );
00115        }
00116    }
00117 }


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().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:26:58 2009 for CMSSW by  doxygen 1.5.4