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 (BaseTreeFiller &main, const edm::ParameterSet &iConfig, edm::ConsumesCollector &&iC, const std::string &branchNamePrefix)
 Add branches to an existing TTree managed by another BaseTreeFiller. More...
 
 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)
 
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_
 
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 137 of file BaseTreeFiller.h.

Member Enumeration Documentation

◆ WeightMode

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 174 of file BaseTreeFiller.h.

174 { None, Fixed, External };

Constructor & Destructor Documentation

◆ BaseTreeFiller() [1/3]

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 140 of file BaseTreeFiller.h.

141  : BaseTreeFiller(name, config, iC){};

◆ BaseTreeFiller() [2/3]

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 35 of file BaseTreeFiller.cc.

35  {
36  // make trees as requested
38  tree_ = fs->make<TTree>(name, name);
39 
40  // add the branches
41  addBranches_(tree_, iConfig, iC, "");
42 
43  // set up weights, if needed
44  if (iConfig.existsAs<double>("eventWeight")) {
46  weight_ = iConfig.getParameter<double>("eventWeight");
47  } else if (iConfig.existsAs<edm::InputTag>("eventWeight")) {
49  weightSrcToken_ = iC.consumes<GenEventInfoProduct>(iConfig.getParameter<edm::InputTag>("eventWeight"));
50  } else {
51  weightMode_ = None;
52  }
53  if (weightMode_ != None) {
54  tree_->Branch("weight", &weight_, "weight/F");
55  tree_->Branch("totWeight", &totWeight_, "totWeight/F");
56  }
57 
58  storePUweight_ = iConfig.existsAs<edm::InputTag>("PUWeightSrc") ? true : false;
59  if (storePUweight_) {
60  PUweightSrcToken_ = iC.consumes<double>(iConfig.getParameter<edm::InputTag>("PUWeightSrc"));
61  tree_->Branch("PUweight", &PUweight_, "PUweight/F");
62  }
63 
64  if (iConfig.existsAs<edm::InputTag>("pileupInfoTag"))
66  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  }
76  iConfig.existsAs<bool>("addEventVariablesInfo") ? iConfig.getParameter<bool>("addEventVariablesInfo") : false;
79  edm::InputTag bsIT = iConfig.existsAs<edm::InputTag>("beamSpot") ? iConfig.getParameter<edm::InputTag>("beamSpot")
80  : edm::InputTag("offlineBeamSpot");
81  edm::InputTag vtxIT = iConfig.existsAs<edm::InputTag>("vertexCollection")
82  ? iConfig.getParameter<edm::InputTag>("vertexCollection")
83  : edm::InputTag("offlinePrimaryVertices");
84  edm::InputTag pfMetIT = iConfig.existsAs<edm::InputTag>("pfMet") ? iConfig.getParameter<edm::InputTag>("pfMet")
85  : edm::InputTag("pfMet");
86  edm::InputTag tcMetIT = iConfig.existsAs<edm::InputTag>("tcMet") ? iConfig.getParameter<edm::InputTag>("tcMet")
87  : edm::InputTag("tcMet");
88  edm::InputTag clMetIT =
89  iConfig.existsAs<edm::InputTag>("clMet") ? iConfig.getParameter<edm::InputTag>("clMet") : edm::InputTag("met");
90 
95  addCaloMet_ = iConfig.existsAs<bool>("addCaloMet") ? iConfig.getParameter<bool>("addCaloMet") : true;
96  tree_->Branch("event_nPV", &mNPV_, "mNPV/I");
97  if (addCaloMet_) {
100  tree_->Branch("event_met_calomet", &mMET_, "mMET/F");
101  tree_->Branch("event_met_calosumet", &mSumET_, "mSumET/F");
102  tree_->Branch("event_met_calometsignificance", &mMETSign_, "mMETSign/F");
103  tree_->Branch("event_met_tcmet", &mtcMET_, "mtcMET/F");
104  tree_->Branch("event_met_tcsumet", &mtcSumET_, "mtcSumET/F");
105  tree_->Branch("event_met_tcmetsignificance", &mtcMETSign_, "mtcMETSign/F");
106  }
107  tree_->Branch("event_met_pfmet", &mpfMET_, "mpfMET/F");
108  tree_->Branch("event_met_pfphi", &mpfPhi_, "mpfPhi/F");
109  tree_->Branch("event_met_pfsumet", &mpfSumET_, "mpfSumET/F");
110 
111  tree_->Branch("event_met_pfmetsignificance", &mpfMETSign_, "mpfMETSign/F");
112  tree_->Branch("event_PrimaryVertex_x", &mPVx_, "mPVx/F");
113  tree_->Branch("event_PrimaryVertex_y", &mPVy_, "mPVy/F");
114  tree_->Branch("event_PrimaryVertex_z", &mPVz_, "mPVz/F");
115  tree_->Branch("event_BeamSpot_x", &mBSx_, "mBSx/F");
116  tree_->Branch("event_BeamSpot_y", &mBSy_, "mBSy/F");
117  tree_->Branch("event_BeamSpot_z", &mBSz_, "mBSz/F");
118  }
119 
120  addRho_ = iConfig.existsAs<edm::InputTag>("rho") ? true : false;
121  if (addRho_) {
122  rhoToken_ = iC.consumes<double>(iConfig.getParameter<edm::InputTag>("rho"));
123  tree_->Branch("event_rho", &rho_, "rho/F");
124  }
125 }

References edm::ConsumesCollector::consumes(), event_(), edm::ParameterSet::existsAs(), edm::ParameterSet::getParameter(), HLT_2018_cff::InputTag, TFileService::make(), edm::ConsumesCollector::mayConsume(), Skims_PA_cff::name, and None.

◆ BaseTreeFiller() [3/3]

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 127 of file BaseTreeFiller.cc.

131  : addRunLumiInfo_(false), addEventVariablesInfo_(false), tree_(nullptr) {
132  addRunLumiInfo_ = main.addRunLumiInfo_;
133  storePUweight_ = main.storePUweight_;
134  addBranches_(main.tree_, iConfig, iC, branchNamePrefix);
135 }

References addBranches_(), addRunLumiInfo_, and storePUweight_.

◆ ~BaseTreeFiller()

tnp::BaseTreeFiller::~BaseTreeFiller ( )

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

Definition at line 178 of file BaseTreeFiller.cc.

178 {}

Member Function Documentation

◆ addBranches_()

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

Definition at line 137 of file BaseTreeFiller.cc.

140  {
141  // set up variables
143  //.. the ones that are strings
144  std::vector<std::string> stringVars = variables.getParameterNamesForType<std::string>();
145  for (std::vector<std::string>::const_iterator it = stringVars.begin(), ed = stringVars.end(); it != ed; ++it) {
146  vars_.push_back(tnp::ProbeVariable(branchNamePrefix + *it, variables.getParameter<std::string>(*it)));
147  }
148  //.. the ones that are InputTags
149  std::vector<std::string> inputTagVars = variables.getParameterNamesForType<edm::InputTag>();
150  for (std::vector<std::string>::const_iterator it = inputTagVars.begin(), ed = inputTagVars.end(); it != ed; ++it) {
151  vars_.push_back(tnp::ProbeVariable(branchNamePrefix + *it,
152  iC.consumes<edm::ValueMap<float> >(variables.getParameter<edm::InputTag>(*it))));
153  }
154  // set up flags
156  //.. the ones that are strings
157  std::vector<std::string> stringFlags = flags.getParameterNamesForType<std::string>();
158  for (std::vector<std::string>::const_iterator it = stringFlags.begin(), ed = stringFlags.end(); it != ed; ++it) {
159  flags_.push_back(tnp::ProbeFlag(branchNamePrefix + *it, flags.getParameter<std::string>(*it)));
160  }
161  //.. the ones that are InputTags
162  std::vector<std::string> inputTagFlags = flags.getParameterNamesForType<edm::InputTag>();
163  for (std::vector<std::string>::const_iterator it = inputTagFlags.begin(), ed = inputTagFlags.end(); it != ed; ++it) {
164  flags_.push_back(tnp::ProbeFlag(branchNamePrefix + *it,
165  iC.consumes<edm::View<reco::Candidate> >(flags.getParameter<edm::InputTag>(*it))));
166  }
167 
168  // then make all the variables in the trees
169  for (std::vector<tnp::ProbeVariable>::iterator it = vars_.begin(), ed = vars_.end(); it != ed; ++it) {
170  tree->Branch(it->name().c_str(), it->address(), (it->name() + "/F").c_str());
171  }
172 
173  for (std::vector<tnp::ProbeFlag>::iterator it = flags_.begin(), ed = flags_.end(); it != ed; ++it) {
174  tree->Branch(it->name().c_str(), it->address(), (it->name() + "/I").c_str());
175  }
176 }

References edm::ConsumesCollector::consumes(), HLT_2018_cff::flags, edm::ParameterSet::getParameter(), AlCaHLTBitMon_QueryRunRegistry::string, and L1TEGammaDiff_cfi::variables.

Referenced by BaseTreeFiller().

◆ fill()

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 308 of file BaseTreeFiller.cc.

308  {
309  for (auto const &var : vars_)
310  var.fill(probe);
311  for (auto const &flag : flags_)
312  flag.fill(probe);
313 
314  if (tree_)
315  tree_->Fill();
316 }

References RemoveAddSevLevel::flag, and trigObjTnPSource_cfi::var.

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

◆ init()

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 180 of file BaseTreeFiller.cc.

180  {
181  run_ = iEvent.id().run();
182  lumi_ = iEvent.id().luminosityBlock();
183  event_ = iEvent.id().event();
184 
185  truePU_ = 0;
186  if (!iEvent.isRealData() and !pileupInfoToken_.isUninitialized()) {
188  iEvent.getByToken(pileupInfoToken_, PupInfo);
189  truePU_ = PupInfo->begin()->getTrueNumInteractions();
190  }
191 
192  totWeight_ = 1.;
193  for (std::vector<tnp::ProbeVariable>::const_iterator it = vars_.begin(), ed = vars_.end(); it != ed; ++it) {
194  it->init(iEvent);
195  }
196  for (std::vector<tnp::ProbeFlag>::const_iterator it = flags_.begin(), ed = flags_.end(); it != ed; ++it) {
197  it->init(iEvent);
198  }
199  if (weightMode_ == External) {
200  // edm::Handle<double> weight;
201  // iEvent.getByToken(weightSrcToken_, weight);
202  // weight_ = *weight;
204  iEvent.getByToken(weightSrcToken_, weight);
205  weight_ = weight->weight();
206  totWeight_ *= weight_;
207  }
208 
210  PUweight_ = 1;
212  edm::Handle<double> weightPU;
213  bool isPresent = iEvent.getByToken(PUweightSrcToken_, weightPU);
214  if (isPresent)
215  PUweight_ = float(*weightPU);
217  }
218 
223  iEvent.getByToken(recVtxsToken_, recVtxs);
224  mNPV_ = 0;
225  mPVx_ = 100.0;
226  mPVy_ = 100.0;
227  mPVz_ = 100.0;
228 
229  for (unsigned int ind = 0; ind < recVtxs->size(); ind++) {
230  if (!((*recVtxs)[ind].isFake()) && ((*recVtxs)[ind].ndof() > 4) && (fabs((*recVtxs)[ind].z()) <= 24.0) &&
231  ((*recVtxs)[ind].position().Rho() <= 2.0)) {
232  mNPV_++;
233  if (mNPV_ == 1) { // store the first good primary vertex
234  mPVx_ = (*recVtxs)[ind].x();
235  mPVy_ = (*recVtxs)[ind].y();
236  mPVz_ = (*recVtxs)[ind].z();
237  }
238  }
239  }
240 
243  iEvent.getByToken(beamSpotToken_, beamSpot);
244  mBSx_ = beamSpot->position().X();
245  mBSy_ = beamSpot->position().Y();
246  mBSz_ = beamSpot->position().Z();
247 
248  if (addCaloMet_) {
251  iEvent.getByToken(metToken_, met);
252  if (met->empty()) {
253  mMET_ = -1;
254  mSumET_ = -1;
255  mMETSign_ = -1;
256  } else {
257  mMET_ = (*met)[0].et();
258  mSumET_ = (*met)[0].sumEt();
259  mMETSign_ = (*met)[0].significance();
260  }
261 
264  iEvent.getByToken(tcmetToken_, tcmet);
265  if (tcmet->empty()) {
266  mtcMET_ = -1;
267  mtcSumET_ = -1;
268  mtcMETSign_ = -1;
269  } else {
270  mtcMET_ = (*tcmet)[0].et();
271  mtcSumET_ = (*tcmet)[0].sumEt();
272  mtcMETSign_ = (*tcmet)[0].significance();
273  }
274  }
275 
278  iEvent.getByToken(pfmetToken_, pfmet);
279  if (pfmet.isValid()) {
280  if (pfmet->empty()) {
281  mpfMET_ = -1;
282  mpfSumET_ = -1;
283  mpfMETSign_ = -1;
284  } else {
285  mpfMET_ = (*pfmet)[0].et();
286  mpfPhi_ = (*pfmet)[0].phi();
287  mpfSumET_ = (*pfmet)[0].sumEt();
288  mpfMETSign_ = (*pfmet)[0].significance();
289  }
290  } else {
292  iEvent.getByToken(pfmetTokenMiniAOD_, pfmet2);
293  const pat::MET &met = pfmet2->front();
294  mpfMET_ = met.pt();
295  mpfPhi_ = met.phi();
296  mpfSumET_ = met.sumEt();
297  mpfMETSign_ = met.significance();
298  }
299 
300  if (addRho_) {
301  edm::Handle<double> rhos;
302  iEvent.getByToken(rhoToken_, rhos);
303  rho_ = (float)*rhos;
304  }
305  }
306 }

References pwdgSkimBPark_cfi::beamSpot, event_(), dqmMemoryStats::float, iEvent, edm::HandleBase::isValid(), BTaggingMonitor_cfi::met, and mps_merge::weight.

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

◆ storePUweight()

bool tnp::BaseTreeFiller::storePUweight ( ) const
inline

Definition at line 167 of file BaseTreeFiller.h.

167 { return storePUweight_; };

◆ writeProvenance()

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 317 of file BaseTreeFiller.cc.

317  {
318  TList *list = tree_->GetUserInfo();
319  list->Add(new TObjString(pset.dump().c_str()));
320 }

References list(), and muonDTDigis_cfi::pset.

Member Data Documentation

◆ addCaloMet_

bool tnp::BaseTreeFiller::addCaloMet_
protected

Definition at line 196 of file BaseTreeFiller.h.

◆ addEventVariablesInfo_

bool tnp::BaseTreeFiller::addEventVariablesInfo_
protected

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

Definition at line 194 of file BaseTreeFiller.h.

◆ addRho_

bool tnp::BaseTreeFiller::addRho_
protected

Definition at line 195 of file BaseTreeFiller.h.

◆ addRunLumiInfo_

bool tnp::BaseTreeFiller::addRunLumiInfo_
protected

Add branches with run and lumisection number.

Definition at line 188 of file BaseTreeFiller.h.

Referenced by BaseTreeFiller().

◆ beamSpotToken_

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

Definition at line 180 of file BaseTreeFiller.h.

◆ event_

uint64_t tnp::BaseTreeFiller::event_
mutableprotected

Definition at line 207 of file BaseTreeFiller.h.

◆ flags_

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

Definition at line 171 of file BaseTreeFiller.h.

◆ lumi_

uint32_t tnp::BaseTreeFiller::lumi_
mutableprotected

Definition at line 206 of file BaseTreeFiller.h.

◆ mBSx_

float tnp::BaseTreeFiller::mBSx_
mutableprotected

Definition at line 210 of file BaseTreeFiller.h.

◆ mBSy_

float tnp::BaseTreeFiller::mBSy_
mutableprotected

Definition at line 210 of file BaseTreeFiller.h.

◆ mBSz_

float tnp::BaseTreeFiller::mBSz_
mutableprotected

Definition at line 210 of file BaseTreeFiller.h.

◆ metToken_

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

Definition at line 181 of file BaseTreeFiller.h.

◆ mMET_

float tnp::BaseTreeFiller::mMET_
mutableprotected

Definition at line 212 of file BaseTreeFiller.h.

◆ mMETSign_

float tnp::BaseTreeFiller::mMETSign_
mutableprotected

Definition at line 212 of file BaseTreeFiller.h.

◆ mNPV_

uint32_t tnp::BaseTreeFiller::mNPV_
mutableprotected

Definition at line 206 of file BaseTreeFiller.h.

◆ mpfMET_

float tnp::BaseTreeFiller::mpfMET_
mutableprotected

Definition at line 212 of file BaseTreeFiller.h.

◆ mpfMETSign_

float tnp::BaseTreeFiller::mpfMETSign_
mutableprotected

Definition at line 212 of file BaseTreeFiller.h.

◆ mpfPhi_

float tnp::BaseTreeFiller::mpfPhi_
mutableprotected

Definition at line 212 of file BaseTreeFiller.h.

◆ mpfSumET_

float tnp::BaseTreeFiller::mpfSumET_
mutableprotected

Definition at line 212 of file BaseTreeFiller.h.

◆ mPVx_

float tnp::BaseTreeFiller::mPVx_
mutableprotected

Definition at line 210 of file BaseTreeFiller.h.

◆ mPVy_

float tnp::BaseTreeFiller::mPVy_
mutableprotected

Definition at line 210 of file BaseTreeFiller.h.

◆ mPVz_

float tnp::BaseTreeFiller::mPVz_
mutableprotected

Definition at line 210 of file BaseTreeFiller.h.

◆ mSumET_

float tnp::BaseTreeFiller::mSumET_
mutableprotected

Definition at line 212 of file BaseTreeFiller.h.

◆ mtcMET_

float tnp::BaseTreeFiller::mtcMET_
mutableprotected

Definition at line 212 of file BaseTreeFiller.h.

◆ mtcMETSign_

float tnp::BaseTreeFiller::mtcMETSign_
mutableprotected

Definition at line 212 of file BaseTreeFiller.h.

◆ mtcSumET_

float tnp::BaseTreeFiller::mtcSumET_
mutableprotected

Definition at line 212 of file BaseTreeFiller.h.

◆ pfmetToken_

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

Definition at line 183 of file BaseTreeFiller.h.

◆ pfmetTokenMiniAOD_

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

Definition at line 184 of file BaseTreeFiller.h.

◆ pileupInfoToken_

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

Definition at line 185 of file BaseTreeFiller.h.

◆ PUweight_

float tnp::BaseTreeFiller::PUweight_
mutableprotected

Definition at line 205 of file BaseTreeFiller.h.

◆ PUweightSrcToken_

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

Definition at line 177 of file BaseTreeFiller.h.

◆ recVtxsToken_

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

Definition at line 179 of file BaseTreeFiller.h.

◆ rho_

float tnp::BaseTreeFiller::rho_
mutableprotected

Definition at line 211 of file BaseTreeFiller.h.

◆ rhoToken_

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

Definition at line 178 of file BaseTreeFiller.h.

◆ run_

uint32_t tnp::BaseTreeFiller::run_
mutableprotected

Definition at line 206 of file BaseTreeFiller.h.

◆ storePUweight_

bool tnp::BaseTreeFiller::storePUweight_
protected

Store Pileup weight when running over Monte Carlo.

Definition at line 191 of file BaseTreeFiller.h.

Referenced by BaseTreeFiller().

◆ tcmetToken_

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

Definition at line 182 of file BaseTreeFiller.h.

◆ totWeight_

float tnp::BaseTreeFiller::totWeight_
mutableprotected

Definition at line 205 of file BaseTreeFiller.h.

◆ tree_

TTree* tnp::BaseTreeFiller::tree_
mutableprotected

Definition at line 204 of file BaseTreeFiller.h.

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

◆ truePU_

int tnp::BaseTreeFiller::truePU_
mutableprotected

Definition at line 208 of file BaseTreeFiller.h.

◆ vars_

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

Definition at line 167 of file BaseTreeFiller.h.

◆ weight_

float tnp::BaseTreeFiller::weight_
mutableprotected

Definition at line 205 of file BaseTreeFiller.h.

◆ weightMode_

WeightMode tnp::BaseTreeFiller::weightMode_
protected

Definition at line 175 of file BaseTreeFiller.h.

◆ weightSrcToken_

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

Definition at line 176 of file BaseTreeFiller.h.

GenEventInfoProduct
Definition: GenEventInfoProduct.h:17
tnp::BaseTreeFiller::mpfPhi_
float mpfPhi_
Definition: BaseTreeFiller.h:212
reco::PFMETCollection
std::vector< reco::PFMET > PFMETCollection
collection of PFMET objects
Definition: PFMETCollection.h:20
pwdgSkimBPark_cfi.beamSpot
beamSpot
Definition: pwdgSkimBPark_cfi.py:5
dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
tnp::BaseTreeFiller::addCaloMet_
bool addCaloMet_
Definition: BaseTreeFiller.h:196
tnp::BaseTreeFiller::rhoToken_
edm::EDGetTokenT< double > rhoToken_
Definition: BaseTreeFiller.h:178
tnp::BaseTreeFiller::PUweight_
float PUweight_
Definition: BaseTreeFiller.h:205
detailsBasic3DVector::z
float float float z
Definition: extBasic3DVector.h:14
tnp::BaseTreeFiller::External
Definition: BaseTreeFiller.h:174
tnp::ProbeFlag
Definition: BaseTreeFiller.h:93
L1TEGammaDiff_cfi.variables
variables
Definition: L1TEGammaDiff_cfi.py:5
mps_merge.weight
weight
Definition: mps_merge.py:88
tree
Definition: tree.py:1
reco::VertexCollection
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
tnp::BaseTreeFiller::metToken_
edm::EDGetTokenT< reco::CaloMETCollection > metToken_
Definition: BaseTreeFiller.h:181
tnp::BaseTreeFiller::storePUweight_
bool storePUweight_
Store Pileup weight when running over Monte Carlo.
Definition: BaseTreeFiller.h:191
tnp::BaseTreeFiller::mpfMETSign_
float mpfMETSign_
Definition: BaseTreeFiller.h:212
tnp::BaseTreeFiller::mMETSign_
float mMETSign_
Definition: BaseTreeFiller.h:212
tnp::BaseTreeFiller::mBSx_
float mBSx_
Definition: BaseTreeFiller.h:210
edm::Handle
Definition: AssociativeIterator.h:50
tnp::BaseTreeFiller::weight_
float weight_
Definition: BaseTreeFiller.h:205
BTaggingMonitor_cfi.met
met
Definition: BTaggingMonitor_cfi.py:84
reco::METCollection
std::vector< reco::MET > METCollection
collection of MET objects
Definition: METCollection.h:22
tnp::BaseTreeFiller::None
Definition: BaseTreeFiller.h:174
trigObjTnPSource_cfi.var
var
Definition: trigObjTnPSource_cfi.py:21
config
Definition: config.py:1
tnp::BaseTreeFiller::weightMode_
WeightMode weightMode_
Definition: BaseTreeFiller.h:175
tnp::BaseTreeFiller::addRunLumiInfo_
bool addRunLumiInfo_
Add branches with run and lumisection number.
Definition: BaseTreeFiller.h:188
tnp::BaseTreeFiller::rho_
float rho_
Definition: BaseTreeFiller.h:211
edm::EDGetTokenT::isUninitialized
bool isUninitialized() const
Definition: EDGetToken.h:70
reco::BeamSpot
Definition: BeamSpot.h:21
tnp::BaseTreeFiller::mMET_
float mMET_
Definition: BaseTreeFiller.h:212
tnp::BaseTreeFiller::mtcMET_
float mtcMET_
Definition: BaseTreeFiller.h:212
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:49
tnp::BaseTreeFiller::mPVx_
float mPVx_
Definition: BaseTreeFiller.h:210
tnp::BaseTreeFiller::mtcMETSign_
float mtcMETSign_
Definition: BaseTreeFiller.h:212
tnp::BaseTreeFiller::event_
uint64_t event_
Definition: BaseTreeFiller.h:207
tnp::BaseTreeFiller::beamSpotToken_
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
Definition: BaseTreeFiller.h:180
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
tnp::BaseTreeFiller::mPVy_
float mPVy_
Definition: BaseTreeFiller.h:210
tnp::BaseTreeFiller::mpfSumET_
float mpfSumET_
Definition: BaseTreeFiller.h:212
edm::View
Definition: CaloClusterFwd.h:14
HLT_2018_cff.InputTag
InputTag
Definition: HLT_2018_cff.py:79016
edm::ParameterSet
Definition: ParameterSet.h:36
tnp::BaseTreeFiller::mpfMET_
float mpfMET_
Definition: BaseTreeFiller.h:212
tnp::BaseTreeFiller::pileupInfoToken_
edm::EDGetTokenT< std::vector< PileupSummaryInfo > > pileupInfoToken_
Definition: BaseTreeFiller.h:185
tnp::BaseTreeFiller::weightSrcToken_
edm::EDGetTokenT< GenEventInfoProduct > weightSrcToken_
Definition: BaseTreeFiller.h:176
edm::ConsumesCollector::mayConsume
EDGetTokenT< ProductType > mayConsume(edm::InputTag const &tag)
Definition: ConsumesCollector.h:61
edm::Service< TFileService >
iEvent
int iEvent
Definition: GenABIO.cc:224
pat::MET
Analysis-level MET class.
Definition: MET.h:40
tnp::BaseTreeFiller::mBSz_
float mBSz_
Definition: BaseTreeFiller.h:210
tnp::BaseTreeFiller::run_
uint32_t run_
Definition: BaseTreeFiller.h:206
tnp::BaseTreeFiller::BaseTreeFiller
BaseTreeFiller(const char *name, const edm::ParameterSet &config, edm::ConsumesCollector &&iC)
specify the name of the TTree, and the configuration for it
Definition: BaseTreeFiller.h:140
tnp::BaseTreeFiller::mBSy_
float mBSy_
Definition: BaseTreeFiller.h:210
tnp::BaseTreeFiller::recVtxsToken_
edm::EDGetTokenT< reco::VertexCollection > recVtxsToken_
Definition: BaseTreeFiller.h:179
pat::METCollection
std::vector< MET > METCollection
Definition: MET.h:31
main
Definition: main.py:1
tnp::BaseTreeFiller::flags_
std::vector< ProbeFlag > flags_
Definition: BaseTreeFiller.h:171
tnp::BaseTreeFiller::addEventVariablesInfo_
bool addEventVariablesInfo_
Add branches with event variables: met, sum ET, .. etc.
Definition: BaseTreeFiller.h:194
tnp::BaseTreeFiller::vars_
std::vector< ProbeVariable > vars_
Definition: BaseTreeFiller.h:167
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
tnp::BaseTreeFiller::pfmetToken_
edm::EDGetTokenT< reco::PFMETCollection > pfmetToken_
Definition: BaseTreeFiller.h:183
tnp::BaseTreeFiller::tree_
TTree * tree_
Definition: BaseTreeFiller.h:204
tnp::BaseTreeFiller::Fixed
Definition: BaseTreeFiller.h:174
edm::ValueMap< float >
tnp::BaseTreeFiller::tcmetToken_
edm::EDGetTokenT< reco::METCollection > tcmetToken_
Definition: BaseTreeFiller.h:182
tnp::BaseTreeFiller::mPVz_
float mPVz_
Definition: BaseTreeFiller.h:210
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
list
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
reco::CaloMETCollection
std::vector< reco::CaloMET > CaloMETCollection
collection of CaloMET objects
Definition: CaloMETCollection.h:20
tnp::BaseTreeFiller::lumi_
uint32_t lumi_
Definition: BaseTreeFiller.h:206
tnp::ProbeVariable
A variable for the probe: can be a string expression or an external ValueMap<float>
Definition: BaseTreeFiller.h:44
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
tnp::BaseTreeFiller::addBranches_
void addBranches_(TTree *tree, const edm::ParameterSet &iConfig, edm::ConsumesCollector &iC, const std::string &branchNamePrefix="")
Definition: BaseTreeFiller.cc:137
tnp::BaseTreeFiller::truePU_
int truePU_
Definition: BaseTreeFiller.h:208
tnp::BaseTreeFiller::PUweightSrcToken_
edm::EDGetTokenT< double > PUweightSrcToken_
Definition: BaseTreeFiller.h:177
HLT_2018_cff.flags
flags
Definition: HLT_2018_cff.py:11758
edm::InputTag
Definition: InputTag.h:15
tnp::BaseTreeFiller::mSumET_
float mSumET_
Definition: BaseTreeFiller.h:212
tnp::BaseTreeFiller::addRho_
bool addRho_
Definition: BaseTreeFiller.h:195
weight
Definition: weight.py:1
TFileService::make
T * make(const Args &... args) const
make new ROOT object
Definition: TFileService.h:64
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
tnp::BaseTreeFiller::totWeight_
float totWeight_
Definition: BaseTreeFiller.h:205
tnp::BaseTreeFiller::mtcSumET_
float mtcSumET_
Definition: BaseTreeFiller.h:212
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:116
tnp::BaseTreeFiller::pfmetTokenMiniAOD_
edm::EDGetTokenT< pat::METCollection > pfmetTokenMiniAOD_
Definition: BaseTreeFiller.h:184
tnp::BaseTreeFiller::mNPV_
uint32_t mNPV_
Definition: BaseTreeFiller.h:206