48 std::vector<MonitorElement*> hcalMEs;
50 std::vector<std::string> fullPathHLTFolders = ig.
getSubdirs();
51 for (
unsigned int i=0;
i<fullPathHLTFolders.size();
i++) {
53 edm::LogInfo(
"HitsValidationHcal") <<
"fullPath: " << fullPathHLTFolders[
i];
56 std::vector<std::string> fullSubPathHLTFolders = ig.
getSubdirs();
57 for (
unsigned int j=0;
j<fullSubPathHLTFolders.size();
j++) {
61 if (strcmp(fullSubPathHLTFolders[
j].c_str(),
"HcalHitsV/SimHitsValidationHcal") == 0) {
79 MonitorElement *HitEnergyvsieta[divisions.size()], *HitTimevsieta[divisions.size()];
83 char name[40], name1[40], name2[40], name3[40], name4[40];
87 Time_weighteden[
k] = 0;
88 for (
unsigned int ih=0; ih<hcalMEs.size(); ih++) {
89 sprintf (name1,
"Energy_%s", detdivision[
k].c_str());
90 sprintf (name2,
"Time_Enweighted_%s", detdivision[
k].c_str());
91 if (strcmp(hcalMEs[ih]->getName().c_str(), name1) == 0) {
92 Energy[
k] = hcalMEs[ih];
94 if (strcmp(hcalMEs[ih]->getName().c_str(), name2) == 0) {
95 Time_weighteden[
k] = hcalMEs[ih];
101 for (
unsigned int j=0;
j<divisions.size();
j++) {
102 for (
unsigned int ih=0; ih<hcalMEs.size(); ih++) {
103 sprintf (name,
"HcalHitE%s%s", time[
i].c_str(),divisions[
j].c_str());
104 if (strcmp(hcalMEs[ih]->getName().c_str(), name) == 0) {
105 Occupancy_map[
i][
j]= hcalMEs[ih];
111 for (
unsigned int k=0;
k<divisions.size();
k++) {
112 HitEnergyvsieta[
k]= 0;
114 for (
unsigned int ih=0; ih<hcalMEs.size(); ih++) {
115 sprintf (name3,
"HcalHitEta%s",divisions[
k].c_str());
116 sprintf (name4,
"HcalHitTimeAEta%s",divisions[
k].c_str());
117 if (strcmp(hcalMEs[ih]->getName().c_str(), name3) == 0) {
118 HitEnergyvsieta[
k]= hcalMEs[ih];
120 if (strcmp(hcalMEs[ih]->getName().c_str(), name4) == 0) {
121 HitTimevsieta[
k]= hcalMEs[ih];
133 float hitenergy[divisions.size()], hittime[divisions.size()];
134 float fev = float(nevent);
136 for (
int dettype=0; dettype<
nType1; dettype++) {
138 for (
int i=0;
i<=nx1;
i++) {
142 int nx2= Time_weighteden[dettype]->
getNbinsX();
143 for (
int i=0;
i<=nx2;
i++) {
149 for (
unsigned int dettype=0; dettype<divisions.size(); dettype++) {
150 int nx1=HitEnergyvsieta[dettype]->
getNbinsX();
151 for (
int i=0;
i<=nx1;
i++) {
152 hitenergy[dettype]= HitEnergyvsieta[dettype]->
getBinContent(
i)/fev;
155 int nx2= HitTimevsieta[dettype]->
getNbinsX();
156 for (
int i=0;
i<=nx2;
i++) {
162 for (
int itime=0; itime<
nTime; itime++) {
163 for (
unsigned int det=0; det<divisions.size(); det++) {
164 int ny= Occupancy_map[itime][det]->
getNbinsY();
165 int nx= Occupancy_map[itime][det]->
getNbinsX();
166 for (
int i=1;
i<nx+1;
i++) {
167 for (
int j=1;
j<ny+1;
j++) {
189 std::vector<std::string > divisions;
194 sprintf (name1,
"HC%d",
depth);
199 sprintf (name1,
"HB%d",
depth);
204 sprintf (name1,
"HE%d+z",
depth);
206 sprintf (name1,
"HE%d-z",
depth);
212 sprintf (name1,
"HO%d", depth);
217 for (
int k=0;
k<4; ++
k) {
219 sprintf (name1,
"HF%s%d+z", hfty1[
k].c_str(),
depth);
221 sprintf (name1,
"HF%s%d-z", hfty1[
k].c_str(),
depth);
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
std::vector< std::string > getHistogramTypes()
int getNbinsY(void) const
get # of bins in Y-axis
int getMaxDepth(const int type) const
virtual void beginRun(edm::Run const &run, edm::EventSetup const &c)
const HcalDDDRecConstants * hcons
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