CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes
ZSelector Struct Reference

Public Member Functions

int operator() (const Candidate &c) const
 
 ZSelector (double ptMin, double etaDau0Min, double etaDau0Max, double etaDau1Min, double etaDau1Max, double massMin, double massMax, double massMinZMC, double massMaxZMC)
 

Public Attributes

double etaDau0Max_
 
double etaDau0Min_
 
double etaDau1Max_
 
double etaDau1Min_
 
double massMax_
 
double massMaxZMC_
 
double massMin_
 
double massMinZMC_
 
double ptMin_
 

Detailed Description

Definition at line 23 of file MCAcceptanceAnalyzer.cc.

Constructor & Destructor Documentation

ZSelector::ZSelector ( double  ptMin,
double  etaDau0Min,
double  etaDau0Max,
double  etaDau1Min,
double  etaDau1Max,
double  massMin,
double  massMax,
double  massMinZMC,
double  massMaxZMC 
)
inline

Definition at line 24 of file MCAcceptanceAnalyzer.cc.

24  :
25  ptMin_(ptMin), etaDau0Min_(etaDau0Min),etaDau0Max_(etaDau0Max), etaDau1Min_(etaDau1Min),etaDau1Max_(etaDau1Max),
26  massMin_(massMin), massMax_(massMax), massMinZMC_(massMinZMC), massMaxZMC_(massMaxZMC) { }

Member Function Documentation

int ZSelector::operator() ( const Candidate c) const
inline

allowing asymmetric cut....

Definition at line 27 of file MCAcceptanceAnalyzer.cc.

References reco::Candidate::daughter(), reco::Candidate::eta(), m, reco::Candidate::mass(), mcMuDaughter(), reco::Candidate::numberOfDaughters(), reco::Candidate::p4(), and reco::Candidate::pt().

27  {
28  // std::cout << "c.numberOfDaughters(): " << c.numberOfDaughters()<< std::endl;
29  if (c.numberOfDaughters()<2) return 0;
30  if (c.numberOfDaughters()>=6) return 0;
31  const Candidate * d0 = c.daughter(0);
32  const Candidate * d1 = c.daughter(1);
33  if(c.numberOfDaughters()>2) {
34  if (d0->numberOfDaughters()>0) d0 = mcMuDaughter(d0);
35  if (d1->numberOfDaughters()>0) d1 = mcMuDaughter(d1);
36  }
37  int temp_cut= 0;
39  if( ( fabs(d0->eta()) > etaDau0Min_ && fabs(d1->eta())>etaDau1Min_ && fabs(d0->eta()) < etaDau0Max_ && fabs(d1->eta()) <etaDau1Max_ ) || ( fabs(d0->eta()) > etaDau1Min_ && fabs(d1->eta())>etaDau0Min_ && fabs(d0->eta()) < etaDau1Max_ && fabs(d1->eta()) <etaDau0Max_ ) ) {
40  temp_cut=1;
41  if(d0->pt() > ptMin_ && d1->pt() > ptMin_) {
42  temp_cut=2;
43  double m = (d0->p4() + d1->p4()).mass();
44  if(m > massMin_ && m < massMax_) temp_cut=3;
45  if (c.mass()> massMinZMC_ && c.mass() < massMaxZMC_) temp_cut =4;
46  }
47  }
48 
49  return temp_cut;
50  }
virtual const Candidate * daughter(size_type i) const =0
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
virtual float mass() const =0
mass
virtual float eta() const =0
momentum pseudorapidity
virtual size_type numberOfDaughters() const =0
number of daughters
virtual float pt() const =0
transverse momentum
const Candidate * mcMuDaughter(const Candidate *c)
virtual const LorentzVector & p4() const =0
four-momentum Lorentz vector

Member Data Documentation

double ZSelector::etaDau0Max_

Definition at line 51 of file MCAcceptanceAnalyzer.cc.

double ZSelector::etaDau0Min_

Definition at line 51 of file MCAcceptanceAnalyzer.cc.

double ZSelector::etaDau1Max_

Definition at line 51 of file MCAcceptanceAnalyzer.cc.

double ZSelector::etaDau1Min_

Definition at line 51 of file MCAcceptanceAnalyzer.cc.

double ZSelector::massMax_

Definition at line 51 of file MCAcceptanceAnalyzer.cc.

double ZSelector::massMaxZMC_

Definition at line 51 of file MCAcceptanceAnalyzer.cc.

double ZSelector::massMin_

Definition at line 51 of file MCAcceptanceAnalyzer.cc.

double ZSelector::massMinZMC_

Definition at line 51 of file MCAcceptanceAnalyzer.cc.

double ZSelector::ptMin_

Definition at line 51 of file MCAcceptanceAnalyzer.cc.