54 dPhi1Para_(config.getParameter<edm::
ParameterSet>(
"dPhi1SParams")),
55 dPhi2Para_(config.getParameter<edm::
ParameterSet>(
"dPhi2SParams")),
56 dRZ2Para_(config.getParameter<edm::
ParameterSet>(
"dRZ2SParams")),
57 productsToWrite_(config.getParameter<int>(
"productsToWrite"))
61 produces < reco::RecoEcalCandidateIsolationMap >(
"s2");
63 produces < reco::RecoEcalCandidateIsolationMap >(
"dPhi1BestS2");
64 produces < reco::RecoEcalCandidateIsolationMap >(
"dPhi2BestS2");
65 produces < reco::RecoEcalCandidateIsolationMap >(
"dzBestS2");
83 std::auto_ptr<edm::ParameterDescriptionCases<std::string>> binDescCases;
89 edm::ParameterDescription<int>(
"yMax",99999,
true) and
94 edm::ParameterDescription<double>(
"xMax",3.0,
true) and
95 edm::ParameterDescription<int>(
"yMin",0,
true) and
96 edm::ParameterDescription<int>(
"yMax",99999,
true) and
97 edm::ParameterDescription<std::string>(
"funcType",
"pol0",
true) and
100 (edm::ParameterDescription<double>(
"xMin",0.0,
true) and
101 edm::ParameterDescription<double>(
"xMax",3.0,
true) and
102 edm::ParameterDescription<int>(
"yMin",0,
true) and
103 edm::ParameterDescription<int>(
"yMax",99999,
true) and
104 edm::ParameterDescription<std::string>(
"funcType",
"pol0",
true) and
107 binParamDesc.
ifValue(edm::ParameterDescription<std::string>(
"binType",
"AbsEtaClus",
true), binDescCases);
110 varParamDesc.addVPSet(
"bins",binParamDesc);
111 desc.
add(
"dPhi1SParams",varParamDesc);
112 desc.
add(
"dPhi2SParams",varParamDesc);
113 desc.
add(
"dRZ2SParams",varParamDesc);
114 desc.
add<
int>(
"productsToWrite",0);
115 descriptions.
add((
"hltEgammaHLTPixelMatchVarProducer"), desc);
128 if(!recoEcalCandHandle.
isValid() || !pixelSeedsHandle.
isValid())
return;
135 for(
unsigned int candNr = 0; candNr<recoEcalCandHandle->size(); candNr++) {
141 for(
auto &
seed : *pixelSeedsHandle){
144 if(&(*candSCRef) == &(*pixelSCRef)){
146 std::array<float,4> s2Data =
calS2(
seed,-1);
147 std::array<float,4> s2DataPos =
calS2(
seed,+1);
148 if(s2Data[0]<bestS2[0]) bestS2=s2Data;
149 if(s2DataPos[0]<bestS2[0]) bestS2=s2DataPos;
155 s2Map->insert(candRef,bestS2[0]);
157 dPhi1BestS2Map->insert(candRef,bestS2[1]);
158 dPhi2BestS2Map->insert(candRef,bestS2[2]);
159 dzBestS2Map->insert(candRef,bestS2[3]);
164 iEvent.
put(s2Map,
"s2");
166 iEvent.
put(dPhi1BestS2Map,
"dPhi1BestS2");
167 iEvent.
put(dPhi2BestS2Map,
"dPhi2BestS2");
168 iEvent.
put(dzBestS2Map,
"dzBestS2");
178 float dPhi1 = (charge <0 ? seed.
dPhi1() : seed.
dPhi1Pos())/dPhi1Const;
179 float dPhi2 = (charge <0 ? seed.
dPhi2() : seed.
dPhi2Pos())/dPhi2Const;
180 float dRz2 = (charge <0 ? seed.
dRz2() : seed.
dRz2Pos())/dRZ2Const;
182 float s2 = dPhi1*dPhi1+dPhi2*dPhi2+dRz2*dRz2;
183 return std::array<float,4>{{
s2,dPhi1,dPhi2,dRz2}};
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
egPM::Param< reco::ElectronSeed > dPhi2Para_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
void produce(edm::StreamID sid, edm::Event &, const edm::EventSetup &) const override
egPM::Param< reco::ElectronSeed > dPhi1Para_
egPM::Param< reco::ElectronSeed > dRZ2Para_
~EgammaHLTPixelMatchVarProducer()
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::vector< ElectronSeed > ElectronSeedCollection
collection of ElectronSeed objects
const edm::EDGetTokenT< reco::RecoEcalCandidateCollection > recoEcalCandidateToken_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
std::array< float, 4 > calS2(const reco::ElectronSeed &seed, int charge) const
ParameterDescriptionNode * ifValue(ParameterDescription< T > const &switchParameter, std::auto_ptr< ParameterDescriptionCases< T > > cases)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::vector< RecoEcalCandidate > RecoEcalCandidateCollection
collectin of RecoEcalCandidate objects
const edm::EDGetTokenT< reco::ElectronSeedCollection > pixelSeedsToken_
EgammaHLTPixelMatchVarProducer(const edm::ParameterSet &)