CMS 3D CMS Logo

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

#include <BasicHepMCHeavyIonValidation.h>

Inheritance diagram for BasicHepMCHeavyIonValidation:
edm::EDAnalyzer

Public Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
 BasicHepMCHeavyIonValidation (const edm::ParameterSet &)
 
virtual void beginJob ()
 
virtual void beginRun (const edm::Run &, const edm::EventSetup &)
 
virtual void endJob ()
 
virtual void endRun (const edm::Run &, const edm::EventSetup &)
 
virtual ~BasicHepMCHeavyIonValidation ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

Private Attributes

WeightManager _wmanager
 
DQMStoredbe
 PDT table. More...
 
MonitorElementeccentricity
 
MonitorElementevent_plane_angle
 
edm::InputTag hepmcCollection_
 
MonitorElementimpact_parameter
 
MonitorElementN_Nwounded_collisions
 
MonitorElementNcoll
 
MonitorElementNcoll_hard
 
MonitorElementnEvt
 
MonitorElementNpart_proj
 
MonitorElementNpart_targ
 
MonitorElementNwounded_N_collisions
 
MonitorElementNwounded_Nwounded_collisions
 
bool QWdebug_
 
MonitorElementsigma_inel_NN
 
MonitorElementspectator_neutrons
 
MonitorElementspectator_protons
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

Detailed Description

Definition at line 33 of file BasicHepMCHeavyIonValidation.h.

Constructor & Destructor Documentation

BasicHepMCHeavyIonValidation::BasicHepMCHeavyIonValidation ( const edm::ParameterSet iPSet)
explicit

Definition at line 14 of file BasicHepMCHeavyIonValidation.cc.

References dbe, edm::ParameterSet::getUntrackedParameter(), cppFunctionSkipper::operator, and QWdebug_.

14  :
15  _wmanager(iPSet),
16  hepmcCollection_(iPSet.getParameter<edm::InputTag>("hepmcCollection"))
17 {
18  dbe = 0;
20  QWdebug_ = iPSet.getUntrackedParameter<bool>("QWdebug",false);
21 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
BasicHepMCHeavyIonValidation::~BasicHepMCHeavyIonValidation ( )
virtual

Definition at line 23 of file BasicHepMCHeavyIonValidation.cc.

23 {}

Member Function Documentation

void BasicHepMCHeavyIonValidation::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
virtual

counters to zero for every event

Gathering the HepMCProduct information

Implements edm::EDAnalyzer.

Definition at line 61 of file BasicHepMCHeavyIonValidation.cc.

References _wmanager, gather_cfg::cout, eccentricity, event_plane_angle, MonitorElement::Fill(), edm::Event::getByLabel(), hepmcCollection_, impact_parameter, N_Nwounded_collisions, Ncoll, Ncoll_hard, nEvt, Npart_proj, Npart_targ, Nwounded_N_collisions, Nwounded_Nwounded_collisions, QWdebug_, sigma_inel_NN, spectator_neutrons, spectator_protons, WeightManager::weight(), and CommonMethods::weight().

62 {
64 
67  iEvent.getByLabel(hepmcCollection_, evt);
68 
69  //Get EVENT
70  //HepMC::GenEvent *myGenEvent = new HepMC::GenEvent(*(evt->GetEvent()));
71 
72 
73 
74  const HepMC::HeavyIon* ion = evt->GetEvent()->heavy_ion();
75 
76  if (!ion) {
77  if ( QWdebug_ ) std::cout << "!!QW!! HeavyIon == null" << std::endl;
78  return;
79  }
80 
81  double weight = _wmanager.weight(iEvent);
82  nEvt->Fill(0.5,weight);
83 
84  Ncoll_hard->Fill(ion->Ncoll_hard(), weight);
85  Npart_proj->Fill(ion->Npart_proj(), weight);
86  Npart_targ->Fill(ion->Npart_targ(), weight);
87  Ncoll->Fill(ion->Ncoll(), weight);
88  N_Nwounded_collisions->Fill(ion->N_Nwounded_collisions(), weight);
89  Nwounded_N_collisions->Fill(ion->Nwounded_N_collisions(), weight);
90  Nwounded_Nwounded_collisions->Fill(ion->Nwounded_Nwounded_collisions(), weight);
91  spectator_neutrons->Fill(ion->spectator_neutrons(), weight);
92  spectator_protons->Fill(ion->spectator_protons(), weight);
93  impact_parameter->Fill(ion->impact_parameter(), weight);
94  event_plane_angle->Fill(ion->event_plane_angle(), weight);
95  eccentricity->Fill(ion->eccentricity(), weight);
96  sigma_inel_NN->Fill(ion->sigma_inel_NN(), weight);
97 
98 
99  //delete myGenEvent;
100 }//analyze
void Fill(long long x)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
tuple cout
Definition: gather_cfg.py:121
double weight(const edm::Event &)
void BasicHepMCHeavyIonValidation::beginJob ( void  )
virtual

Setting the DQM top directories

Booking the ME's

Reimplemented from edm::EDAnalyzer.

Definition at line 25 of file BasicHepMCHeavyIonValidation.cc.

References DQMStore::book1D(), dbe, eccentricity, event_plane_angle, impact_parameter, N_Nwounded_collisions, Ncoll, Ncoll_hard, nEvt, Npart_proj, Npart_targ, Nwounded_N_collisions, Nwounded_Nwounded_collisions, pi, DQMStore::setCurrentFolder(), sigma_inel_NN, spectator_neutrons, and spectator_protons.

26 {
27  if(dbe){
29  dbe->setCurrentFolder("Generator/HeavyIon");
30 
31  // Number of analyzed events
32  nEvt = dbe->book1D("nEvt", "n analyzed Events", 1, 0., 1.);
33 
35  Ncoll_hard = dbe->book1D("Ncoll_hard", "Ncoll_hard", 700, 0, 700);
36  Npart_proj = dbe->book1D("Npart_proj", "Npart_proj", 250, 0, 250);
37  Npart_targ = dbe->book1D("Npart_targ", "Npart_targ", 250, 0, 250);
38  Ncoll = dbe->book1D("Ncoll", "Ncoll", 700, 0, 700);
39  N_Nwounded_collisions = dbe->book1D("N_Nwounded_collisions", "N_Nwounded_collisions", 250, 0, 250);
40  Nwounded_N_collisions = dbe->book1D("Nwounded_N_collisions", "Nwounded_N_collisions", 250, 0, 250);
41  Nwounded_Nwounded_collisions = dbe->book1D("Nwounded_Nwounded_collisions", "Nwounded_Nwounded_collisions", 250, 0, 250);
42  spectator_neutrons = dbe->book1D("spectator_neutrons", "spectator_neutrons", 250, 0, 250);
43  spectator_protons = dbe->book1D("spectator_protons", "spectator_protons", 250, 0, 250);
44  impact_parameter = dbe->book1D("impact_parameter", "impact_parameter", 50, 0, 50);
45  event_plane_angle = dbe->book1D("event_plane_angle", "event_plane_angle", 200, -CLHEP::pi, CLHEP::pi);
46  eccentricity = dbe->book1D("eccentricity", "eccentricity", 200, 0, 1.0);
47  sigma_inel_NN = dbe->book1D("sigma_inel_NN", "sigma_inel_NN", 200, 0, 10.0);
48 
49  }
50  return;
51 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:717
const Double_t pi
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:429
void BasicHepMCHeavyIonValidation::beginRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
virtual

Get PDT Table

Reimplemented from edm::EDAnalyzer.

Definition at line 54 of file BasicHepMCHeavyIonValidation.cc.

55 {
57  //iSetup.getData( fPDGTable );
58  return;
59 }
void BasicHepMCHeavyIonValidation::endJob ( void  )
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 53 of file BasicHepMCHeavyIonValidation.cc.

53 {return;}
void BasicHepMCHeavyIonValidation::endRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 60 of file BasicHepMCHeavyIonValidation.cc.

60 {return;}

Member Data Documentation

WeightManager BasicHepMCHeavyIonValidation::_wmanager
private

Definition at line 46 of file BasicHepMCHeavyIonValidation.h.

Referenced by analyze().

DQMStore* BasicHepMCHeavyIonValidation::dbe
private

PDT table.

ME's "container"

Definition at line 55 of file BasicHepMCHeavyIonValidation.h.

Referenced by BasicHepMCHeavyIonValidation(), and beginJob().

MonitorElement* BasicHepMCHeavyIonValidation::eccentricity
private

Definition at line 71 of file BasicHepMCHeavyIonValidation.h.

Referenced by analyze(), and beginJob().

MonitorElement* BasicHepMCHeavyIonValidation::event_plane_angle
private

Definition at line 70 of file BasicHepMCHeavyIonValidation.h.

Referenced by analyze(), and beginJob().

edm::InputTag BasicHepMCHeavyIonValidation::hepmcCollection_
private

Definition at line 48 of file BasicHepMCHeavyIonValidation.h.

Referenced by analyze().

MonitorElement* BasicHepMCHeavyIonValidation::impact_parameter
private

Definition at line 69 of file BasicHepMCHeavyIonValidation.h.

Referenced by analyze(), and beginJob().

MonitorElement* BasicHepMCHeavyIonValidation::N_Nwounded_collisions
private

Definition at line 64 of file BasicHepMCHeavyIonValidation.h.

Referenced by analyze(), and beginJob().

MonitorElement* BasicHepMCHeavyIonValidation::Ncoll
private

Definition at line 63 of file BasicHepMCHeavyIonValidation.h.

Referenced by analyze(), and beginJob().

MonitorElement* BasicHepMCHeavyIonValidation::Ncoll_hard
private

Definition at line 60 of file BasicHepMCHeavyIonValidation.h.

Referenced by analyze(), and beginJob().

MonitorElement* BasicHepMCHeavyIonValidation::nEvt
private

Definition at line 57 of file BasicHepMCHeavyIonValidation.h.

Referenced by analyze(), and beginJob().

MonitorElement* BasicHepMCHeavyIonValidation::Npart_proj
private

Definition at line 61 of file BasicHepMCHeavyIonValidation.h.

Referenced by analyze(), and beginJob().

MonitorElement* BasicHepMCHeavyIonValidation::Npart_targ
private

Definition at line 62 of file BasicHepMCHeavyIonValidation.h.

Referenced by analyze(), and beginJob().

MonitorElement* BasicHepMCHeavyIonValidation::Nwounded_N_collisions
private

Definition at line 65 of file BasicHepMCHeavyIonValidation.h.

Referenced by analyze(), and beginJob().

MonitorElement* BasicHepMCHeavyIonValidation::Nwounded_Nwounded_collisions
private

Definition at line 66 of file BasicHepMCHeavyIonValidation.h.

Referenced by analyze(), and beginJob().

bool BasicHepMCHeavyIonValidation::QWdebug_
private

Definition at line 49 of file BasicHepMCHeavyIonValidation.h.

Referenced by analyze(), and BasicHepMCHeavyIonValidation().

MonitorElement* BasicHepMCHeavyIonValidation::sigma_inel_NN
private

Definition at line 74 of file BasicHepMCHeavyIonValidation.h.

Referenced by analyze(), and beginJob().

MonitorElement* BasicHepMCHeavyIonValidation::spectator_neutrons
private

Definition at line 67 of file BasicHepMCHeavyIonValidation.h.

Referenced by analyze(), and beginJob().

MonitorElement* BasicHepMCHeavyIonValidation::spectator_protons
private

Definition at line 68 of file BasicHepMCHeavyIonValidation.h.

Referenced by analyze(), and beginJob().