143 HltTree->Branch(
"NrecoElec", &
nele,
"NrecoElec/I");
144 HltTree->Branch(
"recoElecPt",
elpt,
"recoElecPt[NrecoElec]/F");
145 HltTree->Branch(
"recoElecPhi",
elphi,
"recoElecPhi[NrecoElec]/F");
146 HltTree->Branch(
"recoElecEta",
eleta,
"recoElecEta[NrecoElec]/F");
147 HltTree->Branch(
"recoElecEt",
elet,
"recoElecEt[NrecoElec]/F");
148 HltTree->Branch(
"recoElecE",
ele,
"recoElecE[NrecoElec]/F");
149 HltTree->Branch(
"recoElecEleID",
eleId,
"recoElecEleID[NrecoElec]/I");
150 HltTree->Branch(
"recoElecIP",
elIP,
"recoElecIP[NrecoElec]/F");
151 HltTree->Branch(
"recoElecNLostHits",
elNLostHits,
"recoElecNLostHits[NrecoElec]/I");
152 HltTree->Branch(
"recoElecChi2NDF",
elTrkChi2NDF,
"recoElecChi2NDF[NrecoElec]/F");
153 HltTree->Branch(
"recoElecTrkIsoR03",
elTrkIsoR03,
"recoElecTrkIsoR03[NrecoElec]/F");
154 HltTree->Branch(
"recoElecECaloIsoR03",
elECaloIsoR03,
"recoElecECaloIsoR03[NrecoElec]/F");
155 HltTree->Branch(
"recoElecHCaloIsoR03",
elHCaloIsoR03,
"recoElecHCaloIsoR03[NrecoElec]/F");
156 HltTree->Branch(
"recoElecIsEcalDriven",
elIsEcalDriven,
"recoElecIsEcalDriven[NrecoElec]/O");
157 HltTree->Branch(
"recoElecFbrem",
elFbrem,
"recoElecFbrem[NrecoElec]/F");
158 HltTree->Branch(
"recoElecmishits",
elmishits,
"recoElecmishits[NrecoElec]/I");
159 HltTree->Branch(
"recoElecdist",
eldist,
"recoElecdist[NrecoElec]/F");
160 HltTree->Branch(
"recoElecdcot",
eldcot,
"recoElecdcot[NrecoElec]/F");
161 HltTree->Branch(
"recoElectrkiso",
eltrkiso,
"recoElectrkiso[NrecoElec]/F");
162 HltTree->Branch(
"recoElececaliso",
elecaliso,
"recoElececaliso[NrecoElec]/F");
163 HltTree->Branch(
"recoElechcaliso",
elhcaliso,
"recoElechcaliso[NrecoElec]/F");
164 HltTree->Branch(
"recoElecsigmaietaieta",
elsigmaietaieta,
"recoElecsigmaietaieta[NrecoElec]/F");
165 HltTree->Branch(
"recoElecdeltaPhiIn",
eldeltaPhiIn,
"recoElecdeltaPhiIn[NrecoElec]/F");
166 HltTree->Branch(
"recoElecdeltaEtaIn",
eldeltaEtaIn,
"recoElecdeltaEtaIn[NrecoElec]/F");
167 HltTree->Branch(
"recoElechOverE",
elhOverE,
"recoElechOverE[NrecoElec]/F");
168 HltTree->Branch(
"recoElecscEt",
elscEt,
"recoElecscEt[NrecoElec]/F");
169 HltTree->Branch(
"recoElecd0corr",
eld0corr,
"recoElecd0corr[NrecoElec]/F");
170 HltTree->Branch(
"recoElecqGsfCtfScPixConsistent",
elqGsfCtfScPixConsistent,
"recoElecqGsfCtfScPixConsistent[NrecoElec]/O");
172 HltTree->Branch(
"NrecoPhot", &
nphoton,
"NrecoPhot/I");
173 HltTree->Branch(
"recoPhotPt",
photonpt,
"recoPhotPt[NrecoPhot]/F");
174 HltTree->Branch(
"recoPhotPhi",
photonphi,
"recoPhotPhi[NrecoPhot]/F");
175 HltTree->Branch(
"recoPhotEta",
photoneta,
"recoPhotEta[NrecoPhot]/F");
176 HltTree->Branch(
"recoPhotEt",
photonet,
"recoPhotEt[NrecoPhot]/F");
177 HltTree->Branch(
"recoPhotE",
photone,
"recoPhotE[NrecoPhot]/F");
178 HltTree->Branch(
"recoPhotTiso",
photontrkiso,
"recoPhotTiso[NrecoPhot]/F");
179 HltTree->Branch(
"recoPhotEiso",
photonecaliso,
"recoPhotEiso[NrecoPhot]/F");
180 HltTree->Branch(
"recoPhotHiso",
photonhcaliso,
"recoPhotHiso[NrecoPhot]/F");
181 HltTree->Branch(
"recoPhotHoverE",
photonhovere,
"recoPhotHoverE[NrecoPhot]/F");
182 HltTree->Branch(
"recoPhotClusShap",
photonClusShap,
"recoPhotClusShap[NrecoPhot]/F");
183 HltTree->Branch(
"recoPhotR9ID",
photonr9id,
"recoPhotR9ID[NrecoPhot]/F");
185 HltTree->Branch(
"NohPhot", &
nhltgam,
"NohPhot/I");
186 HltTree->Branch(
"ohPhotEt",
hphotet,
"ohPhotEt[NohPhot]/F");
187 HltTree->Branch(
"ohPhotEta",
hphoteta,
"ohPhotEta[NohPhot]/F");
188 HltTree->Branch(
"ohPhotPhi",
hphotphi,
"ohPhotPhi[NohPhot]/F");
189 HltTree->Branch(
"ohPhotEiso",
hphoteiso,
"ohPhotEiso[NohPhot]/F");
190 HltTree->Branch(
"ohPhotHiso",
hphothiso,
"ohPhotHiso[NohPhot]/F");
191 HltTree->Branch(
"ohPhotTiso",
hphottiso,
"ohPhotTiso[NohPhot]/F");
192 HltTree->Branch(
"ohPhotL1iso",
hphotl1iso,
"ohPhotL1iso[NohPhot]/I");
193 HltTree->Branch(
"ohPhotClusShap",
hphotClusShap,
"ohPhotClusShap[NohPhot]/F");
194 HltTree->Branch(
"ohPhotR9",
hphotR9,
"ohPhotR9[NohPhot]/F");
195 HltTree->Branch(
"ohPhotHforHoverE",
hphothovereh,
"ohPhotHforHoverE[NohPhot]/F");
196 HltTree->Branch(
"ohPhotR9ID",
hphotR9ID,
"ohPhotR9ID[NohPhot]/F");
198 HltTree->Branch(
"NohEcalActiv", &
nhltecalactiv,
"NohEcalActiv/I");
199 HltTree->Branch(
"ohEcalActivEt",
hecalactivet,
"ohEcalActivEt[NohEcalActiv]/F");
200 HltTree->Branch(
"ohEcalActivEta",
hecalactiveta,
"ohEcalActivEta[NohEcalActiv]/F");
201 HltTree->Branch(
"ohEcalActivPhi",
hecalactivphi,
"ohEcalActivPhi[NohEcalActiv]/F");
202 HltTree->Branch(
"ohEcalActivEiso",
hecalactiveiso,
"ohEcalActivEiso[NohEcalActiv]/F");
203 HltTree->Branch(
"ohEcalActivHiso",
hecalactivhiso,
"ohEcalActivHiso[NohEcalActiv]/F");
204 HltTree->Branch(
"ohEcalActivTiso",
hecalactivtiso,
"ohEcalActivTiso[NohEcalActiv]/F");
205 HltTree->Branch(
"ohEcalActivL1iso",
hecalactivl1iso,
"ohEcalActivL1iso[NohEcalActiv]/I");
206 HltTree->Branch(
"ohEcalActivClusShap",
hecalactivClusShap,
"ohEcalActivClusShap[NohEcalActiv]/F");
207 HltTree->Branch(
"ohEcalActivR9",
hecalactivR9,
"ohEcalActivR9[NohEcalActiv]/F");
208 HltTree->Branch(
"ohEcalActivHforHoverE",
hecalactivhovereh,
"ohEcalActivHforHoverE[NohEcalActiv]/F");
209 HltTree->Branch(
"ohEcalActivR9ID",
hecalactivR9ID,
"ohEcalActivR9ID[NohEcalActiv]/F");
211 HltTree->Branch(
"NohEle", &
nhltele,
"NohEle/I");
212 HltTree->Branch(
"ohEleEt",
heleet,
"ohEleEt[NohEle]/F");
213 HltTree->Branch(
"ohEleEta",
heleeta,
"ohEleEta[NohEle]/F");
214 HltTree->Branch(
"ohElePhi",
helephi,
"ohElePhi[NohEle]/F");
215 HltTree->Branch(
"ohEleVtxZ",
helevtxz,
"ohEleVtxZ[NohEle]/F");
216 HltTree->Branch(
"ohEleE",
heleE,
"ohEleE[NohEle]/F");
217 HltTree->Branch(
"ohEleP",
helep,
"ohEleP[NohEle]/F");
218 HltTree->Branch(
"ohEleHiso",
helehiso,
"ohEleHiso[NohEle]/F");
219 HltTree->Branch(
"ohEleTiso",
heletiso,
"ohEleTiso[NohEle]/F");
220 HltTree->Branch(
"ohEleEiso",
heleeiso,
"ohEleEiso[NohEle]/F");
221 HltTree->Branch(
"ohEleL1iso",
helel1iso,
"ohEleLiso[NohEle]/I");
222 HltTree->Branch(
"ohElePixelSeeds",
helePixelSeeds,
"ohElePixelSeeds[NohEle]/I");
223 HltTree->Branch(
"ohEleNewSC",
heleNewSC,
"ohEleNewSC[NohEle]/I");
224 HltTree->Branch(
"ohEleClusShap",
heleClusShap,
"ohEleClusShap[NohEle]/F");
225 HltTree->Branch(
"ohEleDeta",
heleDeta,
"ohEleDeta[NohEle]/F");
226 HltTree->Branch(
"ohEleDphi",
heleDphi,
"ohEleDphi[NohEle]/F");
227 HltTree->Branch(
"ohEleR9",
heleR9,
"ohEleR9[NohEle]/F");
228 HltTree->Branch(
"ohEleHforHoverE",
helehovereh,
"ohEleHforHoverE[NohEle]/F");
229 HltTree->Branch(
"ohEleR9ID",
heleR9ID,
"ohEleR9ID[NohEle]/F");
230 HltTree->Branch(
"NohHFEle", &
nhlthfele ,
"NohHFEle/I");
231 HltTree->Branch(
"ohHFElePt",
hhfelept,
"ohHFElePt[NohHFEle]/F");
232 HltTree->Branch(
"ohHFEleEta",
hhfeleeta,
"ohHFEleEta[NohHFEle]/F");
233 HltTree->Branch(
"NohHFECALClus", &
nhlthfeclus,
"NohHFECALClus/I");
235 HltTree->Branch(
"ohHFEleClustere9e25",
hhfclustere9e25,
"ohHFEleClustere9e25[NohHFECALClus]/F");
236 HltTree->Branch(
"ohHFEleClustere1e9",
hhfclustere1e9,
"ohHFEleClustere1e9[NohHFECALClus]/F");
237 HltTree->Branch(
"ohHFEleClustereCOREe9",
hhfclustereCOREe9,
"ohHFEleClustereCOREe9[NohHFECALClus]/F");
238 HltTree->Branch(
"ohHFEleClustereSeL",
hhfclustereSeL,
"ohHFEleClustereSeL[NohHFECALClus]/F");
239 HltTree->Branch(
"ohHFEleCluster2Dcut",
hhfcluster2Dcut,
"ohHFEleCluster2Dcut[NohHFECALClus]/F");
240 HltTree->Branch(
"ohHFEleClusterEta",
hhfclustereta,
"ohHFEleClusterEta[NohHFECALClus]/F");
241 HltTree->Branch(
"ohHFEleClusterPhi",
hhfclusterphi,
"ohHFEleClusterPhi[NohHFECALClus]/F");
246 std::memset(
elpt,
'\0',
kMaxEl *
sizeof(
float));
249 std::memset(
elet,
'\0',
kMaxEl *
sizeof(
float));
250 std::memset(
ele,
'\0',
kMaxEl *
sizeof(
float));
251 std::memset(
ele,
'\0',
kMaxEl *
sizeof(
int));
252 std::memset(
elIP,
'\0',
kMaxEl *
sizeof(
float));
368 nele = myelectrons.size();
371 for (reco::GsfElectronCollection::const_iterator
i = myelectrons.begin();
i != myelectrons.end();
i++) {
376 ele[iel] =
i->energy();
378 if(
i->gsfTrack().isNonnull()){
380 elIP[iel] =
i->gsfTrack()->dxy(BSPosition);
394 elscEt[iel] =
i->superCluster()->energy()*
sin((2*atan(
exp(-
i->superCluster()->eta()))));
403 eld0corr[iel]= - (
i->gsfTrack()->dxy(BSPosition));
421 for (reco::PhotonCollection::const_iterator
i = myphotons.begin();
i!= myphotons.end();
i++) {
442 std::vector<OpenHLTPhoton> theHLTPhotons;
455 recoNonIsolecalcands,
460 photonHoverEHNonIsoMap,
465 nhltgam = theHLTPhotons.size();
467 for (
int u = 0; u <
nhltgam; u++) {
468 hphotet[u] = theHLTPhotons[u].Et;
471 hphoteiso[u] = theHLTPhotons[u].ecalIsol;
472 hphothiso[u] = theHLTPhotons[u].hcalIsol;
473 hphottiso[u] = theHLTPhotons[u].trackIsol;
477 hphotR9[u] = theHLTPhotons[u].r9;
481 std::vector<OpenHLTPhoton> theHLTActivityPhotons;
483 theHLTActivityPhotons,
511 std::vector<OpenHLTElectron> theHLTElectrons;
528 electronNonIsoHandle,
529 recoNonIsolecalcands,
531 L1NonIsoPixelSeedsMap,
532 NonIsoTrackEleIsolMap,
534 photonHoverEHNonIsoMap,
536 electronR9IDNonIsoMap,
542 nhltele = theHLTElectrons.size();
544 for (
int u = 0; u <
nhltele; u++) {
545 heleet[u] = theHLTElectrons[u].Et;
546 heleeta[u] = theHLTElectrons[u].eta;
547 helephi[u] = theHLTElectrons[u].phi;
548 helevtxz[u] = theHLTElectrons[u].vtxZ;
549 heleE[u] = theHLTElectrons[u].E;
550 helep[u] = theHLTElectrons[u].p;
551 helehiso[u] = theHLTElectrons[u].hcalIsol;
553 heletiso[u] = theHLTElectrons[u].trackIsol;
554 heleeiso[u] = theHLTElectrons[u].ecalIsol;
555 helel1iso[u] = theHLTElectrons[u].L1Isolated;
558 heleDeta[u] = theHLTElectrons[u].Deta;
559 heleDphi[u] = theHLTElectrons[u].Dphi;
560 heleR9[u] = theHLTElectrons[u].r9;
562 heleR9ID[u] = theHLTElectrons[u].r9ID;
565 if(electronHFElectrons.
isValid()) {
566 for (reco::RecoEcalCandidateCollection::const_iterator hfelecand = electronHFElectrons->begin(); hfelecand!=electronHFElectrons->end(); hfelecand++) {
572 if(electronHFECALClusters.
isValid()) {
581 float hfCluster2Dcut =(clusShape.
eCOREe9()-(clusShape.
eSeL()*1.125));
584 float hfClustereCOREe9 = clusShape.
eCOREe9();
585 float hfClustereSeL = clusShape.
eSeL();
613 std::vector<OpenHLTPhoton> & theHLTPhotons,
626 if (recoIsolecalcands.
isValid()) {
630 for (reco::RecoEcalCandidateCollection::const_iterator recoecalcand = recoIsolecalcands->begin();
631 recoecalcand!= recoIsolecalcands->end(); recoecalcand++) {
639 pho.
Et = recoecalcand->et();
640 pho.
eta = recoecalcand->eta();
641 pho.
phi = recoecalcand->phi();
648 std::vector<float> vCov = lazyTools.localCovariances( *(recoecalcand->superCluster()->seed()) );
649 double sigmaee =
sqrt(vCov[0]);
662 mapi = (*EcalIsolMap).find(ref);
663 if (mapi !=(*EcalIsolMap).end()) { pho.
ecalIsol = mapi->val;}
667 mapi = (*HcalIsolMap).find(ref);
668 if (mapi !=(*HcalIsolMap).end()) { pho.
hcalIsol = mapi->val;}
672 mapi = (*TrackIsolMap).find(ref);
673 if (mapi !=(*TrackIsolMap).end()) { pho.
trackIsol = mapi->val;}
676 if (photonR9IsoMap.
isValid()) {
677 mapi = (*photonR9IsoMap).find(ref);
678 if (mapi !=(*photonR9IsoMap).end()) { pho.
r9 = mapi->val;}
681 if (photonHoverEHIsoMap.
isValid()) {
682 mapi = (*photonHoverEHIsoMap).find(ref);
683 if (mapi !=(*photonHoverEHIsoMap).end()) { pho.
hovereh = mapi->val;}
686 if (photonR9IDIsoMap.
isValid()) {
687 mapi = (*photonR9IDIsoMap).find(ref);
688 if (mapi !=(*photonR9IDIsoMap).end()) { pho.
r9ID = mapi->val;}
692 theHLTPhotons.push_back(pho);
698 std::vector<OpenHLTPhoton> & theHLTPhotons,
710 if (recoNonIsolecalcands.
isValid()) {
711 for (reco::RecoEcalCandidateCollection::const_iterator recoecalcand = recoNonIsolecalcands->begin();
712 recoecalcand!= recoNonIsolecalcands->end(); recoecalcand++) {
720 pho.
Et = recoecalcand->et();
721 pho.
eta = recoecalcand->eta();
722 pho.
phi = recoecalcand->phi();
729 std::vector<float> vCov = lazyTools.localCovariances( *(recoecalcand->superCluster()->seed()) );
730 double sigmaee =
sqrt(vCov[0]);
740 if (EcalNonIsolMap.
isValid()) {
741 mapi = (*EcalNonIsolMap).find(ref);
742 if (mapi !=(*EcalNonIsolMap).end()) { pho.
ecalIsol = mapi->val;}
745 if (HcalNonIsolMap.
isValid()) {
746 mapi = (*HcalNonIsolMap).find(ref);
747 if (mapi !=(*HcalNonIsolMap).end()) { pho.
hcalIsol = mapi->val;}
750 if (TrackNonIsolMap.
isValid()) {
751 mapi = (*TrackNonIsolMap).find(ref);
752 if (mapi !=(*TrackNonIsolMap).end()) { pho.
trackIsol = mapi->val;}
755 if (photonR9NonIsoMap.
isValid()) {
756 mapi = (*photonR9NonIsoMap).find(ref);
757 if (mapi !=(*photonR9NonIsoMap).end()) { pho.
r9 = mapi->val;}
760 if (photonHoverEHNonIsoMap.
isValid()) {
761 mapi = (*photonHoverEHNonIsoMap).find(ref);
762 if (mapi !=(*photonHoverEHNonIsoMap).end()) { pho.
hovereh = mapi->val;}
765 if (photonR9IDNonIsoMap.
isValid()) {
766 mapi = (*photonR9IDNonIsoMap).find(ref);
767 if (mapi !=(*photonR9IDNonIsoMap).end()) { pho.
r9ID = mapi->val;}
771 theHLTPhotons.push_back(pho);
777 std::vector<OpenHLTElectron> & theHLTElectrons,
792 if (recoIsolecalcands.
isValid()) {
793 for (reco::RecoEcalCandidateCollection::const_iterator recoecalcand = recoIsolecalcands->begin();
794 recoecalcand!= recoIsolecalcands->end(); recoecalcand++) {
812 ele.
Et = recoecalcand->et();
813 ele.
eta = recoecalcand->eta();
814 ele.
phi = recoecalcand->phi();
815 ele.
E = recrSC->energy();
818 std::vector<float> vCov = lazyTools.localCovariances( *(recrSC->seed()) );
819 double sigmaee =
sqrt(vCov[0]);
831 if (mapi !=(*EcalIsolMap).end()) { ele.
ecalIsol = mapi->val;}
834 if (HcalEleIsolMap.
isValid()) {
837 if (mapi !=(*HcalEleIsolMap).end()) { ele.
hcalIsol = mapi->val; }
840 if (electronR9IsoMap.
isValid()) {
842 if (mapi !=(*electronR9IsoMap).end()) { ele.
r9 = mapi->val; }
845 if (photonHoverEHIsoMap.
isValid()) {
847 if (mapi !=(*photonHoverEHIsoMap).end()) { ele.
hovereh = mapi->val;}
850 if (electronR9IDIsoMap.
isValid()) {
852 if (mapi !=(*electronR9IDIsoMap).end()) { ele.
r9ID = mapi->val; }
858 if (L1IsoPixelSeedsMap.
isValid()) {
859 for (reco::ElectronSeedCollection::const_iterator it = L1IsoPixelSeedsMap->begin();
860 it != L1IsoPixelSeedsMap->end(); it++) {
863 if (&(*recrSC) == &(*scRef)) { nmatch++; }
870 if (electronIsoHandle.
isValid()) {
871 bool FirstElectron =
true;
873 for (reco::ElectronCollection::const_iterator iElectron = electronIsoHandle->begin();
874 iElectron != electronIsoHandle->end(); iElectron++) {
876 electronref =
reco::ElectronRef(electronIsoHandle, iElectron - electronIsoHandle->begin());
878 if (&(*recrSC) == &(*theClus)) {
880 FirstElectron =
false;
881 ele.
p = electronref->track()->momentum().R();
882 ele.
vtxZ = electronref->track()->vertex().z();
883 float deta=-100, dphi=-100;
887 if (TrackEleIsolMap.
isValid()) {
889 if (mapTr != (*TrackEleIsolMap).end()) { ele.
trackIsol = mapTr->val; }
903 ele2.
vtxZ = electronref->track()->vertex().z();
909 ele2.
p = electronref->track()->momentum().R();
914 float deta=-100, dphi=-100;
918 if (TrackEleIsolMap.
isValid()) {
920 if (mapTr !=(*TrackEleIsolMap).end()) { ele2.
trackIsol = mapTr->val;}
922 theHLTElectrons.push_back(ele2);
929 theHLTElectrons.push_back(ele);
936 std::vector<OpenHLTElectron> & theHLTElectrons,
951 if (recoNonIsolecalcands.
isValid()) {
952 for (reco::RecoEcalCandidateCollection::const_iterator recoecalcand = recoNonIsolecalcands->begin();
953 recoecalcand!= recoNonIsolecalcands->end(); recoecalcand++) {
973 ele.
Et = recoecalcand->et();
974 ele.
eta = recoecalcand->eta();
975 ele.
phi = recoecalcand->phi();
976 ele.
E = recrSC->energy();
979 std::vector<float> vCov = lazyTools.localCovariances( *(recrSC->seed()) );
980 double sigmaee =
sqrt(vCov[0]);
988 if (EcalNonIsolMap.
isValid()) {
990 if (mapi !=(*EcalNonIsolMap).end()) { ele.
ecalIsol = mapi->val;}
993 if (HcalEleIsolMap.
isValid()) {
996 if (mapi !=(*HcalEleIsolMap).end()) {ele.
hcalIsol = mapi->val;}
999 if (electronR9NonIsoMap.
isValid()) {
1001 if (mapi !=(*electronR9NonIsoMap).end()) { ele.
r9 = mapi->val; }
1004 if (photonHoverEHNonIsoMap.
isValid()) {
1006 if (mapi !=(*photonHoverEHNonIsoMap).end()) { ele.
hovereh = mapi->val;}
1009 if (electronR9IDNonIsoMap.
isValid()) {
1011 if (mapi !=(*electronR9IDNonIsoMap).end()) { ele.
r9ID = mapi->val; }
1017 if (L1NonIsoPixelSeedsMap.
isValid()) {
1018 for (reco::ElectronSeedCollection::const_iterator it = L1NonIsoPixelSeedsMap->begin();
1019 it != L1NonIsoPixelSeedsMap->end(); it++) {
1022 if (&(*recrSC) == &(*scRef)) { nmatch++;}
1029 if (electronNonIsoHandle.
isValid()) {
1030 bool FirstElectron =
true;
1032 for (reco::ElectronCollection::const_iterator iElectron = electronNonIsoHandle->begin();
1033 iElectron != electronNonIsoHandle->end();iElectron++) {
1035 electronref =
reco::ElectronRef(electronNonIsoHandle, iElectron - electronNonIsoHandle->begin());
1037 if (&(*recrSC) == &(*theClus)) {
1038 if (FirstElectron) {
1039 FirstElectron =
false;
1040 ele.
p = electronref->track()->momentum().R();
1041 ele.
vtxZ = electronref->track()->dz();
1042 float deta=-100, dphi=-100;
1047 if (TrackEleIsolMap.
isValid()) {
1049 if (mapTr !=(*TrackEleIsolMap).end()) { ele.
trackIsol = mapTr->val;}
1063 ele2.
vtxZ = electronref->track()->dz();
1069 ele2.
p = electronref->track()->momentum().R();
1073 float deta=-100, dphi=-100;
1078 if (TrackEleIsolMap.
isValid()) {
1080 if (mapTr !=(*TrackEleIsolMap).end()) { ele2.
trackIsol = mapTr->val;}
1082 theHLTElectrons.push_back(ele2);
1089 theHLTElectrons.push_back(ele);
1106 math::XYZPoint SCcorrPosition(theClus->x()-BSPosition.x(), theClus->y()-BSPosition.y() , theClus->z()-eleref->track()->vz() );
1107 deltaeta = SCcorrPosition.eta()-eleref->track()->eta();
1109 if(useTrackProjectionToEcal){
1111 const math::XYZPoint vertex(BSPosition.x(),BSPosition.y(),eleref->track()->vz());
1113 float phi1= posCalc.
ecalPhi(theMagField.
product(),trackMom,vertex,1);
1114 float phi2= posCalc.
ecalPhi(theMagField.
product(),trackMom,vertex,-1);
1116 float deltaphi1=fabs( phi1 - theClus->position().phi() );
1117 if(deltaphi1>6.283185308) deltaphi1 -= 6.283185308;
1118 if(deltaphi1>3.141592654) deltaphi1 = 6.283185308-deltaphi1;
1120 float deltaphi2=fabs( phi2 - theClus->position().phi() );
1121 if(deltaphi2>6.283185308) deltaphi2 -= 6.283185308;
1122 if(deltaphi2>3.141592654) deltaphi2 = 6.283185308-deltaphi2;
1124 deltaphi = deltaphi1;
1125 if(deltaphi2<deltaphi1){ deltaphi = deltaphi2;}
1128 deltaphi=fabs(eleref->track()->outerPosition().phi()-theClus->phi());
1129 if(deltaphi>6.283185308) deltaphi -= 6.283185308;
1130 if(deltaphi>3.141592654) deltaphi = 6.283185308-deltaphi;
float * hecalactivhovereh
tuple useTrackProjectionToEcal
friend struct const_iterator
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)
float * hhfclustereCOREe9
virtual reco::SuperClusterRef superCluster() const
reference to a superCluster
edm::Ref< RecoEcalCandidateCollection > RecoEcalCandidateRef
reference to an object in a collection of RecoEcalCandidate objects
math::XYZPoint Point
point in the space
edm::Ref< ElectronCollection > ElectronRef
reference to an object in a collection of Electron objects
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
double eta() const
pseudorapidity of cluster centroid
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)
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, const edm::Handle< reco::HFEMClusterShapeAssociationCollection > &electronHFClusterAssociation, const edm::Handle< reco::RecoEcalCandidateCollection > &activityECAL, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &activityEcalIsoMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &activityHcalIsoMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &activityTrackIsoMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &activityR9Map, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &activityR9IDMap, const edm::Handle< reco::RecoEcalCandidateIsolationMap > &activityHoverEHMap, TTree *tree)
static const size_t kMaxEl
static const size_t kMaxhEle
XYZVectorD XYZVector
spatial vector with cartesian internal representation
XYZPointD XYZPoint
point in space with cartesian internal representation
std::vector< Photon > PhotonCollection
collectin of Photon objects
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
float * hecalactivClusShap
static const size_t kMaxPhot
double phi() const
azimuthal angle of cluster centroid
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)