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; \
81 using namespace l1extra;
93 bool GotEverything=
true;
103 if(!GotEverything)
return;
115 for(uint
i=0;
i < GenParticles->size();
i++){
120 if(
status==1 && (
abs(pdg)==11 || pdg==22)){
126 }
else if(RecoPart->type() == L1EmParticle::EmType::kIsolated){
129 }
else if(RecoPart->type() == L1EmParticle::EmType::kNonIsolated){
131 _Hists.
Fill(L1ValidatorHists::Type::NonIsoEG, GenPart, RecoPart);
141 }
else if(
status==3 && (
abs(pdg)<=5 || pdg==21)){
147 }
else if(RecoPart->type() == L1JetParticle::JetType::kCentral){
150 }
else if(RecoPart->type() == L1JetParticle::JetType::kForward){
165 for(uint
i=0;
i < Collection1->size();
i++){
174 if(Collection2==
NULL)
return BestPart;
176 for(uint
i=0;
i < Collection2->size();
i++){
192 for(uint
i=0;
i < Collection1->size();
i++){
201 if(Collection2==
NULL)
return BestPart;
203 for(uint
i=0;
i < Collection2->size();
i++){
219 for(uint
i=0;
i < Collection1->size();
i++){
void Fill(int, const reco::LeafCandidate *, const reco::LeafCandidate *)
T getParameter(std::string const &) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< reco::GenParticleCollection > _GenSource
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
virtual double phi() const final
momentum azimuthal angle
L1Validator(const edm::ParameterSet &)
void FillNumber(int, int)
virtual int status() const final
status word
edm::EDGetTokenT< l1extra::L1JetParticleCollection > _L1ExtraForJetSource
void addDefault(ParameterSetDescription const &psetDescription)
Abs< T >::type abs(const T &t)
auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
#define FINDRECOPART(TYPE, COLLECTION1, COLLECTION2)
void analyze(const edm::Event &, const edm::EventSetup &) override
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
edm::EDGetTokenT< l1extra::L1JetParticleCollection > _L1ExtraTauJetSource
void setCurrentFolder(const std::string &fullpath)
edm::EDGetTokenT< l1extra::L1MuonParticleCollection > _L1ExtraMuonSource
edm::EDGetTokenT< l1extra::L1EmParticleCollection > _L1ExtraIsoEGSource
virtual int pdgId() const final
PDG identifier.
const reco::LeafCandidate * FindBest(const reco::GenParticle *, const std::vector< l1extra::L1EmParticle > *, const std::vector< l1extra::L1EmParticle > *)
edm::EDGetTokenT< l1extra::L1EmParticleCollection > _L1ExtraNonIsoEGSource
edm::EDGetTokenT< l1extra::L1JetParticleCollection > _L1ExtraCenJetSource
virtual double eta() const final
momentum pseudorapidity
void Book(DQMStore::IBooker &)