95 isMC_(iConfig.getParameter<bool>(
"isMC")),
96 makeMCUnbiasTree_(isMC_ ? iConfig.getParameter<bool>(
"makeMCUnbiasTree") :
false),
97 checkMotherInUnbiasEff_(makeMCUnbiasTree_ ? iConfig.getParameter<bool>(
"checkMotherInUnbiasEff") :
false),
98 tagProbePairMaker_(iConfig),
99 treeFiller_(new tnp::TPTreeFiller(iConfig)),
100 oldTagFiller_((iConfig.existsAs<bool>(
"fillTagTree") && iConfig.getParameter<bool>(
"fillTagTree")) ? new tnp::BaseTreeFiller(
"tag_tree",iConfig) : 0)
107 if (iConfig.
existsAs<int32_t>(
"motherPdgId")) {
110 std::vector<int32_t> motherIds = iConfig.
getParameter<std::vector<int32_t> >(
"motherPdgId");
111 motherPdgId_.insert(motherIds.begin(), motherIds.end());
149 using namespace edm;
using namespace std;
168 for (tnp::TagProbePairs::const_iterator it = pairs.begin(), ed = pairs.end(); it != ed; ++it) {
189 for (
size_t i = 0,
n = allProbes->size();
i <
n; ++
i) {
203 if (ref.
isNull())
return false;
T getParameter(std::string const &) const
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
virtual void analyze(const edm::Event &, const edm::EventSetup &)
edm::InputTag tagMatches_
InputTag to an edm::Association<reco::GenParticle> from tags & probes to MC truth.
std::auto_ptr< tnp::TPTreeFiller > treeFiller_
The object that actually computes variables and fills the tree for T&P.
std::vector< TagProbePair > TagProbePairs
#define DEFINE_FWK_MODULE(type)
std::auto_ptr< tnp::BaseTreeFiller > oldTagFiller_
std::auto_ptr< tnp::BaseTreeFiller > tagFiller_
const_iterator end() const
Termination of iteration.
const_iterator begin() const
Initialize an iterator over the RefVector.
bool checkMotherInUnbiasEff_
Check mother pdgId in unbiased inefficiency measurement.
bool isNonnull() const
Checks for non-null.
bool isNull() const
Checks for null.
edm::InputTag allProbes_
InputTag to the collection of all probes.
bool isMC_
Is this sample MC?
void addParameter(std::string const &name, T const &value)
std::auto_ptr< tnp::BaseTreeFiller > mcFiller_
bool makeMCUnbiasTree_
Do we have to compute this.
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
tnp::TagProbePairMaker tagProbePairMaker_
The object that produces pairs of tags and probes, making any arbitration needed. ...
std::auto_ptr< tnp::BaseTreeFiller > mcUnbiasFiller_
The object that actually computes variables and fills the tree for unbiased MC.
ParameterSet const & getProcessParameterSet()
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
edm::InputTag probeMatches_
std::auto_ptr< tnp::BaseTreeFiller > pairFiller_
TagProbeFitTreeProducer(const edm::ParameterSet &)
~TagProbeFitTreeProducer()