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};
84 virtual void endJob()
override ;
87 int MaxI=-100;
double Time=0,SumT=0,MaxT=-10;
88 for(
int j=0;
j<
n;++
j)
if(MaxT<data[
j]){ MaxT=data[
j]; MaxI=
j; }
93 if(MaxI>0){ Time+=(MaxI-1)*data[MaxI-1]; SumT+=data[MaxI-1]; }
94 if(MaxI<(n-1)){ Time+=(MaxI+1)*data[MaxI+1]; SumT+=data[MaxI+1]; }
100 int Imax=-1;
double max=-100;
101 for(
int i=0;i<n;i++) if(data[i]>
max){max=data[
i]; Imax=
i;}
102 if(Imax==0 && Imax==(n-1))
return false;
103 float sum=data[Imax-1]+data[Imax+1];
104 if(data[Imax]>5.5 && sum>(data[Imax]*0.20))
return true;
111 HBHE[eta+50][
phi][depth][cap]+=val;
112 nHBHE[eta+50][
phi][depth][cap]+=1.0;
115 HO[eta+50][
phi][depth][cap]+=val;
116 nHO[eta+50][
phi][depth][cap]+=1.0;
119 HF[eta+50][
phi][depth][cap]+=val;
120 nHF[eta+50][
phi][depth][cap]+=1.0;
123 if(
nHBHE[eta+50][phi][depth][cup]<10)
return 2.5;
124 if(
nHBHE[eta+50][phi][depth][cup]!=0){
125 double ped=
HBHE[eta+50][
phi][depth][cup]/
nHBHE[eta+50][
phi][depth][cup];
126 if(ped>1.5 && ped<4.5)
return ped;
131 if(
nHO[eta+50][phi][depth][cup]<10)
return 2.5;
132 if(
nHO[eta+50][phi][depth][cup]!=0){
133 double ped=
HO[eta+50][
phi][depth][cup]/
nHO[eta+50][
phi][depth][cup];
134 if(ped>1.5 && ped<4.5)
return ped;
139 if(
nHF[eta+50][phi][depth][cup]<10)
return 2.5;
140 if(
nHF[eta+50][phi][depth][cup]!=0){
141 double ped=
HF[eta+50][
phi][depth][cup]/
nHF[eta+50][
phi][depth][cup];
142 if(ped>1.5 && ped<4.5)
return ped;
148 double HO[100][73][5][4];
149 double nHO[100][73][5][4];
150 double HF[100][73][5][4];
151 double nHF[100][73][5][4];
217 if (monitorName_ !=
"" ) monitorName_ =subsystemname+
"/"+monitorName_+
"/" ;
224 str=
"reportSummaryMap";
227 myhist->GetXaxis()->SetBinLabel(1,
"HB");
228 myhist->GetXaxis()->SetBinLabel(2,
"HE");
229 myhist->GetXaxis()->SetBinLabel(3,
"HO");
230 myhist->GetXaxis()->SetBinLabel(4,
"HF");
231 myhist->GetYaxis()->SetBinLabel(1,
"Status");
233 myhist->SetBinContent(1,1,-1);
234 myhist->SetBinContent(2,1,-1);
235 myhist->SetBinContent(3,1,-1);
236 myhist->SetBinContent(4,1,-1);
238 myhist->GetXaxis()->SetBinLabel(5,
"ZDC");
239 myhist->SetBinContent(5,1,-1);
240 myhist->SetOption(
"textcolz");
271 str=
"L1MuGMTReadoutRecord_getDTBXCands";
DTcand =
dbe_->
book1D(str,str,5,-0.5,4.5);
274 str=
"L1MuGMTReadoutRecord_getCSCCands";
CSCcand =
dbe_->
book1D(str,str,5,-0.5,4.5);
275 str=
"DT_OR_RPCb_OR_RPCf_OR_CSC";
OR =
dbe_->
book1D(str,str,5,-0.5,4.5);
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
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
HcalTimingMonitorModule(const edm::ParameterSet &)
MonitorElement * HBTimeGCT
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< HODigiCollection > tok_ho_
virtual void beginJob() override
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]
MonitorElement * bookFloat(const char *name)
Book float.
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
std::vector< bool > TechnicalTriggerWord
technical trigger bits (64 bits)
MonitorElement * HOShapeRPC
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 set_ho(int eta, int phi, int depth, int cap, float val)
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > tok_gtro_
double HBHE[100][73][5][4]
T const * product() const
MonitorElement * HEShapeCSCp
char data[epos_bytes_allocation]
edm::EDGetTokenT< L1MuGMTReadoutCollection > tok_L1mu_
std::vector< L1MuGMTReadoutRecord > const & getRecords() const
double nHF[100][73][5][4]
virtual void endJob() override
MonitorElement * HBTimeRPC
MonitorElement * HFTimeCSCp
edm::EDGetTokenT< HBHEDigiCollection > tok_hbhe_
TH2F * getTH2F(void) const
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
MonitorElement * HOShapeDT
MonitorElement * HOTimeDT
double get_ped_hf(int eta, int phi, int depth, int cup)
double nHO[100][73][5][4]
void setCurrentFolder(const std::string &fullpath)
MonitorElement * RPCbcand
MonitorElement * HBShapeDT
MonitorElement * HFTimeCSCm