92 isMC_(iConfig.getParameter<
bool>(
"isMC")),
104 if (iConfig.
existsAs<int32_t>(
"motherPdgId")) {
107 std::vector<int32_t> motherIds = iConfig.
getParameter<std::vector<int32_t> >(
"motherPdgId");
108 motherPdgId_.insert(motherIds.begin(), motherIds.end());
146 using namespace edm;
using namespace std;
164 for (tnp::TagProbePairs::const_iterator it = pairs.begin(), ed = pairs.end(); it != ed; ++it) {
172 mcMass = (mtag->p4() + mprobe->p4()).
mass();
180 treeFiller_->fill(it->probe, it->mass, mcTrue, mcMass);
189 for (
size_t i = 0,
n = allProbes->
size();
i <
n; ++
i) {
203 if (ref.
isNull())
return false;
T getParameter(std::string const &) const
edm::EDGetTokenT< edm::Association< std::vector< reco::GenParticle > > > tagMatchesToken_
Token foran edm::Association<reco::GenParticle> from tags & probes to MC truth.
bool isNonnull() const
Checks for non-null.
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
std::unique_ptr< tnp::TPTreeFiller > treeFiller_
The object that actually computes variables and fills the tree for T&P.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< TagProbePair > TagProbePairs
edm::EDGetTokenT< reco::CandidateView > allProbesToken_
InputTag to the collection of all probes.
const_iterator end() const
Termination of iteration.
const_iterator begin() const
Initialize an iterator over the RefVector.
ParameterSet const & getProcessParameterSetContainingModule(ModuleDescription const &moduleDescription)
bool checkMotherInUnbiasEff_
Check mother pdgId in unbiased inefficiency measurement.
RefToBase< value_type > refAt(size_type i) const
ModuleDescription const & moduleDescription() const
#define DEFINE_FWK_MODULE(type)
void analyze(const edm::Event &, const edm::EventSetup &) override
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
bool isMC_
Is this sample MC?
void addParameter(std::string const &name, T const &value)
Abs< T >::type abs(const T &t)
bool makeMCUnbiasTree_
Do we have to compute this.
bool isNull() const
Checks for null.
tnp::TagProbePairMaker tagProbePairMaker_
The object that produces pairs of tags and probes, making any arbitration needed. ...
std::unique_ptr< tnp::BaseTreeFiller > oldTagFiller_
edm::EDGetTokenT< edm::Association< std::vector< reco::GenParticle > > > probeMatchesToken_
std::unique_ptr< tnp::BaseTreeFiller > pairFiller_
bool checkMother(const reco::GenParticleRef &ref) const
Return true if ref is not null and has an ancestor with pdgId inside 'motherPdgId_'.
std::set< int32_t > motherPdgId_
Possible pdgids for the mother. If empty, any truth-matched mu will be considered good...
TagProbePairs run(const edm::Event &iEvent) const
fill in tghe T&P pairs for this event
std::unique_ptr< tnp::BaseTreeFiller > tagFiller_
~TagProbeFitTreeProducer() override
std::unique_ptr< tnp::BaseTreeFiller > mcFiller_
TagProbeFitTreeProducer(const edm::ParameterSet &)
std::unique_ptr< tnp::BaseTreeFiller > mcUnbiasFiller_
The object that actually computes variables and fills the tree for unbiased MC.