65 iConfig.getParameter<edm::
InputTag>(
"L1TrackInputTag"))),
80 produces<TkEtMissCollection>(
"L1TrackerEtMissExtended");
82 produces<TkEtMissCollection>(
"L1TrackerEtMiss");
100 L1TTTrackCollectionType::const_iterator trackIter;
102 if (!L1VertexHandle.isValid()) {
103 LogError(
"L1TrackerEtMissProducer") <<
"\nWarning: TkPrimaryVertexCollection not found in the event. Exit\n";
107 if (!L1TTTrackHandle.isValid()) {
108 LogError(
"L1TrackerEtMissProducer") <<
"\nWarning: L1TTTrackCollection not found in the event. Exit\n";
118 float zVTX = L1VertexHandle->begin()->zvertex();
120 for (trackIter = L1TTTrackHandle->begin(); trackIter != L1TTTrackHandle->end(); ++trackIter) {
121 float pt = trackIter->momentum().perp();
122 float phi = trackIter->momentum().phi();
123 float eta = trackIter->momentum().eta();
124 float chi2dof = trackIter->chi2Red();
125 float bendChi2 = trackIter->stubPtConsistency();
126 float z0 = trackIter->z0();
128 theStubs = trackIter->getStubRefs();
129 int nstubs = (int)theStubs.size();
151 for (
unsigned int istub = 0; istub < (
unsigned int)theStubs.size(); istub++) {
152 DetId detId(theStubs.at(istub)->getDetId());
167 if (fabs(eta) >= 0 && fabs(eta) < 0.7)
169 else if (fabs(eta) >= 0.7 && fabs(eta) < 1.0)
171 else if (fabs(eta) >= 1.0 && fabs(eta) < 1.2)
173 else if (fabs(eta) >= 1.2 && fabs(eta) < 1.6)
175 else if (fabs(eta) >= 1.6 && fabs(eta) < 2.0)
177 else if (fabs(eta) >= 2.0 && fabs(eta) <= 2.4)
181 if (fabs(z0 - zVTX) <=
deltaZ_) {
182 sumPx += pt *
cos(phi);
183 sumPy += pt *
sin(phi);
186 sumPx_PU += pt *
cos(phi);
187 sumPy_PU += pt *
sin(phi);
192 float et =
sqrt(sumPx * sumPx + sumPy * sumPy);
193 double etmiss_PU =
sqrt(sumPx_PU * sumPx_PU + sumPy_PU * sumPy_PU);
197 METCollection->push_back(
TkEtMiss(missingEt, TkEtMiss::kMET, etTot, etmiss_PU, etTot_PU, ibx));
200 iEvent.
put(
std::move(METCollection),
"L1TrackerEtMissExtended");
202 iEvent.
put(
std::move(METCollection),
"L1TrackerEtMiss");
std::vector< TkEtMiss > TkEtMissCollection
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
std::vector< L1TTTrackType > L1TTTrackCollectionType
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
Sin< T >::type sin(const T &t)
Log< level::Error, false > LogError
std::vector< reco::MET > METCollection
collection of MET objects
bool getData(T &iHolder) const
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
TTTrack< Ref_Phase2TrackerDigi_ > L1TTTrackType
const edm::EDGetTokenT< std::vector< TTTrack< Ref_Phase2TrackerDigi_ > > > trackToken_
Cos< T >::type cos(const T &t)
static constexpr auto TOB
Class to store the L1 Track Trigger stubs.
Class to store the L1 Track Trigger tracks.
std::vector< TkPrimaryVertex > TkPrimaryVertexCollection
T getParameter(std::string const &) const
void produce(edm::Event &, const edm::EventSetup &) override
const edm::EDGetTokenT< TkPrimaryVertexCollection > pvToken_
L1TrackerEtMissProducer(const edm::ParameterSet &)
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
static constexpr auto TID
~L1TrackerEtMissProducer() override