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;
121 for(
auto &Genjet : *GenJets ){
124 if(fabs((&Genjet)->
eta())>4.7)
continue;
126 double minDR = 999.0;
132 for(std::vector<l1t::Jet>::const_iterator
jet = JetsBX->
begin(iBx);
jet != JetsBX->
end(iBx); ++
jet){
144 for(uint
i=0;
i < GenParticles->size();
i++){
149 double minDR = 999.0;
155 if(fabs(GenPart->
eta())>2.4)
continue;
161 for(std::vector<l1t::Muon>::const_iterator
mu = MuonsBX->
begin(iBx);
mu != MuonsBX->
end(iBx); ++
mu){
174 }
else if(
status==1 && (
abs(pdg)==11 || pdg==22)){
177 if(fabs(GenPart->
eta())>2.5)
continue;
180 if(fabs(GenPart->
eta())>1.4442 && fabs(GenPart->
eta())<1.5660)
continue;
186 for(std::vector<l1t::EGamma>::const_iterator eg = EGammasBX->
begin(iBx); eg != EGammasBX->
end(iBx); ++eg){
194 _Hists.
Fill(L1ValidatorHists::Type::Egamma, GenPart, L1Part);
201 if(fabs(GenPart->
eta())>2.4)
continue;
207 for(std::vector<l1t::Tau>::const_iterator
tau = TausBX->
begin(iBx);
tau != TausBX->
end(iBx); ++
tau){
228 for(uint
i=0;
i < Collection1->size();
i++){
237 if(Collection2==
NULL)
return BestPart;
239 for(uint
i=0;
i < Collection2->size();
i++){
255 for(uint
i=0;
i < Collection1->size();
i++){
264 if(Collection2==
NULL)
return BestPart;
266 for(uint
i=0;
i < Collection2->size();
i++){
282 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
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