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; \
80 using namespace l1extra;
92 bool GotEverything=
true;
102 if(!GotEverything)
return;
114 for(uint
i=0;
i < GenParticles->size();
i++){
119 if(
status==1 && (
abs(pdg)==11 || pdg==22)){
125 }
else if(RecoPart->type() == L1EmParticle::EmType::kIsolated){
128 }
else if(RecoPart->type() == L1EmParticle::EmType::kNonIsolated){
130 _Hists->
Fill(L1ValidatorHists::Type::NonIsoEG, GenPart, RecoPart);
135 _Hists->
Fill(L1ValidatorHists::Type::Muon, GenPart, RecoPart);
140 }
else if(
status==3 && (
abs(pdg)<=5 || pdg==21)){
146 }
else if(RecoPart->type() == L1JetParticle::JetType::kCentral){
149 }
else if(RecoPart->type() == L1JetParticle::JetType::kForward){
206 for(uint
i=0;
i < Collection1->size();
i++){
215 if(Collection2==
NULL)
return BestPart;
217 for(uint
i=0;
i < Collection2->size();
i++){
233 for(uint
i=0;
i < Collection1->size();
i++){
242 if(Collection2==
NULL)
return BestPart;
244 for(uint
i=0;
i < Collection2->size();
i++){
260 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
virtual void endJob() override
virtual int pdgId() const GCC11_FINAL
PDG identifier.
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< reco::GenParticleCollection > _GenSource
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
virtual void endRun(edm::Run const &, edm::EventSetup const &) override
L1Validator(const edm::ParameterSet &)
void FillNumber(int, int)
virtual float phi() const GCC11_FINAL
momentum azimuthal angle
edm::EDGetTokenT< l1extra::L1JetParticleCollection > _L1ExtraForJetSource
void addDefault(ParameterSetDescription const &psetDescription)
virtual int status() const GCC11_FINAL
status word
L1ValidatorHists * _Hists
Abs< T >::type abs(const T &t)
auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
#define FINDRECOPART(TYPE, COLLECTION1, COLLECTION2)
virtual float eta() const GCC11_FINAL
momentum pseudorapidity
edm::EDGetTokenT< l1extra::L1JetParticleCollection > _L1ExtraTauJetSource
edm::EDGetTokenT< l1extra::L1MuonParticleCollection > _L1ExtraMuonSource
edm::EDGetTokenT< l1extra::L1EmParticleCollection > _L1ExtraIsoEGSource
const reco::LeafCandidate * FindBest(const reco::GenParticle *, const std::vector< l1extra::L1EmParticle > *, const std::vector< l1extra::L1EmParticle > *)
edm::EDGetTokenT< l1extra::L1EmParticleCollection > _L1ExtraNonIsoEGSource
virtual void beginRun(edm::Run const &, edm::EventSetup const &) override
edm::EDGetTokenT< l1extra::L1JetParticleCollection > _L1ExtraCenJetSource
void analyze(const edm::Event &, const edm::EventSetup &)
void setCurrentFolder(const std::string &fullpath)