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; \
79 using namespace l1extra;
91 bool GotEverything=
true;
101 if(!GotEverything)
return;
113 for(uint
i=0;
i < GenParticles->size();
i++){
118 if(
status==1 && (
abs(pdg)==11 || pdg==22)){
124 }
else if(RecoPart->type() == L1EmParticle::EmType::kIsolated){
127 }
else if(RecoPart->type() == L1EmParticle::EmType::kNonIsolated){
129 _Hists->
Fill(L1ValidatorHists::Type::NonIsoEG, GenPart, RecoPart);
134 _Hists->
Fill(L1ValidatorHists::Type::Muon, GenPart, RecoPart);
139 }
else if(
status==3 && (
abs(pdg)<=5 || pdg==21)){
145 }
else if(RecoPart->type() == L1JetParticle::JetType::kCentral){
148 }
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
virtual int pdgId() const
PDG identifier.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
virtual void endJob() override
#define DEFINE_FWK_MODULE(type)
virtual int status() const
status word
edm::EDGetTokenT< reco::GenParticleCollection > _GenSource
virtual float phi() const
momentum azimuthal angle
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
double deltaR(const T1 &t1, const T2 &t2)
virtual void endRun(edm::Run const &, edm::EventSetup const &) override
L1Validator(const edm::ParameterSet &)
void FillNumber(int, int)
edm::EDGetTokenT< l1extra::L1JetParticleCollection > _L1ExtraForJetSource
void addDefault(ParameterSetDescription const &psetDescription)
virtual float eta() const
momentum pseudorapidity
L1ValidatorHists * _Hists
Abs< T >::type abs(const T &t)
#define FINDRECOPART(TYPE, COLLECTION1, COLLECTION2)
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)