CMS 3D CMS Logo

Public Member Functions | Private Attributes

HLTHeavyIon Class Reference

#include <HLTHeavyIon.h>

List of all members.

Public Member Functions

void analyze (const edm::Handle< edm::TriggerResults > &hltresults, const edm::Handle< reco::Centrality > &centrality, const edm::Handle< reco::EvtPlaneCollection > &evtPlanes, const edm::Handle< edm::GenHIEvent > &hiMC, edm::EventSetup const &eventSetup, edm::Event const &iEvent, TTree *tree)
void beginRun (const edm::Run &, const edm::EventSetup &)
 HLTHeavyIon ()
void setup (const edm::ParameterSet &pSet, TTree *tree)

Private Attributes

bool _Debug
bool _Monte
bool _OR_BXes
TString * algoBitToName
float fb
float fEtMR
float fMeanPt
float fMeanPtMR
int fNcharged
int fNchargedMR
int fNchargedPtCut
int fNchargedPtCutMR
float fNcoll
float fNhard
float fNpart
float fPhi0
int hiBin
float hiEB
float hiEE
float hiEEminus
float hiEEplus
float hiET
float * hiEvtPlane
float hiHF
float hiHFhit
float hiHFhitMinus
float hiHFhitPlus
float hiHFminus
float hiHFplus
int hiNpix
int hiNpixelTracks
int hiNtracks
int hiNtracksEtaCut
int hiNtracksEtaPtCut
int hiNtracksPtCut
float hiZDC
float hiZDCminus
float hiZDCplus
HLTConfigProvider hltConfig_
int HltEvtCnt
L1GtUtils m_l1GtUtils
int nEvtPlanes
std::string processName_
TString * techBitToName
int UnpackBxInEvent

Detailed Description

$Date: November 2006 $Revision:

Author:
P. Bargassa - Rice U.

Definition at line 55 of file HLTHeavyIon.h.


Constructor & Destructor Documentation

HLTHeavyIon::HLTHeavyIon ( )

Definition at line 21 of file HLTHeavyIon.cc.

                         {

  //set parameter defaults 
   _Monte = false;
  _Debug=false;
  _OR_BXes=false;
  UnpackBxInEvent=1;

}

Member Function Documentation

void HLTHeavyIon::analyze ( const edm::Handle< edm::TriggerResults > &  hltresults,
const edm::Handle< reco::Centrality > &  centrality,
const edm::Handle< reco::EvtPlaneCollection > &  evtPlanes,
const edm::Handle< edm::GenHIEvent > &  hiMC,
edm::EventSetup const &  eventSetup,
edm::Event const &  iEvent,
TTree *  tree 
)

Analyze the Data

Definition at line 129 of file HLTHeavyIon.cc.

References gather_cfg::cout, benchmark_cfg::fb, edm::Event::getByLabel(), HiEvtPlane_cfi::hiEvtPlane, i, and edm::HandleBase::isValid().

                                      {

   std::cout << " Beginning HLTHeavyIon " << std::endl;

   if(_Monte){
      fb = mc->b();
      fNpart = mc->Npart();
      fNcoll = mc->Ncoll();
      fNhard = mc->Nhard();
      fPhi0 = mc->evtPlane();
      fNcharged = mc->Ncharged();
      fNchargedMR = mc->NchargedMR();
      fMeanPt = mc->MeanPt();
      fMeanPtMR = mc->MeanPtMR();
      fEtMR = mc->EtMR();
      fNchargedPtCut = mc->NchargedPtCut();
      fNchargedPtCutMR = mc->NchargedPtCutMR();
   }

   edm::Handle<int> binHandle;
   iEvent.getByLabel("centralityBin",binHandle);
   hiBin = *binHandle;

  hiNpix = centrality->multiplicityPixel();
  hiNpixelTracks = centrality->NpixelTracks();
  hiNtracks = centrality->Ntracks();
  hiNtracksPtCut = centrality->NtracksPtCut();
  hiNtracksEtaCut = centrality->NtracksEtaCut();
  hiNtracksEtaPtCut = centrality->NtracksEtaPtCut();

  hiHF = centrality->EtHFtowerSum();
  hiHFplus = centrality->EtHFtowerSumPlus();
  hiHFminus = centrality->EtHFtowerSumMinus();
  hiHFhit = centrality->EtHFhitSum();
  hiHFhitPlus = centrality->EtHFhitSumPlus();
  hiHFhitMinus = centrality->EtHFhitSumMinus();

  hiZDC = centrality->zdcSum();
  hiZDCplus = centrality->zdcSumPlus();
  hiZDCminus = centrality->zdcSumMinus();

  hiEEplus = centrality->EtEESumPlus();
  hiEEminus = centrality->EtEESumMinus();
  hiEE = centrality->EtEESum();
  hiEB = centrality->EtEBSum();
  hiET = centrality->EtMidRapiditySum();

  
  if(evtPlanes.isValid()){
     nEvtPlanes = evtPlanes->size();
     for(unsigned int i = 0; i < evtPlanes->size(); ++i){
        hiEvtPlane[i] = (*evtPlanes)[i].angle();     
     }
  }
  
}
void HLTHeavyIon::beginRun ( const edm::Run run,
const edm::EventSetup c 
)

Definition at line 31 of file HLTHeavyIon.cc.

References gather_cfg::cout.

                                                                   { 


  bool changed(true);
  if (hltConfig_.init(run,c,processName_,changed)) {
    // if init returns TRUE, initialisation has succeeded!
    if (changed) {
      // The HLT config has actually changed wrt the previous Run, hence rebook your
      // histograms or do anything else dependent on the revised HLT config
      cout << "Initalizing HLTConfigProvider"  << endl;
    }
  } else {
    // if init returns FALSE, initialisation has NOT succeeded, which indicates a problem
    // with the file and/or code and needs to be investigated!
    cout << " HLT config extraction failure with process name " << processName_ << endl;
    // In this case, all access methods will return empty values!
  }

}
void HLTHeavyIon::setup ( const edm::ParameterSet pSet,
TTree *  tree 
)

Definition at line 52 of file HLTHeavyIon.cc.

References benchmark_cfg::fb, edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterNames(), and HiEvtPlane_cfi::hiEvtPlane.

                                                                   {


  processName_ = pSet.getParameter<std::string>("HLTProcessName") ;

  edm::ParameterSet myHltParams = pSet.getParameter<edm::ParameterSet>("RunParameters") ;
  vector<std::string> parameterNames = myHltParams.getParameterNames() ;
  
  for ( vector<std::string>::iterator iParam = parameterNames.begin();
        iParam != parameterNames.end(); iParam++ ){
    if ( (*iParam) == "Debug" ) _Debug =  myHltParams.getParameter<bool>( *iParam );
    if ( (*iParam) == "Monte" ) _Monte =  myHltParams.getParameter<bool>( *iParam );

  }

  HltEvtCnt = 0;
  const int kMaxEvtPlanes = 1000;

  fNpart = -1;
  fNcoll = -1;
  fNhard = -1;
  fPhi0 = -1;
  fb = -1;
  fNcharged = -1;
  fNchargedMR = -1;
  fMeanPt = -1;
  fMeanPtMR = -1;

  fEtMR = -1;
  fNchargedPtCut = -1;
  fNchargedPtCutMR = -1;

  nEvtPlanes = 0;
  hiBin = -1;
  hiEvtPlane = new float[kMaxEvtPlanes];

  HltTree->Branch("Npart",&fNpart,"Npart/F");
  HltTree->Branch("Ncoll",&fNcoll,"Ncoll/F");
  HltTree->Branch("Nhard",&fNhard,"Nhard/F");
  HltTree->Branch("phi0",&fPhi0,"NPhi0/F");
  HltTree->Branch("b",&fb,"b/F");
  HltTree->Branch("Ncharged",&fNcharged,"Ncharged/I");
  HltTree->Branch("NchargedMR",&fNchargedMR,"NchargedMR/I");
  HltTree->Branch("MeanPt",&fMeanPt,"MeanPt/F");
  HltTree->Branch("MeanPtMR",&fMeanPtMR,"MeanPtMR/F");
  HltTree->Branch("EtMR",&fEtMR,"EtMR/F");
  HltTree->Branch("NchargedPtCut",&fNchargedPtCut,"NchargedPtCut/I");
  HltTree->Branch("NchargedPtCutMR",&fNchargedPtCutMR,"NchargedPtCutMR/I");
  HltTree->Branch("hiBin",&hiBin,"hiBin/I");
  HltTree->Branch("hiHF",&hiHF,"hiHF/F");
  HltTree->Branch("hiHFplus",&hiHFplus,"hiHFplus/F");
  HltTree->Branch("hiHFminus",&hiHFminus,"hiHFminus/F");
  HltTree->Branch("hiZDC",&hiZDC,"hiZDC/F");
  HltTree->Branch("hiZDCplus",&hiZDCplus,"hiZDCplus/F");
  HltTree->Branch("hiZDCminus",&hiZDCminus,"hiZDCminus/F");

  HltTree->Branch("hiHFhit",&hiHFhit,"hiHFhit/F");
  HltTree->Branch("hiHFhitPlus",&hiHFhitPlus,"hiHFhitPlus/F");
  HltTree->Branch("hiHFhitMinus",&hiHFhitMinus,"hiHFhitMinus/F");

  HltTree->Branch("hiET",&hiET,"hiET/F");
  HltTree->Branch("hiEE",&hiEE,"hiEE/F");
  HltTree->Branch("hiEB",&hiEB,"hiEB/F");
  HltTree->Branch("hiEEplus",&hiEEplus,"hiEEplus/F");
  HltTree->Branch("hiEEminus",&hiEEminus,"hiEEminus/F");
  HltTree->Branch("hiNpix",&hiNpix,"hiNpix/I");
  HltTree->Branch("hiNpixelTracks",&hiNpixelTracks,"hiNpixelTracks/I");
  HltTree->Branch("hiNtracks",&hiNtracks,"hiNtracks/I");
  HltTree->Branch("hiNevtPlane",&nEvtPlanes,"hiNevtPlane/I");
  HltTree->Branch("hiEvtPlanes",hiEvtPlane,"hiEvtPlanes/F");
  HltTree->Branch("hiNtracksPtCut",&hiNtracksPtCut,"hiNtracksPtCut/I");
  HltTree->Branch("hiNtracksEtaCut",&hiNtracksEtaCut,"hiNtracksEtaCut/I");
  HltTree->Branch("hiNtracksEtaPtCut",&hiNtracksEtaPtCut,"hiNtracksEtaPtCut/I");

}

Member Data Documentation

bool HLTHeavyIon::_Debug [private]

Definition at line 109 of file HLTHeavyIon.h.

bool HLTHeavyIon::_Monte [private]

Definition at line 110 of file HLTHeavyIon.h.

bool HLTHeavyIon::_OR_BXes [private]

Definition at line 105 of file HLTHeavyIon.h.

TString* HLTHeavyIon::algoBitToName [private]

Definition at line 97 of file HLTHeavyIon.h.

float HLTHeavyIon::fb [private]

Definition at line 86 of file HLTHeavyIon.h.

float HLTHeavyIon::fEtMR [private]

Definition at line 92 of file HLTHeavyIon.h.

float HLTHeavyIon::fMeanPt [private]

Definition at line 90 of file HLTHeavyIon.h.

float HLTHeavyIon::fMeanPtMR [private]

Definition at line 91 of file HLTHeavyIon.h.

int HLTHeavyIon::fNcharged [private]

Definition at line 88 of file HLTHeavyIon.h.

int HLTHeavyIon::fNchargedMR [private]

Definition at line 89 of file HLTHeavyIon.h.

Definition at line 93 of file HLTHeavyIon.h.

Definition at line 94 of file HLTHeavyIon.h.

float HLTHeavyIon::fNcoll [private]

Definition at line 83 of file HLTHeavyIon.h.

float HLTHeavyIon::fNhard [private]

Definition at line 84 of file HLTHeavyIon.h.

float HLTHeavyIon::fNpart [private]

Definition at line 82 of file HLTHeavyIon.h.

float HLTHeavyIon::fPhi0 [private]

Definition at line 85 of file HLTHeavyIon.h.

int HLTHeavyIon::hiBin [private]

Definition at line 78 of file HLTHeavyIon.h.

float HLTHeavyIon::hiEB [private]

Definition at line 80 of file HLTHeavyIon.h.

float HLTHeavyIon::hiEE [private]

Definition at line 80 of file HLTHeavyIon.h.

float HLTHeavyIon::hiEEminus [private]

Definition at line 80 of file HLTHeavyIon.h.

float HLTHeavyIon::hiEEplus [private]

Definition at line 80 of file HLTHeavyIon.h.

float HLTHeavyIon::hiET [private]

Definition at line 80 of file HLTHeavyIon.h.

float* HLTHeavyIon::hiEvtPlane [private]

Definition at line 75 of file HLTHeavyIon.h.

float HLTHeavyIon::hiHF [private]

Definition at line 80 of file HLTHeavyIon.h.

float HLTHeavyIon::hiHFhit [private]

Definition at line 80 of file HLTHeavyIon.h.

float HLTHeavyIon::hiHFhitMinus [private]

Definition at line 80 of file HLTHeavyIon.h.

float HLTHeavyIon::hiHFhitPlus [private]

Definition at line 80 of file HLTHeavyIon.h.

float HLTHeavyIon::hiHFminus [private]

Definition at line 80 of file HLTHeavyIon.h.

float HLTHeavyIon::hiHFplus [private]

Definition at line 80 of file HLTHeavyIon.h.

int HLTHeavyIon::hiNpix [private]

Definition at line 79 of file HLTHeavyIon.h.

Definition at line 79 of file HLTHeavyIon.h.

int HLTHeavyIon::hiNtracks [private]

Definition at line 79 of file HLTHeavyIon.h.

Definition at line 79 of file HLTHeavyIon.h.

Definition at line 79 of file HLTHeavyIon.h.

Definition at line 79 of file HLTHeavyIon.h.

float HLTHeavyIon::hiZDC [private]

Definition at line 80 of file HLTHeavyIon.h.

float HLTHeavyIon::hiZDCminus [private]

Definition at line 80 of file HLTHeavyIon.h.

float HLTHeavyIon::hiZDCplus [private]

Definition at line 80 of file HLTHeavyIon.h.

Definition at line 101 of file HLTHeavyIon.h.

int HLTHeavyIon::HltEvtCnt [private]

Definition at line 77 of file HLTHeavyIon.h.

Definition at line 102 of file HLTHeavyIon.h.

int HLTHeavyIon::nEvtPlanes [private]

Definition at line 76 of file HLTHeavyIon.h.

std::string HLTHeavyIon::processName_ [private]

Definition at line 103 of file HLTHeavyIon.h.

TString* HLTHeavyIon::techBitToName [private]

Definition at line 98 of file HLTHeavyIon.h.

Definition at line 106 of file HLTHeavyIon.h.