HEP-KBFI / TallinnNtupleProducer

code, python scripts and config files for producing "plain" Tallinn Ntuples
3 stars 2 forks source link

Filterbits #7

Closed saswatinandan closed 2 years ago

veelken commented 2 years ago

I think it is better if you remove the TriggerInfo object from the RecoElectron::read() and RecoMuon::read() functions and instead set the bits via a global function: https://github.com/HEP-KBFI/TallinnNtupleProducer/blob/main/Writers/plugins/TriggerInfoWriter.cc#L57-L86 The global function can be called from the EventReader class (after the EventReader class has read the leptons). Please adapt the TriggerInfoWriter class such that it used the HLT filter bits of the RecoElectron and RecoMuon objects, rather than evaluating the HLT filter bits independently in the TriggerInfoWriter code (this avoids code duplication and ensures that the HLT filter bit information is handled consistently).

saswatinandan commented 2 years ago

I think it is better if you remove the TriggerInfo object from the RecoElectron::read() and RecoMuon::read() functions and instead set the bits via a global function: https://github.com/HEP-KBFI/TallinnNtupleProducer/blob/main/Writers/plugins/TriggerInfoWriter.cc#L57-L86 The global function can be called from the EventReader class (after the EventReader class has read the leptons). Please adapt the TriggerInfoWriter class such that it used the HLT filter bits of the RecoElectron and RecoMuon objects, rather than evaluating the HLT filter bits independently in the TriggerInfoWriter code (this avoids code duplication and ensures that the HLT filter bit information is handled consistently).

used a template method of EventReader class which is friend class of RecoLepton and RecoHadTau and filter bit is set by this template function