|
|
|
void | beginRun (edm::Run const &, edm::EventSetup const &) override |
|
void | endRun (edm::Run const &, edm::EventSetup const &) override |
|
reco::HcalIsolatedTrackCandidateCollection * | select (edm::Handle< edm::TriggerResults > &triggerResults, const std::vector< std::string > &triggerNames_, edm::Handle< reco::TrackCollection > &trkCollection, math::XYZPoint &leadPV, edm::Handle< EcalRecHitCollection > &barrelRecHitsHandle, edm::Handle< EcalRecHitCollection > &endcapRecHitsHandle, edm::Handle< HBHERecHitCollection > &hbhe, double ptL1, double etaL1, double phiL1) |
|
void | setPtEtaPhi (std::vector< edm::Ref< l1extra::L1JetParticleCollection > > &objref, double &ptL1, double &etaL1, double &phiL1) |
|
Definition at line 87 of file AlCaIsoTracksProducer.cc.
◆ AlCaIsoTracksProducer()
Definition at line 149 of file AlCaIsoTracksProducer.cc.
154 trigNames_(iConfig.getParameter<std::vector<std::string> >(
"triggers")),
157 a_coneR_(iConfig.getParameter<
double>(
"coneRadius")),
158 a_mipR_(iConfig.getParameter<
double>(
"coneRadiusMIP")),
161 pTrackMin_(iConfig.getParameter<
double>(
"minimumTrackP")),
162 eEcalMax_(iConfig.getParameter<
double>(
"maximumEcalEnergy")),
163 eIsolate_(iConfig.getParameter<
double>(
"isolationEnergy")),
164 pTrackLow_(iConfig.getParameter<
double>(
"momentumRangeLow")),
165 pTrackHigh_(iConfig.getParameter<
double>(
"momentumRangeHigh")),
166 preScale_(iConfig.getParameter<
int>(
"preScaleFactor")),
183 const double isolationRadius(28.9);
208 edm::LogInfo(
"HcalIsoTrack") <<
"Parameters read from config file \n"
228 produces<reco::HcalIsolatedTrackCandidateCollection>(
labelIsoTk_);
234 edm::LogInfo(
"HcalIsoTrack") <<
" Expected to produce the collections:\n"
235 <<
"reco::HcalIsolatedTrackCandidateCollection "
236 <<
" with label HcalIsolatedTrackCollection\n"
238 <<
"EcalRecHitCollection with label EcalRecHitsEB\n"
239 <<
"EcalRecHitCollection with label EcalRecHitsEE\n"
References a_charIsoR_, a_coneR_, a_mipR_, eEcalMax_, eIsolate_, edm::ParameterSet::getParameter(), edm::InputTag::instance(), dqmdumpme::k, edm::InputTag::label(), labelBS_, labelEB_, labelEE_, labelGenTrack_, labelHBHE_, labelHltGT_, labelIsoTk_, labelRecVtx_, labelTriggerEvent_, labelTriggerResults_, spr::trackSelectionParameters::maxChi2, spr::trackSelectionParameters::maxDpOverP, spr::trackSelectionParameters::maxDxyPV, spr::trackSelectionParameters::maxDzPV, spr::trackSelectionParameters::maxInMiss, spr::trackSelectionParameters::maxOutMiss, maxRestrictionP_, spr::trackSelectionParameters::minLayerCrossed, spr::trackSelectionParameters::minOuterHit, spr::trackSelectionParameters::minPt, spr::trackSelectionParameters::minQuality, preScale_, processName_, pTrackHigh_, pTrackLow_, pTrackMin_, reco::TrackBase::qualityByName(), selectionParameter_, slopeRestrictionP_, theTrackQuality_, tok_bs_, tok_EB_, tok_EE_, tok_genTrack_, tok_hbhe_, tok_hltGT_, tok_recVtx_, tok_trigEvt_, tok_trigRes_, and trigNames_.
◆ ~AlCaIsoTracksProducer()
AlCaIsoTracksProducer::~AlCaIsoTracksProducer |
( |
| ) |
|
|
override |
◆ beginRun()
◆ endRun()
◆ endStream()
void AlCaIsoTracksProducer::endStream |
( |
| ) |
|
|
override |
◆ fillDescriptions()
Definition at line 245 of file AlCaIsoTracksProducer.cc.
257 desc.
add<
std::string>(
"IsoTrackLabel",
"HcalIsolatedTrackCollection");
258 std::vector<std::string> triggers = {
"HLT_IsoTrackHB",
"HLT_IsoTrackHE"};
259 desc.
add<std::vector<std::string> >(
"triggers", triggers);
263 desc.
add<
double>(
"minTrackPt", 1.0);
264 desc.add<
double>(
"maxDxyPV", 10.0);
265 desc.add<
double>(
"maxDzPV", 100.0);
266 desc.add<
double>(
"maxChi2", 5.0);
267 desc.add<
double>(
"maxDpOverP", 0.1);
268 desc.add<
int>(
"minOuterHit", 4);
269 desc.add<
int>(
"minLayerCrossed", 8);
270 desc.add<
int>(
"maxInMiss", 2);
271 desc.add<
int>(
"maxOutMiss", 2);
273 desc.add<
double>(
"coneRadius", 34.98);
274 desc.add<
double>(
"minimumTrackP", 20.0);
276 desc.add<
double>(
"coneRadiusMIP", 14.0);
277 desc.add<
double>(
"maximumEcalEnergy", 2.0);
279 desc.add<
double>(
"maxTrackP", 8.0);
280 desc.add<
double>(
"slopeTrackP", 0.05090504066);
281 desc.add<
double>(
"isolationEnergy", 10.0);
283 desc.add<
double>(
"momentumRangeLow", 20.0);
284 desc.add<
double>(
"momentumRangeHigh", 40.0);
285 desc.add<
int>(
"preScaleFactor", 10);
286 descriptions.
add(
"alcaisotrk", desc);
References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), HLT_2018_cff::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.
◆ globalEndJob()
◆ initializeGlobalCache()
◆ produce()
Definition at line 289 of file AlCaIsoTracksProducer.cc.
293 <<
iEvent.luminosityBlock() <<
" Bunch " <<
iEvent.bunchCrossing();
300 if (!triggerEventHandle.
isValid()) {
313 if (!trkCollection.
isValid()) {
329 if (!recVtxs->empty() && !((*recVtxs)[0].isFake())) {
330 leadPV =
math::XYZPoint((*recVtxs)[0].
x(), (*recVtxs)[0].
y(), (*recVtxs)[0].
z());
331 }
else if (beamSpotH.
isValid()) {
336 edm::LogInfo(
"HcalIsoTrack") <<
"Primary Vertex " << leadPV;
341 if (!barrelRecHitsHandle.
isValid()) {
347 if (!endcapRecHitsHandle.
isValid()) {
353 if (!
hbhe.isValid()) {
359 double ptL1(0), etaL1(0), phiL1(0);
364 std::vector<edm::Ref<l1extra::L1JetParticleCollection> > l1tauobjref;
368 std::vector<edm::Ref<l1extra::L1JetParticleCollection> > l1jetobjref;
372 std::vector<edm::Ref<l1extra::L1JetParticleCollection> > l1forjetobjref;
379 auto outputHcalIsoTrackColl = std::make_unique<reco::HcalIsolatedTrackCandidateCollection>();
380 auto outputVColl = std::make_unique<reco::VertexCollection>();
381 auto outputEBColl = std::make_unique<EBRecHitCollection>();
382 auto outputEEColl = std::make_unique<EERecHitCollection>();
383 auto outputHBHEColl = std::make_unique<HBHERecHitCollection>();
387 edm::LogWarning(
"HcalIsoTrack") <<
"Error! Can't get some of the products";
392 const std::vector<std::string>& triggerNames_ =
triggerNames.triggerNames();
404 edm::LogInfo(
"HcalIsoTrack") <<
"AlCaIsoTracksProducer::select returns " << isotk->size() <<
" isolated tracks";
407 if (!isotk->empty()) {
408 int ntrin(0), ntrout(0);
409 for (reco::HcalIsolatedTrackCandidateCollection::const_iterator
itr = isotk->begin();
itr != isotk->end();
416 bool selectEvent = ntrout > 0;
417 if (!selectEvent && ntrin > 0) {
425 for (reco::HcalIsolatedTrackCandidateCollection::const_iterator
itr = isotk->begin();
itr != isotk->end();
427 outputHcalIsoTrackColl->push_back(*
itr);
429 for (reco::VertexCollection::const_iterator
vtx = recVtxs->begin();
vtx != recVtxs->end(); ++
vtx)
430 outputVColl->push_back(*
vtx);
433 ehit != barrelRecHitsHandle->
end();
435 outputEBColl->push_back(*ehit);
438 ehit != endcapRecHitsHandle->
end();
440 outputEEColl->push_back(*ehit);
442 for (std::vector<HBHERecHit>::const_iterator hhit =
hbhe->begin(); hhit !=
hbhe->end(); ++hhit)
443 outputHBHEColl->push_back(*hhit);
References edm::SortedCollection< T, SORT >::begin(), edm::SortedCollection< T, SORT >::end(), trigger::TriggerRefsCollections::getObjects(), photonIsolationHIProducer_cfi::hbhe, iEvent, edm::InputTag::instance(), edm::HandleBase::isValid(), edm::InputTag::label(), labelEB_, labelEE_, labelGenTrack_, labelHBHE_, labelIsoTk_, labelRecVtx_, labelTriggerEvent_, labelTriggerResults_, eostools::move(), nAll_, nGood_, nRange_, reco::BeamSpot::position(), preScale_, edm::Handle< T >::product(), pTrackHigh_, pTrackLow_, select(), setPtEtaPhi(), tok_bs_, tok_EB_, tok_EE_, tok_genTrack_, tok_hbhe_, tok_hltGT_, tok_recVtx_, tok_trigEvt_, tok_trigRes_, PDWG_DiPhoton_SD_cff::triggerEvent, trigger::TriggerL1CenJet, trigger::TriggerL1ForJet, trigger::TriggerL1TauJet, L1TEGammaOffline_cfi::triggerNames, triggerResults, validateGeometry_cfg::valid, badGlobalMuonTaggersAOD_cff::vtx, x, y, and z.
◆ select()
Definition at line 485 of file AlCaIsoTracksProducer.cc.
500 for (
unsigned int iHLT = 0; iHLT <
triggerResults->size(); iHLT++) {
507 edm::LogInfo(
"HcalIsoTrack") <<
"The trigger we are looking for " << triggerNames_[iHLT] <<
" Flag " <<
hlt
514 std::vector<spr::propagatedTrackDirection> trkCaloDirections;
517 std::vector<spr::propagatedTrackDirection>::const_iterator trkDetItr;
518 unsigned int nTracks(0), nselTracks(0);
519 for (trkDetItr = trkCaloDirections.begin(),
nTracks = 0; trkDetItr != trkCaloDirections.end();
521 const reco::Track* pTrack = &(*(trkDetItr->trkItr));
524 edm::LogInfo(
"HcalIsoTrack") <<
"This track : " <<
nTracks <<
" (pt|eta|phi|p) :" << pTrack->
pt() <<
"|"
525 << pTrack->
eta() <<
"|" << pTrack->
phi() <<
"|" << pTrack->
p();
530 edm::LogInfo(
"HcalIsoTrack") <<
"qltyFlag|okECAL|okHCAL : " << qltyFlag <<
"|" << trkDetItr->okECAL <<
"|"
531 << trkDetItr->okHCAL;
533 if (qltyFlag && trkDetItr->okECAL && trkDetItr->okHCAL) {
534 double t_p = pTrack->
p();
536 int nRH_eMipDR(0), nNearTRKs(0);
540 trkDetItr->pointHCAL,
541 trkDetItr->pointECAL,
543 trkDetItr->directionECAL,
552 edm::LogInfo(
"HcalIsoTrack") <<
"This track : " <<
nTracks <<
" (pt|eta|phi|p) :" << pTrack->
pt() <<
"|"
553 << pTrack->
eta() <<
"|" << pTrack->
phi() <<
"|" << t_p <<
" e_MIP " << eMipDR
554 <<
" Chg Isolation " << hmaxNearP <<
":" << eIsolation;
558 newCandidate.SetMaxP(hmaxNearP);
559 newCandidate.SetEnergyEcal(eMipDR);
560 newCandidate.setL1(ptL1, etaL1, phiL1);
561 newCandidate.SetEtaPhiEcal((trkDetItr->pointECAL).eta(), (trkDetItr->pointECAL).
phi());
563 newCandidate.SetEtaPhiHcal(
564 (trkDetItr->pointHCAL).eta(), (trkDetItr->pointHCAL).
phi(), detId.
ieta(), detId.
iphi());
566 for (reco::TrackCollection::const_iterator trkItr1 = trkCollection->begin(); trkItr1 != trkCollection->end();
569 if (pTrack1 == pTrack) {
571 newCandidate.setTrack(tRef);
References a_charIsoR_, a_mipR_, bField, spr::chargeIsolationCone(), spr::eCone_ecal(), eEcalMax_, eIsolate_, reco::TrackBase::eta(), JetChargeProducer_cfi::exp, spr::find(), geo, spr::goodTrack(), ValidationMatrix::hlt, mps_fire::i, LEDCalibrationChannels::ieta, HcalDetId::ieta(), HcalDetId::ietaAbs(), HcalDetId::iphi(), maxRestrictionP_, nTracks(), convertSQLiteXML::ok, reco::TrackBase::p(), phi, reco::TrackBase::phi(), spr::propagateCALO(), reco::TrackBase::pt(), pTrackMin_, reco::TrackBase::px(), reco::TrackBase::py(), reco::TrackBase::pz(), selectionParameter_, reco::HcalIsolatedTrackCandidate::SetEnergyEcal(), reco::HcalIsolatedTrackCandidate::SetEtaPhiEcal(), reco::HcalIsolatedTrackCandidate::SetEtaPhiHcal(), reco::HcalIsolatedTrackCandidate::setL1(), reco::HcalIsolatedTrackCandidate::SetMaxP(), reco::HcalIsolatedTrackCandidate::setTrack(), slopeRestrictionP_, theTrackQuality_, duplicaterechits_cfi::trackCollection, triggerResults, and trigNames_.
Referenced by produce().
◆ setPtEtaPhi()
◆ a_charIsoR_
double AlCaIsoTracksProducer::a_charIsoR_ |
|
private |
◆ a_coneR_
const double AlCaIsoTracksProducer::a_coneR_ |
|
private |
◆ a_mipR_
const double AlCaIsoTracksProducer::a_mipR_ |
|
private |
◆ bField
◆ eEcalMax_
const double AlCaIsoTracksProducer::eEcalMax_ |
|
private |
◆ eIsolate_
const double AlCaIsoTracksProducer::eIsolate_ |
|
private |
◆ geo
◆ hltConfig_
◆ labelBS_
◆ labelEB_
◆ labelEE_
◆ labelGenTrack_
◆ labelHBHE_
◆ labelHltGT_
◆ labelIsoTk_
const std::string AlCaIsoTracksProducer::labelIsoTk_ |
|
private |
◆ labelRecVtx_
◆ labelTriggerEvent_
◆ labelTriggerResults_
◆ maxRestrictionP_
const double AlCaIsoTracksProducer::maxRestrictionP_ |
|
private |
◆ nAll_
unsigned int AlCaIsoTracksProducer::nAll_ |
|
private |
◆ nGood_
unsigned int AlCaIsoTracksProducer::nGood_ |
|
private |
◆ nRange_
unsigned int AlCaIsoTracksProducer::nRange_ |
|
private |
◆ nRun_
unsigned int AlCaIsoTracksProducer::nRun_ |
|
private |
◆ preScale_
const int AlCaIsoTracksProducer::preScale_ |
|
private |
◆ processName_
const std::string AlCaIsoTracksProducer::processName_ |
|
private |
◆ pTrackHigh_
const double AlCaIsoTracksProducer::pTrackHigh_ |
|
private |
◆ pTrackLow_
const double AlCaIsoTracksProducer::pTrackLow_ |
|
private |
◆ pTrackMin_
const double AlCaIsoTracksProducer::pTrackMin_ |
|
private |
◆ selectionParameter_
◆ slopeRestrictionP_
const double AlCaIsoTracksProducer::slopeRestrictionP_ |
|
private |
◆ theTrackQuality_
const std::string AlCaIsoTracksProducer::theTrackQuality_ |
|
private |
◆ tok_bs_
◆ tok_EB_
◆ tok_EE_
◆ tok_genTrack_
◆ tok_hbhe_
◆ tok_hltGT_
◆ tok_recVtx_
◆ tok_trigEvt_
◆ tok_trigRes_
◆ trigNames_
const std::vector<std::string> AlCaIsoTracksProducer::trigNames_ |
|
private |
edm::EDGetTokenT< EcalRecHitCollection > tok_EB_
T const * product() const
const unsigned int nTracks(const reco::Vertex &sv)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
std::vector< T >::const_iterator const_iterator
T const * product() const
const edm::InputTag labelRecVtx_
constexpr int iphi() const
get the cell iphi
double p() const
momentum vector magnitude
const edm::InputTag labelEE_
const double slopeRestrictionP_
HLTConfigProvider hltConfig_
reco::HcalIsolatedTrackCandidateCollection * select(edm::Handle< edm::TriggerResults > &triggerResults, const std::vector< std::string > &triggerNames_, edm::Handle< reco::TrackCollection > &trkCollection, math::XYZPoint &leadPV, edm::Handle< EcalRecHitCollection > &barrelRecHitsHandle, edm::Handle< EcalRecHitCollection > &endcapRecHitsHandle, edm::Handle< HBHERecHitCollection > &hbhe, double ptL1, double etaL1, double phiL1)
const edm::InputTag labelBS_
edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > tok_hltGT_
static const std::string triggerResults
double px() const
x coordinate of momentum vector
bool goodTrack(const reco::Track *pTrack, math::XYZPoint leadPV, trackSelectionParameters parameters, bool debug=false)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
const edm::InputTag labelHBHE_
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
edm::EDGetTokenT< reco::VertexCollection > tok_recVtx_
const std::string labelIsoTk_
double pt() const
track transverse momentum
const edm::InputTag labelHltGT_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
double py() const
y coordinate of momentum vector
const_iterator begin() const
spr::trackSelectionParameters selectionParameter_
edm::EDGetTokenT< EcalRecHitCollection > tok_EE_
edm::EDGetTokenT< edm::TriggerResults > tok_trigRes_
const Point & position() const
position
double chargeIsolationCone(unsigned int trkIndex, std::vector< spr::propagatedTrackDirection > &trkDirs, double dR, int &nNearTRKs, bool debug=false)
const edm::InputTag labelEB_
double phi() const
azimuthal angle of momentum vector
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
std::vector< HcalIsolatedTrackCandidate > HcalIsolatedTrackCandidateCollection
collectin of HcalIsolatedTrackCandidate objects
edm::EDGetTokenT< trigger::TriggerEvent > tok_trigEvt_
constexpr int ieta() const
get the cell ieta
const edm::InputTag labelTriggerEvent_
XYZPointD XYZPoint
point in space with cartesian internal representation
const_iterator end() const
edm::EDGetTokenT< reco::BeamSpot > tok_bs_
double eta() const
pseudorapidity of momentum vector
const double maxRestrictionP_
The single EDProduct to be saved for each event (AOD case)
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
std::vector< std::pair< float, float > >::iterator itr
reco::TrackBase::TrackQuality minQuality
const std::vector< std::string > trigNames_
std::vector< spr::propagatedTrackID > propagateCALO(edm::Handle< reco::TrackCollection > &trkCollection, const CaloGeometry *geo, const MagneticField *bField, const std::string &theTrackQuality, bool debug=false)
static TrackQuality qualityByName(const std::string &name)
const std::string processName_
const std::string theTrackQuality_
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d'tor
void setPtEtaPhi(std::vector< edm::Ref< l1extra::L1JetParticleCollection > > &objref, double &ptL1, double &etaL1, double &phiL1)
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
const edm::InputTag labelTriggerResults_
edm::EDGetTokenT< reco::TrackCollection > tok_genTrack_
double pz() const
z coordinate of momentum vector
const edm::InputTag labelGenTrack_
constexpr int ietaAbs() const
get the absolute value of the cell ieta
double eCone_ecal(const CaloGeometry *geo, edm::Handle< T > &barrelhits, edm::Handle< T > &endcaphits, const GlobalPoint &hpoint1, const GlobalPoint &point1, double dR, const GlobalVector &trackMom, int &nRecHits, double ebThr=-100, double eeThr=-100, double tMin=-500, double tMax=500, bool debug=false)
const MagneticField * bField