41 z_(pset.getParameter<
InputTag>(
"z")),
42 gen_(pset.getParameter<
InputTag>(
"gen")),
43 match_(pset.getParameter<
InputTag>(
"match")),
44 nbinsMass_(pset.getUntrackedParameter<unsigned int>(
"nbinsMass")),
45 nbinsPt_(pset.getUntrackedParameter<unsigned int>(
"nbinsPt")),
46 nbinsAng_(pset.getUntrackedParameter<unsigned int>(
"nbinsAng")),
47 nbinsMassRes_(pset.getUntrackedParameter<unsigned int>(
"nbinsMassRes")),
48 massMax_(pset.getUntrackedParameter<double>(
"massMax")),
49 ptMax_(pset.getUntrackedParameter<double>(
"ptMax")),
50 angMax_(pset.getUntrackedParameter<double>(
"angMax")),
51 massResMax_(pset.getUntrackedParameter<double>(
"massResMax")) {
52 cout <<
">>> Z Histogrammer constructor" << endl;
58 h_nZ_ = ZHisto.
make<TH1F>(
"ZNumber",
"number of Z particles", 11, -0.5, 10.5);
67 h_nZMC_ = ZMCHisto.
make<TH1F>(
"ZMCNumber",
"number of Z MC particles", 11, -0.5, 10.5);
91 h_mResZ_ = ZResHisto.
make<TH1F>(
"ZMassResolution",
"Z mass Resolution (GeV/c^{2})",
93 h_ptResZ_ = ZResHisto.
make<TH1F>(
"ZPtResolution",
"Z p_{t} Resolution (GeV/c)",
95 h_phiResZ_ = ZResHisto.
make<TH1F>(
"ZPhiResolution",
"Z #phi Resolution",
97 h_thetaResZ_ = ZResHisto.
make<TH1F>(
"ZThetaResolution",
"Z #theta Resolution",
99 h_etaResZ_ = ZResHisto.
make<TH1F>(
"ZEtaResolution",
"Z #eta Resolution",
104 "Z Reco vs matched final state #mu #mu mass Difference (GeV/c^{2})",
107 "Z Reco vs matched final state #mu #mu mass Ratio",
110 "Z vs final state #mu #mu MC mass Difference (GeV/c^{2})",
113 "Z vs final state #mu #mu MC mass Ratio",
118 cout <<
">>> Z Histogrammer analyze" << endl;
122 event.getByLabel(
z_, z);
123 event.getByLabel(
gen_, gen);
124 event.getByLabel(
match_, match);
125 h_nZ_->Fill(z->size());
126 for(
unsigned int i = 0;
i < z->size(); ++
i) {
136 if(zMCMatch.
isNonnull() && zMCMatch->pdgId()==23) {
137 h_mResZ_->Fill(zCandRef->mass() - zMCMatch->mass());
138 h_ptResZ_->Fill(zCandRef->pt() - zMCMatch->pt());
139 h_phiResZ_->Fill(zCandRef->phi() - zMCMatch->phi());
140 h_thetaResZ_->Fill(zCandRef->theta() - zMCMatch->theta());
141 h_etaResZ_->Fill(zCandRef->eta() - zMCMatch->eta());
143 const Candidate * dau0 = zMCMatch->daughter(0);
144 const Candidate * dau1 = zMCMatch->daughter(1);
159 double invMass = (dau0->
p4()+dau1->
p4()).mass();
166 for(
unsigned int i = 0;
i < gen->size(); ++
i) {
168 if((genCand.
pdgId() == 23) && (genCand.
status() == 2))
170 <<
" daughters" << endl;
171 if((genCand.
pdgId() == 23)&&(genCand.
status() == 3)) {
173 <<
" daughters" << endl;
196 cout <<
">>> The muon " <<
j
200 cout <<
">>> Mu " <<
j
201 <<
" daughter MC " <<
k
202 <<
" PDG Id " << dauMuGen->
pdgId()
203 <<
", status " << dauMuGen->
status()
204 <<
", charge " << dauMuGen->
charge()
207 pZ += dauMuGen->
p4();
214 double mZ = pZ.mass();
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 void analyze(const edm::Event &event, const edm::EventSetup &setup) override
virtual float eta() const =0
momentum pseudorapidity
#define DEFINE_FWK_MODULE(type)
virtual int status() const =0
status word
virtual float phi() const =0
momentum azimuthal angle
virtual double rapidity() const =0
rapidity
bool isNonnull() const
Checks for non-null.
virtual size_type numberOfDaughters() const =0
number of daughters
virtual float pt() const =0
transverse momentum
virtual double theta() const =0
momentum polar angle
Abs< T >::type abs(const T &t)
ZHistogrammer(const edm::ParameterSet &pset)
virtual int charge() const =0
electric charge
T * make(const Args &...args) const
make new ROOT object
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 but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
unsigned int nbinsMassRes_
virtual int pdgId() const =0
PDG identifier.
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
math::XYZTLorentzVector LorentzVector
Lorentz vector.
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
virtual const LorentzVector & p4() const =0
four-momentum Lorentz vector