61 produces < reco::ElectronIsolationMap >(
"Deta" ).setBranchAlias(
"deta" );
62 produces < reco::ElectronIsolationMap >(
"Dphi" ).setBranchAlias(
"dphi" );
64 produces < reco::RecoEcalCandidateIsolationMap >(
"Deta" ).setBranchAlias(
"deta" );
65 produces < reco::RecoEcalCandidateIsolationMap >(
"Dphi" ).setBranchAlias(
"dphi" );
97 for(reco::ElectronCollection::const_iterator iElectron = electronHandle->begin(); iElectron != electronHandle->end(); iElectron++){
102 detaMap.
insert(eleref, dEtaDPhi.first);
103 dphiMap.
insert(eleref, dEtaDPhi.second);
108 for(reco::RecoEcalCandidateCollection::const_iterator iRecoEcalCand = recoEcalCandHandle->begin(); iRecoEcalCand != recoEcalCandHandle->end(); iRecoEcalCand++){
113 std::pair<float,float> dEtaDPhi(999999,999999);
115 detaCandMap.
insert(recoEcalCandRef, dEtaDPhi.first);
116 dphiCandMap.
insert(recoEcalCandRef, dEtaDPhi.second);
123 iEvent.
put(detMap,
"Deta" );
124 iEvent.
put(dphMap,
"Dphi" );
128 iEvent.
put(detaCandMapForEvent,
"Deta" );
129 iEvent.
put(dphiCandMapForEvent,
"Dphi" );
138 math::XYZPoint SCcorrPosition(theClus->x()-bsPosition.x(), theClus->y()-bsPosition.y() , theClus->z()-eleref->track()->vz() );
139 float deltaeta = fabs(SCcorrPosition.eta()-eleref->track()->eta());
140 float deltaphi = 999.;
142 bool recoveryForFailingPropagation =
false;
150 deltaeta = fabs(scAtVtx.dEta());
151 deltaphi = fabs(scAtVtx.dPhi());
153 recoveryForFailingPropagation =
true;
157 const math::XYZPoint vertex(bsPosition.x(),bsPosition.y(),eleref->track()->vz());
159 float phi1= posCalc.
ecalPhi(magField,trackMom,vertex,1);
160 float phi2= posCalc.
ecalPhi(magField,trackMom,vertex,-1);
162 float deltaphi1=fabs( phi1 - theClus->position().phi() );
163 if(deltaphi1>6.283185308) deltaphi1 -= 6.283185308;
164 if(deltaphi1>3.141592654) deltaphi1 = 6.283185308-deltaphi1;
166 float deltaphi2=fabs( phi2 - theClus->position().phi() );
167 if(deltaphi2>6.283185308) deltaphi2 -= 6.283185308;
168 if(deltaphi2>3.141592654) deltaphi2 = 6.283185308-deltaphi2;
170 deltaphi = deltaphi1;
171 if(deltaphi2<deltaphi1){ deltaphi = deltaphi2;}
173 deltaphi=fabs(eleref->track()->outerPosition().phi()-theClus->phi());
174 if(deltaphi>6.283185308) deltaphi -= 6.283185308;
175 if(deltaphi>3.141592654) deltaphi = 6.283185308-deltaphi;
178 return std::make_pair(deltaeta,deltaphi);
184 for(reco::ElectronCollection::const_iterator eleIt = electronHandle->begin(); eleIt != electronHandle->end(); eleIt++){
185 if(eleIt->superCluster()==recoEcalCandRef->superCluster()){
T getParameter(std::string const &) const
virtual void endRun(edm::Run &, edm::EventSetup const &)
edm::InputTag electronProducer_
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
std::pair< float, float > calDEtaDPhiSCTrk(reco::ElectronRef &eleref, const reco::BeamSpot::Point &BSPosition, const MagneticField *magField)
const MagneticField * magField_
Global3DPoint GlobalPoint
GlobalPoint globalPosition() const
math::XYZPoint Point
point in the space
virtual void beginRun(edm::Run &, edm::EventSetup const &)
edm::Ref< ElectronCollection > ElectronRef
reference to an object in a collection of Electron objects
~EgammaHLTElectronDetaDphiProducer()
double ecalPhi(const MagneticField *magField, const math::XYZVector &momentum, const math::XYZPoint &vertex, const int charge)
virtual void produce(edm::Event &, const edm::EventSetup &)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
edm::InputTag recoEcalCandidateProducer_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
EgammaHLTElectronDetaDphiProducer(const edm::ParameterSet &)
void insert(const key_type &k, const data_type &v)
insert an association
XYZVectorD XYZVector
spatial vector with cartesian internal representation
XYZPointD XYZPoint
point in space with cartesian internal representation
T const * product() const
TrajectoryStateOnSurface stateOnSurface(const GlobalPoint &point) const
edm::InputTag bsProducer_
bool useTrackProjectionToEcal_
static reco::ElectronRef getEleRef(const reco::RecoEcalCandidateRef &recoEcalCandRef, const edm::Handle< reco::ElectronCollection > &electronHandle)