7 genEventInfoProductTag_(iConfig.getParameter<edm::InputTag>(
"genEventInfoProductTag")),
8 genParticlesTag_(iConfig.getParameter<edm::InputTag>(
"genParticlesTag"))
37 if (evt_info.failedToGet())
40 weight = evt_info->weight() ;
49 bool hasTop(
false), hasTopbar(
false);
52 if(p.
pdgId() == 6) hasTop=
true;
53 if(p.
pdgId() == -6) hasTopbar=
true;
56 if(hasTop && hasTopbar){
60 if ( (p.
pdgId() == 11 ||
63 if ( (p.
pdgId() == -11 ||
65 p.
pdgId() == -15) && p.
status() == 3) { _leptonBar = &
p ; }
67 if (_lepton && _leptonBar)
break;
70 if (_lepton && _leptonBar) {
78 double asym = ( deltaPhi > CLHEP::halfpi ) ? 0.5 : -0.5 ;
83 double llpairPt = llpair.pt() ;
86 double llpairM = llpair.M() ;
101 TString
dir=
"Generator/";
102 dir+=
"TTbarSpinCorr";
virtual int pdgId() const
PDG identifier.
virtual void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &)
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
#define DEFINE_FWK_MODULE(type)
virtual int status() const
status word
edm::InputTag genEventInfoProductTag_
double Phi_mpi_pi(double x)
virtual void endLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &)
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
virtual void beginRun(edm::Run const &, edm::EventSetup const &)
virtual void analyze(const edm::Event &, const edm::EventSetup &)
TTbarSpinCorrHepMCAnalyzer(const edm::ParameterSet &)
edm::InputTag genParticlesTag_
virtual void endRun(edm::Run const &, edm::EventSetup const &)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
MonitorElement * _h_deltaPhi
~TTbarSpinCorrHepMCAnalyzer()
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
virtual const LorentzVector & p4() const
four-momentum Lorentz vector
MonitorElement * _h_llpairM
void setCurrentFolder(const std::string &fullpath)
MonitorElement * _h_llpairPt