48 std::vector<MonitorElement*> hcalMEs;
50 std::vector<std::string> fullPathHLTFolders = ig.
getSubdirs();
51 for (
unsigned int i=0;
i<fullPathHLTFolders.size();
i++) {
55 std::vector<std::string> fullSubPathHLTFolders = ig.
getSubdirs();
56 for (
unsigned int j=0;
j<fullSubPathHLTFolders.size();
j++) {
60 if (strcmp(fullSubPathHLTFolders[
j].c_str(),
"HcalHitsV/SimHitsValidationHcal") == 0) {
79 std::string divisions[
nType]={
"HB0",
"HB1",
"HE0+z",
"HE1+z",
"HE2+z",
"HE0-z",
"HE1-z",
80 "HE2-z",
"HO0",
"HFL0+z",
"HFS0+z",
"HFL1+z",
"HFS1+z",
81 "HFL2+z",
"HFS2+z",
"HFL3+z",
"HFS3+z",
"HFL0-z",
"HFS0-z",
82 "HFL1-z",
"HFS1-z",
"HFL2-z",
"HFS2-z",
"HFL3-z",
"HFS3-z"};
86 char name[40], name1[40], name2[40], name3[40], name4[40];
90 Time_weighteden[
k] = 0;
91 for (
unsigned int ih=0; ih<hcalMEs.size(); ih++) {
92 sprintf (name1,
"Energy_%s", detdivision[
k].c_str());
93 sprintf (name2,
"Time_Enweighted_%s", detdivision[
k].c_str());
94 if (strcmp(hcalMEs[ih]->getName().c_str(), name1) == 0) {
95 Energy[
k] = hcalMEs[ih];
97 if (strcmp(hcalMEs[ih]->getName().c_str(), name2) == 0) {
98 Time_weighteden[
k] = hcalMEs[ih];
105 Occupancy_map[
i][
j]= 0;
106 for (
unsigned int ih=0; ih<hcalMEs.size(); ih++) {
107 sprintf (name,
"HcalHitE%s%s", time[
i].c_str(),divisions[
j].c_str());
108 if (strcmp(hcalMEs[ih]->getName().c_str(), name) == 0) {
109 Occupancy_map[
i][
j]= hcalMEs[ih];
116 HitEnergyvsieta[
k]= 0;
118 for (
unsigned int ih=0; ih<hcalMEs.size(); ih++) {
119 sprintf (name3,
"HcalHitEta%s",divisions[
k].c_str());
120 sprintf (name4,
"HcalHitTimeAEta%s",divisions[
k].c_str());
121 if (strcmp(hcalMEs[ih]->getName().c_str(), name3) == 0) {
122 HitEnergyvsieta[
k]= hcalMEs[ih];
124 if (strcmp(hcalMEs[ih]->getName().c_str(), name4) == 0) {
125 HitTimevsieta[
k]= hcalMEs[ih];
138 float fev = float(nevent);
140 for (
int dettype=0; dettype<
nType1; dettype++) {
142 for (
int i=0;
i<=nx1;
i++) {
146 int nx2= Time_weighteden[dettype]->
getNbinsX();
147 for (
int i=0;
i<=nx2;
i++) {
155 for (
int dettype=0; dettype<
nType; dettype++) {
156 if (HitEnergyvsieta[dettype] != 0) {
157 int nx1=HitEnergyvsieta[dettype]->
getNbinsX();
158 for (
int i=0;
i<=nx1;
i++) {
159 hitenergy[dettype]= HitEnergyvsieta[dettype]->
getBinContent(
i)/fev;
162 int nx2= HitTimevsieta[dettype]->
getNbinsX();
163 for (
int i=0;
i<=nx2;
i++) {
170 for (
int itime=0; itime<
nTime; itime++) {
171 for (
int det=0; det<
nType;det++) {
172 if (Occupancy_map[itime][det] != 0) {
173 int ny= Occupancy_map[itime][det]->
getNbinsY();
174 int nx= Occupancy_map[itime][det]->
getNbinsX();
175 for (
int i=1;
i<nx+1;
i++) {
176 for (
int j=1;
j<ny+1;
j++) {
std::vector< MonitorElement * > getContents(Args &&...args)
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
void setBinContent(int binx, double content)
set content of bin (1-D)
tuple cont
load Luminosity info ##
#define DEFINE_FWK_MODULE(type)
int SimHitsEndjob(const std::vector< MonitorElement * > &hcalMEs)
virtual void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &)
double getEntries(void) const
get # of entries
int getNbinsY(void) const
get # of bins in Y-axis
virtual void runClient_(DQMStore::IBooker &, DQMStore::IGetter &)
virtual ~HcalSimHitsClient()
std::vector< std::string > getSubdirs(void)
void setCurrentFolder(const std::string &fullpath)
double getBinContent(int binx) const
get content of bin (1-D)
HcalSimHitsClient(const edm::ParameterSet &)
int getNbinsX(void) const
get # of bins in X-axis