18 hltElectronTag(iConfig.getParameter<
edm::InputTag > (
"HltElectronTag")),
19 sourceJetTag(iConfig.getParameter<
edm::InputTag > (
"SourceJetTag")),
23 minDeltaR_(iConfig.getParameter< double > (
"minDeltaR"))
31 produces<TCollectionVector> ();
51 desc.
add<
double> (
"minDeltaR", 0.5);
71 typedef vector<T> TCollection;
83 std::vector<edm::Ref<reco::RecoEcalCandidateCollection> > clusCands;
86 std::vector<edm::Ref<reco::ElectronCollection> > eleCands;
93 std::vector<TVector3> ElePs;
95 if(!clusCands.empty()){
96 for(
auto & clusCand : clusCands){
97 TVector3 positionVector(
98 clusCand->superCluster()->position().x(),
99 clusCand->superCluster()->position().y(),
100 clusCand->superCluster()->position().z());
101 ElePs.push_back(positionVector);
103 }
else if(!eleCands.empty()){
104 for(
auto & eleCand : eleCands){
105 TVector3 positionVector(
106 eleCand->superCluster()->position().x(),
107 eleCand->superCluster()->position().y(),
108 eleCand->superCluster()->position().z());
109 ElePs.push_back(positionVector);
112 else if(!photonCands.empty()){
113 for(
auto & photonCand : photonCands){
114 TVector3 positionVector(
115 photonCand->superCluster()->position().x(),
116 photonCand->superCluster()->position().y(),
117 photonCand->superCluster()->position().z());
118 ElePs.push_back(positionVector);
125 const TCollection & theJetCollection = *theJetCollectionHandle;
129 std::unique_ptr < TCollectionVector > allSelections(
new TCollectionVector());
133 for (
auto & EleP : ElePs) {
137 TRefVector refVector;
139 for (
unsigned int j = 0; j < theJetCollection.size(); j++) {
140 TVector3 JetP(theJetCollection[j].px(), theJetCollection[j].py(), theJetCollection[j].pz());
141 double DR = EleP.DeltaR(JetP);
144 refVector.push_back(TRef(theJetCollectionHandle, j));
146 allSelections->push_back(refVector);
std::string defaultModuleLabel()
edm::EDGetTokenT< std::vector< T > > m_theJetToken
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
edm::InputTag sourceJetTag
~HLTJetCollectionsForElePlusJets()
bool getByToken(EDGetToken token, Handle< PROD > &result) const
HLTJetCollectionsForElePlusJets(const edm::ParameterSet &)
edm::InputTag hltElectronTag
ParameterDescriptionBase * add(U const &iLabel, T const &value)
edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > m_theElectronToken
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::vector< reco::RecoEcalCandidateRef > VRphoton
virtual void produce(edm::Event &, const edm::EventSetup &)