33 cout <<
">>> Z Mass constructor" << endl;
35 h_mZ_ = fs->
make<TH1F>(
"ZMass",
"Z mass (GeV/c^{2})", 100, 0, 200);
36 h_mZMC_ = fs->
make<TH1F>(
"ZMCMass",
"Z MC mass (GeV/c^{2})", 100, 0, 200);
40 cout <<
">>> Z Mass analyze" << endl;
45 for(
unsigned int i = 0;
i < z->
size(); ++
i) {
49 for(
unsigned int i = 0;
i < gen->
size(); ++
i) {
51 if((genCand.
pdgId() == 23) && (genCand.
status() == 2))
53 <<
" daughters" << endl;
54 if((genCand.
pdgId() == 23)&&(genCand.
status() == 3)) {
56 <<
" daughters" << endl;
62 cout <<
">>> daughter MC 0 PDG Id " << dauGen0->
pdgId()
63 <<
", status " << dauGen0->
status()
64 <<
", charge " << dauGen0->
charge()
66 cout <<
">>> daughter MC 1 PDG Id " << dauGen1->
pdgId()
67 <<
", status " << dauGen1->
status()
68 <<
", charge " << dauGen1->
charge()
70 cout <<
">>> daughter MC 2 PDG Id " << dauGen2->
pdgId()
71 <<
", status " << dauGen2->
status()
72 <<
", charge " << dauGen2->
charge() << endl;
virtual const Candidate * daughter(size_type i) const =0
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
void analyze(const edm::Event &event, const edm::EventSetup &setup) override
def setup(process, global_tag, zero_tesla=False)
T * make(const Args &...args) const
make new ROOT object
edm::EDGetTokenT< reco::CandidateView > genToken_
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
virtual int status() const =0
status word
#define DEFINE_FWK_MODULE(type)
virtual int pdgId() const =0
PDG identifier.
edm::EDGetTokenT< reco::CandidateView > zToken_
def gen(fragment, howMuch)
Production test section ####.
ZMassHistogrammer(const edm::ParameterSet &pset)
virtual double mass() const =0
mass
virtual int charge() const =0
electric charge
virtual size_type numberOfDaughters() const =0
number of daughters