CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
ZMuMuMassConstraintParameterFinder::DiMuonInfo Class Reference

helper class containing information about a di-muon system More...

Public Member Functions

 DiMuonInfo (double, double)
 
void fill ()
 
std::vector< reco::GenParticle > & muons ()
 
void setupTree (const std::string &, edm::Service< TFileService > &)
 

Private Attributes

double diMuonMass_ {-1.0}
 
const double maxMassPair_
 
const double minMassPair_
 
std::vector< reco::GenParticlemuons_
 
bool passed_ {false}
 
int pdgMother_ {0}
 
TTree * tree_ {nullptr}
 

Detailed Description

helper class containing information about a di-muon system

Definition at line 56 of file ZMuMuMassConstraintParameterFinder.cc.

Constructor & Destructor Documentation

◆ DiMuonInfo()

ZMuMuMassConstraintParameterFinder::DiMuonInfo::DiMuonInfo ( double  minMass,
double  maxMass 
)

Member Function Documentation

◆ fill()

void ZMuMuMassConstraintParameterFinder::DiMuonInfo::fill ( )

Definition at line 181 of file ZMuMuMassConstraintParameterFinder.cc.

181  {
182  if (muons_.size() == 2) {
183  diMuonMass_ = (muons_[0].p4() + muons_[1].p4()).M();
184  pdgMother_ = muons_[0].mother()->pdgId();
186  passed_ = true;
187  tree_->Fill();
188  }
189  muons_.clear();
190  diMuonMass_ = -1.0;
191  pdgMother_ = 0;
192  passed_ = false;
193 }

References ZMuMuMassConstraintParameterFinder::maxMassPair_, and ZMuMuMassConstraintParameterFinder::minMassPair_.

Referenced by ZMuMuMassConstraintParameterFinder::analyze().

◆ muons()

std::vector<reco::GenParticle>& ZMuMuMassConstraintParameterFinder::DiMuonInfo::muons ( )
inline

Definition at line 61 of file ZMuMuMassConstraintParameterFinder.cc.

61 { return muons_; }

References muons_.

Referenced by ZMuMuMassConstraintParameterFinder::analyze().

◆ setupTree()

void ZMuMuMassConstraintParameterFinder::DiMuonInfo::setupTree ( const std::string &  name,
edm::Service< TFileService > &  fs 
)

Definition at line 172 of file ZMuMuMassConstraintParameterFinder.cc.

173  {
174  tree_ = fs->make<TTree>(name.c_str(), name.c_str());
175  tree_->Branch("muons", &muons_);
176  tree_->Branch("di_muon_mass", &diMuonMass_);
177  tree_->Branch("pdg_mother", &pdgMother_);
178  tree_->Branch("in_mass_window", &passed_);
179 }

References TFileService::make(), and Skims_PA_cff::name.

Member Data Documentation

◆ diMuonMass_

double ZMuMuMassConstraintParameterFinder::DiMuonInfo::diMuonMass_ {-1.0}
private

Definition at line 66 of file ZMuMuMassConstraintParameterFinder.cc.

◆ maxMassPair_

const double ZMuMuMassConstraintParameterFinder::DiMuonInfo::maxMassPair_
private

Definition at line 71 of file ZMuMuMassConstraintParameterFinder.cc.

◆ minMassPair_

const double ZMuMuMassConstraintParameterFinder::DiMuonInfo::minMassPair_
private

Definition at line 70 of file ZMuMuMassConstraintParameterFinder.cc.

◆ muons_

std::vector<reco::GenParticle> ZMuMuMassConstraintParameterFinder::DiMuonInfo::muons_
private

Definition at line 65 of file ZMuMuMassConstraintParameterFinder.cc.

Referenced by muons().

◆ passed_

bool ZMuMuMassConstraintParameterFinder::DiMuonInfo::passed_ {false}
private

Definition at line 68 of file ZMuMuMassConstraintParameterFinder.cc.

◆ pdgMother_

int ZMuMuMassConstraintParameterFinder::DiMuonInfo::pdgMother_ {0}
private

Definition at line 67 of file ZMuMuMassConstraintParameterFinder.cc.

◆ tree_

TTree* ZMuMuMassConstraintParameterFinder::DiMuonInfo::tree_ {nullptr}
private

Definition at line 64 of file ZMuMuMassConstraintParameterFinder.cc.

ZMuMuMassConstraintParameterFinder::DiMuonInfo::muons_
std::vector< reco::GenParticle > muons_
Definition: ZMuMuMassConstraintParameterFinder.cc:65
ZMuMuMassConstraintParameterFinder::DiMuonInfo::minMassPair_
const double minMassPair_
Definition: ZMuMuMassConstraintParameterFinder.cc:70
B2GTnPMonitor_cfi.maxMass
maxMass
Definition: B2GTnPMonitor_cfi.py:55
ZMuMuMassConstraintParameterFinder::DiMuonInfo::pdgMother_
int pdgMother_
Definition: ZMuMuMassConstraintParameterFinder.cc:67
ZMuMuMassConstraintParameterFinder::DiMuonInfo::diMuonMass_
double diMuonMass_
Definition: ZMuMuMassConstraintParameterFinder.cc:66
ZMuMuMassConstraintParameterFinder::DiMuonInfo::maxMassPair_
const double maxMassPair_
Definition: ZMuMuMassConstraintParameterFinder.cc:71
ZMuMuMassConstraintParameterFinder::DiMuonInfo::passed_
bool passed_
Definition: ZMuMuMassConstraintParameterFinder.cc:68
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
B2GTnPMonitor_cfi.minMass
minMass
Definition: B2GTnPMonitor_cfi.py:54
ZMuMuMassConstraintParameterFinder::DiMuonInfo::tree_
TTree * tree_
Definition: ZMuMuMassConstraintParameterFinder.cc:64
TFileService::make
T * make(const Args &... args) const
make new ROOT object
Definition: TFileService.h:64