CMS 3D CMS Logo

Public Member Functions | Private Attributes

BasicHepMCHeavyIonValidation Class Reference

#include <BasicHepMCHeavyIonValidation.h>

Inheritance diagram for BasicHepMCHeavyIonValidation:
edm::EDAnalyzer

List of all members.

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 ()

Private Attributes

WeightManager _wmanager
DQMStoredbe
 PDT table.
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

Detailed Description

Definition at line 33 of file BasicHepMCHeavyIonValidation.h.


Constructor & Destructor Documentation

BasicHepMCHeavyIonValidation::BasicHepMCHeavyIonValidation ( const edm::ParameterSet iPSet) [explicit]
BasicHepMCHeavyIonValidation::~BasicHepMCHeavyIonValidation ( ) [virtual]

Definition at line 23 of file BasicHepMCHeavyIonValidation.cc.

{}

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, CommonMethods::weight(), and WeightManager::weight().

{ 

        edm::Handle<HepMCProduct> evt;
        iEvent.getByLabel(hepmcCollection_, evt);

        //Get EVENT
        //HepMC::GenEvent *myGenEvent = new HepMC::GenEvent(*(evt->GetEvent()));



        const HepMC::HeavyIon* ion = evt->GetEvent()->heavy_ion();

        if (!ion) {
                if ( QWdebug_ ) std::cout << "!!QW!! HeavyIon == null" << std::endl;
                return;
        }

        double weight = _wmanager.weight(iEvent);
        nEvt->Fill(0.5,weight);

        Ncoll_hard->Fill(ion->Ncoll_hard(), weight);
        Npart_proj->Fill(ion->Npart_proj(), weight);
        Npart_targ->Fill(ion->Npart_targ(), weight);
        Ncoll->Fill(ion->Ncoll(), weight);
        N_Nwounded_collisions->Fill(ion->N_Nwounded_collisions(), weight);
        Nwounded_N_collisions->Fill(ion->Nwounded_N_collisions(), weight);
        Nwounded_Nwounded_collisions->Fill(ion->Nwounded_Nwounded_collisions(), weight);
        spectator_neutrons->Fill(ion->spectator_neutrons(), weight);
        spectator_protons->Fill(ion->spectator_protons(), weight);
        impact_parameter->Fill(ion->impact_parameter(), weight);
        event_plane_angle->Fill(ion->event_plane_angle(), weight);
        eccentricity->Fill(ion->eccentricity(), weight);
        sigma_inel_NN->Fill(ion->sigma_inel_NN(), weight);


        //delete myGenEvent;
}//analyze
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.

{
        if(dbe){
                dbe->setCurrentFolder("Generator/HeavyIon");

                // Number of analyzed events
                nEvt = dbe->book1D("nEvt", "n analyzed Events", 1, 0., 1.);

                Ncoll_hard = dbe->book1D("Ncoll_hard", "Ncoll_hard", 700, 0, 700);
                Npart_proj = dbe->book1D("Npart_proj", "Npart_proj", 250, 0, 250);
                Npart_targ = dbe->book1D("Npart_targ", "Npart_targ", 250, 0, 250);
                Ncoll = dbe->book1D("Ncoll", "Ncoll", 700, 0, 700);
                N_Nwounded_collisions = dbe->book1D("N_Nwounded_collisions", "N_Nwounded_collisions", 250, 0, 250);
                Nwounded_N_collisions = dbe->book1D("Nwounded_N_collisions", "Nwounded_N_collisions", 250, 0, 250);
                Nwounded_Nwounded_collisions = dbe->book1D("Nwounded_Nwounded_collisions", "Nwounded_Nwounded_collisions", 250, 0, 250);
                spectator_neutrons = dbe->book1D("spectator_neutrons", "spectator_neutrons", 250, 0, 250);
                spectator_protons = dbe->book1D("spectator_protons", "spectator_protons", 250, 0, 250);
                impact_parameter = dbe->book1D("impact_parameter", "impact_parameter", 50, 0, 50);
                event_plane_angle = dbe->book1D("event_plane_angle", "event_plane_angle", 200, -CLHEP::pi, CLHEP::pi);
                eccentricity = dbe->book1D("eccentricity", "eccentricity", 200, 0, 1.0);
                sigma_inel_NN = dbe->book1D("sigma_inel_NN", "sigma_inel_NN", 200, 0, 10.0);

        }
        return;
}
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.

{
        //iSetup.getData( fPDGTable );
        return;
}
void BasicHepMCHeavyIonValidation::endJob ( void  ) [virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 53 of file BasicHepMCHeavyIonValidation.cc.

{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.

{return;}

Member Data Documentation

Definition at line 46 of file BasicHepMCHeavyIonValidation.h.

Referenced by analyze().

PDT table.

ME's "container"

Definition at line 55 of file BasicHepMCHeavyIonValidation.h.

Referenced by BasicHepMCHeavyIonValidation(), and beginJob().

Definition at line 71 of file BasicHepMCHeavyIonValidation.h.

Referenced by analyze(), and beginJob().

Definition at line 70 of file BasicHepMCHeavyIonValidation.h.

Referenced by analyze(), and beginJob().

Definition at line 48 of file BasicHepMCHeavyIonValidation.h.

Referenced by analyze().

Definition at line 69 of file BasicHepMCHeavyIonValidation.h.

Referenced by analyze(), and beginJob().

Definition at line 64 of file BasicHepMCHeavyIonValidation.h.

Referenced by analyze(), and beginJob().

Definition at line 63 of file BasicHepMCHeavyIonValidation.h.

Referenced by analyze(), and beginJob().

Definition at line 60 of file BasicHepMCHeavyIonValidation.h.

Referenced by analyze(), and beginJob().

Definition at line 57 of file BasicHepMCHeavyIonValidation.h.

Referenced by analyze(), and beginJob().

Definition at line 61 of file BasicHepMCHeavyIonValidation.h.

Referenced by analyze(), and beginJob().

Definition at line 62 of file BasicHepMCHeavyIonValidation.h.

Referenced by analyze(), and beginJob().

Definition at line 65 of file BasicHepMCHeavyIonValidation.h.

Referenced by analyze(), and beginJob().

Definition at line 66 of file BasicHepMCHeavyIonValidation.h.

Referenced by analyze(), and beginJob().

Definition at line 49 of file BasicHepMCHeavyIonValidation.h.

Referenced by analyze(), and BasicHepMCHeavyIonValidation().

Definition at line 74 of file BasicHepMCHeavyIonValidation.h.

Referenced by analyze(), and beginJob().

Definition at line 67 of file BasicHepMCHeavyIonValidation.h.

Referenced by analyze(), and beginJob().

Definition at line 68 of file BasicHepMCHeavyIonValidation.h.

Referenced by analyze(), and beginJob().