CMS 3D CMS Logo

HLTEgamma Class Reference

$Date: November 2006 $Revision: More...

#include <HLTrigger/HLTanalyzers/interface/HLTEgamma.h>

List of all members.

Public Member Functions

void analyze (const edm::Handle< reco::GsfElectronCollection > &electrons, const edm::Handle< reco::PhotonCollection > &photons, const edm::Handle< reco::ElectronCollection > &electronIsoHandle, const edm::Handle< reco::ElectronCollection > &electronIsoHandleLW, const edm::Handle< reco::ElectronCollection > &electronNonIsoHandle, const edm::Handle< reco::ElectronCollection > &electronNonIsoHandleLW, const edm::Handle< reco::ElectronIsolationMap > &NonIsoTrackEleIsolMap, const edm::Handle< reco::ElectronIsolationMap > &NonIsoTrackEleIsolMapLW, const edm::Handle< reco::ElectronIsolationMap > &TrackEleIsolMap, const edm::Handle< reco::ElectronIsolationMap > &TrackEleIsolMapLW, const edm::Handle< reco::ElectronPixelSeedCollection > &L1IsoPixelSeedsMap, const edm::Handle< reco::ElectronPixelSeedCollection > &L1IsoPixelSeedsMapLW, const edm::Handle< reco::ElectronPixelSeedCollection > &L1NonIsoPixelSeedsMap, const edm::Handle< reco::ElectronPixelSeedCollection > &L1NonIsoPixelSeedsMapLW, const edm::Handle< reco::RecoEcalCandidateCollection > &recoIsolecalcands, const edm::Handle< reco::RecoEcalCandidateCollection > &recoNonIsolecalcands, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &EcalIsolMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &EcalNonIsolMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &HcalEleIsolMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &HcalEleNonIsolMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &HcalIsolMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &HcalNonIsolMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &TrackIsolMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &TrackNonIsolMap, TTree *tree)
 Analyze the Data.
void clear (void)
 HLTEgamma ()
void setup (const edm::ParameterSet &pSet, TTree *tree)

Private Member Functions

void MakeL1IsolatedElectrons (const edm::Handle< reco::ElectronCollection > &electronIsoHandle, const edm::Handle< reco::RecoEcalCandidateCollection > &recoIsolecalcands, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &HcalEleIsolMap, const edm::Handle< reco::ElectronPixelSeedCollection > &L1IsoPixelSeedsMap, const edm::Handle< reco::ElectronIsolationMap > &TrackEleIsolMap)
void MakeL1IsolatedElectronsLargeWindows (const edm::Handle< reco::ElectronCollection > &electronIsoHandle, const edm::Handle< reco::RecoEcalCandidateCollection > &recoIsolecalcands, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &HcalEleIsolMap, const edm::Handle< reco::ElectronPixelSeedCollection > &L1IsoPixelSeedsMap, const edm::Handle< reco::ElectronIsolationMap > &TrackEleIsolMap)
void MakeL1IsolatedPhotons (const edm::Handle< reco::RecoEcalCandidateCollection > &recoIsolecalcands, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &EcalIsolMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &HcalIsolMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &TrackIsolMap)
void MakeL1NonIsolatedElectrons (const edm::Handle< reco::ElectronCollection > &electronNonIsoHandle, const edm::Handle< reco::RecoEcalCandidateCollection > &recoNonIsolecalcands, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &HcalEleIsolMap, const edm::Handle< reco::ElectronPixelSeedCollection > &L1NonIsoPixelSeedsMap, const edm::Handle< reco::ElectronIsolationMap > &TrackEleIsolMap)
void MakeL1NonIsolatedElectronsLargeWindows (const edm::Handle< reco::ElectronCollection > &electronNonIsoHandle, const edm::Handle< reco::RecoEcalCandidateCollection > &recoNonIsolecalcands, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &HcalEleIsolMap, const edm::Handle< reco::ElectronPixelSeedCollection > &L1NonIsoPixelSeedsMap, const edm::Handle< reco::ElectronIsolationMap > &TrackEleIsolMap)
void MakeL1NonIsolatedPhotons (const edm::Handle< reco::RecoEcalCandidateCollection > &recoNonIsolecalcands, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &EcalNonIsolMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &HcalNonIsolMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &TrackNonIsolMap)

Private Attributes

float * ele
float * elet
float * eleta
float * elphi
float * elpt
float * heleE
float * heleELW
float * heleet
float * heleeta
float * heleetaLW
float * heleetLW
float * helehiso
float * helehisoLW
inthelel1iso
inthelel1isoLW
intheleNewSC
intheleNewSCLW
float * helep
float * helephi
float * helephiLW
inthelePixelSeeds
inthelePixelSeedsLW
float * helepLW
float * heletiso
float * heletisoLW
float * hphoteiso
float * hphotet
float * hphoteta
float * hphothiso
inthphotl1iso
float * hphotphi
float * hphottiso
int nele
int nhltele
int nhlteleLW
int nhltgam
int nphoton
float * photone
float * photonet
float * photoneta
float * photonphi
float * photonpt
std::vector< myHLTElectrontheHLTElectrons
std::vector< myHLTElectrontheHLTElectronsLargeWindows
std::vector< myHLTPhotontheHLTPhotons

Classes

class  myHLTElectron
class  myHLTPhoton


Detailed Description

$Date: November 2006 $Revision:

Author:
P. Bargassa - Rice U.

Definition at line 53 of file HLTEgamma.h.


Constructor & Destructor Documentation

HLTEgamma::HLTEgamma (  ) 

Definition at line 23 of file HLTEgamma.cc.

00023                      {
00024 }


Member Function Documentation

void HLTEgamma::analyze ( const edm::Handle< reco::GsfElectronCollection > &  electrons,
const edm::Handle< reco::PhotonCollection > &  photons,
const edm::Handle< reco::ElectronCollection > &  electronIsoHandle,
const edm::Handle< reco::ElectronCollection > &  electronIsoHandleLW,
const edm::Handle< reco::ElectronCollection > &  electronNonIsoHandle,
const edm::Handle< reco::ElectronCollection > &  electronNonIsoHandleLW,
const edm::Handle< reco::ElectronIsolationMap > &  NonIsoTrackEleIsolMap,
const edm::Handle< reco::ElectronIsolationMap > &  NonIsoTrackEleIsolMapLW,
const edm::Handle< reco::ElectronIsolationMap > &  TrackEleIsolMap,
const edm::Handle< reco::ElectronIsolationMap > &  TrackEleIsolMapLW,
const edm::Handle< reco::ElectronPixelSeedCollection > &  L1IsoPixelSeedsMap,
const edm::Handle< reco::ElectronPixelSeedCollection > &  L1IsoPixelSeedsMapLW,
const edm::Handle< reco::ElectronPixelSeedCollection > &  L1NonIsoPixelSeedsMap,
const edm::Handle< reco::ElectronPixelSeedCollection > &  L1NonIsoPixelSeedsMapLW,
const edm::Handle< reco::RecoEcalCandidateCollection > &  recoIsolecalcands,
const edm::Handle< reco::RecoEcalCandidateCollection > &  recoNonIsolecalcands,
const edm::Handle< reco::RecoEcalCandidateIsolationMap > &  EcalIsolMap,
const edm::Handle< reco::RecoEcalCandidateIsolationMap > &  EcalNonIsolMap,
const edm::Handle< reco::RecoEcalCandidateIsolationMap > &  HcalEleIsolMap,
const edm::Handle< reco::RecoEcalCandidateIsolationMap > &  HcalEleNonIsolMap,
const edm::Handle< reco::RecoEcalCandidateIsolationMap > &  HcalIsolMap,
const edm::Handle< reco::RecoEcalCandidateIsolationMap > &  HcalNonIsolMap,
const edm::Handle< reco::RecoEcalCandidateIsolationMap > &  TrackIsolMap,
const edm::Handle< reco::RecoEcalCandidateIsolationMap > &  TrackNonIsolMap,
TTree *  tree 
)

Analyze the Data.

Definition at line 169 of file HLTEgamma.cc.

References clear(), ele, elet, eleta, elphi, elpt, heleE, heleELW, heleet, heleeta, heleetaLW, heleetLW, helehiso, helehisoLW, helel1iso, helel1isoLW, heleNewSC, heleNewSCLW, helep, helephi, helephiLW, helePixelSeeds, helePixelSeedsLW, helepLW, heletiso, heletisoLW, hphoteiso, hphotet, hphoteta, hphothiso, hphotl1iso, hphotphi, hphottiso, i, edm::Handle< T >::isValid(), MakeL1IsolatedElectrons(), MakeL1IsolatedElectronsLargeWindows(), MakeL1IsolatedPhotons(), MakeL1NonIsolatedElectrons(), MakeL1NonIsolatedElectronsLargeWindows(), MakeL1NonIsolatedPhotons(), nele, nhltele, nhlteleLW, nhltgam, nphoton, photone, photonet, photoneta, photonphi, photonpt, python::multivaluedict::sort(), theHLTElectrons, theHLTElectronsLargeWindows, and theHLTPhotons.

Referenced by HLTAnalyzer::analyze().

00194 {
00195   // reset the tree variables
00196   clear();
00197 
00198   if (electrons.isValid()) {
00199     GsfElectronCollection myelectrons( electrons->begin(), electrons->end() );
00200     nele = myelectrons.size();
00201     std::sort(myelectrons.begin(), myelectrons.end(), EtGreater());
00202     int iel = 0;
00203     for (GsfElectronCollection::const_iterator i = myelectrons.begin(); i != myelectrons.end(); i++) {
00204       elpt[iel]  = i->pt();
00205       elphi[iel] = i->phi();
00206       eleta[iel] = i->eta();
00207       elet[iel]  = i->et();
00208       ele[iel]   = i->energy();
00209       iel++;
00210     }
00211   } else {
00212     nele = 0;
00213   }
00214 
00215   if (photons.isValid()) {
00216     PhotonCollection myphotons(* photons);
00217     nphoton = myphotons.size();
00218     std::sort(myphotons.begin(), myphotons.end(), EtGreater());
00219     int ipho = 0;
00220     for (PhotonCollection::const_iterator i = myphotons.begin(); i!= myphotons.end(); i++) {
00221       photonpt[ipho] = i->pt();
00222       photonphi[ipho] = i->phi();
00223       photoneta[ipho] = i->eta();
00224       photonet[ipho] = i->et();
00225       photone[ipho] = i->energy();
00226       ipho++;
00227     }
00228   } else {
00229     nphoton = 0;
00230   }
00231 
00233 
00234   theHLTPhotons.clear();
00235   MakeL1IsolatedPhotons(
00236       recoIsolecalcands,
00237       EcalIsolMap,
00238       HcalIsolMap,
00239       TrackIsolMap);
00240   MakeL1NonIsolatedPhotons(
00241       recoNonIsolecalcands,
00242       EcalNonIsolMap,
00243       HcalNonIsolMap,
00244       TrackNonIsolMap);
00245   std::sort(theHLTPhotons.begin(), theHLTPhotons.end(), EtGreater());
00246   nhltgam = theHLTPhotons.size();
00247   for (int u = 0; u < nhltgam; u++) {
00248     hphotet[u]    = theHLTPhotons[u].Et;
00249     hphoteta[u]   = theHLTPhotons[u].eta;
00250     hphotphi[u]   = theHLTPhotons[u].phi;
00251     hphoteiso[u]  = theHLTPhotons[u].ecalIsol;
00252     hphothiso[u]  = theHLTPhotons[u].hcalIsol;
00253     hphottiso[u]  = theHLTPhotons[u].trackIsol;
00254     hphotl1iso[u] = theHLTPhotons[u].L1Isolated;
00255   }
00256 
00257   theHLTElectrons.clear();
00258   MakeL1IsolatedElectrons(
00259       electronIsoHandle,
00260       recoIsolecalcands,
00261       HcalEleIsolMap,
00262       L1IsoPixelSeedsMap,
00263       TrackEleIsolMap);
00264   MakeL1NonIsolatedElectrons(
00265       electronNonIsoHandle,
00266       recoNonIsolecalcands,
00267       HcalEleNonIsolMap,
00268       L1NonIsoPixelSeedsMap,
00269       NonIsoTrackEleIsolMap);
00270   std::sort(theHLTElectrons.begin(), theHLTElectrons.end(), EtGreater());
00271   nhltele = theHLTElectrons.size();
00272   for (int u = 0; u < nhltele; u++) {
00273     heleet[u]         = theHLTElectrons[u].Et;
00274     heleeta[u]        = theHLTElectrons[u].eta;
00275     helephi[u]        = theHLTElectrons[u].phi;
00276     heleE[u]          = theHLTElectrons[u].E;
00277     helep[u]          = theHLTElectrons[u].p;
00278     helehiso[u]       = theHLTElectrons[u].hcalIsol;
00279     helePixelSeeds[u] = theHLTElectrons[u].pixelSeeds;
00280     heletiso[u]       = theHLTElectrons[u].trackIsol;
00281     helel1iso[u]      = theHLTElectrons[u].L1Isolated;
00282     heleNewSC[u]      = theHLTElectrons[u].newSC;
00283   }
00284 
00285   theHLTElectronsLargeWindows.clear();
00286   MakeL1IsolatedElectronsLargeWindows(
00287       electronIsoHandleLW,
00288       recoIsolecalcands,
00289       HcalEleIsolMap,
00290       L1IsoPixelSeedsMapLW,
00291       TrackEleIsolMapLW);
00292   MakeL1NonIsolatedElectronsLargeWindows(
00293       electronNonIsoHandleLW,
00294       recoNonIsolecalcands,
00295       HcalEleNonIsolMap,
00296       L1NonIsoPixelSeedsMapLW,
00297       NonIsoTrackEleIsolMapLW);
00298   std::sort(theHLTElectronsLargeWindows.begin(), theHLTElectronsLargeWindows.end(), EtGreater());
00299   nhlteleLW = theHLTElectronsLargeWindows.size();
00300   for (int u = 0; u < nhltele; u++) {
00301     heleetLW[u]         = theHLTElectronsLargeWindows[u].Et;
00302     heleetaLW[u]        = theHLTElectronsLargeWindows[u].eta;
00303     helephiLW[u]        = theHLTElectronsLargeWindows[u].phi;
00304     heleELW[u]          = theHLTElectronsLargeWindows[u].E;
00305     helepLW[u]          = theHLTElectronsLargeWindows[u].p;
00306     helehisoLW[u]       = theHLTElectronsLargeWindows[u].hcalIsol;
00307     helePixelSeedsLW[u] = theHLTElectronsLargeWindows[u].pixelSeeds;
00308     heletisoLW[u]       = theHLTElectronsLargeWindows[u].trackIsol;
00309     helel1isoLW[u]      = theHLTElectronsLargeWindows[u].L1Isolated;
00310     heleNewSCLW[u]      = theHLTElectronsLargeWindows[u].newSC;
00311   }
00312 }

void HLTEgamma::clear ( void   ) 

Definition at line 117 of file HLTEgamma.cc.

References ele, elet, eleta, elphi, elpt, heleE, heleELW, heleet, heleeta, heleetaLW, heleetLW, helehiso, helehisoLW, helel1iso, helel1isoLW, heleNewSC, heleNewSCLW, helep, helephi, helephiLW, helePixelSeeds, helePixelSeedsLW, helepLW, heletiso, heletisoLW, hphoteiso, hphotet, hphoteta, hphothiso, hphotl1iso, hphotphi, hphottiso, kMaxEl, kMaxhEle, kMaxhEleLW, kMaxhPhot, kMaxPhot, nele, nhltele, nhlteleLW, nhltgam, nphoton, photone, photonet, photoneta, photonphi, photonpt, theHLTElectrons, theHLTElectronsLargeWindows, and theHLTPhotons.

Referenced by analyze().

00118 {
00119   std::memset(elpt,             '\0', kMaxEl     * sizeof(float));
00120   std::memset(elphi,            '\0', kMaxEl     * sizeof(float));
00121   std::memset(eleta,            '\0', kMaxEl     * sizeof(float));
00122   std::memset(elet,             '\0', kMaxEl     * sizeof(float));
00123   std::memset(ele,              '\0', kMaxEl     * sizeof(float));
00124   std::memset(photonpt,         '\0', kMaxPhot   * sizeof(float));
00125   std::memset(photonphi,        '\0', kMaxPhot   * sizeof(float));
00126   std::memset(photoneta,        '\0', kMaxPhot   * sizeof(float));
00127   std::memset(photonet,         '\0', kMaxPhot   * sizeof(float));
00128   std::memset(photone,          '\0', kMaxPhot   * sizeof(float));
00129   std::memset(hphotet,          '\0', kMaxhPhot  * sizeof(float));
00130   std::memset(hphoteta,         '\0', kMaxhPhot  * sizeof(float));
00131   std::memset(hphotphi,         '\0', kMaxhPhot  * sizeof(float));
00132   std::memset(hphoteiso,        '\0', kMaxhPhot  * sizeof(float));
00133   std::memset(hphothiso,        '\0', kMaxhPhot  * sizeof(float));
00134   std::memset(hphottiso,        '\0', kMaxhPhot  * sizeof(float));
00135   std::memset(hphotl1iso,       '\0', kMaxhPhot  * sizeof(int));
00136   std::memset(heleet,           '\0', kMaxhEle   * sizeof(float));
00137   std::memset(heleeta,          '\0', kMaxhEle   * sizeof(float));
00138   std::memset(helephi,          '\0', kMaxhEle   * sizeof(float));
00139   std::memset(heleE,            '\0', kMaxhEle   * sizeof(float));
00140   std::memset(helep,            '\0', kMaxhEle   * sizeof(float));
00141   std::memset(helehiso,         '\0', kMaxhEle   * sizeof(float));
00142   std::memset(heletiso,         '\0', kMaxhEle   * sizeof(float));
00143   std::memset(helel1iso,        '\0', kMaxhEle   * sizeof(int));
00144   std::memset(helePixelSeeds,   '\0', kMaxhEle   * sizeof(int));
00145   std::memset(heleNewSC,        '\0', kMaxhEle   * sizeof(int));
00146   std::memset(heleetLW,         '\0', kMaxhEleLW * sizeof(float));
00147   std::memset(heleetaLW,        '\0', kMaxhEleLW * sizeof(float));
00148   std::memset(helephiLW,        '\0', kMaxhEleLW * sizeof(float));
00149   std::memset(heleELW,          '\0', kMaxhEleLW * sizeof(float));
00150   std::memset(helepLW,          '\0', kMaxhEleLW * sizeof(float));
00151   std::memset(helehisoLW,       '\0', kMaxhEleLW * sizeof(float));
00152   std::memset(heletisoLW,       '\0', kMaxhEleLW * sizeof(float));
00153   std::memset(helel1isoLW,      '\0', kMaxhEleLW * sizeof(int));
00154   std::memset(helePixelSeedsLW, '\0', kMaxhEleLW * sizeof(int));
00155   std::memset(heleNewSCLW,      '\0', kMaxhEleLW * sizeof(int));
00156 
00157   nele      = 0;
00158   nphoton   = 0;
00159   nhltgam   = 0;
00160   nhltele   = 0;
00161   nhlteleLW = 0;
00162 
00163   theHLTPhotons.clear();
00164   theHLTElectrons.clear();
00165   theHLTElectronsLargeWindows.clear();
00166 }

void HLTEgamma::MakeL1IsolatedElectrons ( const edm::Handle< reco::ElectronCollection > &  electronIsoHandle,
const edm::Handle< reco::RecoEcalCandidateCollection > &  recoIsolecalcands,
const edm::Handle< reco::RecoEcalCandidateIsolationMap > &  HcalEleIsolMap,
const edm::Handle< reco::ElectronPixelSeedCollection > &  L1IsoPixelSeedsMap,
const edm::Handle< reco::ElectronIsolationMap > &  TrackEleIsolMap 
) [private]

Definition at line 408 of file HLTEgamma.cc.

References HLTEgamma::myHLTElectron::E, ele, HLTEgamma::myHLTElectron::Et, HLTEgamma::myHLTElectron::eta, HLTEgamma::myHLTElectron::hcalIsol, edm::Handle< T >::isValid(), it, HLTEgamma::myHLTElectron::L1Isolated, HLTEgamma::myHLTElectron::newSC, HLTEgamma::myHLTElectron::p, HLTEgamma::myHLTElectron::phi, HLTEgamma::myHLTElectron::pixelSeeds, theHLTElectrons, and HLTEgamma::myHLTElectron::trackIsol.

Referenced by analyze().

00414 {
00415   // if there are electrons, then the isolation maps and the SC should be in the event; if not it is an error
00416 
00417   if (recoIsolecalcands.isValid()) {
00418     for (reco::RecoEcalCandidateCollection::const_iterator recoecalcand = recoIsolecalcands->begin();
00419          recoecalcand!= recoIsolecalcands->end(); recoecalcand++) {
00420       // get the ref to the SC:
00421       reco::RecoEcalCandidateRef ref = reco::RecoEcalCandidateRef(recoIsolecalcands, distance(recoIsolecalcands->begin(), recoecalcand));
00422       reco::SuperClusterRef recrSC = ref->superCluster();
00423       //reco::SuperClusterRef recrSC = recoecalcand->superCluster();
00424 
00425       myHLTElectron ele;
00426       ele.hcalIsol   = -999;
00427       ele.trackIsol  = -999;
00428       ele.L1Isolated = true;
00429       ele.p          = -999;
00430       ele.pixelSeeds = -999;
00431       ele.newSC      = true;
00432       ele.Et         = recoecalcand->et();
00433       ele.eta        = recoecalcand->eta();
00434       ele.phi        = recoecalcand->phi();
00435       ele.E          = recrSC->energy();
00436 
00437       // fill the hcal Isolation
00438       if (HcalEleIsolMap.isValid()) {
00439         //reco::RecoEcalCandidateIsolationMap::const_iterator mapi = (*HcalEleIsolMap).find( reco::RecoEcalCandidateRef(recoIsolecalcands, distance(recoIsolecalcands->begin(), recoecalcand)) );
00440         reco::RecoEcalCandidateIsolationMap::const_iterator mapi = (*HcalEleIsolMap).find( ref );
00441         if (mapi !=(*HcalEleIsolMap).end()) { ele.hcalIsol = mapi->val; }
00442       }
00443       // look if the SC has associated pixelSeeds
00444       int nmatch = 0;
00445 
00446       if (L1IsoPixelSeedsMap.isValid()) {
00447         for (reco::ElectronPixelSeedCollection::const_iterator it = L1IsoPixelSeedsMap->begin();
00448              it != L1IsoPixelSeedsMap->end(); it++) {
00449           const reco::SuperClusterRef & scRef = it->superCluster();
00450           if (&(*recrSC) ==  &(*scRef)) { nmatch++; }
00451         }
00452       }
00453 
00454       ele.pixelSeeds = nmatch;
00455 
00456       // look if the SC was promoted to an electron:
00457       if (electronIsoHandle.isValid()) {
00458         bool FirstElectron = true;
00459         reco::ElectronRef electronref;
00460         for (reco::ElectronCollection::const_iterator iElectron = electronIsoHandle->begin();
00461              iElectron != electronIsoHandle->end(); iElectron++) {
00462           // 1) find the SC from the electron
00463           electronref = reco::ElectronRef(electronIsoHandle, iElectron - electronIsoHandle->begin());
00464           const reco::SuperClusterRef theClus = electronref->superCluster(); // SC from the electron;
00465           if (&(*recrSC) ==  &(*theClus)) {     // ref is the RecoEcalCandidateRef corresponding to the electron
00466             if (FirstElectron) {                // the first electron is stored in ele, keeping the ele.newSC = true
00467               FirstElectron = false;
00468               ele.p = electronref->track()->momentum().R();
00469               // fill the track Isolation
00470               if (TrackEleIsolMap.isValid()) {
00471                 reco::ElectronIsolationMap::const_iterator mapTr = (*TrackEleIsolMap).find(electronref);
00472                 if (mapTr != (*TrackEleIsolMap).end()) { ele.trackIsol = mapTr->val; }
00473               }
00474             }
00475             else {
00476               // FirstElectron is false, i.e. the SC of this electron is common to another electron.
00477               // A new  myHLTElectron is inserted in the theHLTElectrons vector setting newSC = false
00478               myHLTElectron ele2;
00479               ele2.hcalIsol  = ele.hcalIsol;
00480               ele2.trackIsol = -999;
00481               ele2.Et  = ele.Et;
00482               ele2.eta = ele.eta;
00483               ele2.phi = ele.phi;
00484               ele2.E   = ele.E;
00485               ele2.L1Isolated = ele.L1Isolated;
00486               ele2.pixelSeeds = ele.pixelSeeds;
00487               ele2.newSC = false;
00488               ele2.p = electronref->track()->momentum().R();
00489               // fill the track Isolation
00490               if (TrackEleIsolMap.isValid()) {
00491                 reco::ElectronIsolationMap::const_iterator mapTr = (*TrackEleIsolMap).find( electronref);
00492                 if (mapTr !=(*TrackEleIsolMap).end()) { ele2.trackIsol = mapTr->val;}
00493               }
00494               theHLTElectrons.push_back(ele2);
00495             }
00496           }
00497         } // end of loop over electrons
00498       } // end of if (electronIsoHandle) {
00499 
00500       //store the electron into the vector
00501       theHLTElectrons.push_back(ele);
00502     } // end of loop over ecalCandidates
00503   } // end of if (recoIsolecalcands) {
00504 }

void HLTEgamma::MakeL1IsolatedElectronsLargeWindows ( const edm::Handle< reco::ElectronCollection > &  electronIsoHandle,
const edm::Handle< reco::RecoEcalCandidateCollection > &  recoIsolecalcands,
const edm::Handle< reco::RecoEcalCandidateIsolationMap > &  HcalEleIsolMap,
const edm::Handle< reco::ElectronPixelSeedCollection > &  L1IsoPixelSeedsMap,
const edm::Handle< reco::ElectronIsolationMap > &  TrackEleIsolMap 
) [private]

Definition at line 604 of file HLTEgamma.cc.

References HLTEgamma::myHLTElectron::E, ele, HLTEgamma::myHLTElectron::Et, HLTEgamma::myHLTElectron::eta, HLTEgamma::myHLTElectron::hcalIsol, edm::Handle< T >::isValid(), it, HLTEgamma::myHLTElectron::L1Isolated, HLTEgamma::myHLTElectron::newSC, HLTEgamma::myHLTElectron::p, HLTEgamma::myHLTElectron::phi, HLTEgamma::myHLTElectron::pixelSeeds, theHLTElectronsLargeWindows, and HLTEgamma::myHLTElectron::trackIsol.

Referenced by analyze().

00610 {
00611   // if there are electrons, then the isolation maps and the SC should be in the event; if not it is an error
00612 
00613   if (recoIsolecalcands.isValid()) {
00614     for (reco::RecoEcalCandidateCollection::const_iterator recoecalcand = recoIsolecalcands->begin();
00615          recoecalcand!= recoIsolecalcands->end(); recoecalcand++) {
00616       // get the ref to the SC:
00617       reco::RecoEcalCandidateRef ref = reco::RecoEcalCandidateRef(recoIsolecalcands, distance(recoIsolecalcands->begin(), recoecalcand));
00618       reco::SuperClusterRef recrSC = ref->superCluster();
00619       //reco::SuperClusterRef recrSC = recoecalcand->superCluster();
00620 
00621       myHLTElectron ele;
00622       ele.hcalIsol   = -999;
00623       ele.trackIsol  = -999;
00624       ele.L1Isolated = true;
00625       ele.p          = -999;
00626       ele.pixelSeeds = -999;
00627       ele.newSC      = true;
00628       ele.Et         = recoecalcand->et();
00629       ele.eta        = recoecalcand->eta();
00630       ele.phi        = recoecalcand->phi();
00631       ele.E          = recrSC->energy();
00632 
00633       // fill the hcal Isolation
00634       if (HcalEleIsolMap.isValid()) {
00635         //reco::RecoEcalCandidateIsolationMap::const_iterator mapi = (*HcalEleIsolMap).find( reco::RecoEcalCandidateRef(recoIsolecalcands, distance(recoIsolecalcands->begin(), recoecalcand)) );
00636         reco::RecoEcalCandidateIsolationMap::const_iterator mapi = (*HcalEleIsolMap).find( ref );
00637         if (mapi !=(*HcalEleIsolMap).end()) {ele.hcalIsol = mapi->val;}
00638       }
00639       // look if the SC has associated pixelSeeds
00640       int nmatch = 0;
00641 
00642       if (L1IsoPixelSeedsMap.isValid()) {
00643         for(reco::ElectronPixelSeedCollection::const_iterator it = L1IsoPixelSeedsMap->begin();
00644             it != L1IsoPixelSeedsMap->end(); it++) {
00645           const reco::SuperClusterRef & scRef = it->superCluster();
00646           if (&(*recrSC) == &(*scRef)) { nmatch++;}
00647         }
00648       }
00649 
00650       ele.pixelSeeds = nmatch;
00651 
00652       // look if the SC was promoted to an electron:
00653       if (electronIsoHandle.isValid()) {
00654         bool FirstElectron = true;
00655         reco::ElectronRef electronref;
00656         for(reco::ElectronCollection::const_iterator iElectron = electronIsoHandle->begin(); iElectron !=
00657               electronIsoHandle->end();iElectron++) {
00658           // 1) find the SC from the electron
00659           electronref = reco::ElectronRef(electronIsoHandle, iElectron - electronIsoHandle->begin());
00660           const reco::SuperClusterRef theClus = electronref->superCluster(); //SC from the electron;
00661           if (&(*recrSC) == &(*theClus)) { // ref is the RecoEcalCandidateRef corresponding to the electron
00662             if (FirstElectron) { //the first electron is stored in ele, keeping the ele.newSC = true
00663               FirstElectron = false;
00664               ele.p = electronref->track()->momentum().R();
00665               // fill the track Isolation
00666               if (TrackEleIsolMap.isValid()) {
00667                 reco::ElectronIsolationMap::const_iterator mapTr = (*TrackEleIsolMap).find( electronref);
00668                 if (mapTr !=(*TrackEleIsolMap).end()) { ele.trackIsol = mapTr->val;}
00669               }
00670             }
00671             else {
00672               // FirstElectron is false, i.e. the SC of this electron is common to another electron.
00673               // A new  myHLTElectron is inserted in the theHLTElectrons vector setting newSC = false
00674               myHLTElectron ele2;
00675               ele2.hcalIsol   = ele.hcalIsol;
00676               ele2.trackIsol  = -999;
00677               ele2.Et         = ele.Et;
00678               ele2.eta        = ele.eta;
00679               ele2.phi        = ele.phi;
00680               ele2.E          = ele.E;
00681               ele2.L1Isolated = ele.L1Isolated;
00682               ele2.pixelSeeds = ele.pixelSeeds;
00683               ele2.newSC      = false;
00684               ele2.p          = electronref->track()->momentum().R();
00685               // fill the track Isolation
00686               if (TrackEleIsolMap.isValid()) {
00687                 reco::ElectronIsolationMap::const_iterator mapTr = (*TrackEleIsolMap).find( electronref);
00688                 if (mapTr !=(*TrackEleIsolMap).end()) { ele2.trackIsol = mapTr->val;}
00689               }
00690               theHLTElectronsLargeWindows.push_back(ele2);
00691             }
00692           }
00693         } // end of loop over electrons
00694       } // end of if (electronIsoHandle) {
00695 
00696       // store the electron into the vector
00697       theHLTElectronsLargeWindows.push_back(ele);
00698     } // end of loop over ecalCandidates
00699   } // end of if (recoIsolecalcands) {
00700 }

void HLTEgamma::MakeL1IsolatedPhotons ( const edm::Handle< reco::RecoEcalCandidateCollection > &  recoIsolecalcands,
const edm::Handle< reco::RecoEcalCandidateIsolationMap > &  EcalIsolMap,
const edm::Handle< reco::RecoEcalCandidateIsolationMap > &  HcalIsolMap,
const edm::Handle< reco::RecoEcalCandidateIsolationMap > &  TrackIsolMap 
) [private]

Definition at line 314 of file HLTEgamma.cc.

References HLTEgamma::myHLTPhoton::ecalIsol, HLTEgamma::myHLTPhoton::Et, HLTEgamma::myHLTPhoton::eta, HLTEgamma::myHLTPhoton::hcalIsol, edm::Handle< T >::isValid(), HLTEgamma::myHLTPhoton::L1Isolated, HLTEgamma::myHLTPhoton::phi, theHLTPhotons, and HLTEgamma::myHLTPhoton::trackIsol.

Referenced by analyze().

00319 {
00320   // Iterator to the isolation-map
00321   reco::RecoEcalCandidateIsolationMap::const_iterator mapi;
00322 
00323   if (recoIsolecalcands.isValid()) {
00324     // loop over SuperCluster and fill the HLTPhotons
00325     for (reco::RecoEcalCandidateCollection::const_iterator recoecalcand = recoIsolecalcands->begin();
00326          recoecalcand!= recoIsolecalcands->end(); recoecalcand++) {
00327 
00328       myHLTPhoton pho;
00329       pho.ecalIsol   = -999;
00330       pho.hcalIsol   = -999;
00331       pho.trackIsol  = -999;
00332       pho.L1Isolated = true;
00333       pho.Et         = recoecalcand->et();
00334       pho.eta        = recoecalcand->eta();
00335       pho.phi        = recoecalcand->phi();
00336 
00337       // Method to get the reference to the candidate
00338       reco::RecoEcalCandidateRef ref = reco::RecoEcalCandidateRef(recoIsolecalcands, distance(recoIsolecalcands->begin(), recoecalcand));
00339 
00340       // First/Second member of the Map: Ref-to-Candidate(mapi)/Isolation(->val)
00341       // fill the ecal Isolation
00342       if (EcalIsolMap.isValid()) {
00343         mapi = (*EcalIsolMap).find(ref);
00344         if (mapi !=(*EcalIsolMap).end()) { pho.ecalIsol = mapi->val;}
00345       }
00346       // fill the hcal Isolation
00347       if (HcalIsolMap.isValid()) {
00348         mapi = (*HcalIsolMap).find(ref);
00349         if (mapi !=(*HcalIsolMap).end()) { pho.hcalIsol = mapi->val;}
00350       }
00351       // fill the track Isolation
00352       if (TrackIsolMap.isValid()) {
00353         mapi = (*TrackIsolMap).find(ref);
00354         if (mapi !=(*TrackIsolMap).end()) { pho.trackIsol = mapi->val;}
00355       }
00356 
00357       // store the photon into the vector
00358       theHLTPhotons.push_back(pho);
00359     }
00360   }
00361 }

void HLTEgamma::MakeL1NonIsolatedElectrons ( const edm::Handle< reco::ElectronCollection > &  electronNonIsoHandle,
const edm::Handle< reco::RecoEcalCandidateCollection > &  recoNonIsolecalcands,
const edm::Handle< reco::RecoEcalCandidateIsolationMap > &  HcalEleIsolMap,
const edm::Handle< reco::ElectronPixelSeedCollection > &  L1NonIsoPixelSeedsMap,
const edm::Handle< reco::ElectronIsolationMap > &  TrackEleIsolMap 
) [private]

Definition at line 507 of file HLTEgamma.cc.

References HLTEgamma::myHLTElectron::E, ele, HLTEgamma::myHLTElectron::Et, HLTEgamma::myHLTElectron::eta, HLTEgamma::myHLTElectron::hcalIsol, edm::Handle< T >::isValid(), it, HLTEgamma::myHLTElectron::L1Isolated, HLTEgamma::myHLTElectron::newSC, HLTEgamma::myHLTElectron::p, HLTEgamma::myHLTElectron::phi, HLTEgamma::myHLTElectron::pixelSeeds, theHLTElectrons, and HLTEgamma::myHLTElectron::trackIsol.

Referenced by analyze().

00513 {
00514   // if there are electrons, then the isolation maps and the SC should be in the event; if not it is an error
00515 
00516   if (recoNonIsolecalcands.isValid()) {
00517     for(reco::RecoEcalCandidateCollection::const_iterator recoecalcand = recoNonIsolecalcands->begin();
00518                                         recoecalcand!= recoNonIsolecalcands->end(); recoecalcand++) {
00519       //get the ref to the SC:
00520       reco::RecoEcalCandidateRef ref = reco::RecoEcalCandidateRef(recoNonIsolecalcands, distance(recoNonIsolecalcands->begin(), recoecalcand));
00521       reco::SuperClusterRef recrSC = ref->superCluster();
00522       //reco::SuperClusterRef recrSC = recoecalcand->superCluster();
00523 
00524       myHLTElectron ele;
00525       ele.hcalIsol   = -999;
00526       ele.trackIsol  = -999;
00527       ele.L1Isolated = false;
00528       ele.p          = -999;
00529       ele.pixelSeeds = -999;
00530       ele.newSC      = true;
00531       ele.Et         = recoecalcand->et();
00532       ele.eta        = recoecalcand->eta();
00533       ele.phi        = recoecalcand->phi();
00534       ele.E          = recrSC->energy();
00535 
00536       // fill the hcal Isolation
00537       if (HcalEleIsolMap.isValid()) {
00538         // reco::RecoEcalCandidateIsolationMap::const_iterator mapi = (*HcalEleIsolMap).find( reco::RecoEcalCandidateRef(recoNonIsolecalcands, distance(recoNonIsolecalcands->begin(), recoecalcand)) );
00539         reco::RecoEcalCandidateIsolationMap::const_iterator mapi = (*HcalEleIsolMap).find( ref );
00540         if (mapi !=(*HcalEleIsolMap).end()) {ele.hcalIsol = mapi->val;}
00541       }
00542       // look if the SC has associated pixelSeeds
00543       int nmatch = 0;
00544 
00545       if (L1NonIsoPixelSeedsMap.isValid()) {
00546         for (reco::ElectronPixelSeedCollection::const_iterator it = L1NonIsoPixelSeedsMap->begin();
00547              it != L1NonIsoPixelSeedsMap->end(); it++) {
00548           const reco::SuperClusterRef & scRef = it->superCluster();
00549           if (&(*recrSC) == &(*scRef)) { nmatch++;}
00550         }
00551       }
00552 
00553       ele.pixelSeeds = nmatch;
00554 
00555       // look if the SC was promoted to an electron:
00556       if (electronNonIsoHandle.isValid()) {
00557         bool FirstElectron = true;
00558         reco::ElectronRef electronref;
00559         for(reco::ElectronCollection::const_iterator iElectron = electronNonIsoHandle->begin(); iElectron !=
00560               electronNonIsoHandle->end();iElectron++) {
00561           // 1) find the SC from the electron
00562           electronref = reco::ElectronRef(electronNonIsoHandle, iElectron - electronNonIsoHandle->begin());
00563           const reco::SuperClusterRef theClus = electronref->superCluster(); //SC from the electron;
00564           if (&(*recrSC) ==  &(*theClus)) { // ref is the RecoEcalCandidateRef corresponding to the electron
00565             if (FirstElectron) { //the first electron is stored in ele, keeping the ele.newSC = true
00566               FirstElectron = false;
00567               ele.p = electronref->track()->momentum().R();
00568               // fill the track Isolation
00569               if (TrackEleIsolMap.isValid()) {
00570                 reco::ElectronIsolationMap::const_iterator mapTr = (*TrackEleIsolMap).find( electronref);
00571                 if (mapTr !=(*TrackEleIsolMap).end()) { ele.trackIsol = mapTr->val;}
00572               }
00573             } else {
00574               // FirstElectron is false, i.e. the SC of this electron is common to another electron.
00575               // A new myHLTElectron is inserted in the theHLTElectrons vector setting newSC = false
00576               myHLTElectron ele2;
00577               ele2.hcalIsol   = ele.hcalIsol;
00578               ele2.trackIsol  =-999;
00579               ele2.Et         = ele.Et;
00580               ele2.eta        = ele.eta;
00581               ele2.phi        = ele.phi;
00582               ele2.E          = ele.E;
00583               ele2.L1Isolated = ele.L1Isolated;
00584               ele2.pixelSeeds = ele.pixelSeeds;
00585               ele2.newSC      = false;
00586               ele2.p          = electronref->track()->momentum().R();
00587               // fill the track Isolation
00588               if (TrackEleIsolMap.isValid()) {
00589                 reco::ElectronIsolationMap::const_iterator mapTr = (*TrackEleIsolMap).find( electronref);
00590                 if (mapTr !=(*TrackEleIsolMap).end()) { ele2.trackIsol = mapTr->val;}
00591               }
00592               theHLTElectrons.push_back(ele2);
00593             }
00594           }
00595         } // end of loop over electrons
00596       } // end of if (electronNonIsoHandle) {
00597 
00598       // store the electron into the vector
00599       theHLTElectrons.push_back(ele);
00600     } // end of loop over ecalCandidates
00601   } // end of if (recoNonIsolecalcands) {
00602 }

void HLTEgamma::MakeL1NonIsolatedElectronsLargeWindows ( const edm::Handle< reco::ElectronCollection > &  electronNonIsoHandle,
const edm::Handle< reco::RecoEcalCandidateCollection > &  recoNonIsolecalcands,
const edm::Handle< reco::RecoEcalCandidateIsolationMap > &  HcalEleIsolMap,
const edm::Handle< reco::ElectronPixelSeedCollection > &  L1NonIsoPixelSeedsMap,
const edm::Handle< reco::ElectronIsolationMap > &  TrackEleIsolMap 
) [private]

Definition at line 703 of file HLTEgamma.cc.

References HLTEgamma::myHLTElectron::E, ele, HLTEgamma::myHLTElectron::Et, HLTEgamma::myHLTElectron::eta, HLTEgamma::myHLTElectron::hcalIsol, edm::Handle< T >::isValid(), it, HLTEgamma::myHLTElectron::L1Isolated, HLTEgamma::myHLTElectron::newSC, HLTEgamma::myHLTElectron::p, HLTEgamma::myHLTElectron::phi, HLTEgamma::myHLTElectron::pixelSeeds, theHLTElectronsLargeWindows, and HLTEgamma::myHLTElectron::trackIsol.

Referenced by analyze().

00709 {
00710   // if there are electrons, then the isolation maps and the SC should be in the event; if not it is an error
00711 
00712   if (recoNonIsolecalcands.isValid()) {
00713     for (reco::RecoEcalCandidateCollection::const_iterator recoecalcand = recoNonIsolecalcands->begin();
00714          recoecalcand!= recoNonIsolecalcands->end(); recoecalcand++) {
00715       //get the ref to the SC:
00716       reco::RecoEcalCandidateRef ref = reco::RecoEcalCandidateRef(recoNonIsolecalcands, distance(recoNonIsolecalcands->begin(), recoecalcand));
00717       reco::SuperClusterRef recrSC = ref->superCluster();
00718       //reco::SuperClusterRef recrSC = recoecalcand->superCluster();
00719 
00720       myHLTElectron ele;
00721       ele.hcalIsol   = -999;
00722       ele.trackIsol  = -999;
00723       ele.L1Isolated = false;
00724       ele.p          = -999;
00725       ele.pixelSeeds = -999;
00726       ele.newSC      = true;
00727       ele.Et         = recoecalcand->et();
00728       ele.eta        = recoecalcand->eta();
00729       ele.phi        = recoecalcand->phi();
00730       ele.E          = recrSC->energy();
00731 
00732       // fill the hcal Isolation
00733       if (HcalEleIsolMap.isValid()) {
00734         //reco::RecoEcalCandidateIsolationMap::const_iterator mapi = (*HcalEleIsolMap).find( reco::RecoEcalCandidateRef(recoNonIsolecalcands, distance(recoNonIsolecalcands->begin(), recoecalcand)) );
00735         reco::RecoEcalCandidateIsolationMap::const_iterator mapi = (*HcalEleIsolMap).find( ref );
00736         if (mapi !=(*HcalEleIsolMap).end()) {ele.hcalIsol = mapi->val;}
00737       }
00738       // look if the SC has associated pixelSeeds
00739       int nmatch = 0;
00740 
00741       if (L1NonIsoPixelSeedsMap.isValid()) {
00742         for (reco::ElectronPixelSeedCollection::const_iterator it = L1NonIsoPixelSeedsMap->begin();
00743              it != L1NonIsoPixelSeedsMap->end(); it++) {
00744           const reco::SuperClusterRef & scRef = it->superCluster();
00745           if (&(*recrSC) ==  &(*scRef)) { nmatch++;}
00746         }
00747       }
00748 
00749       ele.pixelSeeds = nmatch;
00750 
00751       // look if the SC was promoted to an electron:
00752       if (electronNonIsoHandle.isValid()) {
00753         bool FirstElectron = true;
00754         reco::ElectronRef electronref;
00755         for (reco::ElectronCollection::const_iterator iElectron = electronNonIsoHandle->begin();
00756              iElectron != electronNonIsoHandle->end(); iElectron++) {
00757           // 1) find the SC from the electron
00758           electronref = reco::ElectronRef(electronNonIsoHandle, iElectron - electronNonIsoHandle->begin());
00759           const reco::SuperClusterRef theClus = electronref->superCluster(); //SC from the electron;
00760           if (&(*recrSC) ==  &(*theClus)) { // ref is the RecoEcalCandidateRef corresponding to the electron
00761             if (FirstElectron) { // the first electron is stored in ele, keeping the ele.newSC = true
00762               FirstElectron = false;
00763               ele.p = electronref->track()->momentum().R();
00764               // fill the track Isolation
00765               if (TrackEleIsolMap.isValid()) {
00766                 reco::ElectronIsolationMap::const_iterator mapTr = (*TrackEleIsolMap).find( electronref);
00767                 if (mapTr !=(*TrackEleIsolMap).end()) { ele.trackIsol = mapTr->val;}
00768               }
00769             } else {
00770               // FirstElectron is false, i.e. the SC of this electron is common to another electron.
00771               // A new myHLTElectron is inserted in the theHLTElectrons vector setting newSC = false
00772               myHLTElectron ele2;
00773               ele2.hcalIsol   = ele.hcalIsol;
00774               ele2.trackIsol  = -999;
00775               ele2.Et         = ele.Et;
00776               ele2.eta        = ele.eta;
00777               ele2.phi        = ele.phi;
00778               ele2.E          = ele.E;
00779               ele2.L1Isolated = ele.L1Isolated;
00780               ele2.pixelSeeds = ele.pixelSeeds;
00781               ele2.newSC      = false;
00782               ele2.p          = electronref->track()->momentum().R();
00783               // fill the track Isolation
00784               if (TrackEleIsolMap.isValid()) {
00785                 reco::ElectronIsolationMap::const_iterator mapTr = (*TrackEleIsolMap).find( electronref);
00786                 if (mapTr !=(*TrackEleIsolMap).end()) { ele2.trackIsol = mapTr->val;}
00787               }
00788               theHLTElectronsLargeWindows.push_back(ele2);
00789             }
00790           }
00791         } // end of loop over electrons
00792       } // end of if (electronNonIsoHandle) {
00793 
00794       // store the electron into the vector
00795       theHLTElectronsLargeWindows.push_back(ele);
00796     } // end of loop over ecalCandidates
00797   } // end of if (recoNonIsolecalcands) {
00798 }

void HLTEgamma::MakeL1NonIsolatedPhotons ( const edm::Handle< reco::RecoEcalCandidateCollection > &  recoNonIsolecalcands,
const edm::Handle< reco::RecoEcalCandidateIsolationMap > &  EcalNonIsolMap,
const edm::Handle< reco::RecoEcalCandidateIsolationMap > &  HcalNonIsolMap,
const edm::Handle< reco::RecoEcalCandidateIsolationMap > &  TrackNonIsolMap 
) [private]

Definition at line 363 of file HLTEgamma.cc.

References HLTEgamma::myHLTPhoton::ecalIsol, HLTEgamma::myHLTPhoton::Et, HLTEgamma::myHLTPhoton::eta, HLTEgamma::myHLTPhoton::hcalIsol, edm::Handle< T >::isValid(), HLTEgamma::myHLTPhoton::L1Isolated, HLTEgamma::myHLTPhoton::phi, theHLTPhotons, and HLTEgamma::myHLTPhoton::trackIsol.

Referenced by analyze().

00368 {
00369   reco::RecoEcalCandidateIsolationMap::const_iterator mapi;
00370 
00371   if (recoNonIsolecalcands.isValid()) {
00372     for (reco::RecoEcalCandidateCollection::const_iterator recoecalcand = recoNonIsolecalcands->begin();
00373          recoecalcand!= recoNonIsolecalcands->end(); recoecalcand++) {
00374       // loop over SuperCluster and fill the HLTPhotons
00375       myHLTPhoton pho;
00376       pho.ecalIsol   = -999;
00377       pho.hcalIsol   = -999;
00378       pho.trackIsol  = -999;
00379       pho.L1Isolated = false;
00380       pho.Et         = recoecalcand->et();
00381       pho.eta        = recoecalcand->eta();
00382       pho.phi        = recoecalcand->phi();
00383 
00384       reco::RecoEcalCandidateRef ref = reco::RecoEcalCandidateRef(recoNonIsolecalcands, distance(recoNonIsolecalcands->begin(), recoecalcand));
00385 
00386       // fill the ecal Isolation
00387       if (EcalNonIsolMap.isValid()) {
00388         mapi = (*EcalNonIsolMap).find(ref);
00389         if (mapi !=(*EcalNonIsolMap).end()) { pho.ecalIsol = mapi->val;}
00390       }
00391       // fill the hcal Isolation
00392       if (HcalNonIsolMap.isValid()) {
00393         mapi = (*HcalNonIsolMap).find(ref);
00394         if (mapi !=(*HcalNonIsolMap).end()) { pho.hcalIsol = mapi->val;}
00395       }
00396       // fill the track Isolation
00397       if (TrackNonIsolMap.isValid()) {
00398         mapi = (*TrackNonIsolMap).find(ref);
00399         if (mapi !=(*TrackNonIsolMap).end()) { pho.trackIsol = mapi->val;}
00400       }
00401 
00402       // store the photon into the vector
00403       theHLTPhotons.push_back(pho);
00404     }
00405   }
00406 }

void HLTEgamma::setup ( const edm::ParameterSet pSet,
TTree *  tree 
)

Definition at line 27 of file HLTEgamma.cc.

References ele, elet, eleta, elphi, elpt, heleE, heleELW, heleet, heleeta, heleetaLW, heleetLW, helehiso, helehisoLW, helel1iso, helel1isoLW, heleNewSC, heleNewSCLW, helep, helephi, helephiLW, helePixelSeeds, helePixelSeedsLW, helepLW, heletiso, heletisoLW, hphoteiso, hphotet, hphoteta, hphothiso, hphotl1iso, hphotphi, hphottiso, kMaxEl, kMaxhEle, kMaxhEleLW, kMaxhPhot, kMaxPhot, nele, nhltele, nhlteleLW, nhltgam, nphoton, photone, photonet, photoneta, photonphi, and photonpt.

Referenced by HLTAnalyzer::HLTAnalyzer().

00028 {
00029   elpt              = new float[kMaxEl];
00030   elphi             = new float[kMaxEl];
00031   eleta             = new float[kMaxEl];
00032   elet              = new float[kMaxEl];
00033   ele               = new float[kMaxEl];
00034   photonpt          = new float[kMaxPhot];
00035   photonphi         = new float[kMaxPhot];
00036   photoneta         = new float[kMaxPhot];
00037   photonet          = new float[kMaxPhot];
00038   photone           = new float[kMaxPhot];
00039   hphotet           = new float[kMaxhPhot];
00040   hphoteta          = new float[kMaxhPhot];
00041   hphotphi          = new float[kMaxhPhot];
00042   hphoteiso         = new float[kMaxhPhot];
00043   hphothiso         = new float[kMaxhPhot];
00044   hphottiso         = new float[kMaxhPhot];
00045   hphotl1iso        = new int[kMaxhPhot];
00046   heleet            = new float[kMaxhEle];
00047   heleeta           = new float[kMaxhEle];
00048   helephi           = new float[kMaxhEle];
00049   heleE             = new float[kMaxhEle];
00050   helep             = new float[kMaxhEle];
00051   helehiso          = new float[kMaxhEle];
00052   heletiso          = new float[kMaxhEle];
00053   helel1iso         = new int[kMaxhEle];
00054   helePixelSeeds    = new int[kMaxhEle];
00055   heleNewSC         = new int[kMaxhEle];
00056   heleetLW          = new float[kMaxhEleLW];
00057   heleetaLW         = new float[kMaxhEleLW];
00058   helephiLW         = new float[kMaxhEleLW];
00059   heleELW           = new float[kMaxhEleLW];
00060   helepLW           = new float[kMaxhEleLW];
00061   helehisoLW        = new float[kMaxhEleLW];
00062   heletisoLW        = new float[kMaxhEleLW];
00063   helel1isoLW       = new int[kMaxhEleLW];
00064   helePixelSeedsLW  = new int[kMaxhEleLW];
00065   heleNewSCLW       = new int[kMaxhEleLW];
00066   nele      = 0;
00067   nphoton   = 0;
00068   nhltgam   = 0;
00069   nhltele   = 0;
00070   nhlteleLW = 0;
00071 
00072   // Egamma-specific branches of the tree
00073   HltTree->Branch("NrecoElec",          & nele,             "NrecoElec/I");
00074   HltTree->Branch("recoElecPt",         elpt,               "recoElecPt[NrecoElec]/F");
00075   HltTree->Branch("recoElecPhi",        elphi,              "recoElecPhi[NrecoElec]/F");
00076   HltTree->Branch("recoElecEta",        eleta,              "recoElecEta[NrecoElec]/F");
00077   HltTree->Branch("recoElecEt",         elet,               "recoElecEt[NrecoElec]/F");
00078   HltTree->Branch("recoElecE",          ele,                "recoElecE[NrecoElec]/F");
00079   HltTree->Branch("NrecoPhot",          &nphoton,           "NrecoPhot/I");
00080   HltTree->Branch("recoPhotPt",         photonpt,           "recoPhotPt[NrecoPhot]/F");
00081   HltTree->Branch("recoPhotPhi",        photonphi,          "recoPhotPhi[NrecoPhot]/F");
00082   HltTree->Branch("recoPhotEta",        photoneta,          "recoPhotEta[NrecoPhot]/F");
00083   HltTree->Branch("recoPhotEt",         photonet,           "recoPhotEt[NrecoPhot]/F");
00084   HltTree->Branch("recoPhotE",          photone,            "recoPhotE[NrecoPhot]/F");
00085   HltTree->Branch("NohPhot",            & nhltgam,          "NohPhot/I");
00086   HltTree->Branch("ohPhotEt",           hphotet,            "ohPhotEt[NohPhot]/F");
00087   HltTree->Branch("ohPhotEta",          hphoteta,           "ohPhotEta[NohPhot]/F");
00088   HltTree->Branch("ohPhotPhi",          hphotphi,           "ohPhotPhi[NohPhot]/F");
00089   HltTree->Branch("ohPhotEiso",         hphoteiso,          "ohPhotEiso[NohPhot]/F");
00090   HltTree->Branch("ohPhotHiso",         hphothiso,          "ohPhotHiso[NohPhot]/F");
00091   HltTree->Branch("ohPhotTiso",         hphottiso,          "ohPhotTiso[NohPhot]/F");
00092   HltTree->Branch("ohPhotL1iso",        hphotl1iso,         "ohPhotL1iso[NohPhot]/I");
00093   HltTree->Branch("NohEle",             & nhltele,          "NohEle/I");
00094   HltTree->Branch("ohEleEt",            heleet,             "ohEleEt[NohEle]/F");
00095   HltTree->Branch("ohEleEta",           heleeta,            "ohEleEta[NohEle]/F");
00096   HltTree->Branch("ohElePhi",           helephi,            "ohElePhi[NohEle]/F");
00097   HltTree->Branch("ohEleE",             heleE,              "ohEleE[NohEle]/F");
00098   HltTree->Branch("ohEleP",             helep,              "ohEleP[NohEle]/F");
00099   HltTree->Branch("ohEleHiso",          helehiso,           "ohEleHiso[NohEle]/F");
00100   HltTree->Branch("ohEleTiso",          heletiso,           "ohEleTiso[NohEle]/F");
00101   HltTree->Branch("ohEleL1iso",         helel1iso,          "ohEleLiso[NohEle]/I");
00102   HltTree->Branch("ohElePixelSeeds",    helePixelSeeds,     "ohElePixelSeeds[NohEle]/I");
00103   HltTree->Branch("ohEleNewSC",         heleNewSC,          "ohEleNewSC[NohEle]/I");
00104   HltTree->Branch("NohEleLW",           & nhlteleLW,        "NohEleLW/I");
00105   HltTree->Branch("ohEleEtLW",          heleetLW,           "ohEleEtLW[NohEleLW]/F");
00106   HltTree->Branch("ohEleEtaLW",         heleetaLW,          "ohEleEtaLW[NohEleLW]/F");
00107   HltTree->Branch("ohElePhiLW",         helephiLW,          "ohElePhiLW[NohEleLW]/F");
00108   HltTree->Branch("ohEleELW",           heleELW,            "ohEleELW[NohEleLW]/F");
00109   HltTree->Branch("ohElePLW",           helepLW,            "ohElePLW[NohEleLW]/F");
00110   HltTree->Branch("ohEleHisoLW",        helehisoLW,         "ohEleHisoLW[NohEleLW]/F");
00111   HltTree->Branch("ohEleTisoLW",        heletisoLW,         "ohEleTisoLW[NohEleLW]/F");
00112   HltTree->Branch("ohEleL1isoLW",       helel1isoLW,        "ohEleLisoLW[NohEleLW]/I");
00113   HltTree->Branch("ohElePixelSeedsLW",  helePixelSeedsLW,   "ohElePixelSeedsLW[NohEleLW]/I");
00114   HltTree->Branch("ohEleNewSCLW",       heleNewSCLW,        "ohEleNewSCLW[NohEleLW]/I");
00115 }


Member Data Documentation

float * HLTEgamma::ele [private]

Definition at line 132 of file HLTEgamma.h.

Referenced by analyze(), clear(), MakeL1IsolatedElectrons(), MakeL1IsolatedElectronsLargeWindows(), MakeL1NonIsolatedElectrons(), MakeL1NonIsolatedElectronsLargeWindows(), and setup().

float * HLTEgamma::elet [private]

Definition at line 132 of file HLTEgamma.h.

Referenced by analyze(), clear(), and setup().

float * HLTEgamma::eleta [private]

Definition at line 132 of file HLTEgamma.h.

Referenced by analyze(), clear(), and setup().

float * HLTEgamma::elphi [private]

Definition at line 132 of file HLTEgamma.h.

Referenced by analyze(), clear(), and setup().

float* HLTEgamma::elpt [private]

Definition at line 132 of file HLTEgamma.h.

Referenced by analyze(), clear(), and setup().

float * HLTEgamma::heleE [private]

Definition at line 135 of file HLTEgamma.h.

Referenced by analyze(), clear(), and setup().

float * HLTEgamma::heleELW [private]

Definition at line 136 of file HLTEgamma.h.

Referenced by analyze(), clear(), and setup().

float* HLTEgamma::heleet [private]

Definition at line 135 of file HLTEgamma.h.

Referenced by analyze(), clear(), and setup().

float * HLTEgamma::heleeta [private]

Definition at line 135 of file HLTEgamma.h.

Referenced by analyze(), clear(), and setup().

float * HLTEgamma::heleetaLW [private]

Definition at line 136 of file HLTEgamma.h.

Referenced by analyze(), clear(), and setup().

float* HLTEgamma::heleetLW [private]

Definition at line 136 of file HLTEgamma.h.

Referenced by analyze(), clear(), and setup().

float * HLTEgamma::helehiso [private]

Definition at line 135 of file HLTEgamma.h.

Referenced by analyze(), clear(), and setup().

float * HLTEgamma::helehisoLW [private]

Definition at line 136 of file HLTEgamma.h.

Referenced by analyze(), clear(), and setup().

int * HLTEgamma::helel1iso [private]

Definition at line 137 of file HLTEgamma.h.

Referenced by analyze(), clear(), and setup().

int * HLTEgamma::helel1isoLW [private]

Definition at line 137 of file HLTEgamma.h.

Referenced by analyze(), clear(), and setup().

int* HLTEgamma::heleNewSC [private]

Definition at line 138 of file HLTEgamma.h.

Referenced by analyze(), clear(), and setup().

int * HLTEgamma::heleNewSCLW [private]

Definition at line 138 of file HLTEgamma.h.

Referenced by analyze(), clear(), and setup().

float * HLTEgamma::helep [private]

Definition at line 135 of file HLTEgamma.h.

Referenced by analyze(), clear(), and setup().

float * HLTEgamma::helephi [private]

Definition at line 135 of file HLTEgamma.h.

Referenced by analyze(), clear(), and setup().

float * HLTEgamma::helephiLW [private]

Definition at line 136 of file HLTEgamma.h.

Referenced by analyze(), clear(), and setup().

int * HLTEgamma::helePixelSeeds [private]

Definition at line 137 of file HLTEgamma.h.

Referenced by analyze(), clear(), and setup().

int * HLTEgamma::helePixelSeedsLW [private]

Definition at line 137 of file HLTEgamma.h.

Referenced by analyze(), clear(), and setup().

float * HLTEgamma::helepLW [private]

Definition at line 136 of file HLTEgamma.h.

Referenced by analyze(), clear(), and setup().

float * HLTEgamma::heletiso [private]

Definition at line 135 of file HLTEgamma.h.

Referenced by analyze(), clear(), and setup().

float * HLTEgamma::heletisoLW [private]

Definition at line 136 of file HLTEgamma.h.

Referenced by analyze(), clear(), and setup().

float * HLTEgamma::hphoteiso [private]

Definition at line 134 of file HLTEgamma.h.

Referenced by analyze(), clear(), and setup().

float* HLTEgamma::hphotet [private]

Definition at line 134 of file HLTEgamma.h.

Referenced by analyze(), clear(), and setup().

float * HLTEgamma::hphoteta [private]

Definition at line 134 of file HLTEgamma.h.

Referenced by analyze(), clear(), and setup().

float * HLTEgamma::hphothiso [private]

Definition at line 134 of file HLTEgamma.h.

Referenced by analyze(), clear(), and setup().

int* HLTEgamma::hphotl1iso [private]

Definition at line 137 of file HLTEgamma.h.

Referenced by analyze(), clear(), and setup().

float * HLTEgamma::hphotphi [private]

Definition at line 134 of file HLTEgamma.h.

Referenced by analyze(), clear(), and setup().

float * HLTEgamma::hphottiso [private]

Definition at line 134 of file HLTEgamma.h.

Referenced by analyze(), clear(), and setup().

int HLTEgamma::nele [private]

Definition at line 139 of file HLTEgamma.h.

Referenced by analyze(), clear(), and setup().

int HLTEgamma::nhltele [private]

Definition at line 139 of file HLTEgamma.h.

Referenced by analyze(), clear(), and setup().

int HLTEgamma::nhlteleLW [private]

Definition at line 139 of file HLTEgamma.h.

Referenced by analyze(), clear(), and setup().

int HLTEgamma::nhltgam [private]

Definition at line 139 of file HLTEgamma.h.

Referenced by analyze(), clear(), and setup().

int HLTEgamma::nphoton [private]

Definition at line 139 of file HLTEgamma.h.

Referenced by analyze(), clear(), and setup().

float * HLTEgamma::photone [private]

Definition at line 133 of file HLTEgamma.h.

Referenced by analyze(), clear(), and setup().

float * HLTEgamma::photonet [private]

Definition at line 133 of file HLTEgamma.h.

Referenced by analyze(), clear(), and setup().

float * HLTEgamma::photoneta [private]

Definition at line 133 of file HLTEgamma.h.

Referenced by analyze(), clear(), and setup().

float * HLTEgamma::photonphi [private]

Definition at line 133 of file HLTEgamma.h.

Referenced by analyze(), clear(), and setup().

float* HLTEgamma::photonpt [private]

Definition at line 133 of file HLTEgamma.h.

Referenced by analyze(), clear(), and setup().

std::vector<myHLTElectron> HLTEgamma::theHLTElectrons [private]

Definition at line 170 of file HLTEgamma.h.

Referenced by analyze(), clear(), MakeL1IsolatedElectrons(), and MakeL1NonIsolatedElectrons().

std::vector<myHLTElectron> HLTEgamma::theHLTElectronsLargeWindows [private]

Definition at line 171 of file HLTEgamma.h.

Referenced by analyze(), clear(), MakeL1IsolatedElectronsLargeWindows(), and MakeL1NonIsolatedElectronsLargeWindows().

std::vector<myHLTPhoton> HLTEgamma::theHLTPhotons [private]

Definition at line 153 of file HLTEgamma.h.

Referenced by analyze(), clear(), MakeL1IsolatedPhotons(), and MakeL1NonIsolatedPhotons().


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