117 HltTree->Branch(
"NrecoElec", &
nele,
"NrecoElec/I");
118 HltTree->Branch(
"recoElecPt",
elpt,
"recoElecPt[NrecoElec]/F");
119 HltTree->Branch(
"recoElecPhi",
elphi,
"recoElecPhi[NrecoElec]/F");
120 HltTree->Branch(
"recoElecEta",
eleta,
"recoElecEta[NrecoElec]/F");
121 HltTree->Branch(
"recoElecEt",
elet,
"recoElecEt[NrecoElec]/F");
122 HltTree->Branch(
"recoElecE",
ele,
"recoElecE[NrecoElec]/F");
123 HltTree->Branch(
"recoElecEleID",
eleId,
"recoElecEleID[NrecoElec]/I");
124 HltTree->Branch(
"recoElecIP",
elIP,
"recoElecIP[NrecoElec]/F");
125 HltTree->Branch(
"recoElecNLostHits",
elNLostHits,
"recoElecNLostHits[NrecoElec]/I");
126 HltTree->Branch(
"recoElecChi2NDF",
elTrkChi2NDF,
"recoElecChi2NDF[NrecoElec]/F");
127 HltTree->Branch(
"recoElecTrkIsoR03",
elTrkIsoR03,
"recoElecTrkIsoR03[NrecoElec]/F");
128 HltTree->Branch(
"recoElecECaloIsoR03",
elECaloIsoR03,
"recoElecECaloIsoR03[NrecoElec]/F");
129 HltTree->Branch(
"recoElecHCaloIsoR03",
elHCaloIsoR03,
"recoElecHCaloIsoR03[NrecoElec]/F");
130 HltTree->Branch(
"recoElecIsEcalDriven",
elIsEcalDriven,
"recoElecIsEcalDriven[NrecoElec]/O");
131 HltTree->Branch(
"recoElecFbrem",
elFbrem,
"recoElecFbrem[NrecoElec]/F");
132 HltTree->Branch(
"recoElecmishits",
elmishits,
"recoElecmishits[NrecoElec]/I");
133 HltTree->Branch(
"recoElecdist",
eldist,
"recoElecdist[NrecoElec]/F");
134 HltTree->Branch(
"recoElecdcot",
eldcot,
"recoElecdcot[NrecoElec]/F");
135 HltTree->Branch(
"recoElectrkiso",
eltrkiso,
"recoElectrkiso[NrecoElec]/F");
136 HltTree->Branch(
"recoElececaliso",
elecaliso,
"recoElececaliso[NrecoElec]/F");
137 HltTree->Branch(
"recoElechcaliso",
elhcaliso,
"recoElechcaliso[NrecoElec]/F");
138 HltTree->Branch(
"recoElecsigmaietaieta",
elsigmaietaieta,
"recoElecsigmaietaieta[NrecoElec]/F");
139 HltTree->Branch(
"recoElecdeltaPhiIn",
eldeltaPhiIn,
"recoElecdeltaPhiIn[NrecoElec]/F");
140 HltTree->Branch(
"recoElecdeltaEtaIn",
eldeltaEtaIn,
"recoElecdeltaEtaIn[NrecoElec]/F");
141 HltTree->Branch(
"recoElechOverE",
elhOverE,
"recoElechOverE[NrecoElec]/F");
142 HltTree->Branch(
"recoElecscEt",
elscEt,
"recoElecscEt[NrecoElec]/F");
143 HltTree->Branch(
"recoElecd0corr",
eld0corr,
"recoElecd0corr[NrecoElec]/F");
144 HltTree->Branch(
"recoElecqGsfCtfScPixConsistent",
elqGsfCtfScPixConsistent,
"recoElecqGsfCtfScPixConsistent[NrecoElec]/O");
146 HltTree->Branch(
"NrecoPhot", &
nphoton,
"NrecoPhot/I");
147 HltTree->Branch(
"recoPhotPt",
photonpt,
"recoPhotPt[NrecoPhot]/F");
148 HltTree->Branch(
"recoPhotPhi",
photonphi,
"recoPhotPhi[NrecoPhot]/F");
149 HltTree->Branch(
"recoPhotEta",
photoneta,
"recoPhotEta[NrecoPhot]/F");
150 HltTree->Branch(
"recoPhotEt",
photonet,
"recoPhotEt[NrecoPhot]/F");
151 HltTree->Branch(
"recoPhotE",
photone,
"recoPhotE[NrecoPhot]/F");
153 HltTree->Branch(
"NohPhot", &
nhltgam,
"NohPhot/I");
154 HltTree->Branch(
"ohPhotEt",
hphotet,
"ohPhotEt[NohPhot]/F");
155 HltTree->Branch(
"ohPhotEta",
hphoteta,
"ohPhotEta[NohPhot]/F");
156 HltTree->Branch(
"ohPhotPhi",
hphotphi,
"ohPhotPhi[NohPhot]/F");
157 HltTree->Branch(
"ohPhotEiso",
hphoteiso,
"ohPhotEiso[NohPhot]/F");
158 HltTree->Branch(
"ohPhotHiso",
hphothiso,
"ohPhotHiso[NohPhot]/F");
159 HltTree->Branch(
"ohPhotTiso",
hphottiso,
"ohPhotTiso[NohPhot]/F");
160 HltTree->Branch(
"ohPhotL1iso",
hphotl1iso,
"ohPhotL1iso[NohPhot]/I");
161 HltTree->Branch(
"ohPhotClusShap",
hphotClusShap,
"ohPhotClusShap[NohPhot]/F");
162 HltTree->Branch(
"ohPhotR9",
hphotR9,
"ohPhotR9[NohPhot]/F");
163 HltTree->Branch(
"ohPhotHforHoverE",
hphothovereh,
"ohPhotHforHoverE[NohPhot]/F");
164 HltTree->Branch(
"ohPhotR9ID",
hphotR9ID,
"ohPhotR9ID[NohPhot]/F");
166 HltTree->Branch(
"NohEle", &
nhltele,
"NohEle/I");
167 HltTree->Branch(
"ohEleEt",
heleet,
"ohEleEt[NohEle]/F");
168 HltTree->Branch(
"ohEleEta",
heleeta,
"ohEleEta[NohEle]/F");
169 HltTree->Branch(
"ohElePhi",
helephi,
"ohElePhi[NohEle]/F");
170 HltTree->Branch(
"ohEleE",
heleE,
"ohEleE[NohEle]/F");
171 HltTree->Branch(
"ohEleP",
helep,
"ohEleP[NohEle]/F");
172 HltTree->Branch(
"ohEleHiso",
helehiso,
"ohEleHiso[NohEle]/F");
173 HltTree->Branch(
"ohEleTiso",
heletiso,
"ohEleTiso[NohEle]/F");
174 HltTree->Branch(
"ohEleEiso",
heleeiso,
"ohEleEiso[NohEle]/F");
175 HltTree->Branch(
"ohEleL1iso",
helel1iso,
"ohEleLiso[NohEle]/I");
176 HltTree->Branch(
"ohElePixelSeeds",
helePixelSeeds,
"ohElePixelSeeds[NohEle]/I");
177 HltTree->Branch(
"ohEleNewSC",
heleNewSC,
"ohEleNewSC[NohEle]/I");
178 HltTree->Branch(
"ohEleClusShap",
heleClusShap,
"ohEleClusShap[NohEle]/F");
179 HltTree->Branch(
"ohEleDeta",
heleDeta,
"ohEleDeta[NohEle]/F");
180 HltTree->Branch(
"ohEleDphi",
heleDphi,
"ohEleDphi[NohEle]/F");
181 HltTree->Branch(
"ohEleR9",
heleR9,
"ohEleR9[NohEle]/F");
182 HltTree->Branch(
"ohEleHforHoverE",
helehovereh,
"ohEleHforHoverE[NohEle]/F");
183 HltTree->Branch(
"ohEleR9ID",
heleR9ID,
"ohEleR9ID[NohEle]/F");
184 HltTree->Branch(
"NohHFEle", &
nhlthfele ,
"NohHFEle/I");
185 HltTree->Branch(
"ohHFElePt",
hhfelept,
"ohHFElePt[NohHFEle]/F");
186 HltTree->Branch(
"ohHFEleEta",
hhfeleeta,
"ohHFElePt[NohHFEle]/F");
187 HltTree->Branch(
"NohHFECALClus", &
nhlthfeclus,
"NohHFECALClus/I");
188 HltTree->Branch(
"ohHFElee9e25",
hhfclustere9e25,
"ohHFElePt[NohHFECALClus]/F");
189 HltTree->Branch(
"ohHFEle2Dcut",
hhfcluster2Dcut,
"ohHFElePt[NohHFECALClus]/F");
195 std::memset(
elpt,
'\0',
kMaxEl *
sizeof(
float));
198 std::memset(
elet,
'\0',
kMaxEl *
sizeof(
float));
199 std::memset(
ele,
'\0',
kMaxEl *
sizeof(
float));
200 std::memset(
ele,
'\0',
kMaxEl *
sizeof(
int));
201 std::memset(
elIP,
'\0',
kMaxEl *
sizeof(
float));
297 nele = myelectrons.size();
300 for (reco::GsfElectronCollection::const_iterator
i = myelectrons.begin();
i != myelectrons.end();
i++) {
305 ele[iel] =
i->energy();
307 if(
i->gsfTrack().isNonnull()){
308 elNLostHits[iel] =
i->gsfTrack()->trackerExpectedHitsInner().numberOfLostHits();
309 elIP[iel] =
i->gsfTrack()->dxy(BSPosition);
323 elscEt[iel] =
i->superCluster()->energy()*
sin((2*atan(
exp(-
i->superCluster()->eta()))));
328 elmishits[iel] =
i->gsfTrack()->trackerExpectedHitsInner().numberOfHits();
332 eld0corr[iel]= - (
i->gsfTrack()->dxy(BSPosition));
350 for (reco::PhotonCollection::const_iterator
i = myphotons.begin();
i!= myphotons.end();
i++) {
365 std::vector<OpenHLTPhoton> theHLTPhotons;
378 recoNonIsolecalcands,
383 photonHoverEHNonIsoMap,
388 nhltgam = theHLTPhotons.size();
390 for (
int u = 0; u <
nhltgam; u++) {
391 hphotet[u] = theHLTPhotons[u].Et;
394 hphoteiso[u] = theHLTPhotons[u].ecalIsol;
395 hphothiso[u] = theHLTPhotons[u].hcalIsol;
396 hphottiso[u] = theHLTPhotons[u].trackIsol;
400 hphotR9[u] = theHLTPhotons[u].r9;
405 std::vector<OpenHLTElectron> theHLTElectrons;
422 electronNonIsoHandle,
423 recoNonIsolecalcands,
425 L1NonIsoPixelSeedsMap,
426 NonIsoTrackEleIsolMap,
428 photonHoverEHNonIsoMap,
430 electronR9IDNonIsoMap,
436 nhltele = theHLTElectrons.size();
438 for (
int u = 0; u <
nhltele; u++) {
439 heleet[u] = theHLTElectrons[u].Et;
440 heleeta[u] = theHLTElectrons[u].eta;
441 helephi[u] = theHLTElectrons[u].phi;
442 heleE[u] = theHLTElectrons[u].E;
443 helep[u] = theHLTElectrons[u].p;
444 helehiso[u] = theHLTElectrons[u].hcalIsol;
446 heletiso[u] = theHLTElectrons[u].trackIsol;
447 heleeiso[u] = theHLTElectrons[u].ecalIsol;
448 helel1iso[u] = theHLTElectrons[u].L1Isolated;
451 heleDeta[u] = theHLTElectrons[u].Deta;
452 heleDphi[u] = theHLTElectrons[u].Dphi;
453 heleR9[u] = theHLTElectrons[u].r9;
455 heleR9ID[u] = theHLTElectrons[u].r9ID;
458 if(electronHFElectrons.
isValid()) {
459 for (reco::RecoEcalCandidateCollection::const_iterator hfelecand = electronHFElectrons->begin();
460 hfelecand!= electronHFElectrons->end(); hfelecand++) {
466 if(electronHFECALClusters.
isValid()) {
467 for(reco::SuperClusterCollection::const_iterator hfeleclus = electronHFECALClusters->begin();
468 hfeleclus!= electronHFECALClusters->end(); hfeleclus++) {
477 std::vector<OpenHLTPhoton> & theHLTPhotons,
490 if (recoIsolecalcands.
isValid()) {
494 for (reco::RecoEcalCandidateCollection::const_iterator recoecalcand = recoIsolecalcands->begin();
495 recoecalcand!= recoIsolecalcands->end(); recoecalcand++) {
503 pho.
Et = recoecalcand->et();
504 pho.
eta = recoecalcand->eta();
505 pho.
phi = recoecalcand->phi();
512 std::vector<float> vCov = lazyTools.
localCovariances( *(recoecalcand->superCluster()->seed()) );
513 double sigmaee =
sqrt(vCov[0]);
526 mapi = (*EcalIsolMap).find(ref);
527 if (mapi !=(*EcalIsolMap).end()) { pho.
ecalIsol = mapi->
val;}
531 mapi = (*HcalIsolMap).find(ref);
532 if (mapi !=(*HcalIsolMap).end()) { pho.
hcalIsol = mapi->
val;}
536 mapi = (*TrackIsolMap).find(ref);
537 if (mapi !=(*TrackIsolMap).end()) { pho.
trackIsol = mapi->
val;}
540 if (photonR9IsoMap.
isValid()) {
541 mapi = (*photonR9IsoMap).find(ref);
542 if (mapi !=(*photonR9IsoMap).end()) { pho.
r9 = mapi->
val;}
545 if (photonHoverEHIsoMap.
isValid()) {
546 mapi = (*photonHoverEHIsoMap).find(ref);
547 if (mapi !=(*photonHoverEHIsoMap).end()) { pho.
hovereh = mapi->
val;}
550 if (photonR9IDIsoMap.
isValid()) {
551 mapi = (*photonR9IDIsoMap).find(ref);
552 if (mapi !=(*photonR9IDIsoMap).end()) { pho.
r9ID = mapi->
val;}
556 theHLTPhotons.push_back(pho);
562 std::vector<OpenHLTPhoton> & theHLTPhotons,
574 if (recoNonIsolecalcands.
isValid()) {
575 for (reco::RecoEcalCandidateCollection::const_iterator recoecalcand = recoNonIsolecalcands->begin();
576 recoecalcand!= recoNonIsolecalcands->end(); recoecalcand++) {
584 pho.
Et = recoecalcand->et();
585 pho.
eta = recoecalcand->eta();
586 pho.
phi = recoecalcand->phi();
593 std::vector<float> vCov = lazyTools.
localCovariances( *(recoecalcand->superCluster()->seed()) );
594 double sigmaee =
sqrt(vCov[0]);
604 if (EcalNonIsolMap.
isValid()) {
605 mapi = (*EcalNonIsolMap).find(ref);
606 if (mapi !=(*EcalNonIsolMap).end()) { pho.
ecalIsol = mapi->
val;}
609 if (HcalNonIsolMap.
isValid()) {
610 mapi = (*HcalNonIsolMap).find(ref);
611 if (mapi !=(*HcalNonIsolMap).end()) { pho.
hcalIsol = mapi->
val;}
614 if (TrackNonIsolMap.
isValid()) {
615 mapi = (*TrackNonIsolMap).find(ref);
616 if (mapi !=(*TrackNonIsolMap).end()) { pho.
trackIsol = mapi->
val;}
619 if (photonR9NonIsoMap.
isValid()) {
620 mapi = (*photonR9NonIsoMap).find(ref);
621 if (mapi !=(*photonR9NonIsoMap).end()) { pho.
r9 = mapi->
val;}
624 if (photonHoverEHNonIsoMap.
isValid()) {
625 mapi = (*photonHoverEHNonIsoMap).find(ref);
626 if (mapi !=(*photonHoverEHNonIsoMap).end()) { pho.
hovereh = mapi->
val;}
629 if (photonR9IDNonIsoMap.
isValid()) {
630 mapi = (*photonR9IDNonIsoMap).find(ref);
631 if (mapi !=(*photonR9IDNonIsoMap).end()) { pho.
r9ID = mapi->
val;}
635 theHLTPhotons.push_back(pho);
641 std::vector<OpenHLTElectron> & theHLTElectrons,
656 if (recoIsolecalcands.
isValid()) {
657 for (reco::RecoEcalCandidateCollection::const_iterator recoecalcand = recoIsolecalcands->begin();
658 recoecalcand!= recoIsolecalcands->end(); recoecalcand++) {
676 ele.
Et = recoecalcand->et();
677 ele.
eta = recoecalcand->eta();
678 ele.
phi = recoecalcand->phi();
679 ele.
E = recrSC->energy();
683 double sigmaee =
sqrt(vCov[0]);
695 if (mapi !=(*EcalIsolMap).end()) { ele.
ecalIsol = mapi->
val;}
698 if (HcalEleIsolMap.
isValid()) {
701 if (mapi !=(*HcalEleIsolMap).end()) { ele.
hcalIsol = mapi->
val; }
704 if (electronR9IsoMap.
isValid()) {
706 if (mapi !=(*electronR9IsoMap).end()) { ele.
r9 = mapi->
val; }
709 if (photonHoverEHIsoMap.
isValid()) {
711 if (mapi !=(*photonHoverEHIsoMap).end()) { ele.
hovereh = mapi->
val;}
714 if (electronR9IDIsoMap.
isValid()) {
716 if (mapi !=(*electronR9IDIsoMap).end()) { ele.
r9ID = mapi->
val; }
722 if (L1IsoPixelSeedsMap.
isValid()) {
723 for (reco::ElectronSeedCollection::const_iterator it = L1IsoPixelSeedsMap->begin();
724 it != L1IsoPixelSeedsMap->end(); it++) {
727 if (&(*recrSC) == &(*scRef)) { nmatch++; }
734 if (electronIsoHandle.
isValid()) {
735 bool FirstElectron =
true;
737 for (reco::ElectronCollection::const_iterator iElectron = electronIsoHandle->begin();
738 iElectron != electronIsoHandle->end(); iElectron++) {
740 electronref =
reco::ElectronRef(electronIsoHandle, iElectron - electronIsoHandle->begin());
742 if (&(*recrSC) == &(*theClus)) {
744 FirstElectron =
false;
745 ele.
p = electronref->track()->momentum().R();
746 float deta=-100, dphi=-100;
750 if (TrackEleIsolMap.
isValid()) {
752 if (mapTr != (*TrackEleIsolMap).end()) { ele.
trackIsol = mapTr->
val; }
771 ele2.
p = electronref->track()->momentum().R();
776 float deta=-100, dphi=-100;
780 if (TrackEleIsolMap.
isValid()) {
782 if (mapTr !=(*TrackEleIsolMap).end()) { ele2.
trackIsol = mapTr->
val;}
784 theHLTElectrons.push_back(ele2);
791 theHLTElectrons.push_back(ele);
798 std::vector<OpenHLTElectron> & theHLTElectrons,
813 if (recoNonIsolecalcands.
isValid()) {
814 for (reco::RecoEcalCandidateCollection::const_iterator recoecalcand = recoNonIsolecalcands->begin();
815 recoecalcand!= recoNonIsolecalcands->end(); recoecalcand++) {
835 ele.
Et = recoecalcand->et();
836 ele.
eta = recoecalcand->eta();
837 ele.
phi = recoecalcand->phi();
838 ele.
E = recrSC->energy();
842 double sigmaee =
sqrt(vCov[0]);
850 if (EcalNonIsolMap.
isValid()) {
852 if (mapi !=(*EcalNonIsolMap).end()) { ele.
ecalIsol = mapi->
val;}
855 if (HcalEleIsolMap.
isValid()) {
858 if (mapi !=(*HcalEleIsolMap).end()) {ele.
hcalIsol = mapi->
val;}
861 if (electronR9NonIsoMap.
isValid()) {
863 if (mapi !=(*electronR9NonIsoMap).end()) { ele.
r9 = mapi->
val; }
866 if (photonHoverEHNonIsoMap.
isValid()) {
868 if (mapi !=(*photonHoverEHNonIsoMap).end()) { ele.
hovereh = mapi->
val;}
871 if (electronR9IDNonIsoMap.
isValid()) {
873 if (mapi !=(*electronR9IDNonIsoMap).end()) { ele.
r9ID = mapi->
val; }
879 if (L1NonIsoPixelSeedsMap.
isValid()) {
880 for (reco::ElectronSeedCollection::const_iterator it = L1NonIsoPixelSeedsMap->begin();
881 it != L1NonIsoPixelSeedsMap->end(); it++) {
884 if (&(*recrSC) == &(*scRef)) { nmatch++;}
891 if (electronNonIsoHandle.
isValid()) {
892 bool FirstElectron =
true;
894 for (reco::ElectronCollection::const_iterator iElectron = electronNonIsoHandle->begin();
895 iElectron != electronNonIsoHandle->end();iElectron++) {
897 electronref =
reco::ElectronRef(electronNonIsoHandle, iElectron - electronNonIsoHandle->begin());
899 if (&(*recrSC) == &(*theClus)) {
901 FirstElectron =
false;
902 ele.
p = electronref->track()->momentum().R();
903 float deta=-100, dphi=-100;
908 if (TrackEleIsolMap.
isValid()) {
910 if (mapTr !=(*TrackEleIsolMap).end()) { ele.
trackIsol = mapTr->
val;}
929 ele2.
p = electronref->track()->momentum().R();
933 float deta=-100, dphi=-100;
938 if (TrackEleIsolMap.
isValid()) {
940 if (mapTr !=(*TrackEleIsolMap).end()) { ele2.
trackIsol = mapTr->
val;}
942 theHLTElectrons.push_back(ele2);
949 theHLTElectrons.push_back(ele);
958 float& deltaphi,
bool useTrackProjectionToEcal )
966 math::XYZPoint SCcorrPosition(theClus->x()-BSPosition.x(), theClus->y()-BSPosition.y() , theClus->z()-eleref->track()->vz() );
967 deltaeta = SCcorrPosition.eta()-eleref->track()->eta();
969 if(useTrackProjectionToEcal){
971 const math::XYZPoint vertex(BSPosition.x(),BSPosition.y(),eleref->track()->vz());
973 float phi1= posCalc.
ecalPhi(theMagField.
product(),trackMom,vertex,1);
974 float phi2= posCalc.
ecalPhi(theMagField.
product(),trackMom,vertex,-1);
976 float deltaphi1=fabs( phi1 - theClus->position().phi() );
977 if(deltaphi1>6.283185308) deltaphi1 -= 6.283185308;
978 if(deltaphi1>3.141592654) deltaphi1 = 6.283185308-deltaphi1;
980 float deltaphi2=fabs( phi2 - theClus->position().phi() );
981 if(deltaphi2>6.283185308) deltaphi2 -= 6.283185308;
982 if(deltaphi2>3.141592654) deltaphi2 = 6.283185308-deltaphi2;
984 deltaphi = deltaphi1;
985 if(deltaphi2<deltaphi1){ deltaphi = deltaphi2;}
988 deltaphi=fabs(eleref->track()->outerPosition().phi()-theClus->phi());
989 if(deltaphi>6.283185308) deltaphi -= 6.283185308;
990 if(deltaphi>3.141592654) deltaphi = 6.283185308-deltaphi;
void MakeL1NonIsolatedElectrons(std::vector< OpenHLTElectron > &electrons, const edm::Handle< reco::ElectronCollection > &electronNonIsoHandle, const edm::Handle< reco::RecoEcalCandidateCollection > &recoNonIsolecalcands, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &HcalEleIsolMap, const edm::Handle< reco::ElectronSeedCollection > &L1NonIsoPixelSeedsMap, const edm::Handle< reco::ElectronIsolationMap > &TrackEleIsolMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &electronR9NonIsoMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &photonHoverEHIsoMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &EcalIsolMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &electronR9IDNonIsoMap, EcalClusterLazyTools &lazyTools, const edm::ESHandle< MagneticField > &theMagField, reco::BeamSpot::Point &BSPosition)
Sin< T >::type sin(const T &t)
edm::Ref< RecoEcalCandidateCollection > RecoEcalCandidateRef
reference to an object in a collection of RecoEcalCandidate objects
math::XYZPoint Point
point in the space
Exp< T >::type exp(const T &t)
edm::Ref< ElectronCollection > ElectronRef
reference to an object in a collection of Electron objects
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
static const size_t kMaxhPhot
void CalculateDetaDphi(const edm::ESHandle< MagneticField > &theMagField, reco::BeamSpot::Point &BSPosition, const reco::ElectronRef eleref, float &deltaeta, float &deltaphi, bool useTrackProjectionToEcal)
void setup(const edm::ParameterSet &pSet, TTree *tree)
double ecalPhi(const MagneticField *magField, const math::XYZVector &momentum, const math::XYZPoint &vertex, const int charge)
static const size_t kMaxEl
static const size_t kMaxhEle
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 > &electronNonIsoHandle, const edm::Handle< reco::ElectronIsolationMap > &NonIsoTrackEleIsolMap, const edm::Handle< reco::ElectronIsolationMap > &TrackEleIsolMap, const edm::Handle< reco::ElectronSeedCollection > &L1IsoPixelSeedsMap, const edm::Handle< reco::ElectronSeedCollection > &L1NonIsoPixelSeedsMap, 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, EcalClusterLazyTools &lazyTools, const edm::ESHandle< MagneticField > &theMagField, reco::BeamSpot::Point &BSPosition, std::vector< edm::Handle< edm::ValueMap< float > > > &eIDValueMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &photonR9IsoMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &photonR9NonIsoMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &electronR9IsoMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &electronR9NonIsoMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &photonHoverEHIsoMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &photonHoverEHNonIsoMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &photonR9IDIsoMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &photonR9IDNonIsoMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &electronR9IDIsoMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &electronR9IDNonIsoMap, const edm::Handle< reco::SuperClusterCollection > &electronHFClusterHandle, const edm::Handle< reco::RecoEcalCandidateCollection > &electronHFElectronHandle, TTree *tree)
XYZVectorD XYZVector
spatial vector with cartesian internal representation
XYZPointD XYZPoint
point in space with cartesian internal representation
REF castTo() const
cast to a concrete type
void MakeL1IsolatedElectrons(std::vector< OpenHLTElectron > &electrons, const edm::Handle< reco::ElectronCollection > &electronIsoHandle, const edm::Handle< reco::RecoEcalCandidateCollection > &recoIsolecalcands, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &HcalEleIsolMap, const edm::Handle< reco::ElectronSeedCollection > &L1IsoPixelSeedsMap, const edm::Handle< reco::ElectronIsolationMap > &TrackEleIsolMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &electronR9IsoMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &photonHoverEHIsoMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &EcalIsolMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &electronR9IDIsoMap, EcalClusterLazyTools &lazyTools, const edm::ESHandle< MagneticField > &theMagField, reco::BeamSpot::Point &BSPosition)
T const * product() const
std::vector< Photon > PhotonCollection
collectin of Photon objects
static const size_t kMaxPhot
bool * elqGsfCtfScPixConsistent
void MakeL1NonIsolatedPhotons(std::vector< OpenHLTPhoton > &photons, const edm::Handle< reco::RecoEcalCandidateCollection > &recoNonIsolecalcands, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &EcalNonIsolMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &HcalNonIsolMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &TrackNonIsolMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &photonR9NonIsoMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &photonHoverEHNonIsoMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &photonR9IDNonIsoMap, EcalClusterLazyTools &lazyTools)
void MakeL1IsolatedPhotons(std::vector< OpenHLTPhoton > &photons, const edm::Handle< reco::RecoEcalCandidateCollection > &recoIsolecalcands, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &EcalIsolMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &HcalIsolMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &TrackIsolMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &photonR9IsoMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &photonHoverEHIsoMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &photonR9IDIsoMap, EcalClusterLazyTools &lazyTools)