1 #ifndef DQM_HCALMONITORTASKS_HCALDETDIAGTIMINGMONITOR_H
2 #define DQM_HCALMONITORTASKS_HCALDETDIAGTIMINGMONITOR_H
34 int MaxI=-100;
double Time=0,SumT=0,MaxT=-10;
35 for(
int j=0;
j<
n;++
j)
if(MaxT<data[
j]){ MaxT=data[
j]; MaxI=
j; }
39 if(MaxI>0){ Time+=(MaxI-1)*data[MaxI-1]; SumT+=data[MaxI-1]; }
40 if(MaxI<(n-1)){ Time+=(MaxI+1)*data[MaxI+1]; SumT+=data[MaxI+1]; }
46 int Imax=-1;
double max=-100;
47 for(
int i=0;i<n;i++) if(data[i]>
max){max=data[
i]; Imax=
i;}
48 if(Imax==0 && Imax==(n-1))
return false;
49 float sum=data[Imax-1]+data[Imax+1];
50 if(data[Imax]>5.5 && sum>(data[Imax]*0.25))
return true;
56 HBHE[eta+50][
phi][depth][cap]+=val;
60 HO[eta+50][
phi][depth][cap]+=val;
61 nHO[eta+50][
phi][depth][cap]+=1.0;
64 HF[eta+50][
phi][depth][cap]+=val;
65 nHF[eta+50][
phi][depth][cap]+=1.0;
68 if(
nHBHE[eta+50][phi][depth][cup]<10)
return 2.5;
69 if(
nHBHE[eta+50][phi][depth][cup]!=0){
70 double ped=
HBHE[eta+50][
phi][depth][cup]/
nHBHE[eta+50][
phi][depth][cup];
71 if(ped>1.5 && ped<4.5)
return ped;
76 if(
nHO[eta+50][phi][depth][cup]<10)
return 2.5;
77 if(
nHO[eta+50][phi][depth][cup]!=0){
78 double ped=
HO[eta+50][
phi][depth][cup]/
nHO[eta+50][
phi][depth][cup];
79 if(ped>1.5 && ped<4.5)
return ped;
84 if(
nHF[eta+50][phi][depth][cup]<10)
return 2.5;
85 if(
nHF[eta+50][phi][depth][cup]!=0){
86 double ped=
HF[eta+50][
phi][depth][cup]/
nHF[eta+50][
phi][depth][cup];
87 if(ped>1.5 && ped<4.5)
return ped;
91 double HBHE[100][73][5][4];
93 double HO[100][73][5][4];
94 double nHO[100][73][5][4];
95 double HF[100][73][5][4];
96 double nHF[100][73][5][4];
double nHBHE[100][73][5][4]
MonitorElement * HBTimeHO
MonitorElement * HOTimeRPC
MonitorElement * HETimeRPCp
edm::EDGetTokenT< HBHEDigiCollection > tok_hbhe_
MonitorElement * HBTimeRPC
MonitorElement * HBTimeDT
void set_hf(int eta, int phi, int depth, int cap, float val)
MonitorElement * HETimeRPCm
MonitorElement * HOTimeGCT
edm::EDGetTokenT< FEDRawDataCollection > tok_raw_
MonitorElement * HFTimeCSCp
void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup)
edm::EDGetTokenT< HFDigiCollection > tok_hf_
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]
edm::EDGetTokenT< L1MuGMTReadoutCollection > tok_l1mu_
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)
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > tok_l1_
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()
edm::EDGetTokenT< HODigiCollection > tok_ho_