CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
tnp::BaseTreeFiller Class Reference

#include <BaseTreeFiller.h>

Inheritance diagram for tnp::BaseTreeFiller:
tnp::TPTreeFiller

Public Member Functions

 BaseTreeFiller (const char *name, const edm::ParameterSet &config, edm::ConsumesCollector &&iC)
 specify the name of the TTree, and the configuration for it More...
 
 BaseTreeFiller (const char *name, const edm::ParameterSet &config, edm::ConsumesCollector &iC)
 
 BaseTreeFiller (BaseTreeFiller &main, const edm::ParameterSet &iConfig, edm::ConsumesCollector &&iC, const std::string &branchNamePrefix)
 Add branches to an existing TTree managed by another BaseTreeFiller. More...
 
void fill (const reco::CandidateBaseRef &probe) const
 To be called once per probe, to fill the values for this probe. More...
 
void init (const edm::Event &iEvent) const
 To be called once per event, to load possible external variables. More...
 
bool storePUweight () const
 
void writeProvenance (const edm::ParameterSet &pset) const
 
 ~BaseTreeFiller ()
 Destructor, does nothing but it's out-of-line as we have complex data members. More...
 

Protected Types

enum  WeightMode { None, Fixed, External }
 How event weights are defined: 'None' = no weights, 'Fixed' = one value specified in cfg file, 'External' = read weight from the event (as double) More...
 

Protected Member Functions

void addBranches_ (TTree *tree, const edm::ParameterSet &iConfig, edm::ConsumesCollector &iC, const std::string &branchNamePrefix="")
 

Protected Attributes

bool addCaloMet_
 
bool addEventVariablesInfo_
 Add branches with event variables: met, sum ET, .. etc. More...
 
bool addRho_
 
bool addRunLumiInfo_
 Add branches with run and lumisection number. More...
 
edm::EDGetTokenT< reco::BeamSpotbeamSpotToken_
 
uint64_t event_
 
std::vector< ProbeFlagflags_
 
bool ignoreExceptions_
 Ignore exceptions when evaluating variables. More...
 
uint32_t lumi_
 
float mBSx_
 
float mBSy_
 
float mBSz_
 
edm::EDGetTokenT< reco::CaloMETCollectionmetToken_
 
float mMET_
 
float mMETSign_
 
uint32_t mNPV_
 
float mpfMET_
 
float mpfMETSign_
 
float mpfPhi_
 
float mpfSumET_
 
float mPVx_
 
float mPVy_
 
float mPVz_
 
float mSumET_
 
float mtcMET_
 
float mtcMETSign_
 
float mtcSumET_
 
edm::EDGetTokenT< reco::PFMETCollectionpfmetToken_
 
edm::EDGetTokenT< pat::METCollectionpfmetTokenMiniAOD_
 
edm::EDGetTokenT< std::vector< PileupSummaryInfo > > pileupInfoToken_
 
float PUweight_
 
edm::EDGetTokenT< double > PUweightSrcToken_
 
edm::EDGetTokenT< reco::VertexCollectionrecVtxsToken_
 
float rho_
 
edm::EDGetTokenT< double > rhoToken_
 
uint32_t run_
 
bool storePUweight_
 Store Pileup weight when running over Monte Carlo. More...
 
edm::EDGetTokenT< reco::METCollectiontcmetToken_
 
float totWeight_
 
TTree * tree_
 
int truePU_
 
std::vector< ProbeVariablevars_
 
float weight_
 
WeightMode weightMode_
 
edm::EDGetTokenT< GenEventInfoProductweightSrcToken_
 

Detailed Description

Definition at line 141 of file BaseTreeFiller.h.

Member Enumeration Documentation

How event weights are defined: 'None' = no weights, 'Fixed' = one value specified in cfg file, 'External' = read weight from the event (as double)

Enumerator
None 
Fixed 
External 

Definition at line 175 of file BaseTreeFiller.h.

Constructor & Destructor Documentation

tnp::BaseTreeFiller::BaseTreeFiller ( const char *  name,
const edm::ParameterSet config,
edm::ConsumesCollector &&  iC 
)
inline

specify the name of the TTree, and the configuration for it

Definition at line 144 of file BaseTreeFiller.h.

References tnp::ProbeVariable::fill(), iEvent, tnp::ProbeVariable::init(), tnp::ProbeVariable::name(), muonDTDigis_cfi::pset, and AlCaHLTBitMon_QueryRunRegistry::string.

144 : BaseTreeFiller(name, config, iC) {};
BaseTreeFiller(const char *name, const edm::ParameterSet &config, edm::ConsumesCollector &&iC)
specify the name of the TTree, and the configuration for it
tnp::BaseTreeFiller::BaseTreeFiller ( const char *  name,
const edm::ParameterSet config,
edm::ConsumesCollector iC 
)

FC (EGM) - add possibility to customize collections (can run other miniAOD)

Definition at line 36 of file BaseTreeFiller.cc.

References edm::ConsumesCollector::consumes(), event_(), edm::ParameterSet::existsAs(), edm::ParameterSet::getParameter(), TFileService::make(), edm::ConsumesCollector::mayConsume(), dataset::name, and FSQ::None.

36  {
37  // make trees as requested
39  tree_ = fs->make<TTree>(name,name);
40 
41  // add the branches
42  addBranches_(tree_, iConfig, iC, "");
43 
44  // set up weights, if needed
45  if (iConfig.existsAs<double>("eventWeight")) {
47  weight_ = iConfig.getParameter<double>("eventWeight");
48  } else if (iConfig.existsAs<edm::InputTag>("eventWeight")) {
50  weightSrcToken_ = iC.consumes<GenEventInfoProduct>(iConfig.getParameter<edm::InputTag>("eventWeight"));
51  } else {
52  weightMode_ = None;
53  }
54  if (weightMode_ != None) {
55  tree_->Branch("weight", &weight_, "weight/F");
56  tree_->Branch("totWeight", &totWeight_, "totWeight/F");
57  }
58 
59  storePUweight_ = iConfig.existsAs<edm::InputTag>("PUWeightSrc") ? true: false;
60  if(storePUweight_) {
61  PUweightSrcToken_ = iC.consumes<double>(iConfig.getParameter<edm::InputTag>("PUWeightSrc"));
62  tree_->Branch("PUweight", &PUweight_, "PUweight/F");
63  }
64 
65  if( iConfig.existsAs<edm::InputTag>("pileupInfoTag") )
66  pileupInfoToken_= iC.consumes<std::vector<PileupSummaryInfo> >(iConfig.getParameter<edm::InputTag>("pileupInfoTag"));
67 
68  addRunLumiInfo_ = iConfig.existsAs<bool>("addRunLumiInfo") ? iConfig.getParameter<bool>("addRunLumiInfo") : false;
69  if (addRunLumiInfo_) {
70  tree_->Branch("run", &run_, "run/i");
71  tree_->Branch("lumi", &lumi_, "lumi/i");
72  tree_->Branch("event", &event_, "event/l");
73  tree_->Branch("truePU", &truePU_, "truePU/I");
74  }
75  addEventVariablesInfo_ = iConfig.existsAs<bool>("addEventVariablesInfo") ? iConfig.getParameter<bool>("addEventVariablesInfo") : false;
78  edm::InputTag bsIT = iConfig.existsAs<edm::InputTag>("beamSpot") ? iConfig.getParameter<edm::InputTag>("beamSpot") : edm::InputTag("offlineBeamSpot");
79  edm::InputTag vtxIT = iConfig.existsAs<edm::InputTag>("vertexCollection") ? iConfig.getParameter<edm::InputTag>("vertexCollection") : edm::InputTag("offlinePrimaryVertices");
80  edm::InputTag pfMetIT = iConfig.existsAs<edm::InputTag>("pfMet") ? iConfig.getParameter<edm::InputTag>("pfMet") : edm::InputTag("pfMet");
81  edm::InputTag tcMetIT = iConfig.existsAs<edm::InputTag>("tcMet") ? iConfig.getParameter<edm::InputTag>("tcMet") : edm::InputTag("tcMet");
82  edm::InputTag clMetIT = iConfig.existsAs<edm::InputTag>("clMet") ? iConfig.getParameter<edm::InputTag>("clMet") : edm::InputTag("met");
83 
88  addCaloMet_ = iConfig.existsAs<bool>("addCaloMet") ? iConfig.getParameter<bool>("addCaloMet") : true;
89  tree_->Branch("event_nPV" ,&mNPV_ ,"mNPV/I");
90  if( addCaloMet_ ) {
93  tree_->Branch("event_met_calomet" ,&mMET_ ,"mMET/F");
94  tree_->Branch("event_met_calosumet" ,&mSumET_ ,"mSumET/F");
95  tree_->Branch("event_met_calometsignificance",&mMETSign_ ,"mMETSign/F");
96  tree_->Branch("event_met_tcmet" ,&mtcMET_ ,"mtcMET/F");
97  tree_->Branch("event_met_tcsumet" ,&mtcSumET_ ,"mtcSumET/F");
98  tree_->Branch("event_met_tcmetsignificance",&mtcMETSign_ ,"mtcMETSign/F");
99  }
100  tree_->Branch("event_met_pfmet" ,&mpfMET_ ,"mpfMET/F");
101  tree_->Branch("event_met_pfphi" ,&mpfPhi_ ,"mpfPhi/F");
102  tree_->Branch("event_met_pfsumet" ,&mpfSumET_ ,"mpfSumET/F");
103 
104  tree_->Branch("event_met_pfmetsignificance",&mpfMETSign_ ,"mpfMETSign/F");
105  tree_->Branch("event_PrimaryVertex_x" ,&mPVx_ ,"mPVx/F");
106  tree_->Branch("event_PrimaryVertex_y" ,&mPVy_ ,"mPVy/F");
107  tree_->Branch("event_PrimaryVertex_z" ,&mPVz_ ,"mPVz/F");
108  tree_->Branch("event_BeamSpot_x" ,&mBSx_ ,"mBSx/F");
109  tree_->Branch("event_BeamSpot_y" ,&mBSy_ ,"mBSy/F");
110  tree_->Branch("event_BeamSpot_z" ,&mBSz_ ,"mBSz/F");
111  }
112 
113  addRho_ = iConfig.existsAs<edm::InputTag>("rho") ? true : false;
114  if (addRho_) {
115  rhoToken_ = iC.consumes<double>(iConfig.getParameter<edm::InputTag>("rho"));
116  tree_->Branch("event_rho" ,&rho_ ,"rho/F");
117  }
118 
119 
120  ignoreExceptions_ = iConfig.existsAs<bool>("ignoreExceptions") ? iConfig.getParameter<bool>("ignoreExceptions") : false;
121 }
bool addEventVariablesInfo_
Add branches with event variables: met, sum ET, .. etc.
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::EDGetTokenT< reco::PFMETCollection > pfmetToken_
edm::EDGetTokenT< GenEventInfoProduct > weightSrcToken_
EDGetTokenT< ProductType > mayConsume(edm::InputTag const &tag)
bool addRunLumiInfo_
Add branches with run and lumisection number.
std::vector< MET > METCollection
Definition: MET.h:32
edm::EDGetTokenT< double > PUweightSrcToken_
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
std::vector< reco::MET > METCollection
collection of MET objects
Definition: METCollection.h:23
edm::EDGetTokenT< reco::CaloMETCollection > metToken_
edm::EDGetTokenT< pat::METCollection > pfmetTokenMiniAOD_
edm::EDGetTokenT< reco::METCollection > tcmetToken_
edm::EDGetTokenT< double > rhoToken_
void addBranches_(TTree *tree, const edm::ParameterSet &iConfig, edm::ConsumesCollector &iC, const std::string &branchNamePrefix="")
std::vector< reco::CaloMET > CaloMETCollection
collection of CaloMET objects
edm::EDGetTokenT< reco::VertexCollection > recVtxsToken_
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
std::vector< reco::PFMET > PFMETCollection
collection of PFMET objects
bool ignoreExceptions_
Ignore exceptions when evaluating variables.
edm::EDGetTokenT< std::vector< PileupSummaryInfo > > pileupInfoToken_
bool storePUweight_
Store Pileup weight when running over Monte Carlo.
tnp::BaseTreeFiller::BaseTreeFiller ( BaseTreeFiller main,
const edm::ParameterSet iConfig,
edm::ConsumesCollector &&  iC,
const std::string &  branchNamePrefix 
)

Add branches to an existing TTree managed by another BaseTreeFiller.

Definition at line 123 of file BaseTreeFiller.cc.

References addBranches_(), addRunLumiInfo_, storePUweight_, and tree_.

123  :
124  addRunLumiInfo_(false),
125  addEventVariablesInfo_(false),
126  tree_(0)
127 {
128  addRunLumiInfo_ = main.addRunLumiInfo_;
129  storePUweight_ = main.storePUweight_;
130  addBranches_(main.tree_, iConfig, iC, branchNamePrefix);
131 }
bool addEventVariablesInfo_
Add branches with event variables: met, sum ET, .. etc.
bool addRunLumiInfo_
Add branches with run and lumisection number.
void addBranches_(TTree *tree, const edm::ParameterSet &iConfig, edm::ConsumesCollector &iC, const std::string &branchNamePrefix="")
Definition: main.py:1
bool storePUweight_
Store Pileup weight when running over Monte Carlo.
tnp::BaseTreeFiller::~BaseTreeFiller ( )

Destructor, does nothing but it's out-of-line as we have complex data members.

Definition at line 171 of file BaseTreeFiller.cc.

171 { }

Member Function Documentation

void tnp::BaseTreeFiller::addBranches_ ( TTree *  tree,
const edm::ParameterSet iConfig,
edm::ConsumesCollector iC,
const std::string &  branchNamePrefix = "" 
)
protected

Definition at line 134 of file BaseTreeFiller.cc.

References edm::ConsumesCollector::consumes(), flags, flags_, edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterNamesForType(), AlCaHLTBitMon_QueryRunRegistry::string, objects.autophobj::variables, and vars_.

Referenced by BaseTreeFiller().

134  {
135  // set up variables
137  //.. the ones that are strings
138  std::vector<std::string> stringVars = variables.getParameterNamesForType<std::string>();
139  for (std::vector<std::string>::const_iterator it = stringVars.begin(), ed = stringVars.end(); it != ed; ++it) {
140  vars_.push_back(tnp::ProbeVariable(branchNamePrefix + *it, variables.getParameter<std::string>(*it)));
141  }
142  //.. the ones that are InputTags
143  std::vector<std::string> inputTagVars = variables.getParameterNamesForType<edm::InputTag>();
144  for (std::vector<std::string>::const_iterator it = inputTagVars.begin(), ed = inputTagVars.end(); it != ed; ++it) {
145  vars_.push_back(tnp::ProbeVariable(branchNamePrefix + *it, iC.consumes<edm::ValueMap<float> >(variables.getParameter<edm::InputTag>(*it))));
146  }
147  // set up flags
149  //.. the ones that are strings
150  std::vector<std::string> stringFlags = flags.getParameterNamesForType<std::string>();
151  for (std::vector<std::string>::const_iterator it = stringFlags.begin(), ed = stringFlags.end(); it != ed; ++it) {
152  flags_.push_back(tnp::ProbeFlag(branchNamePrefix + *it, flags.getParameter<std::string>(*it)));
153  }
154  //.. the ones that are InputTags
155  std::vector<std::string> inputTagFlags = flags.getParameterNamesForType<edm::InputTag>();
156  for (std::vector<std::string>::const_iterator it = inputTagFlags.begin(), ed = inputTagFlags.end(); it != ed; ++it) {
157  flags_.push_back(tnp::ProbeFlag(branchNamePrefix + *it, iC.consumes<edm::View<reco::Candidate> >(flags.getParameter<edm::InputTag>(*it))));
158  }
159 
160  // then make all the variables in the trees
161  for (std::vector<tnp::ProbeVariable>::iterator it = vars_.begin(), ed = vars_.end(); it != ed; ++it) {
162  tree->Branch(it->name().c_str(), it->address(), (it->name()+"/F").c_str());
163  }
164 
165  for (std::vector<tnp::ProbeFlag>::iterator it = flags_.begin(), ed = flags_.end(); it != ed; ++it) {
166  tree->Branch(it->name().c_str(), it->address(), (it->name()+"/I").c_str());
167  }
168 
169 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
std::vector< ProbeVariable > vars_
std::vector< Variable::Flags > flags
Definition: MVATrainer.cc:135
A variable for the probe: can be a string expression or an external ValueMap<float> ...
std::vector< std::string > getParameterNamesForType(bool trackiness=true) const
Definition: ParameterSet.h:194
std::vector< ProbeFlag > flags_
Definition: tree.py:1
void tnp::BaseTreeFiller::fill ( const reco::CandidateBaseRef probe) const

To be called once per probe, to fill the values for this probe.

Definition at line 306 of file BaseTreeFiller.cc.

References flags_, ignoreExceptions_, tree_, and vars_.

Referenced by tnp::TPTreeFiller::fill().

306  {
307  for (std::vector<tnp::ProbeVariable>::const_iterator it = vars_.begin(), ed = vars_.end(); it != ed; ++it) {
308  if (ignoreExceptions_) {
309  try{ it->fill(probe); } catch(cms::Exception &ex ){}
310  } else {
311 
312  it->fill(probe);
313  }
314  }
315 
316  for (std::vector<tnp::ProbeFlag>::const_iterator it = flags_.begin(), ed = flags_.end(); it != ed; ++it) {
317  if (ignoreExceptions_) {
318  try{ it->fill(probe); } catch(cms::Exception &ex ){}
319  } else {
320  it->fill(probe);
321  }
322  }
323  if (tree_) tree_->Fill();
324 }
std::vector< ProbeVariable > vars_
std::vector< ProbeFlag > flags_
bool ignoreExceptions_
Ignore exceptions when evaluating variables.
void tnp::BaseTreeFiller::init ( const edm::Event iEvent) const

To be called once per event, to load possible external variables.

*********** store some event variables: MET, SumET ****** ///////// Primary vertex //////////////

Definition at line 173 of file BaseTreeFiller.cc.

References addCaloMet_, addEventVariablesInfo_, addRho_, ecalDrivenElectronSeedsParameters_cff::beamSpot, beamSpotToken_, edm::EventID::event(), event_, External, flags_, objects.autophobj::float, edm::Event::getByToken(), edm::EventBase::id(), edm::EventBase::isRealData(), edm::EDGetTokenT< T >::isUninitialized(), edm::HandleBase::isValid(), lumi_, edm::EventID::luminosityBlock(), mBSx_, mBSy_, mBSz_, RazorAnalyzer::met, metToken_, mMET_, mMETSign_, mNPV_, mpfMET_, mpfMETSign_, mpfPhi_, mpfSumET_, mPVx_, mPVy_, mPVz_, mSumET_, mtcMET_, mtcMETSign_, mtcSumET_, pfmetToken_, pfmetTokenMiniAOD_, reco::LeafCandidate::phi(), pileupInfoToken_, reco::BeamSpot::position(), reco::LeafCandidate::pt(), PUweight_, PUweightSrcToken_, recVtxsToken_, rho_, rhoToken_, edm::EventID::run(), run_, reco::MET::significance(), storePUweight_, reco::MET::sumEt(), tcmetToken_, totWeight_, truePU_, vars_, GenEventInfoProduct::weight(), mps_merge::weight, weight_, weightMode_, and weightSrcToken_.

Referenced by tnp::TPTreeFiller::init().

173  {
174  run_ = iEvent.id().run();
175  lumi_ = iEvent.id().luminosityBlock();
176  event_ = iEvent.id().event();
177 
178  truePU_ = 0;
179  if (!iEvent.isRealData() and !pileupInfoToken_.isUninitialized()) {
181  iEvent.getByToken(pileupInfoToken_, PupInfo);
182  truePU_ = PupInfo->begin()->getTrueNumInteractions();
183  }
184 
185  totWeight_ = 1.;
186  for (std::vector<tnp::ProbeVariable>::const_iterator it = vars_.begin(), ed = vars_.end(); it != ed; ++it) {
187  it->init(iEvent);
188  }
189  for (std::vector<tnp::ProbeFlag>::const_iterator it = flags_.begin(), ed = flags_.end(); it != ed; ++it) {
190  it->init(iEvent);
191  }
192  if (weightMode_ == External) {
193  // edm::Handle<double> weight;
194  // iEvent.getByToken(weightSrcToken_, weight);
195  // weight_ = *weight;
197  iEvent.getByToken(weightSrcToken_, weight);
198  weight_ = weight->weight();
199  totWeight_ *= weight_;
200  }
201 
203  PUweight_ = 1;
205  edm::Handle<double> weightPU;
206  bool isPresent = iEvent.getByToken(PUweightSrcToken_, weightPU);
207  if(isPresent) PUweight_ = float(*weightPU);
209  }
210 
215  iEvent.getByToken(recVtxsToken_,recVtxs);
216  mNPV_ = 0;
217  mPVx_ = 100.0;
218  mPVy_ = 100.0;
219  mPVz_ = 100.0;
220 
221  for(unsigned int ind=0;ind<recVtxs->size();ind++) {
222  if (!((*recVtxs)[ind].isFake()) && ((*recVtxs)[ind].ndof()>4)
223  && (fabs((*recVtxs)[ind].z())<=24.0) &&
224  ((*recVtxs)[ind].position().Rho()<=2.0) ) {
225  mNPV_++;
226  if(mNPV_==1) { // store the first good primary vertex
227  mPVx_ = (*recVtxs)[ind].x();
228  mPVy_ = (*recVtxs)[ind].y();
229  mPVz_ = (*recVtxs)[ind].z();
230  }
231  }
232  }
233 
236  iEvent.getByToken(beamSpotToken_, beamSpot);
237  mBSx_ = beamSpot->position().X();
238  mBSy_ = beamSpot->position().Y();
239  mBSz_ = beamSpot->position().Z();
240 
241  if( addCaloMet_) {
244  iEvent.getByToken(metToken_,met);
245  if (met->size() == 0) {
246  mMET_ = -1;
247  mSumET_ = -1;
248  mMETSign_ = -1;
249  }
250  else {
251  mMET_ = (*met)[0].et();
252  mSumET_ = (*met)[0].sumEt();
253  mMETSign_ = (*met)[0].significance();
254  }
255 
258  iEvent.getByToken(tcmetToken_, tcmet);
259  if (tcmet->size() == 0) {
260  mtcMET_ = -1;
261  mtcSumET_ = -1;
262  mtcMETSign_ = -1;
263  }
264  else {
265  mtcMET_ = (*tcmet)[0].et();
266  mtcSumET_ = (*tcmet)[0].sumEt();
267  mtcMETSign_ = (*tcmet)[0].significance();
268  }
269  }
270 
273  iEvent.getByToken(pfmetToken_, pfmet);
274  if( pfmet.isValid() ) {
275  if (pfmet->size() == 0) {
276  mpfMET_ = -1;
277  mpfSumET_ = -1;
278  mpfMETSign_ = -1;
279  }
280  else {
281  mpfMET_ = (*pfmet)[0].et();
282  mpfPhi_ = (*pfmet)[0].phi();
283  mpfSumET_ = (*pfmet)[0].sumEt();
284  mpfMETSign_ = (*pfmet)[0].significance();
285  }
286  } else {
288  iEvent.getByToken(pfmetTokenMiniAOD_, pfmet2);
289  const pat::MET &met = pfmet2->front();
290  mpfMET_ = met.pt();
291  mpfPhi_ = met.phi();
292  mpfSumET_ = met.sumEt();
293  mpfMETSign_ = met.significance();
294  }
295 
296  if (addRho_) {
297  edm::Handle<double> rhos;
298  iEvent.getByToken(rhoToken_, rhos);
299  rho_ = (float) *rhos;
300  }
301  }
302 
303 
304 }
RunNumber_t run() const
Definition: EventID.h:39
bool addEventVariablesInfo_
Add branches with event variables: met, sum ET, .. etc.
Analysis-level MET class.
Definition: MET.h:43
virtual double pt() const final
transverse momentum
EventNumber_t event() const
Definition: EventID.h:41
edm::EDGetTokenT< reco::PFMETCollection > pfmetToken_
edm::EDGetTokenT< GenEventInfoProduct > weightSrcToken_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:457
edm::EDGetTokenT< double > PUweightSrcToken_
std::vector< ProbeVariable > vars_
double weight() const
LuminosityBlockNumber_t luminosityBlock() const
Definition: EventID.h:40
bool isRealData() const
Definition: EventBase.h:62
virtual double phi() const final
momentum azimuthal angle
std::vector< ProbeFlag > flags_
double sumEt() const
Definition: MET.h:56
edm::EDGetTokenT< reco::CaloMETCollection > metToken_
edm::EDGetTokenT< pat::METCollection > pfmetTokenMiniAOD_
edm::EDGetTokenT< reco::METCollection > tcmetToken_
bool isValid() const
Definition: HandleBase.h:75
edm::EDGetTokenT< double > rhoToken_
met
===> hadronic RAZOR
edm::EDGetTokenT< reco::VertexCollection > recVtxsToken_
edm::EventID id() const
Definition: EventBase.h:58
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
bool isUninitialized() const
Definition: EDGetToken.h:73
const Point & position() const
position
Definition: BeamSpot.h:62
edm::EDGetTokenT< std::vector< PileupSummaryInfo > > pileupInfoToken_
double significance() const
Definition: MET.cc:78
bool storePUweight_
Store Pileup weight when running over Monte Carlo.
bool tnp::BaseTreeFiller::storePUweight ( ) const
inline

Definition at line 167 of file BaseTreeFiller.h.

167 {return storePUweight_;};
bool storePUweight_
Store Pileup weight when running over Monte Carlo.
void tnp::BaseTreeFiller::writeProvenance ( const edm::ParameterSet pset) const

Write a string dump of this PSet into the TTree header. see macro in test directory for how to retrieve it from the output root file

Definition at line 325 of file BaseTreeFiller.cc.

References edm::ParameterSet::dump(), list(), and tree_.

325  {
326  TList *list = tree_->GetUserInfo();
327  list->Add(new TObjString(pset.dump().c_str()));
328 }
std::string dump(unsigned int indent=0) const
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run

Member Data Documentation

bool tnp::BaseTreeFiller::addCaloMet_
protected

Definition at line 200 of file BaseTreeFiller.h.

Referenced by init().

bool tnp::BaseTreeFiller::addEventVariablesInfo_
protected

Add branches with event variables: met, sum ET, .. etc.

Definition at line 198 of file BaseTreeFiller.h.

Referenced by init().

bool tnp::BaseTreeFiller::addRho_
protected

Definition at line 199 of file BaseTreeFiller.h.

Referenced by init().

bool tnp::BaseTreeFiller::addRunLumiInfo_
protected

Add branches with run and lumisection number.

Definition at line 192 of file BaseTreeFiller.h.

Referenced by BaseTreeFiller().

edm::EDGetTokenT<reco::BeamSpot> tnp::BaseTreeFiller::beamSpotToken_
protected

Definition at line 181 of file BaseTreeFiller.h.

Referenced by init().

uint64_t tnp::BaseTreeFiller::event_
mutableprotected

Definition at line 208 of file BaseTreeFiller.h.

Referenced by init().

std::vector<ProbeFlag> tnp::BaseTreeFiller::flags_
protected

Definition at line 172 of file BaseTreeFiller.h.

Referenced by addBranches_(), fill(), and init().

bool tnp::BaseTreeFiller::ignoreExceptions_
protected

Ignore exceptions when evaluating variables.

Definition at line 189 of file BaseTreeFiller.h.

Referenced by fill().

uint32_t tnp::BaseTreeFiller::lumi_
mutableprotected

Definition at line 207 of file BaseTreeFiller.h.

Referenced by init().

float tnp::BaseTreeFiller::mBSx_
mutableprotected

Definition at line 211 of file BaseTreeFiller.h.

Referenced by init().

float tnp::BaseTreeFiller::mBSy_
mutableprotected

Definition at line 211 of file BaseTreeFiller.h.

Referenced by init().

float tnp::BaseTreeFiller::mBSz_
mutableprotected

Definition at line 211 of file BaseTreeFiller.h.

Referenced by init().

edm::EDGetTokenT<reco::CaloMETCollection> tnp::BaseTreeFiller::metToken_
protected

Definition at line 182 of file BaseTreeFiller.h.

Referenced by init().

float tnp::BaseTreeFiller::mMET_
mutableprotected

Definition at line 213 of file BaseTreeFiller.h.

Referenced by init().

float tnp::BaseTreeFiller::mMETSign_
mutableprotected

Definition at line 213 of file BaseTreeFiller.h.

Referenced by init().

uint32_t tnp::BaseTreeFiller::mNPV_
mutableprotected

Definition at line 207 of file BaseTreeFiller.h.

Referenced by init().

float tnp::BaseTreeFiller::mpfMET_
mutableprotected

Definition at line 213 of file BaseTreeFiller.h.

Referenced by init().

float tnp::BaseTreeFiller::mpfMETSign_
mutableprotected

Definition at line 213 of file BaseTreeFiller.h.

Referenced by init().

float tnp::BaseTreeFiller::mpfPhi_
mutableprotected

Definition at line 213 of file BaseTreeFiller.h.

Referenced by init().

float tnp::BaseTreeFiller::mpfSumET_
mutableprotected

Definition at line 213 of file BaseTreeFiller.h.

Referenced by init().

float tnp::BaseTreeFiller::mPVx_
mutableprotected

Definition at line 211 of file BaseTreeFiller.h.

Referenced by init().

float tnp::BaseTreeFiller::mPVy_
mutableprotected

Definition at line 211 of file BaseTreeFiller.h.

Referenced by init().

float tnp::BaseTreeFiller::mPVz_
mutableprotected

Definition at line 211 of file BaseTreeFiller.h.

Referenced by init().

float tnp::BaseTreeFiller::mSumET_
mutableprotected

Definition at line 213 of file BaseTreeFiller.h.

Referenced by init().

float tnp::BaseTreeFiller::mtcMET_
mutableprotected

Definition at line 213 of file BaseTreeFiller.h.

Referenced by init().

float tnp::BaseTreeFiller::mtcMETSign_
mutableprotected

Definition at line 213 of file BaseTreeFiller.h.

Referenced by init().

float tnp::BaseTreeFiller::mtcSumET_
mutableprotected

Definition at line 213 of file BaseTreeFiller.h.

Referenced by init().

edm::EDGetTokenT<reco::PFMETCollection> tnp::BaseTreeFiller::pfmetToken_
protected

Definition at line 184 of file BaseTreeFiller.h.

Referenced by init().

edm::EDGetTokenT<pat::METCollection> tnp::BaseTreeFiller::pfmetTokenMiniAOD_
protected

Definition at line 185 of file BaseTreeFiller.h.

Referenced by init().

edm::EDGetTokenT<std::vector<PileupSummaryInfo> > tnp::BaseTreeFiller::pileupInfoToken_
protected

Definition at line 186 of file BaseTreeFiller.h.

Referenced by init().

float tnp::BaseTreeFiller::PUweight_
mutableprotected

Definition at line 206 of file BaseTreeFiller.h.

Referenced by init().

edm::EDGetTokenT<double> tnp::BaseTreeFiller::PUweightSrcToken_
protected

Definition at line 178 of file BaseTreeFiller.h.

Referenced by init().

edm::EDGetTokenT<reco::VertexCollection> tnp::BaseTreeFiller::recVtxsToken_
protected

Definition at line 180 of file BaseTreeFiller.h.

Referenced by init().

float tnp::BaseTreeFiller::rho_
mutableprotected

Definition at line 212 of file BaseTreeFiller.h.

Referenced by init().

edm::EDGetTokenT<double> tnp::BaseTreeFiller::rhoToken_
protected

Definition at line 179 of file BaseTreeFiller.h.

Referenced by init().

uint32_t tnp::BaseTreeFiller::run_
mutableprotected

Definition at line 207 of file BaseTreeFiller.h.

Referenced by init().

bool tnp::BaseTreeFiller::storePUweight_
protected

Store Pileup weight when running over Monte Carlo.

Definition at line 195 of file BaseTreeFiller.h.

Referenced by BaseTreeFiller(), and init().

edm::EDGetTokenT<reco::METCollection> tnp::BaseTreeFiller::tcmetToken_
protected

Definition at line 183 of file BaseTreeFiller.h.

Referenced by init().

float tnp::BaseTreeFiller::totWeight_
mutableprotected

Definition at line 206 of file BaseTreeFiller.h.

Referenced by init().

TTree* tnp::BaseTreeFiller::tree_
mutableprotected
int tnp::BaseTreeFiller::truePU_
mutableprotected

Definition at line 209 of file BaseTreeFiller.h.

Referenced by init().

std::vector<ProbeVariable> tnp::BaseTreeFiller::vars_
protected

Definition at line 167 of file BaseTreeFiller.h.

Referenced by addBranches_(), fill(), and init().

float tnp::BaseTreeFiller::weight_
mutableprotected

Definition at line 206 of file BaseTreeFiller.h.

Referenced by init().

WeightMode tnp::BaseTreeFiller::weightMode_
protected

Definition at line 176 of file BaseTreeFiller.h.

Referenced by init().

edm::EDGetTokenT<GenEventInfoProduct> tnp::BaseTreeFiller::weightSrcToken_
protected

Definition at line 177 of file BaseTreeFiller.h.

Referenced by init().