|
|
Go to the documentation of this file.
70 double getPtScaledCut(
double pt, std::vector<double>&
parameters);
71 bool selectMatchedTrack(
double& d_r,
double& d_phi,
double& d_eta,
double& tk_pt,
float& eg_eta);
110 iConfig.getParameter<
edm::
InputTag>(
"L1TrackInputTag"))),
142 produces<TkElectronCollection>(
label);
164 L1TTTrackCollectionType::const_iterator trackIter;
168 <<
"\nWarning: L1EmCollection not found in the event. Exit" << std::endl;
171 if (!L1TTTrackHandle.
isValid()) {
172 throw cms::Exception(
"TkEmProducer") <<
"\nWarning: L1TTTrackCollectionType not found in the event. Exit."
178 for (egIter = eGammaCollection.
begin(0); egIter != eGammaCollection.
end(0); ++egIter) {
182 float e_ele = egIter->energy();
183 float eta_ele = egIter->eta();
185 float cosh_eta_ele = cosh(eta_ele);
186 if (cosh_eta_ele > 0.0)
187 et_ele = e_ele / cosh_eta_ele;
196 for (trackIter = L1TTTrackHandle->begin(); trackIter != L1TTTrackHandle->end(); ++trackIter) {
198 double trkPt_fit = trackIter->momentum().perp();
200 double trkPt = trkPt_fit;
223 float trkisol =
isolation(L1TTTrackHandle, itrack);
225 trkisol = trkisol / et_ele;
300 L1TTTrackCollectionType::const_iterator trackIter;
308 for (trackIter = trkHandle->begin(); trackIter != trkHandle->end(); ++trackIter) {
309 if (
itr++ != match_index) {
315 float dZ =
std::abs(trackIter->POCA().z() - matchedTrkPtr->
POCA().
z());
317 float phi1 = trackIter->momentum().phi();
320 float dEta = (trackIter->momentum().eta() - matchedTrkPtr->
momentum().
eta());
323 if (dR2 > dRMin2 && dR2 < dRMax2 && dZ < deltaZ_ && trackIter->momentum().perp() >
pTMinTra_) {
324 sumPt += trackIter->momentum().perp();
335 double& d_r,
double& d_phi,
double& d_eta,
double& tk_pt,
float& eg_eta) {
344 if ((d_eta / deta_max) * (d_eta / deta_max) + (d_phi / dphi_max) * (d_phi / dphi_max) < 1)
T const * product() const
T const * product() const
GlobalVector momentum() const
Track momentum.
bool selectMatchedTrack(double &d_r, double &d_phi, double &d_eta, double &tk_pt, float &eg_eta)
~L1TkElectronTrackProducer() override
float isolation(const edm::Handle< L1TTTrackCollectionType > &trkHandle, int match_index)
constexpr double deltaPhi(double phi1, double phi2)
std::vector< T >::const_iterator const_iterator
std::vector< double > dPhiCutoff_
bool primaryVtxConstrain_
Class to store the L1 Track Trigger tracks.
double rInv() const
Track curvature.
std::vector< double > dEtaCutoff_
TTTrack< Ref_Phase2TrackerDigi_ > L1TTTrackType
double getPtScaledCut(double pt, std::vector< double > ¶meters)
L1TkElectronTrackProducer(const edm::ParameterSet &)
const edm::EDGetTokenT< EGammaBxCollection > egToken_
GlobalPoint POCA() const
POCA.
#define DEFINE_FWK_MODULE(type)
edm::Ref< EGammaBxCollection > EGammaRef
void doMatchClusterET(BXVector< l1t::EGamma >::const_iterator egIter, const edm::Ptr< L1TTTrackType > &pTrk, double &dph, double &dr, double &deta)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void doMatch(BXVector< l1t::EGamma >::const_iterator egIter, const edm::Ptr< L1TTTrackType > &pTrk, double &dph, double &dr, double &deta)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const_iterator begin(int bx) const
unsigned int minNStubsIsoTracks_
const_iterator end(int bx) const
std::vector< L1TTTrackType > L1TTTrackCollectionType
std::vector< TkElectron > TkElectronCollection
float pTFrom2(std::vector< TTTrack< Ref_Phase2TrackerDigi_ > >::const_iterator trk, const TrackerGeometry *tkGeometry)
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
std::vector< std::pair< float, float > >::iterator itr
const edm::EDGetTokenT< std::vector< TTTrack< Ref_Phase2TrackerDigi_ > > > trackToken_
void setTrackCurvature(double trackCurvature)
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
void produce(edm::Event &, const edm::EventSetup &) override
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
T getParameter(std::string const &) const
Abs< T >::type abs(const T &t)
void addDefault(ParameterSetDescription const &psetDescription)
Geom::Phi< T > phi() const
static constexpr float EB_MaxEta
std::vector< double > dRCutoff_