CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static 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 (edm::ConsumesCollector &&iC)
 
void setup (const edm::ParameterSet &pSet, TTree *tree)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Attributes

bool _Debug
 
bool _Monte
 
bool _OR_BXes
 
TString * algoBitToName
 
edm::InputTag centralityBin_Label
 
edm::EDGetTokenT< int > centralityBin_Token
 
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
 
int nEvtPlanes
 
std::string processName_
 
TString * techBitToName
 
int UnpackBxInEvent
 

Detailed Description

$Date: November 2006 $Revision:

Author
P. Bargassa - Rice U.

Definition at line 58 of file HLTHeavyIon.h.

Constructor & Destructor Documentation

HLTHeavyIon::HLTHeavyIon ( edm::ConsumesCollector &&  iC)

Definition at line 21 of file HLTHeavyIon.cc.

References HLT_FULL_cff::InputTag, and HLT_Fake1_cff::UnpackBxInEvent.

21  {
22  //set parameter defaults
23  _Monte = false;
24  _Debug = false;
25  _OR_BXes=false;
27  centralityBin_Label = edm::InputTag("centralityBin");
29 }
edm::EDGetTokenT< int > centralityBin_Token
Definition: HLTHeavyIon.h:112
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::InputTag centralityBin_Label
Definition: HLTHeavyIon.h:111
int UnpackBxInEvent
Definition: HLTHeavyIon.h:109

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 139 of file HLTHeavyIon.cc.

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

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

Definition at line 42 of file HLTHeavyIon.cc.

References gather_cfg::cout.

42  {
43 
44  bool changed(true);
45  if (hltConfig_.init(run,c,processName_,changed)) {
46  // if init returns TRUE, initialisation has succeeded!
47  if (changed) {
48  // The HLT config has actually changed wrt the previous Run, hence rebook your
49  // histograms or do anything else dependent on the revised HLT config
50  cout << "Initalizing HLTConfigProvider" << endl;
51  }
52  } else {
53  // if init returns FALSE, initialisation has NOT succeeded, which indicates a problem
54  // with the file and/or code and needs to be investigated!
55  cout << " HLT config extraction failure with process name " << processName_ << endl;
56  // In this case, all access methods will return empty values!
57  }
58 
59 }
std::string processName_
Definition: HLTHeavyIon.h:106
HLTConfigProvider hltConfig_
Definition: HLTHeavyIon.h:105
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:145
void HLTHeavyIon::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 32 of file HLTHeavyIon.cc.

References edm::ConfigurationDescriptions::add(), and edm::ParameterSetDescription::add().

32  {
34  edm::ParameterSetDescription hltParameterSet;
35  desc.add<edm::ParameterSetDescription>("RunParameters",hltParameterSet);
36  desc.add<bool>("Debug",false);
37  desc.add<bool>("Monte",false);
38  descriptions.add("hltHeavyIon", desc);
39 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void HLTHeavyIon::setup ( const edm::ParameterSet pSet,
TTree *  tree 
)

Definition at line 62 of file HLTHeavyIon.cc.

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

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

Member Data Documentation

bool HLTHeavyIon::_Debug
private

Definition at line 115 of file HLTHeavyIon.h.

bool HLTHeavyIon::_Monte
private

Definition at line 116 of file HLTHeavyIon.h.

bool HLTHeavyIon::_OR_BXes
private

Definition at line 108 of file HLTHeavyIon.h.

TString* HLTHeavyIon::algoBitToName
private

Definition at line 101 of file HLTHeavyIon.h.

edm::InputTag HLTHeavyIon::centralityBin_Label
private

Definition at line 111 of file HLTHeavyIon.h.

edm::EDGetTokenT<int> HLTHeavyIon::centralityBin_Token
private

Definition at line 112 of file HLTHeavyIon.h.

float HLTHeavyIon::fb
private

Definition at line 90 of file HLTHeavyIon.h.

float HLTHeavyIon::fEtMR
private

Definition at line 96 of file HLTHeavyIon.h.

float HLTHeavyIon::fMeanPt
private

Definition at line 94 of file HLTHeavyIon.h.

float HLTHeavyIon::fMeanPtMR
private

Definition at line 95 of file HLTHeavyIon.h.

int HLTHeavyIon::fNcharged
private

Definition at line 92 of file HLTHeavyIon.h.

int HLTHeavyIon::fNchargedMR
private

Definition at line 93 of file HLTHeavyIon.h.

int HLTHeavyIon::fNchargedPtCut
private

Definition at line 97 of file HLTHeavyIon.h.

int HLTHeavyIon::fNchargedPtCutMR
private

Definition at line 98 of file HLTHeavyIon.h.

float HLTHeavyIon::fNcoll
private

Definition at line 87 of file HLTHeavyIon.h.

float HLTHeavyIon::fNhard
private

Definition at line 88 of file HLTHeavyIon.h.

float HLTHeavyIon::fNpart
private

Definition at line 86 of file HLTHeavyIon.h.

float HLTHeavyIon::fPhi0
private

Definition at line 89 of file HLTHeavyIon.h.

int HLTHeavyIon::hiBin
private

Definition at line 82 of file HLTHeavyIon.h.

float HLTHeavyIon::hiEB
private

Definition at line 84 of file HLTHeavyIon.h.

float HLTHeavyIon::hiEE
private

Definition at line 84 of file HLTHeavyIon.h.

float HLTHeavyIon::hiEEminus
private

Definition at line 84 of file HLTHeavyIon.h.

float HLTHeavyIon::hiEEplus
private

Definition at line 84 of file HLTHeavyIon.h.

float HLTHeavyIon::hiET
private

Definition at line 84 of file HLTHeavyIon.h.

float* HLTHeavyIon::hiEvtPlane
private

Definition at line 79 of file HLTHeavyIon.h.

float HLTHeavyIon::hiHF
private

Definition at line 84 of file HLTHeavyIon.h.

float HLTHeavyIon::hiHFhit
private

Definition at line 84 of file HLTHeavyIon.h.

float HLTHeavyIon::hiHFhitMinus
private

Definition at line 84 of file HLTHeavyIon.h.

float HLTHeavyIon::hiHFhitPlus
private

Definition at line 84 of file HLTHeavyIon.h.

float HLTHeavyIon::hiHFminus
private

Definition at line 84 of file HLTHeavyIon.h.

float HLTHeavyIon::hiHFplus
private

Definition at line 84 of file HLTHeavyIon.h.

int HLTHeavyIon::hiNpix
private

Definition at line 83 of file HLTHeavyIon.h.

int HLTHeavyIon::hiNpixelTracks
private

Definition at line 83 of file HLTHeavyIon.h.

int HLTHeavyIon::hiNtracks
private

Definition at line 83 of file HLTHeavyIon.h.

int HLTHeavyIon::hiNtracksEtaCut
private

Definition at line 83 of file HLTHeavyIon.h.

int HLTHeavyIon::hiNtracksEtaPtCut
private

Definition at line 83 of file HLTHeavyIon.h.

int HLTHeavyIon::hiNtracksPtCut
private

Definition at line 83 of file HLTHeavyIon.h.

float HLTHeavyIon::hiZDC
private

Definition at line 84 of file HLTHeavyIon.h.

float HLTHeavyIon::hiZDCminus
private

Definition at line 84 of file HLTHeavyIon.h.

float HLTHeavyIon::hiZDCplus
private

Definition at line 84 of file HLTHeavyIon.h.

HLTConfigProvider HLTHeavyIon::hltConfig_
private

Definition at line 105 of file HLTHeavyIon.h.

int HLTHeavyIon::HltEvtCnt
private

Definition at line 81 of file HLTHeavyIon.h.

int HLTHeavyIon::nEvtPlanes
private

Definition at line 80 of file HLTHeavyIon.h.

std::string HLTHeavyIon::processName_
private

Definition at line 106 of file HLTHeavyIon.h.

TString* HLTHeavyIon::techBitToName
private

Definition at line 102 of file HLTHeavyIon.h.

int HLTHeavyIon::UnpackBxInEvent
private

Definition at line 109 of file HLTHeavyIon.h.