32 #define FINDRECOPART(TYPE, COLLECTION1, COLLECTION2) \ 33 const TYPE *RecoPart = NULL; \ 34 double BestDist = 999.; \ 35 for (uint i = 0; i < COLLECTION1->size(); i++) { \ 36 const TYPE *ThisPart = &COLLECTION1->at(i); \ 37 double ThisDist = reco::deltaR(GenPart->eta(), GenPart->phi(), ThisPart->eta(), ThisPart->phi()); \ 38 if (ThisDist < 1.0 && ThisDist < BestDist) { \ 39 BestDist = ThisDist; \ 40 RecoPart = ThisPart; \ 43 if (COLLECTION1.product() != COLLECTION2.product()) { \ 44 for (uint i = 0; i < COLLECTION2->size(); i++) { \ 45 const TYPE *ThisPart = &COLLECTION2->at(i); \ 46 double ThisDist = reco::deltaR(GenPart->eta(), GenPart->phi(), ThisPart->eta(), ThisPart->phi()); \ 47 if (ThisDist < 1.0 && ThisDist < BestDist) { \ 48 BestDist = ThisDist; \ 49 RecoPart = ThisPart; \ 89 bool GotEverything =
true;
92 GotEverything =
false;
94 GotEverything =
false;
96 GotEverything =
false;
98 GotEverything =
false;
100 GotEverything =
false;
102 GotEverything =
false;
104 GotEverything =
false;
121 int nL1Muons = 0, nL1EGammas = 0, nL1Taus = 0, nL1Jets = 0;
123 nL1Muons = MuonsBX->
size(0);
125 nL1EGammas = EGammasBX->
size(0);
127 nL1Taus = TausBX->
size(0);
129 nL1Jets = JetsBX->
size(0);
138 for (
auto &Genjet : *
GenJets) {
140 if (fabs((&Genjet)->
eta()) > 4.7)
144 if ((&Genjet)->
pt() < 10.0)
147 double minDR = 999.0;
154 for (std::vector<l1t::Jet>::const_iterator
jet = JetsBX->
begin(iBx);
jet != JetsBX->
end(iBx); ++
jet) {
170 double minDR = 999.0;
180 if (fabs(
GenPart->eta()) > 2.4)
188 for (std::vector<l1t::Muon>::const_iterator
mu = MuonsBX->
begin(iBx);
mu != MuonsBX->
end(iBx); ++
mu) {
203 if (fabs(
GenPart->eta()) > 2.5)
207 if (fabs(
GenPart->eta()) > 1.4442 && fabs(
GenPart->eta()) < 1.5660)
215 for (std::vector<l1t::EGamma>::const_iterator eg = EGammasBX->
begin(iBx); eg != EGammasBX->
end(iBx); ++eg) {
230 if (fabs(
GenPart->eta()) > 2.4)
238 for (std::vector<l1t::Tau>::const_iterator
tau = TausBX->
begin(iBx);
tau != TausBX->
end(iBx); ++
tau) {
254 const std::vector<l1extra::L1EmParticle> *Collection1,
255 const std::vector<l1extra::L1EmParticle> *Collection2 =
nullptr) {
257 double BestDR = 999.;
259 for (
uint i = 0;
i < Collection1->size();
i++) {
262 if (ThisDR < BestDR) {
268 if (Collection2 ==
nullptr)
271 for (
uint i = 0;
i < Collection2->size();
i++) {
274 if (ThisDR < BestDR) {
284 const std::vector<l1extra::L1JetParticle> *Collection1,
285 const std::vector<l1extra::L1JetParticle> *Collection2 =
nullptr) {
287 double BestDR = 999.;
289 for (
uint i = 0;
i < Collection1->size();
i++) {
292 if (ThisDR < BestDR) {
298 if (Collection2 ==
nullptr)
301 for (
uint i = 0;
i < Collection2->size();
i++) {
304 if (ThisDR < BestDR) {
314 const std::vector<l1extra::L1MuonParticle> *Collection1) {
316 double BestDR = 999.;
318 for (
uint i = 0;
i < Collection1->size();
i++) {
321 if (ThisDR < BestDR) {
void Fill(int, const reco::LeafCandidate *, const reco::LeafCandidate *)
edm::EDGetTokenT< reco::GenJetCollection > _L1GenJetSource
T getParameter(std::string const &) const
edm::EDGetTokenT< reco::GenParticleCollection > _GenSource
edm::EDGetTokenT< GenEventInfoProduct > _srcToken
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
L1Validator(const edm::ParameterSet &)
const_iterator begin(int bx) const
unsigned size(int bx) const
void FillNumber(int, int)
void Book(DQMStore::IBooker &, std::string dirname)
void addDefault(ParameterSetDescription const &psetDescription)
edm::EDGetTokenT< l1t::TauBxCollection > _L1TauBXSource
edm::EDGetTokenT< l1t::JetBxCollection > _L1JetBXSource
Abs< T >::type abs(const T &t)
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< l1t::MuonBxCollection > _L1MuonBXSource
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
void analyze(const edm::Event &, const edm::EventSetup &) override
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
const reco::LeafCandidate * FindBest(const reco::GenParticle *, const std::vector< l1extra::L1EmParticle > *, const std::vector< l1extra::L1EmParticle > *)
const_iterator end(int bx) const
edm::EDGetTokenT< l1t::EGammaBxCollection > _L1EGammaBXSource
double phi() const final
momentum azimuthal angle
double eta() const final
momentum pseudorapidity