63 static const float adc2fC[128]={-0.5,0.5,1.5,2.5,3.5,4.5,5.5,6.5,7.5,8.5,9.5, 10.5,11.5,12.5,
64 13.5,15.,17.,19.,21.,23.,25.,27.,29.5,32.5,35.5,38.5,42.,46.,50.,54.5,59.5,
65 64.5,59.5,64.5,69.5,74.5,79.5,84.5,89.5,94.5,99.5,104.5,109.5,114.5,119.5,
66 124.5,129.5,137.,147.,157.,167.,177.,187.,197.,209.5,224.5,239.5,254.5,272.,
67 292.,312.,334.5,359.5,384.5,359.5,384.5,409.5,434.5,459.5,484.5,509.5,534.5,
68 559.5,584.5,609.5,634.5,659.5,684.5,709.5,747.,797.,847.,897.,947.,997.,
69 1047.,1109.5,1184.5,1259.5,1334.5,1422.,1522.,1622.,1734.5,1859.5,1984.5,
70 1859.5,1984.5,2109.5,2234.5,2359.5,2484.5,2609.5,2734.5,2859.5,2984.5,
71 3109.5,3234.5,3359.5,3484.5,3609.5,3797.,4047.,4297.,4547.,4797.,5047.,
72 5297.,5609.5,5984.5,6359.5,6734.5,7172.,7672.,8172.,8734.5,9359.5,9984.5};
88 int MaxI=-100;
double Time=0,SumT=0,MaxT=-10;
89 for(
int j=0;
j<
n;++
j)
if(MaxT<data[
j]){ MaxT=data[
j]; MaxI=
j; }
94 if(MaxI>0){ Time+=(MaxI-1)*data[MaxI-1]; SumT+=data[MaxI-1]; }
95 if(MaxI<(n-1)){ Time+=(MaxI+1)*data[MaxI+1]; SumT+=data[MaxI+1]; }
101 int Imax=-1;
double max=-100;
102 for(
int i=0;i<n;i++) if(data[i]>
max){max=data[
i]; Imax=
i;}
103 if(Imax==0 && Imax==(n-1))
return false;
104 float sum=data[Imax-1]+data[Imax+1];
105 if(data[Imax]>5.5 && sum>(data[Imax]*0.20))
return true;
112 HBHE[eta+50][
phi][depth][cap]+=val;
113 nHBHE[eta+50][
phi][depth][cap]+=1.0;
116 HO[eta+50][
phi][depth][cap]+=val;
117 nHO[eta+50][
phi][depth][cap]+=1.0;
120 HF[eta+50][
phi][depth][cap]+=val;
121 nHF[eta+50][
phi][depth][cap]+=1.0;
124 if(
nHBHE[eta+50][phi][depth][cup]<10)
return 2.5;
125 if(
nHBHE[eta+50][phi][depth][cup]!=0){
126 double ped=
HBHE[eta+50][
phi][depth][cup]/
nHBHE[eta+50][
phi][depth][cup];
127 if(ped>1.5 && ped<4.5)
return ped;
132 if(
nHO[eta+50][phi][depth][cup]<10)
return 2.5;
133 if(
nHO[eta+50][phi][depth][cup]!=0){
134 double ped=
HO[eta+50][
phi][depth][cup]/
nHO[eta+50][
phi][depth][cup];
135 if(ped>1.5 && ped<4.5)
return ped;
140 if(
nHF[eta+50][phi][depth][cup]<10)
return 2.5;
141 if(
nHF[eta+50][phi][depth][cup]!=0){
142 double ped=
HF[eta+50][
phi][depth][cup]/
nHF[eta+50][
phi][depth][cup];
143 if(ped>1.5 && ped<4.5)
return ped;
149 double HO[100][73][5][4];
150 double nHO[100][73][5][4];
151 double HF[100][73][5][4];
152 double nHF[100][73][5][4];
216 if (monitorName_ !=
"" ) monitorName_ =
subsystemname_+
"/"+monitorName_+
"/" ;
247 str=
"reportSummaryMap";
250 myhist->GetXaxis()->SetBinLabel(1,
"HB");
251 myhist->GetXaxis()->SetBinLabel(2,
"HE");
252 myhist->GetXaxis()->SetBinLabel(3,
"HO");
253 myhist->GetXaxis()->SetBinLabel(4,
"HF");
254 myhist->GetYaxis()->SetBinLabel(1,
"Status");
256 myhist->SetBinContent(1,1,-1);
257 myhist->SetBinContent(2,1,-1);
258 myhist->SetBinContent(3,1,-1);
259 myhist->SetBinContent(4,1,-1);
261 myhist->GetXaxis()->SetBinLabel(5,
"ZDC");
262 myhist->SetBinContent(5,1,-1);
263 myhist->SetOption(
"textcolz");
271 str=
"L1MuGMTReadoutRecord_getDTBXCands";
DTcand =ib.
book1D(str,str,5,-0.5,4.5);
272 str=
"L1MuGMTReadoutRecord_getBrlRPCCands";
RPCbcand=ib.
book1D(str,str,5,-0.5,4.5);
273 str=
"L1MuGMTReadoutRecord_getFwdRPCCands";
RPCfcand=ib.
book1D(str,str,5,-0.5,4.5);
274 str=
"L1MuGMTReadoutRecord_getCSCCands";
CSCcand =ib.
book1D(str,str,5,-0.5,4.5);
275 str=
"DT_OR_RPCb_OR_RPCf_OR_CSC";
OR =ib.
book1D(str,str,5,-0.5,4.5);
277 str=
"HB Tower Energy (LinADC-PED)";
HBEnergy=ib.
book1D(str,str,1000,-10,90);
278 str=
"HE Tower Energy (LinADC-PED)";
HEEnergy=ib.
book1D(str,str,1000,-10,90);
279 str=
"HO Tower Energy (LinADC-PED)";
HOEnergy=ib.
book1D(str,str,1000,-10,90);
280 str=
"HF Tower Energy (LinADC-PED)";
HFEnergy=ib.
book1D(str,str,1000,-10,90);
283 str=
"HB Shape (DT Trigger)";
HBShapeDT =ib.
book1D(str,str,10,-0.5,9.5);
286 str=
"HO Shape (DT Trigger)";
HOShapeDT =ib.
book1D(str,str,10,-0.5,9.5);
295 str=
"HB Timing (DT Trigger)";
HBTimeDT =ib.
book1D(str,str,100,0,10);
298 str=
"HO Timing (DT Trigger)";
HOTimeDT =ib.
book1D(str,str,100,0,10);
308 int HBcnt=0,HEcnt=0,HOcnt=0,HFcnt=0,
eta,
phi,depth,nTS;
329 if(GCTTrigger1 || GCTTrigger2 || GCTTrigger3 || GCTTrigger4 || GCTTrigger5){
TrigGCT++; TRIGGER=+
TRIG_GCT; }
342 int ndt[5] = {0,0,0,0,0};
343 int ncsc[5] = {0,0,0,0,0};
344 int nrpcb[5] = {0,0,0,0,0};
345 int nrpcf[5] = {0,0,0,0,0};
348 std::vector<L1MuGMTReadoutRecord> gmt_records = gmtrc->
getRecords();
349 std::vector<L1MuGMTReadoutRecord>::const_iterator igmtrr;
351 for(igmtrr=gmt_records.begin(); igmtrr!=gmt_records.end(); igmtrr++) {
352 std::vector<L1MuRegionalCand>::const_iterator iter1;
353 std::vector<L1MuRegionalCand> rmc;
355 rmc = igmtrr->getDTBXCands();
356 for(iter1=rmc.begin(); iter1!=rmc.end(); iter1++) {
357 if ( idt <
MAXDTBX && !(*iter1).empty() ) {
364 rmc = igmtrr->getCSCCands();
365 for(iter1=rmc.begin(); iter1!=rmc.end(); iter1++) {
366 if ( icsc <
MAXCSC && !(*iter1).empty() ) {
372 rmc = igmtrr->getBrlRPCCands();
373 for(iter1=rmc.begin(); iter1!=rmc.end(); iter1++) {
374 if ( irpcb <
MAXRPC && !(*iter1).empty() ) {
381 rmc = igmtrr->getFwdRPCCands();
382 for(iter1=rmc.begin(); iter1!=rmc.end(); iter1++) {
383 if ( irpcf <
MAXRPC && !(*iter1).empty() ) {
412 if(ndt[0]||nrpcb[0]||nrpcf[0]||ncsc[0])
OR->
Fill(0);
413 if(ndt[1]||nrpcb[1]||nrpcf[1]||ncsc[1])
OR->
Fill(1);
414 if(ndt[2]||nrpcb[2]||nrpcf[2]||ncsc[2])
OR->
Fill(2);
415 if(ndt[3]||nrpcb[3]||nrpcf[3]||ncsc[3])
OR->
Fill(3);
416 if(ndt[4]||nrpcb[4]||nrpcf[4]||ncsc[4])
OR->
Fill(4);
430 eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
433 for(
int i=0;
i<nTS;
i++)
434 if(digi->sample(
i).adc()<20)
set_hbhe(
eta,phi,depth,digi->sample(
i).capid(),
adc2fC[digi->sample(
i).adc()]);
442 eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
444 for(
int i=0;
i<nTS;
i++)
445 if(digi->sample(
i).adc()<20)
set_ho(
eta,phi,depth,digi->sample(
i).capid(),
adc2fC[digi->sample(
i).adc()]);
454 eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
456 for(
int i=0;
i<nTS;
i++)
457 if(digi->sample(
i).adc()<20)
set_hf(
eta,phi,depth,digi->sample(
i).capid(),
adc2fC[digi->sample(
i).adc()]);
470 eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
475 for(
int i=0;
i<nTS;
i++){
482 for(
int i=0;
i<nTS;
i++){
510 eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
514 for(
int i=0;
i<nTS;
i++){
520 for(
int i=0;
i<nTS;
i++){
540 eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
544 for(
int i=0;
i<nTS;
i++){
549 if(energy<15.0)
continue;
550 for(
int i=0;
i<nTS;
i++){
563 if(
Debug_)
if((
counterEvt_%100)==0) printf(
"Run: %i,Events processed: %i (HB: %i towers,HE: %i towers,HO: %i towers,HF: %i towers)"
564 " CSC: %i DT: %i RPC: %i GCT: %i\n",
T getParameter(std::string const &) const
MonitorElement * HBShapeGCT
T getUntrackedParameter(std::string const &, T const &) const
~HcalTimingMonitorModule()
MonitorElement * HBEnergy
static const int TRIG_RPC
MonitorElement * HFShapeCSCm
MonitorElement * HETimeCSCm
bool getByToken(EDGetToken token, Handle< PROD > &result) const
HcalTimingMonitorModule(const edm::ParameterSet &)
MonitorElement * HBTimeGCT
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< HODigiCollection > tok_ho_
Sin< T >::type sin(const T &t)
MonitorElement * HOTimeGCT
double GetTime(double *data, int n)
double get_ped_ho(int eta, int phi, int depth, int cup)
std::vector< HBHEDataFrame >::const_iterator const_iterator
static const int TRIG_GCT
MonitorElement * HOEnergy
void set_hf(int eta, int phi, int depth, int cap, float val)
MonitorElement * HETimeCSCp
virtual void analyze(const edm::Event &, const edm::EventSetup &) override
MonitorElement * HFEnergy
static const float adc2fC[128]
bool isSignal(double *data, int n)
edm::ParameterSet parameters_
static const int TRIG_CSC
MonitorElement * HBShapeRPC
MonitorElement * HFShapeCSCp
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
std::vector< bool > DecisionWord
typedefs
MonitorElement * HOTimeRPC
double nHBHE[100][73][5][4]
edm::EDGetTokenT< HFDigiCollection > tok_hf_
MonitorElement * RPCfcand
MonitorElement * book1D(Args &&...args)
std::vector< bool > TechnicalTriggerWord
technical trigger bits (64 bits)
MonitorElement * HOShapeRPC
void initialize(DQMStore::IBooker &)
double get_ped_hbhe(int eta, int phi, int depth, int cup)
MonitorElement * HEEnergy
MonitorElement * HBTimeDT
void set_hbhe(int eta, int phi, int depth, int cap, float val)
MonitorElement * HOShapeGCT
MonitorElement * HEShapeCSCm
void setCurrentFolder(const std::string &fullpath)
void set_ho(int eta, int phi, int depth, int cap, float val)
T const * product() const
MonitorElement * book2D(Args &&...args)
std::string subsystemname_
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > tok_gtro_
double HBHE[100][73][5][4]
MonitorElement * HEShapeCSCp
char data[epos_bytes_allocation]
edm::EDGetTokenT< L1MuGMTReadoutCollection > tok_L1mu_
std::vector< L1MuGMTReadoutRecord > const & getRecords() const
double nHF[100][73][5][4]
MonitorElement * HBTimeRPC
virtual void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &)
MonitorElement * bookFloat(Args &&...args)
MonitorElement * HFTimeCSCp
edm::EDGetTokenT< HBHEDigiCollection > tok_hbhe_
TH2F * getTH2F(void) const
MonitorElement * HOShapeDT
MonitorElement * HOTimeDT
double get_ped_hf(int eta, int phi, int depth, int cup)
double nHO[100][73][5][4]
MonitorElement * RPCbcand
MonitorElement * HBShapeDT
MonitorElement * HFTimeCSCm