1 #ifndef DQM_HCALMONITORTASKS_HCALDETDIAGTIMINGMONITOR_H
2 #define DQM_HCALMONITORTASKS_HCALDETDIAGTIMINGMONITOR_H
31 int MaxI=-100;
double Time=0,SumT=0,MaxT=-10;
32 for(
int j=0;
j<
n;++
j)
if(MaxT<data[
j]){ MaxT=data[
j]; MaxI=
j; }
36 if(MaxI>0){ Time+=(MaxI-1)*data[MaxI-1]; SumT+=data[MaxI-1]; }
37 if(MaxI<(n-1)){ Time+=(MaxI+1)*data[MaxI+1]; SumT+=data[MaxI+1]; }
43 int Imax=-1;
double max=-100;
44 for(
int i=0;i<n;i++) if(data[i]>
max){max=data[
i]; Imax=
i;}
45 if(Imax==0 && Imax==(n-1))
return false;
46 float sum=data[Imax-1]+data[Imax+1];
47 if(data[Imax]>5.5 && sum>(data[Imax]*0.25))
return true;
53 HBHE[eta+50][
phi][depth][cap]+=val;
57 HO[eta+50][
phi][depth][cap]+=val;
58 nHO[eta+50][
phi][depth][cap]+=1.0;
61 HF[eta+50][
phi][depth][cap]+=val;
62 nHF[eta+50][
phi][depth][cap]+=1.0;
65 if(
nHBHE[eta+50][phi][depth][cup]<10)
return 2.5;
66 if(
nHBHE[eta+50][phi][depth][cup]!=0){
67 double ped=
HBHE[eta+50][
phi][depth][cup]/
nHBHE[eta+50][
phi][depth][cup];
68 if(ped>1.5 && ped<4.5)
return ped;
73 if(
nHO[eta+50][phi][depth][cup]<10)
return 2.5;
74 if(
nHO[eta+50][phi][depth][cup]!=0){
75 double ped=
HO[eta+50][
phi][depth][cup]/
nHO[eta+50][
phi][depth][cup];
76 if(ped>1.5 && ped<4.5)
return ped;
81 if(
nHF[eta+50][phi][depth][cup]<10)
return 2.5;
82 if(
nHF[eta+50][phi][depth][cup]!=0){
83 double ped=
HF[eta+50][
phi][depth][cup]/
nHF[eta+50][
phi][depth][cup];
84 if(ped>1.5 && ped<4.5)
return ped;
88 double HBHE[100][73][5][4];
90 double HO[100][73][5][4];
91 double nHO[100][73][5][4];
92 double HF[100][73][5][4];
93 double nHF[100][73][5][4];
double nHBHE[100][73][5][4]
MonitorElement * HBTimeHO
MonitorElement * HOTimeRPC
MonitorElement * HETimeRPCp
edm::InputTag FEDRawDataCollection_
MonitorElement * HBTimeRPC
MonitorElement * HBTimeDT
void set_hf(int eta, int phi, int depth, int cap, float val)
MonitorElement * HETimeRPCm
MonitorElement * HOTimeGCT
MonitorElement * HFTimeCSCp
void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup)
double occHBHE[100][73][5]
MonitorElement * HFTimeCSCm
const T & max(const T &a, const T &b)
bool isSignal(double *data, int n)
double get_ped_ho(int eta, int phi, int depth, int cup)
double nHF[100][73][5][4]
MonitorElement * HOTimeHO
void set_ho(int eta, int phi, int depth, int cap, float val)
MonitorElement * HETimeCSCp
HcalDetDiagTimingMonitor(const edm::ParameterSet &ps)
double get_ped_hbhe(int eta, int phi, int depth, int cup)
MonitorElement * HBTimeGCT
double get_ped_hf(int eta, int phi, int depth, int cup)
double HBHE[100][73][5][4]
char data[epos_bytes_allocation]
edm::InputTag L1ADataLabel_
void beginRun(const edm::Run &run, const edm::EventSetup &c)
void set_hbhe(int eta, int phi, int depth, int cap, float val)
MonitorElement * HOTimeDT
MonitorElement * HETimeCSCm
double GetTime(double *data, int n)
double nHO[100][73][5][4]
edm::InputTag inputLabelDigi_
~HcalDetDiagTimingMonitor()