CMS 3D CMS Logo

HLTAnalyzer.cc

Go to the documentation of this file.
00001 // File: HLTAnalyzer.cc
00002 // Description:  Example of Analysis driver originally from Jeremy Mans, 
00003 // Date:  13-October-2006
00004 
00005 #include <boost/foreach.hpp>
00006 
00007 #include "HLTrigger/HLTanalyzers/interface/HLTAnalyzer.h"
00008 #include "HLTMessages.h"
00009 
00010 typedef std::pair<const char *, const edm::InputTag *> MissingCollectionInfo;
00011   
00012 template <class T>
00013 static inline
00014 bool getCollection(const edm::Event & event, std::vector<MissingCollectionInfo> & missing, edm::Handle<T> & handle, const edm::InputTag & name, const char * description) 
00015 {
00016   event.getByLabel(name, handle);
00017   bool valid = handle.isValid();
00018   if (not valid) {
00019     missing.push_back( std::make_pair(description, & name) );
00020     handle.clear();
00021   }
00022   return valid;
00023 }
00024 
00025 // Boiler-plate constructor definition of an analyzer module:
00026 HLTAnalyzer::HLTAnalyzer(edm::ParameterSet const& conf) {
00027 
00028   // If your module takes parameters, here is where you would define
00029   // their names and types, and access them to initialize internal
00030   // variables. Example as follows:
00031   std::cout << " Beginning HLTAnalyzer Analysis " << std::endl;
00032 
00033   recjets_          = conf.getParameter<edm::InputTag> ("recjets");
00034   genjets_          = conf.getParameter<edm::InputTag> ("genjets");
00035   recmet_           = conf.getParameter<edm::InputTag> ("recmet");
00036   genmet_           = conf.getParameter<edm::InputTag> ("genmet");
00037   ht_               = conf.getParameter<edm::InputTag> ("ht");
00038   calotowers_       = conf.getParameter<edm::InputTag> ("calotowers");
00039   muon_             = conf.getParameter<edm::InputTag> ("muon");
00040   mctruth_          = conf.getParameter<edm::InputTag> ("mctruth");
00041   genEventScale_    = conf.getParameter<edm::InputTag> ("genEventScale");
00042 
00043   // keep this separate from l1extramc_ as needed by FastSim:
00044   //    This is purposefully done this way to allow FastSim to run with OpenHLT: 
00045   //    The {FastSim+OpenHLT} package runs on the head of HLTrigger/HLTanalyzers 
00046   //    where there is purposefully this duplication because FastSim does the 
00047   //    simulation of muons seperately, and needs the same collection. 
00048   l1extramu_        = conf.getParameter<std::string>   ("l1extramu");
00049   m_l1extramu       = edm::InputTag(l1extramu_, "");
00050   
00051   // read the L1Extra collection name, and add the instance names as needed
00052   l1extramc_        = conf.getParameter<std::string>   ("l1extramc");
00053   m_l1extraemi      = edm::InputTag(l1extramc_, "Isolated");
00054   m_l1extraemn      = edm::InputTag(l1extramc_, "NonIsolated");
00055   m_l1extrajetc     = edm::InputTag(l1extramc_, "Central");
00056   m_l1extrajetf     = edm::InputTag(l1extramc_, "Forward");
00057   m_l1extrataujet   = edm::InputTag(l1extramc_, "Tau");
00058   m_l1extramet      = edm::InputTag(l1extramc_, "");
00059 
00060   hltresults_       = conf.getParameter<edm::InputTag> ("hltresults");
00061   gtReadoutRecord_  = conf.getParameter<edm::InputTag> ("l1GtReadoutRecord");
00062   gtObjectMap_      = conf.getParameter<edm::InputTag> ("l1GtObjectMapRecord");
00063 
00064   // only keep the module label for GCT in 2.X.X - comment from Pedrame:
00065   //    As far as I (pragmatically) know, this is the way it works up to 2XX series; 
00066   //    I know that Len is working on making it work in 3XX series.
00067   gctCounts_        = edm::InputTag( conf.getParameter<edm::InputTag>("l1GctCounts").label(), "" );
00068   
00069   MuCandTag2_       = conf.getParameter<edm::InputTag> ("MuCandTag2");
00070   MuIsolTag2_       = conf.getParameter<edm::InputTag> ("MuIsolTag2");
00071   MuCandTag3_       = conf.getParameter<edm::InputTag> ("MuCandTag3");
00072   MuIsolTag3_       = conf.getParameter<edm::InputTag> ("MuIsolTag3");
00073   MuLinkTag_        = conf.getParameter<edm::InputTag> ("MuLinkTag");
00074   HLTTau_           = conf.getParameter<edm::InputTag> ("HLTTau");
00075 
00076   // btag OpenHLT input collections
00077   m_rawBJets                = conf.getParameter<edm::InputTag>("CommonBJetsL2");
00078   m_correctedBJets          = conf.getParameter<edm::InputTag>("CorrectedBJetsL2");
00079   m_lifetimeBJetsL25        = conf.getParameter<edm::InputTag>("LifetimeBJetsL25");
00080   m_lifetimeBJetsL3         = conf.getParameter<edm::InputTag>("LifetimeBJetsL3");
00081   m_lifetimeBJetsL25Relaxed = conf.getParameter<edm::InputTag>("LifetimeBJetsL25Relaxed");
00082   m_lifetimeBJetsL3Relaxed  = conf.getParameter<edm::InputTag>("LifetimeBJetsL3Relaxed");
00083   m_softmuonBJetsL25        = conf.getParameter<edm::InputTag>("SoftmuonBJetsL25");
00084   m_softmuonBJetsL3         = conf.getParameter<edm::InputTag>("SoftmuonBJetsL3");
00085   m_performanceBJetsL25     = conf.getParameter<edm::InputTag>("PerformanceBJetsL25");
00086   m_performanceBJetsL3      = conf.getParameter<edm::InputTag>("PerformanceBJetsL3");
00087 
00088   // egamma OpenHLT input collections
00089   Electron_                 = conf.getParameter<edm::InputTag> ("Electron");
00090   Photon_                   = conf.getParameter<edm::InputTag> ("Photon");
00091   CandIso_                  = conf.getParameter<edm::InputTag> ("CandIso");
00092   CandNonIso_               = conf.getParameter<edm::InputTag> ("CandNonIso");
00093   EcalIso_                  = conf.getParameter<edm::InputTag> ("EcalIso");
00094   EcalNonIso_               = conf.getParameter<edm::InputTag> ("EcalNonIso");
00095   HcalIsoPho_               = conf.getParameter<edm::InputTag> ("HcalIsoPho");
00096   HcalNonIsoPho_            = conf.getParameter<edm::InputTag> ("HcalNonIsoPho");
00097   IsoPhoTrackIsol_          = conf.getParameter<edm::InputTag> ("IsoPhoTrackIsol");
00098   NonIsoPhoTrackIsol_       = conf.getParameter<edm::InputTag> ("NonIsoPhoTrackIsol");
00099   IsoElectron_              = conf.getParameter<edm::InputTag> ("IsoElectrons");
00100   NonIsoElectron_           = conf.getParameter<edm::InputTag> ("NonIsoElectrons");
00101   IsoEleHcal_               = conf.getParameter<edm::InputTag> ("HcalIsoEle");
00102   NonIsoEleHcal_            = conf.getParameter<edm::InputTag> ("HcalNonIsoEle");
00103   IsoEleTrackIsol_          = conf.getParameter<edm::InputTag> ("IsoEleTrackIsol");
00104   NonIsoEleTrackIsol_       = conf.getParameter<edm::InputTag> ("NonIsoEleTrackIsol");
00105   IsoElectronLW_            = conf.getParameter<edm::InputTag> ("IsoElectronsLargeWindows");
00106   NonIsoElectronLW_         = conf.getParameter<edm::InputTag> ("NonIsoElectronsLargeWindows");
00107   IsoEleTrackIsolLW_        = conf.getParameter<edm::InputTag> ("IsoEleTrackIsolLargeWindows");
00108   NonIsoEleTrackIsolLW_     = conf.getParameter<edm::InputTag> ("NonIsoEleTrackIsolLargeWindows");
00109   L1IsoPixelSeeds_          = conf.getParameter<edm::InputTag> ("PixelSeedL1Iso");
00110   L1NonIsoPixelSeeds_       = conf.getParameter<edm::InputTag> ("PixelSeedL1NonIso");
00111   L1IsoPixelSeedsLW_        = conf.getParameter<edm::InputTag> ("PixelSeedL1IsoLargeWindows");
00112   L1NonIsoPixelSeedsLW_     = conf.getParameter<edm::InputTag> ("PixelSeedL1NonIsoLargeWindows");
00113   
00114   m_file = 0;   // set to null
00115   errCnt = 0;
00116 
00117   // read run parameters with a default value 
00118   edm::ParameterSet runParameters = conf.getParameter<edm::ParameterSet>("RunParameters");
00119   _HistName = runParameters.getUntrackedParameter<std::string>("HistogramFile", "test.root");
00120   _EtaMin   = runParameters.getUntrackedParameter<double>("EtaMin", -5.2);
00121   _EtaMax   = runParameters.getUntrackedParameter<double>("EtaMax",  5.2);
00122 
00123   // open the tree file
00124   m_file = new TFile(_HistName.c_str(), "RECREATE");
00125   if (m_file)
00126     m_file->cd();
00127 
00128   // Initialize the tree
00129   HltTree = new TTree("HltTree", "");
00130 
00131   // Setup the different analysis
00132   jet_analysis_.setup(conf, HltTree);
00133   bjet_analysis_.setup(conf, HltTree);
00134   elm_analysis_.setup(conf, HltTree);
00135   muon_analysis_.setup(conf, HltTree);
00136   mct_analysis_.setup(conf, HltTree);
00137   hlt_analysis_.setup(conf, HltTree);
00138   evt_header_.setup(HltTree);
00139 }
00140 
00141 // Boiler-plate "analyze" method declaration for an analyzer module.
00142 void HLTAnalyzer::analyze(edm::Event const& iEvent, edm::EventSetup const& iSetup) {
00143 
00144   // To get information from the event setup, you must request the "Record"
00145   // which contains it and then extract the object you need
00146   //edm::ESHandle<CaloGeometry> geometry;
00147   //iSetup.get<IdealGeometryRecord>().get(geometry);
00148 
00149   // These declarations create handles to the types of records that you want
00150   // to retrieve from event "iEvent".
00151   edm::Handle<CaloJetCollection>                    recjets;
00152   edm::Handle<GenJetCollection>                     genjets;
00153   edm::Handle<CaloTowerCollection>                  caloTowers;
00154   edm::Handle<CaloMETCollection>                    recmet;
00155   edm::Handle<GenMETCollection>                     genmet;
00156   edm::Handle<METCollection>                        ht;
00157   edm::Handle<CandidateView>                        mctruth;
00158   edm::Handle<double>                               genEventScale;
00159   edm::Handle<MuonCollection>                       muon;
00160   edm::Handle<edm::TriggerResults>                  hltresults;
00161   edm::Handle<l1extra::L1EmParticleCollection>      l1extemi, l1extemn;
00162   edm::Handle<l1extra::L1MuonParticleCollection>    l1extmu;
00163   edm::Handle<l1extra::L1JetParticleCollection>     l1extjetc, l1extjetf, l1exttaujet;
00164   edm::Handle<l1extra::L1EtMissParticleCollection>  l1extmet;
00165   edm::Handle<L1GlobalTriggerReadoutRecord>         l1GtRR;
00166   edm::Handle<L1GlobalTriggerObjectMapRecord>       l1GtOMRec;
00167   edm::Handle<L1GlobalTriggerObjectMap>             l1GtOM;
00168   edm::Handle<L1GctJetCountsCollection>             l1GctCounts;
00169   edm::Handle<L1GctHFBitCounts>                     l1GctHFBitCounts;
00170   edm::Handle<L1GctHFRingEtSums>                    l1GctHFRingEtSums;
00171   edm::Handle<RecoChargedCandidateCollection>       mucands2, mucands3;
00172   edm::Handle<edm::ValueMap<bool> >                 isoMap2,  isoMap3;
00173   edm::Handle<MuonTrackLinksCollection>             mulinks;
00174   edm::Handle<reco::HLTTauCollection>               taus;
00175 
00176   // btag OpenHLT input collections
00177   edm::Handle<edm::View<reco::Jet> >                hRawBJets;
00178   edm::Handle<edm::View<reco::Jet> >                hCorrectedBJets;
00179   edm::Handle<reco::JetTagCollection>               hLifetimeBJetsL25;
00180   edm::Handle<reco::JetTagCollection>               hLifetimeBJetsL3;
00181   edm::Handle<reco::JetTagCollection>               hLifetimeBJetsL25Relaxed;
00182   edm::Handle<reco::JetTagCollection>               hLifetimeBJetsL3Relaxed;
00183   edm::Handle<reco::JetTagCollection>               hSoftmuonBJetsL25;
00184   edm::Handle<reco::JetTagCollection>               hSoftmuonBJetsL3;
00185   edm::Handle<reco::JetTagCollection>               hPerformanceBJetsL25;
00186   edm::Handle<reco::JetTagCollection>               hPerformanceBJetsL3;
00187 
00188   // egamma OpenHLT input collections
00189   edm::Handle<GsfElectronCollection>                electrons;
00190   edm::Handle<PhotonCollection>                     photons;
00191   edm::Handle<reco::ElectronCollection>             electronIsoHandle;
00192   edm::Handle<reco::ElectronCollection>             electronIsoHandleLW;
00193   edm::Handle<reco::ElectronCollection>             electronNonIsoHandle;
00194   edm::Handle<reco::ElectronCollection>             electronNonIsoHandleLW;
00195   edm::Handle<reco::ElectronIsolationMap>           NonIsoTrackEleIsolMap;
00196   edm::Handle<reco::ElectronIsolationMap>           NonIsoTrackEleIsolMapLW;
00197   edm::Handle<reco::ElectronIsolationMap>           TrackEleIsolMap;
00198   edm::Handle<reco::ElectronIsolationMap>           TrackEleIsolMapLW;
00199   edm::Handle<reco::ElectronPixelSeedCollection>    L1IsoPixelSeedsMap;
00200   edm::Handle<reco::ElectronPixelSeedCollection>    L1IsoPixelSeedsMapLW;
00201   edm::Handle<reco::ElectronPixelSeedCollection>    L1NonIsoPixelSeedsMap;
00202   edm::Handle<reco::ElectronPixelSeedCollection>    L1NonIsoPixelSeedsMapLW;
00203   edm::Handle<reco::RecoEcalCandidateCollection>    recoIsolecalcands;
00204   edm::Handle<reco::RecoEcalCandidateCollection>    recoNonIsolecalcands;
00205   edm::Handle<reco::RecoEcalCandidateIsolationMap>  EcalIsolMap;
00206   edm::Handle<reco::RecoEcalCandidateIsolationMap>  EcalNonIsolMap;
00207   edm::Handle<reco::RecoEcalCandidateIsolationMap>  HcalEleIsolMap;
00208   edm::Handle<reco::RecoEcalCandidateIsolationMap>  HcalEleNonIsolMap;
00209   edm::Handle<reco::RecoEcalCandidateIsolationMap>  HcalIsolMap;
00210   edm::Handle<reco::RecoEcalCandidateIsolationMap>  HcalNonIsolMap;
00211   edm::Handle<reco::RecoEcalCandidateIsolationMap>  TrackIsolMap;
00212   edm::Handle<reco::RecoEcalCandidateIsolationMap>  TrackNonIsolMap;
00213   
00214   // extract the collections from the event, check their validity and log which are missing
00215   std::vector<MissingCollectionInfo> missing;
00216 
00217   getCollection( iEvent, missing, recjets,         recjets_,           kRecjets );
00218   getCollection( iEvent, missing, genjets,         genjets_,           kGenjets );
00219   getCollection( iEvent, missing, recmet,          recmet_,            kRecmet );
00220   getCollection( iEvent, missing, genmet,          genmet_,            kGenmet );
00221   getCollection( iEvent, missing, caloTowers,      calotowers_,        kCaloTowers );
00222   getCollection( iEvent, missing, ht,              ht_,                kHt );
00223   getCollection( iEvent, missing, muon,            muon_,              kMuon );
00224   getCollection( iEvent, missing, taus,            HLTTau_,            kTaus );
00225   getCollection( iEvent, missing, hltresults,      hltresults_,        kHltresults );
00226   getCollection( iEvent, missing, l1extemi,        m_l1extraemi,       kL1extemi );
00227   getCollection( iEvent, missing, l1extemn,        m_l1extraemn,       kL1extemn );
00228   getCollection( iEvent, missing, l1extmu,         m_l1extramu,        kL1extmu );
00229   getCollection( iEvent, missing, l1extjetc,       m_l1extrajetc,      kL1extjetc );
00230   getCollection( iEvent, missing, l1extjetf,       m_l1extrajetf,      kL1extjetf );
00231   getCollection( iEvent, missing, l1exttaujet,     m_l1extrataujet,    kL1exttaujet );
00232   getCollection( iEvent, missing, l1extmet,        m_l1extramet,       kL1extmet );
00233   getCollection( iEvent, missing, l1GtRR,          gtReadoutRecord_,   kL1GtRR );
00234   getCollection( iEvent, missing, l1GtOMRec,       gtObjectMap_,       kL1GtOMRec );
00235   getCollection( iEvent, missing, l1GctCounts,     gctCounts_,         kL1GctCounts );
00236   getCollection( iEvent, missing, mctruth,         mctruth_,           kMctruth );
00237   getCollection( iEvent, missing, genEventScale,   genEventScale_,     kGenEventScale );
00238   getCollection( iEvent, missing, mucands2,        MuCandTag2_,        kMucands2 );
00239   getCollection( iEvent, missing, mucands3,        MuCandTag3_,        kMucands3 );
00240   getCollection( iEvent, missing, isoMap2,         MuIsolTag2_,        kIsoMap2 );
00241   getCollection( iEvent, missing, isoMap3,         MuIsolTag3_,        kIsoMap3 );
00242   getCollection( iEvent, missing, mulinks,         MuLinkTag_,         kMulinks );
00243   getCollection( iEvent, missing, hRawBJets,                m_rawBJets,                 kBTagJets );
00244   getCollection( iEvent, missing, hCorrectedBJets,          m_correctedBJets,           kBTagCorrectedJets );
00245   getCollection( iEvent, missing, hLifetimeBJetsL25,        m_lifetimeBJetsL25,         kBTagLifetimeBJetsL25 );
00246   getCollection( iEvent, missing, hLifetimeBJetsL3,         m_lifetimeBJetsL3,          kBTagLifetimeBJetsL3 );
00247   getCollection( iEvent, missing, hLifetimeBJetsL25Relaxed, m_lifetimeBJetsL25Relaxed,  kBTagLifetimeBJetsL25Relaxed );
00248   getCollection( iEvent, missing, hLifetimeBJetsL3Relaxed,  m_lifetimeBJetsL3Relaxed,   kBTagLifetimeBJetsL3Relaxed );
00249   getCollection( iEvent, missing, hSoftmuonBJetsL25,        m_softmuonBJetsL25,         kBTagSoftmuonBJetsL25 );
00250   getCollection( iEvent, missing, hSoftmuonBJetsL3,         m_softmuonBJetsL3,          kBTagSoftmuonBJetsL3 );
00251   getCollection( iEvent, missing, hPerformanceBJetsL25,     m_performanceBJetsL25,      kBTagPerformanceBJetsL25 );
00252   getCollection( iEvent, missing, hPerformanceBJetsL3,      m_performanceBJetsL3,       kBTagPerformanceBJetsL3 );
00253   getCollection( iEvent, missing, electrons,                Electron_,                  kElectrons );
00254   getCollection( iEvent, missing, photons,                  Photon_,                    kPhotons );
00255   getCollection( iEvent, missing, recoIsolecalcands,        CandIso_,                   kCandIso);
00256   getCollection( iEvent, missing, recoNonIsolecalcands,     CandNonIso_,                kCandNonIso);
00257   getCollection( iEvent, missing, EcalIsolMap,              EcalIso_,                   kEcalIso);
00258   getCollection( iEvent, missing, EcalNonIsolMap,           EcalNonIso_,                kEcalNonIso);
00259   getCollection( iEvent, missing, HcalIsolMap,              HcalIsoPho_,                kHcalIsoPho);
00260   getCollection( iEvent, missing, HcalNonIsolMap,           HcalNonIsoPho_,             kHcalNonIsoPho);
00261   getCollection( iEvent, missing, electronIsoHandleLW,      IsoElectronLW_,             kIsoElectron);
00262   getCollection( iEvent, missing, electronIsoHandle,        IsoElectron_,               kIsoElectron);
00263   getCollection( iEvent, missing, HcalEleIsolMap,           IsoEleHcal_,                kIsoEleHcal);
00264   getCollection( iEvent, missing, TrackEleIsolMapLW,        IsoEleTrackIsolLW_,         kIsoEleTrackIsol);
00265   getCollection( iEvent, missing, L1IsoPixelSeedsMapLW,     L1IsoPixelSeedsLW_,         kL1IsoPixelSeeds);
00266   getCollection( iEvent, missing, L1IsoPixelSeedsMap,       L1IsoPixelSeeds_,           kL1IsoPixelSeeds);
00267   getCollection( iEvent, missing, L1NonIsoPixelSeedsMapLW,  L1NonIsoPixelSeedsLW_,      kL1NonIsoPixelSeeds);
00268   getCollection( iEvent, missing, L1NonIsoPixelSeedsMap,    L1NonIsoPixelSeeds_,        kL1NonIsoPixelSeeds);
00269   getCollection( iEvent, missing, electronNonIsoHandleLW,   NonIsoElectronLW_,          kNonIsoElectron);
00270   getCollection( iEvent, missing, electronNonIsoHandle,     NonIsoElectron_,            kNonIsoElectron);
00271   getCollection( iEvent, missing, HcalEleNonIsolMap,        NonIsoEleHcal_,             kIsoEleHcal);
00272   getCollection( iEvent, missing, NonIsoTrackEleIsolMapLW,  NonIsoEleTrackIsolLW_,      kNonIsoEleTrackIsol);
00273   getCollection( iEvent, missing, NonIsoTrackEleIsolMap,    NonIsoEleTrackIsol_,        kNonIsoEleTrackIsol);
00274   getCollection( iEvent, missing, TrackNonIsolMap,          NonIsoPhoTrackIsol_,        kNonIsoPhoTrackIsol);
00275   getCollection( iEvent, missing, TrackEleIsolMap,          IsoEleTrackIsol_,           kIsoEleTrackIsol);
00276   getCollection( iEvent, missing, TrackIsolMap,             IsoPhoTrackIsol_,           kIsoPhoTrackIsol);
00277 
00278   // print missing collections
00279   if (not missing.empty() and (errCnt < errMax())) {
00280     errCnt++;
00281     std::stringstream out;       
00282     out <<  "OpenHLT analyser - missing collections:";
00283     BOOST_FOREACH(const MissingCollectionInfo & entry, missing)
00284       out << "\n\t" << entry.first << ": " << entry.second->encode();
00285     edm::LogPrint("OpenHLT") << out.str() << std::endl; 
00286     if (errCnt == errMax())
00287       edm::LogWarning("OpenHLT") << "Maximum error count reached -- No more messages will be printed.";
00288   }
00289 
00290   // run the analysis, passing required event fragments
00291   jet_analysis_.analyze(
00292     recjets,
00293     genjets,
00294     recmet,
00295     genmet,
00296     ht,
00297     taus,
00298     caloTowers,
00299     HltTree);
00300   
00301   muon_analysis_.analyze(
00302     muon,
00303     mucands2,
00304     isoMap2,
00305     mucands3,
00306     isoMap3,
00307     mulinks,
00308     HltTree);
00309   
00310   elm_analysis_.analyze(
00311     electrons,
00312     photons,
00313     electronIsoHandle,
00314     electronIsoHandleLW,
00315     electronNonIsoHandle,
00316     electronNonIsoHandleLW,
00317     NonIsoTrackEleIsolMap,
00318     NonIsoTrackEleIsolMapLW,
00319     TrackEleIsolMap,
00320     TrackEleIsolMapLW,
00321     L1IsoPixelSeedsMap,
00322     L1IsoPixelSeedsMapLW,
00323     L1NonIsoPixelSeedsMap,
00324     L1NonIsoPixelSeedsMapLW,
00325     recoIsolecalcands,
00326     recoNonIsolecalcands,
00327     EcalIsolMap,
00328     EcalNonIsolMap,
00329     HcalEleIsolMap,
00330     HcalEleNonIsolMap,
00331     HcalIsolMap,
00332     HcalNonIsolMap,
00333     TrackIsolMap,
00334     TrackNonIsolMap,
00335     HltTree);
00336   
00337   mct_analysis_.analyze(
00338     mctruth,
00339     genEventScale,
00340     HltTree);
00341   
00342   hlt_analysis_.analyze(
00343     hltresults,
00344     l1extemi,
00345     l1extemn,
00346     l1extmu,
00347     l1extjetc,
00348     l1extjetf,
00349     l1exttaujet,
00350     l1extmet,
00351     l1GtRR,
00352     l1GtOMRec,
00353     l1GctCounts,
00354     l1GctHFBitCounts,
00355     l1GctHFRingEtSums,
00356     HltTree);
00357   
00358   bjet_analysis_.analyze(
00359     hRawBJets, 
00360     hCorrectedBJets,
00361     hLifetimeBJetsL25,
00362     hLifetimeBJetsL3,
00363     hLifetimeBJetsL25Relaxed,
00364     hLifetimeBJetsL3Relaxed,
00365     hSoftmuonBJetsL25,
00366     hSoftmuonBJetsL3,
00367     hPerformanceBJetsL25,
00368     hPerformanceBJetsL3,
00369     HltTree);
00370 
00371   evt_header_.analyze(iEvent, HltTree);
00372 
00373   // std::cout << " Ending Event Analysis" << std::endl;
00374   // After analysis, fill the variables tree
00375   if (m_file)
00376     m_file->cd();
00377   HltTree->Fill();
00378 }
00379 
00380 // "endJob" is an inherited method that you may implement to do post-EOF processing and produce final output.
00381 void HLTAnalyzer::endJob() {
00382 
00383   if (m_file)
00384     m_file->cd();
00385 
00386   HltTree->Write();
00387   delete HltTree;
00388   HltTree = 0;
00389 
00390   if (m_file) {         // if there was a tree file...
00391     m_file->Write();    // write out the branches
00392     delete m_file;      // close and delete the file
00393     m_file = 0;         // set to zero to clean up
00394   }
00395 
00396 }

Generated on Tue Jun 9 17:37:48 2009 for CMSSW by  doxygen 1.5.4