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
HLTHeavyIon Class Reference

#include <HLTHeavyIon.h>

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.

21  {
22 
23  //set parameter defaults
24  _Monte = false;
25  _Debug=false;
26  _OR_BXes=false;
28 
29 }
int UnpackBxInEvent
Definition: HLTHeavyIon.h:106

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

135  {
136 
137  std::cout << " Beginning HLTHeavyIon " << std::endl;
138 
139  if(_Monte){
140  fb = mc->b();
141  fNpart = mc->Npart();
142  fNcoll = mc->Ncoll();
143  fNhard = mc->Nhard();
144  fPhi0 = mc->evtPlane();
145  fNcharged = mc->Ncharged();
146  fNchargedMR = mc->NchargedMR();
147  fMeanPt = mc->MeanPt();
148  fMeanPtMR = mc->MeanPtMR();
149  fEtMR = mc->EtMR();
150  fNchargedPtCut = mc->NchargedPtCut();
151  fNchargedPtCutMR = mc->NchargedPtCutMR();
152  }
153 
154  edm::Handle<int> binHandle;
155  iEvent.getByLabel("centralityBin",binHandle);
156  hiBin = *binHandle;
157 
158  hiNpix = centrality->multiplicityPixel();
159  hiNpixelTracks = centrality->NpixelTracks();
160  hiNtracks = centrality->Ntracks();
161  hiNtracksPtCut = centrality->NtracksPtCut();
162  hiNtracksEtaCut = centrality->NtracksEtaCut();
163  hiNtracksEtaPtCut = centrality->NtracksEtaPtCut();
164 
165  hiHF = centrality->EtHFtowerSum();
166  hiHFplus = centrality->EtHFtowerSumPlus();
167  hiHFminus = centrality->EtHFtowerSumMinus();
168  hiHFhit = centrality->EtHFhitSum();
169  hiHFhitPlus = centrality->EtHFhitSumPlus();
170  hiHFhitMinus = centrality->EtHFhitSumMinus();
171 
172  hiZDC = centrality->zdcSum();
173  hiZDCplus = centrality->zdcSumPlus();
174  hiZDCminus = centrality->zdcSumMinus();
175 
176  hiEEplus = centrality->EtEESumPlus();
177  hiEEminus = centrality->EtEESumMinus();
178  hiEE = centrality->EtEESum();
179  hiEB = centrality->EtEBSum();
180  hiET = centrality->EtMidRapiditySum();
181 
182 
183  if(evtPlanes.isValid()){
184  nEvtPlanes = evtPlanes->size();
185  for(unsigned int i = 0; i < evtPlanes->size(); ++i){
186  hiEvtPlane[i] = (*evtPlanes)[i].angle();
187  }
188  }
189 
190 }
int i
Definition: DBlmapReader.cc:9
float hiEB
Definition: HLTHeavyIon.h:80
float hiZDCminus
Definition: HLTHeavyIon.h:80
float * hiEvtPlane
Definition: HLTHeavyIon.h:75
float fMeanPt
Definition: HLTHeavyIon.h:90
float hiET
Definition: HLTHeavyIon.h:80
int hiNtracksEtaPtCut
Definition: HLTHeavyIon.h:79
float fEtMR
Definition: HLTHeavyIon.h:92
int fNchargedMR
Definition: HLTHeavyIon.h:89
int hiNtracksEtaCut
Definition: HLTHeavyIon.h:79
int iEvent
Definition: GenABIO.cc:243
float hiHF
Definition: HLTHeavyIon.h:80
float hiHFhit
Definition: HLTHeavyIon.h:80
float fNcoll
Definition: HLTHeavyIon.h:83
float hiHFhitMinus
Definition: HLTHeavyIon.h:80
bool isValid() const
Definition: HandleBase.h:76
float hiEEplus
Definition: HLTHeavyIon.h:80
int nEvtPlanes
Definition: HLTHeavyIon.h:76
float hiHFhitPlus
Definition: HLTHeavyIon.h:80
int hiNpixelTracks
Definition: HLTHeavyIon.h:79
float fNhard
Definition: HLTHeavyIon.h:84
float fMeanPtMR
Definition: HLTHeavyIon.h:91
float fNpart
Definition: HLTHeavyIon.h:82
int hiNtracksPtCut
Definition: HLTHeavyIon.h:79
float hiHFminus
Definition: HLTHeavyIon.h:80
float hiEEminus
Definition: HLTHeavyIon.h:80
int fNchargedPtCut
Definition: HLTHeavyIon.h:93
int fNchargedPtCutMR
Definition: HLTHeavyIon.h:94
float hiZDC
Definition: HLTHeavyIon.h:80
tuple cout
Definition: gather_cfg.py:121
float hiZDCplus
Definition: HLTHeavyIon.h:80
float hiHFplus
Definition: HLTHeavyIon.h:80
float hiEE
Definition: HLTHeavyIon.h:80
float fPhi0
Definition: HLTHeavyIon.h:85
void HLTHeavyIon::beginRun ( const edm::Run run,
const edm::EventSetup c 
)

Definition at line 31 of file HLTHeavyIon.cc.

References gather_cfg::cout.

31  {
32 
33 
34  bool changed(true);
35  if (hltConfig_.init(run,c,processName_,changed)) {
36  // if init returns TRUE, initialisation has succeeded!
37  if (changed) {
38  // The HLT config has actually changed wrt the previous Run, hence rebook your
39  // histograms or do anything else dependent on the revised HLT config
40  cout << "Initalizing HLTConfigProvider" << endl;
41  }
42  } else {
43  // if init returns FALSE, initialisation has NOT succeeded, which indicates a problem
44  // with the file and/or code and needs to be investigated!
45  cout << " HLT config extraction failure with process name " << processName_ << endl;
46  // In this case, all access methods will return empty values!
47  }
48 
49 }
std::string processName_
Definition: HLTHeavyIon.h:103
HLTConfigProvider hltConfig_
Definition: HLTHeavyIon.h:101
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d&#39;tor
tuple cout
Definition: gather_cfg.py:121
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.

52  {
53 
54 
55  processName_ = pSet.getParameter<std::string>("HLTProcessName") ;
56 
57  edm::ParameterSet myHltParams = pSet.getParameter<edm::ParameterSet>("RunParameters") ;
58  vector<std::string> parameterNames = myHltParams.getParameterNames() ;
59 
60  for ( vector<std::string>::iterator iParam = parameterNames.begin();
61  iParam != parameterNames.end(); iParam++ ){
62  if ( (*iParam) == "Debug" ) _Debug = myHltParams.getParameter<bool>( *iParam );
63  if ( (*iParam) == "Monte" ) _Monte = myHltParams.getParameter<bool>( *iParam );
64 
65  }
66 
67  HltEvtCnt = 0;
68  const int kMaxEvtPlanes = 1000;
69 
70  fNpart = -1;
71  fNcoll = -1;
72  fNhard = -1;
73  fPhi0 = -1;
74  fb = -1;
75  fNcharged = -1;
76  fNchargedMR = -1;
77  fMeanPt = -1;
78  fMeanPtMR = -1;
79 
80  fEtMR = -1;
81  fNchargedPtCut = -1;
82  fNchargedPtCutMR = -1;
83 
84  nEvtPlanes = 0;
85  hiBin = -1;
86  hiEvtPlane = new float[kMaxEvtPlanes];
87 
88  HltTree->Branch("Npart",&fNpart,"Npart/F");
89  HltTree->Branch("Ncoll",&fNcoll,"Ncoll/F");
90  HltTree->Branch("Nhard",&fNhard,"Nhard/F");
91  HltTree->Branch("phi0",&fPhi0,"NPhi0/F");
92  HltTree->Branch("b",&fb,"b/F");
93  HltTree->Branch("Ncharged",&fNcharged,"Ncharged/I");
94  HltTree->Branch("NchargedMR",&fNchargedMR,"NchargedMR/I");
95  HltTree->Branch("MeanPt",&fMeanPt,"MeanPt/F");
96  HltTree->Branch("MeanPtMR",&fMeanPtMR,"MeanPtMR/F");
97  HltTree->Branch("EtMR",&fEtMR,"EtMR/F");
98  HltTree->Branch("NchargedPtCut",&fNchargedPtCut,"NchargedPtCut/I");
99  HltTree->Branch("NchargedPtCutMR",&fNchargedPtCutMR,"NchargedPtCutMR/I");
100  HltTree->Branch("hiBin",&hiBin,"hiBin/I");
101  HltTree->Branch("hiHF",&hiHF,"hiHF/F");
102  HltTree->Branch("hiHFplus",&hiHFplus,"hiHFplus/F");
103  HltTree->Branch("hiHFminus",&hiHFminus,"hiHFminus/F");
104  HltTree->Branch("hiZDC",&hiZDC,"hiZDC/F");
105  HltTree->Branch("hiZDCplus",&hiZDCplus,"hiZDCplus/F");
106  HltTree->Branch("hiZDCminus",&hiZDCminus,"hiZDCminus/F");
107 
108  HltTree->Branch("hiHFhit",&hiHFhit,"hiHFhit/F");
109  HltTree->Branch("hiHFhitPlus",&hiHFhitPlus,"hiHFhitPlus/F");
110  HltTree->Branch("hiHFhitMinus",&hiHFhitMinus,"hiHFhitMinus/F");
111 
112  HltTree->Branch("hiET",&hiET,"hiET/F");
113  HltTree->Branch("hiEE",&hiEE,"hiEE/F");
114  HltTree->Branch("hiEB",&hiEB,"hiEB/F");
115  HltTree->Branch("hiEEplus",&hiEEplus,"hiEEplus/F");
116  HltTree->Branch("hiEEminus",&hiEEminus,"hiEEminus/F");
117  HltTree->Branch("hiNpix",&hiNpix,"hiNpix/I");
118  HltTree->Branch("hiNpixelTracks",&hiNpixelTracks,"hiNpixelTracks/I");
119  HltTree->Branch("hiNtracks",&hiNtracks,"hiNtracks/I");
120  HltTree->Branch("hiNevtPlane",&nEvtPlanes,"hiNevtPlane/I");
121  HltTree->Branch("hiEvtPlanes",hiEvtPlane,"hiEvtPlanes/F");
122  HltTree->Branch("hiNtracksPtCut",&hiNtracksPtCut,"hiNtracksPtCut/I");
123  HltTree->Branch("hiNtracksEtaCut",&hiNtracksEtaCut,"hiNtracksEtaCut/I");
124  HltTree->Branch("hiNtracksEtaPtCut",&hiNtracksEtaPtCut,"hiNtracksEtaPtCut/I");
125 
126 }
T getParameter(std::string const &) const
float hiEB
Definition: HLTHeavyIon.h:80
std::string processName_
Definition: HLTHeavyIon.h:103
float hiZDCminus
Definition: HLTHeavyIon.h:80
float * hiEvtPlane
Definition: HLTHeavyIon.h:75
float fMeanPt
Definition: HLTHeavyIon.h:90
float hiET
Definition: HLTHeavyIon.h:80
int hiNtracksEtaPtCut
Definition: HLTHeavyIon.h:79
float fEtMR
Definition: HLTHeavyIon.h:92
int fNchargedMR
Definition: HLTHeavyIon.h:89
int hiNtracksEtaCut
Definition: HLTHeavyIon.h:79
float hiHF
Definition: HLTHeavyIon.h:80
float hiHFhit
Definition: HLTHeavyIon.h:80
float fNcoll
Definition: HLTHeavyIon.h:83
float hiHFhitMinus
Definition: HLTHeavyIon.h:80
std::vector< std::string > getParameterNames() const
float hiEEplus
Definition: HLTHeavyIon.h:80
int nEvtPlanes
Definition: HLTHeavyIon.h:76
float hiHFhitPlus
Definition: HLTHeavyIon.h:80
int hiNpixelTracks
Definition: HLTHeavyIon.h:79
float fNhard
Definition: HLTHeavyIon.h:84
float fMeanPtMR
Definition: HLTHeavyIon.h:91
float fNpart
Definition: HLTHeavyIon.h:82
int hiNtracksPtCut
Definition: HLTHeavyIon.h:79
float hiHFminus
Definition: HLTHeavyIon.h:80
float hiEEminus
Definition: HLTHeavyIon.h:80
int fNchargedPtCut
Definition: HLTHeavyIon.h:93
int fNchargedPtCutMR
Definition: HLTHeavyIon.h:94
float hiZDC
Definition: HLTHeavyIon.h:80
float hiZDCplus
Definition: HLTHeavyIon.h:80
float hiHFplus
Definition: HLTHeavyIon.h:80
float hiEE
Definition: HLTHeavyIon.h:80
float fPhi0
Definition: HLTHeavyIon.h:85

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.

int HLTHeavyIon::fNchargedPtCut
private

Definition at line 93 of file HLTHeavyIon.h.

int HLTHeavyIon::fNchargedPtCutMR
private

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.

int HLTHeavyIon::hiNpixelTracks
private

Definition at line 79 of file HLTHeavyIon.h.

int HLTHeavyIon::hiNtracks
private

Definition at line 79 of file HLTHeavyIon.h.

int HLTHeavyIon::hiNtracksEtaCut
private

Definition at line 79 of file HLTHeavyIon.h.

int HLTHeavyIon::hiNtracksEtaPtCut
private

Definition at line 79 of file HLTHeavyIon.h.

int HLTHeavyIon::hiNtracksPtCut
private

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.

HLTConfigProvider HLTHeavyIon::hltConfig_
private

Definition at line 101 of file HLTHeavyIon.h.

int HLTHeavyIon::HltEvtCnt
private

Definition at line 77 of file HLTHeavyIon.h.

L1GtUtils HLTHeavyIon::m_l1GtUtils
private

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.

int HLTHeavyIon::UnpackBxInEvent
private

Definition at line 106 of file HLTHeavyIon.h.