9 #include "CLHEP/Units/defs.h"
10 #include "CLHEP/Units/PhysicalConstants.h"
15 wmanager_(iPSet,consumesCollector()),
16 hepmcCollection_(iPSet.getParameter<edm::
InputTag>(
"hepmcCollection"))
103 otherPtclNumber = dqm.
book1dHisto(
"otherPtclNumber",
"Log10(No. other ptcls)", 60, -1, 5,
"log_{10}(No. other ptcls)",
"Number of Events");
104 otherPtclMomentum = dqm.
book1dHisto(
"otherPtclMomentum",
"Log10(p) other ptcls", 60, -2, 4,
"log10(P^{other ptcls}) (log_{10}(GeV))",
"Number of Events");
107 genPtclNumber = dqm.
book1dHisto(
"genPtclNumber",
"Log10(No. all particles)", 60, -1, 5,
"log10(No. all particles)",
"Number of Events");
108 genVrtxNumber = dqm.
book1dHisto(
"genVrtxNumber",
"Log10(No. all vertexs)", 60, -1, 5,
"log10(No. all vertexs)",
"Number of Events");
110 stablePtclNumber= dqm.
book1dHisto(
"stablePtclNumber",
"Log10(No. stable particles)", 50, 0, 5,
"log10(No. stable particles)",
"Number of Events");
111 stablePtclPhi = dqm.
book1dHisto(
"stablePtclPhi",
"stable Ptcl Phi", 360, -180, 180,
"#phi^{stable Ptcl} (rad)",
"Number of Events");
112 stablePtclEta = dqm.
book1dHisto(
"stablePtclEta",
"stable Ptcl Eta (pseudo rapidity)", 220, -11, 11,
"#eta^{stable Ptcl}",
"Number of Events");
114 stableChaNumber= dqm.
book1dHisto(
"stableChaNumber",
"Log10(No. stable charged particles)", 50, 0, 5,
"log_{10}(No. stable charged particles)",
"Number of Events");
115 stablePtclp = dqm.
book1dHisto(
"stablePtclp",
"Log10(p) stable ptcl p", 80, -4, 4,
"log_{10}(P^{stable ptcl}) (log_{10}(GeV))",
"Number of Events");
116 stablePtclpT = dqm.
book1dHisto(
"stablePtclpT",
"Log10(pT) stable ptcl pT", 80, -4, 4,
"log_{10}(P_{t}^{stable ptcl}) (log_{10}(GeV))",
"Number of Events");
117 partonNumber = dqm.
book1dHisto(
"partonNumber",
"number of partons", 100, 0, 100,
"number of partons",
"Number of Events");
118 partonpT = dqm.
book1dHisto(
"partonpT",
"Log10(pT) parton pT", 80, -4, 4,
"Log10(P_{t}^{parton})",
"Number of Events");
119 outVrtxStablePtclNumber = dqm.
book1dHisto(
"outVrtxStablePtclNumber",
"No. outgoing stable ptcls from vrtx", 10, 0, 10,
"No. outgoing stable ptcls from vrtx",
"Number of Events");
121 outVrtxPtclNumber = dqm.
book1dHisto(
"outVrtxPtclNumber",
"No. outgoing ptcls from vrtx", 30, 0, 30,
"No. outgoing ptcls from vrtx",
"Number of Events");
122 vrtxZ = dqm.
book1dHisto(
"VrtxZ",
"VrtxZ", 50 , -250, 250,
"Z_{Vtx}",
"Number of Events");
125 unknownPDTNumber = dqm.
book1dHisto(
"unknownPDTNumber",
"Log10(No. unknown ptcls PDT)", 60, -1, 5,
"log_{10}(No. unknown ptcls PDT)",
"Number of Events");
128 Bjorken_x = dqm.
book1dHisto(
"Bjorken_x",
"Bjorken_x", 1000, 0.0, 1.0,
"Bjorken_{x}",
"Number of Events");
143 log10DeltaEcms =dqm.
book1dHisto(
"DeltaEcms1log10",
"log_{10} of deviation from nominal Ecms", 200,-1., 5.,
"log_{10}(#DeltaE) (log_{10}(GeV))",
"Number of Events");
144 DeltaEcms = dqm.
book1dHisto(
"DeltaEcms1",
"deviation from nominal Ecms", 200,-1., 1.,
"#DeltaE (GeV)",
"Number of Events");
145 DeltaPx = dqm.
book1dHisto(
"DeltaPx1",
"deviation from nominal Px", 200,-1., 1.,
"#DeltaP_{x} (GeV)",
"Number of Events");
146 DeltaPy = dqm.
book1dHisto(
"DeltaPy1",
"deviation from nominal Py", 200,-1., 1.,
"#DeltaP_{y} (GeV)",
"Number of Events");
147 DeltaPz = dqm.
book1dHisto(
"DeltaPz1",
"deviation from nominal Pz", 200,-1., 1.,
"#DeltaP_{z} (GeV)",
"Number of Events");
156 int outVrtxStablePtclNum = 0;
int stablePtclNum = 0;
int otherPtclNum = 0;
int unknownPDTNum = 0;
int stableChaNum = 0;
160 double etotal = 0. ;
double pxtotal = 0.;
double pytotal = 0.;
double pztotal = 0.;
167 HepMC::GenEvent
const *myGenEvent = evt->GetEvent();
177 HepMC::PdfInfo
const *pdf = myGenEvent->pdf_info();
179 bjorken = ((pdf->x1())/((pdf->x1())+(pdf->x2())));
183 HepMC::GenEvent::vertex_const_iterator vrtxBegin = myGenEvent->vertices_begin();
184 HepMC::GenEvent::vertex_const_iterator vrtxEnd = myGenEvent->vertices_end();
185 unsigned int nvtx(0);
186 for(HepMC::GenEvent::vertex_const_iterator vrtxIt = vrtxBegin; vrtxIt!=vrtxEnd; ++vrtxIt)
189 HepMC::GenVertex
const *vrtx = *vrtxIt;
197 HepMC::GenVertex::particles_out_const_iterator vrtxPtclBegin = vrtx->particles_out_const_begin();
198 HepMC::GenVertex::particles_out_const_iterator vrtxPtclEnd = vrtx->particles_out_const_end();
199 outVrtxStablePtclNum = 0;
200 for(HepMC::GenVertex::particles_out_const_iterator vrtxPtclIt = vrtxPtclBegin; vrtxPtclIt != vrtxPtclEnd; ++vrtxPtclIt)
203 if (vrtxPtcl->status() == 1){
204 ++outVrtxStablePtclNum;
212 HepMC::GenEvent::particle_const_iterator ptclBegin = myGenEvent->particles_begin();
213 HepMC::GenEvent::particle_const_iterator ptclEnd = myGenEvent->particles_end();
214 for(HepMC::GenEvent::particle_const_iterator ptclIt = ptclBegin; ptclIt!=ptclEnd; ++ptclIt)
219 int Id = ptcl->pdg_id();
220 float Log_p = log10( ptcl->momentum().rho() );
222 int status = ptcl->status();
229 charge = PData->charge();
235 if(ptcl->status() == 1){
242 if (charge != 0. && charge != 999.) ++stableChaNum;
254 etotal += ptcl->momentum().e();
255 pxtotal += ptcl->momentum().px();
256 pytotal += ptcl->momentum().py();
257 pztotal += ptcl->momentum().pz();
260 if (
abs(Id) < 6 ||
abs(Id) == 22){
264 bool indentified=
false;
265 for(
unsigned int i=0;
i<
particles.size();
i++){
if(
particles.at(
i).Fill(ptcl,weight)){indentified=
true;
break;}}
270 double ecms = 13000.;
271 if ( myGenEvent->valid_beam_particles() ) {
272 ecms = myGenEvent->beam_particles().first->momentum().e()+myGenEvent->beam_particles().second->momentum().e();
MonitorElement * genPtclStatus
MonitorElement * DeltaEcms
MonitorElement * genVrtxNumber
MonitorElement * unknownPDTNumber
MonitorElement * outVrtxPtclNumber
bool getByToken(EDGetToken token, Handle< PROD > &result) const
MonitorElement * Bjorken_x
MonitorElement * otherPtclNumber
other ME's
virtual void dqmBeginRun(const edm::Run &r, const edm::EventSetup &c) override
BasicHepMCValidation(const edm::ParameterSet &)
MonitorElement * otherPtclMomentum
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
MonitorElement * stablePtclCharge
MonitorElement * partonNumber
edm::EDGetTokenT< edm::HepMCProduct > hepmcCollectionToken_
MonitorElement * book1dHisto(std::string name, std::string title, int n, double xmin, double xmax, std::string xaxis, std::string yaxis)
void getData(T &iHolder) const
MonitorElement * vrtxRadius
edm::ESHandle< HepPDT::ParticleDataTable > fPDGTable
PDT table.
virtual void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override
Abs< T >::type abs(const T &t)
MonitorElement * log10DeltaEcms
MonitorElement * partonpT
virtual ~BasicHepMCValidation()
MonitorElement * stablePtclPhi
MonitorElement * stablePtclEta
HepPDT::ParticleData ParticleData
virtual void analyze(edm::Event const &, edm::EventSetup const &) override
MonitorElement * stablePtclp
MonitorElement * status1ShortLived
MonitorElement * stablePtclpT
void setCurrentFolder(const std::string &fullpath)
MonitorElement * stableChaNumber
MonitorElement * stablePtclNumber
MonitorElement * genPtclNumber
edm::InputTag hepmcCollection_
MonitorElement * outVrtxStablePtclNumber
double weight(const edm::Event &)
std::vector< ParticleMonitor > particles