80 edm::LogWarning(
"L1TPhase2OuterTrackerTkMET") <<
"cant find tracks" << std::endl;
83 if (!L1VertexHandle.
isValid()) {
84 edm::LogWarning(
"L1TPhase2OuterTrackerTkMET") <<
"cant find vertex" << std::endl;
93 int nTracks_counter = 0;
95 float zVTX = L1VertexHandle->begin()->zvertex();
96 unsigned int tkCnt = 0;
97 for (
const auto& trackIter : *TTTrackHandle) {
99 float pt = tempTrackPtr->momentum().perp();
100 float phi = tempTrackPtr->momentum().phi();
101 float eta = tempTrackPtr->momentum().eta();
103 theStubs = trackIter.getStubRefs();
104 int nstubs = (int)theStubs.size();
106 float chi2dof = tempTrackPtr->chi2Red();
107 float bendchi2 = tempTrackPtr->stubPtConsistency();
108 float z0 = tempTrackPtr->z0();
121 for (
unsigned int istub = 0; istub < (
unsigned int)theStubs.size(); istub++) {
122 DetId detId(theStubs.at(istub)->getDetId());
134 if (fabs(eta) >= 0 && fabs(eta) < 0.7)
136 else if (fabs(eta) >= 0.7 && fabs(eta) < 1.0)
138 else if (fabs(eta) >= 1.0 && fabs(eta) < 1.2)
140 else if (fabs(eta) >= 1.2 && fabs(eta) < 1.6)
142 else if (fabs(eta) >= 1.6 && fabs(eta) < 2.0)
144 else if (fabs(eta) >= 2.0 && fabs(eta) <= 2.4)
147 if (fabs(z0 - zVTX) <=
DeltaZ) {
157 sumPx += pt *
cos(phi);
158 sumPy += pt *
sin(phi);
161 sumPx_PU += pt *
cos(phi);
162 sumPy_PU += pt *
sin(phi);
168 float et =
sqrt(sumPx * sumPx + sumPy * sumPy);
169 double etmiss_PU =
sqrt(sumPx_PU * sumPx_PU + sumPy_PU * sumPy_PU);
187 HistoName =
"Track_N";
194 Track_N->setAxisTitle(
"# L1 Tracks", 1);
195 Track_N->setAxisTitle(
"# Events", 2);
199 HistoName =
"Track_Pt";
210 HistoName =
"Track_Eta";
221 HistoName =
"Track_VtxZ";
232 HistoName =
"Track_Chi2Dof";
243 HistoName =
"Track_BendChi2";
254 HistoName =
"Track_NStubs";
265 HistoName =
"Track_NPSstubs";
277 HistoName =
"TkMET_QualityCuts";
287 HistoName =
"TkMET_PU";
unsigned int tidRing(const DetId &id) const
virtual void setCurrentFolder(std::string const &fullpath)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
MonitorElement * Track_Chi2Dof
Sin< T >::type sin(const T &t)
MonitorElement * Track_NPSstubs
MonitorElement * Track_Eta
bool getData(T &iHolder) const
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
edm::EDGetTokenT< std::vector< TTTrack< Ref_Phase2TrackerDigi_ > > > ttTrackToken_
std::string topFolderName_
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * TkMET_PU
Cos< T >::type cos(const T &t)
MonitorElement * TkMET_QualityCuts
L1TPhase2OuterTrackerTkMET(const edm::ParameterSet &)
static constexpr auto TOB
Class to store the L1 Track Trigger stubs.
MonitorElement * Track_BendChi2
edm::EDGetTokenT< l1t::TkPrimaryVertexCollection > pvToken
MonitorElement * Track_NStubs
void analyze(const edm::Event &, const edm::EventSetup &) override
T getParameter(std::string const &) const
MonitorElement * Track_Pt
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > m_topoToken
Log< level::Warning, false > LogWarning
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
static constexpr auto TID
~L1TPhase2OuterTrackerTkMET() override
unsigned int tobLayer(const DetId &id) const
MonitorElement * Track_VtxZ
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)