90 std::string divisions[
nType]={
"HB0",
"HB1",
"HE0+z",
"HE1+z",
"HE2+z",
"HE0-z",
"HE1-z",
91 "HE2-z",
"HO0",
"HFL0+z",
"HFS0+z",
"HFL1+z",
"HFS1+z",
92 "HFL2+z",
"HFS2+z",
"HFL3+z",
"HFS3+z",
"HFL0-z",
"HFS0-z",
93 "HFL1-z",
"HFS1-z",
"HFL2-z",
"HFS2-z",
"HFL3-z",
"HFS3-z"};
97 char name[40], name1[40], name2[40], name3[40], name4[40];
101 Time_weighteden[
k] = 0;
102 for (
unsigned int ih=0; ih<hcalMEs.size(); ih++) {
103 sprintf (name1,
"Energy_%s", detdivision[
k].c_str());
104 sprintf (name2,
"Time_Enweighted_%s", detdivision[
k].c_str());
105 if (strcmp(hcalMEs[ih]->getName().c_str(), name1) == 0) {
106 Energy[
k] = hcalMEs[ih];
108 if (strcmp(hcalMEs[ih]->getName().c_str(), name2) == 0) {
109 Time_weighteden[
k] = hcalMEs[ih];
116 Occupancy_map[
i][
j]= 0;
117 for (
unsigned int ih=0; ih<hcalMEs.size(); ih++) {
118 sprintf (name,
"HcalHitE%s%s", time[
i].c_str(),divisions[
j].c_str());
119 if (strcmp(hcalMEs[ih]->getName().c_str(), name) == 0) {
120 Occupancy_map[
i][
j]= hcalMEs[ih];
127 HitEnergyvsieta[
k]= 0;
129 for (
unsigned int ih=0; ih<hcalMEs.size(); ih++) {
130 sprintf (name3,
"HcalHitEta%s",divisions[
k].c_str());
131 sprintf (name4,
"HcalHitTimeAEta%s",divisions[
k].c_str());
132 if (strcmp(hcalMEs[ih]->getName().c_str(), name3) == 0) {
133 HitEnergyvsieta[
k]= hcalMEs[ih];
135 if (strcmp(hcalMEs[ih]->getName().c_str(), name4) == 0) {
136 HitTimevsieta[
k]= hcalMEs[ih];
149 float fev = float(nevent);
151 for (
int dettype=0; dettype<
nType1; dettype++) {
153 for (
int i=0;
i<=nx1;
i++) {
157 int nx2= Time_weighteden[dettype]->
getNbinsX();
158 for (
int i=0;
i<=nx2;
i++) {
166 for (
int dettype=0; dettype<
nType; dettype++) {
167 if (HitEnergyvsieta[dettype] != 0) {
168 int nx1=HitEnergyvsieta[dettype]->
getNbinsX();
169 for (
int i=0;
i<=nx1;
i++) {
170 hitenergy[dettype]= HitEnergyvsieta[dettype]->
getBinContent(
i)/fev;
173 int nx2= HitTimevsieta[dettype]->
getNbinsX();
174 for (
int i=0;
i<=nx2;
i++) {
181 for (
int itime=0; itime<
nTime; itime++) {
182 for (
int det=0; det<
nType;det++) {
183 if (Occupancy_map[itime][det] != 0) {
184 int ny= Occupancy_map[itime][det]->
getNbinsY();
185 int nx= Occupancy_map[itime][det]->
getNbinsX();
186 for (
int i=1;
i<nx+1;
i++) {
187 for (
int j=1;
j<ny+1;
j++) {
void setBinContent(int binx, double content)
set content of bin (1-D)
double getEntries(void) const
get # of entries
int getNbinsY(void) const
get # of bins in Y-axis
double getBinContent(int binx) const
get content of bin (1-D)
int getNbinsX(void) const
get # of bins in X-axis