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; \ 91 bool GotEverything=
true;
101 if(!GotEverything)
return;
114 int nL1Muons = 0, nL1EGammas = 0, nL1Taus = 0, nL1Jets = 0;
127 for(
auto &Genjet : *GenJets ){
130 if(fabs((&Genjet)->
eta())>4.7)
continue;
133 if((&Genjet)->
pt()<10.0)
continue;
135 double minDR = 999.0;
141 for(std::vector<l1t::Jet>::const_iterator
jet = JetsBX->
begin(iBx);
jet != JetsBX->
end(iBx); ++
jet){
153 for(uint
i=0;
i < GenParticles->size();
i++){
158 double minDR = 999.0;
161 if(GenPart->
pt()<10.0)
continue;
167 if(fabs(GenPart->
eta())>2.4)
continue;
173 for(std::vector<l1t::Muon>::const_iterator
mu = MuonsBX->
begin(iBx);
mu != MuonsBX->
end(iBx); ++
mu){
186 }
else if(
status==1 && (
abs(pdg)==11 || pdg==22)){
189 if(fabs(GenPart->
eta())>2.5)
continue;
192 if(fabs(GenPart->
eta())>1.4442 && fabs(GenPart->
eta())<1.5660)
continue;
198 for(std::vector<l1t::EGamma>::const_iterator eg = EGammasBX->
begin(iBx); eg != EGammasBX->
end(iBx); ++eg){
206 _Hists.
Fill(L1ValidatorHists::Type::Egamma, GenPart, L1Part);
213 if(fabs(GenPart->
eta())>2.4)
continue;
219 for(std::vector<l1t::Tau>::const_iterator
tau = TausBX->
begin(iBx);
tau != TausBX->
end(iBx); ++
tau){
240 for(uint
i=0;
i < Collection1->size();
i++){
249 if(Collection2==
nullptr)
return BestPart;
251 for(uint
i=0;
i < Collection2->size();
i++){
267 for(uint
i=0;
i < Collection1->size();
i++){
276 if(Collection2==
nullptr)
return BestPart;
278 for(uint
i=0;
i < Collection2->size();
i++){
294 for(uint
i=0;
i < Collection1->size();
i++){
void Fill(int, const reco::LeafCandidate *, const reco::LeafCandidate *)
const_iterator end(int bx) const
T getParameter(std::string const &) const
virtual double pt() const final
transverse momentum
edm::EDGetTokenT< reco::GenJetCollection > _L1GenJetSource
unsigned size(int bx) const
virtual double eta() const final
momentum pseudorapidity
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< reco::GenParticleCollection > _GenSource
edm::EDGetTokenT< GenEventInfoProduct > _srcToken
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
virtual int status() const final
status word
L1Validator(const edm::ParameterSet &)
void FillNumber(int, int)
virtual double phi() const final
momentum azimuthal angle
void addDefault(ParameterSetDescription const &psetDescription)
edm::EDGetTokenT< l1t::TauBxCollection > _L1TauBXSource
edm::EDGetTokenT< l1t::JetBxCollection > _L1JetBXSource
virtual int pdgId() const final
PDG identifier.
Abs< T >::type abs(const T &t)
auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
edm::EDGetTokenT< l1t::MuonBxCollection > _L1MuonBXSource
void analyze(const edm::Event &, const edm::EventSetup &) override
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
void setCurrentFolder(const std::string &fullpath)
const reco::LeafCandidate * FindBest(const reco::GenParticle *, const std::vector< l1extra::L1EmParticle > *, const std::vector< l1extra::L1EmParticle > *)
edm::EDGetTokenT< l1t::EGammaBxCollection > _L1EGammaBXSource
void Book(DQMStore::IBooker &)
const_iterator begin(int bx) const