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) {