65 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,
66 13.5,15.,17.,19.,21.,23.,25.,27.,29.5,32.5,35.5,38.5,42.,46.,50.,54.5,59.5,
67 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,
68 124.5,129.5,137.,147.,157.,167.,177.,187.,197.,209.5,224.5,239.5,254.5,272.,
69 292.,312.,334.5,359.5,384.5,359.5,384.5,409.5,434.5,459.5,484.5,509.5,534.5,
70 559.5,584.5,609.5,634.5,659.5,684.5,709.5,747.,797.,847.,897.,947.,997.,
71 1047.,1109.5,1184.5,1259.5,1334.5,1422.,1522.,1622.,1734.5,1859.5,1984.5,
72 1859.5,1984.5,2109.5,2234.5,2359.5,2484.5,2609.5,2734.5,2859.5,2984.5,
73 3109.5,3234.5,3359.5,3484.5,3609.5,3797.,4047.,4297.,4547.,4797.,5047.,
74 5297.,5609.5,5984.5,6359.5,6734.5,7172.,7672.,8172.,8734.5,9359.5,9984.5};
89 int MaxI=-100;
double Time=0,SumT=0,MaxT=-10;
90 for(
int j=0;
j<
n;++
j)
if(MaxT<data[
j]){ MaxT=data[
j]; MaxI=
j; }
95 if(MaxI>0){ Time+=(MaxI-1)*data[MaxI-1]; SumT+=data[MaxI-1]; }
96 if(MaxI<(n-1)){ Time+=(MaxI+1)*data[MaxI+1]; SumT+=data[MaxI+1]; }
102 int Imax=-1;
double max=-100;
103 for(
int i=0;i<n;i++) if(data[i]>
max){max=data[
i]; Imax=
i;}
104 if(Imax==0 && Imax==(n-1))
return false;
105 float sum=data[Imax-1]+data[Imax+1];
106 if(data[Imax]>5.5 && sum>(data[Imax]*0.20))
return true;
113 HBHE[eta+50][
phi][depth][cap]+=val;
114 nHBHE[eta+50][
phi][depth][cap]+=1.0;
117 HO[eta+50][
phi][depth][cap]+=val;
118 nHO[eta+50][
phi][depth][cap]+=1.0;
121 HF[eta+50][
phi][depth][cap]+=val;
122 nHF[eta+50][
phi][depth][cap]+=1.0;
125 if(
nHBHE[eta+50][phi][depth][cup]<10)
return 2.5;
126 if(
nHBHE[eta+50][phi][depth][cup]!=0){
127 double ped=
HBHE[eta+50][
phi][depth][cup]/
nHBHE[eta+50][
phi][depth][cup];
128 if(ped>1.5 && ped<4.5)
return ped;
133 if(
nHO[eta+50][phi][depth][cup]<10)
return 2.5;
134 if(
nHO[eta+50][phi][depth][cup]!=0){
135 double ped=
HO[eta+50][
phi][depth][cup]/
nHO[eta+50][
phi][depth][cup];
136 if(ped>1.5 && ped<4.5)
return ped;
141 if(
nHF[eta+50][phi][depth][cup]<10)
return 2.5;
142 if(
nHF[eta+50][phi][depth][cup]!=0){
143 double ped=
HF[eta+50][
phi][depth][cup]/
nHF[eta+50][
phi][depth][cup];
144 if(ped>1.5 && ped<4.5)
return ped;
150 double HO[100][73][5][4];
151 double nHO[100][73][5][4];
152 double HF[100][73][5][4];
153 double nHF[100][73][5][4];
209 if (monitorName_ !=
"" ) monitorName_ =subsystemname+
"/"+monitorName_+
"/" ;
216 str=
"reportSummaryMap";
219 myhist->GetXaxis()->SetBinLabel(1,
"HB");
220 myhist->GetXaxis()->SetBinLabel(2,
"HE");
221 myhist->GetXaxis()->SetBinLabel(3,
"HO");
222 myhist->GetXaxis()->SetBinLabel(4,
"HF");
223 myhist->GetYaxis()->SetBinLabel(1,
"Status");
225 myhist->SetBinContent(1,1,-1);
226 myhist->SetBinContent(2,1,-1);
227 myhist->SetBinContent(3,1,-1);
228 myhist->SetBinContent(4,1,-1);
230 myhist->GetXaxis()->SetBinLabel(5,
"ZDC");
231 myhist->SetBinContent(5,1,-1);
232 myhist->SetOption(
"textcolz");
259 str=
"L1MuGMTReadoutRecord_getDTBXCands";
DTcand =
dbe_->
book1D(str,str,5,-0.5,4.5);
262 str=
"L1MuGMTReadoutRecord_getCSCCands";
CSCcand =
dbe_->
book1D(str,str,5,-0.5,4.5);
263 str=
"DT_OR_RPCb_OR_RPCf_OR_CSC";
OR =
dbe_->
book1D(str,str,5,-0.5,4.5);
296 int HBcnt=0,HEcnt=0,HOcnt=0,HFcnt=0,
eta,
phi,depth,nTS;
317 if(GCTTrigger1 || GCTTrigger2 || GCTTrigger3 || GCTTrigger4 || GCTTrigger5){
TrigGCT++; TRIGGER=+
TRIG_GCT; }
330 int ndt[5] = {0,0,0,0,0};
331 int ncsc[5] = {0,0,0,0,0};
332 int nrpcb[5] = {0,0,0,0,0};
333 int nrpcf[5] = {0,0,0,0,0};
336 std::vector<L1MuGMTReadoutRecord> gmt_records = gmtrc->
getRecords();
337 std::vector<L1MuGMTReadoutRecord>::const_iterator igmtrr;
339 for(igmtrr=gmt_records.begin(); igmtrr!=gmt_records.end(); igmtrr++) {
340 std::vector<L1MuRegionalCand>::const_iterator iter1;
341 std::vector<L1MuRegionalCand> rmc;
343 rmc = igmtrr->getDTBXCands();
344 for(iter1=rmc.begin(); iter1!=rmc.end(); iter1++) {
345 if ( idt <
MAXDTBX && !(*iter1).empty() ) {
352 rmc = igmtrr->getCSCCands();
353 for(iter1=rmc.begin(); iter1!=rmc.end(); iter1++) {
354 if ( icsc <
MAXCSC && !(*iter1).empty() ) {
360 rmc = igmtrr->getBrlRPCCands();
361 for(iter1=rmc.begin(); iter1!=rmc.end(); iter1++) {
362 if ( irpcb <
MAXRPC && !(*iter1).empty() ) {
369 rmc = igmtrr->getFwdRPCCands();
370 for(iter1=rmc.begin(); iter1!=rmc.end(); iter1++) {
371 if ( irpcf <
MAXRPC && !(*iter1).empty() ) {
400 if(ndt[0]||nrpcb[0]||nrpcf[0]||ncsc[0])
OR->
Fill(0);
401 if(ndt[1]||nrpcb[1]||nrpcf[1]||ncsc[1])
OR->
Fill(1);
402 if(ndt[2]||nrpcb[2]||nrpcf[2]||ncsc[2])
OR->
Fill(2);
403 if(ndt[3]||nrpcb[3]||nrpcf[3]||ncsc[3])
OR->
Fill(3);
404 if(ndt[4]||nrpcb[4]||nrpcf[4]||ncsc[4])
OR->
Fill(4);
418 eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
421 for(
int i=0;
i<nTS;
i++)
422 if(digi->sample(
i).adc()<20)
set_hbhe(
eta,phi,depth,digi->sample(
i).capid(),
adc2fC[digi->sample(
i).adc()]);
430 eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
432 for(
int i=0;
i<nTS;
i++)
433 if(digi->sample(
i).adc()<20)
set_ho(
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_hf(
eta,phi,depth,digi->sample(
i).capid(),
adc2fC[digi->sample(
i).adc()]);
458 eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
463 for(
int i=0;
i<nTS;
i++){
470 for(
int i=0;
i<nTS;
i++){
498 eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
502 for(
int i=0;
i<nTS;
i++){
508 for(
int i=0;
i<nTS;
i++){
528 eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
532 for(
int i=0;
i<nTS;
i++){
537 if(energy<15.0)
continue;
538 for(
int i=0;
i<nTS;
i++){
551 if(
Debug_)
if((
counterEvt_%100)==0) printf(
"Run: %i,Events processed: %i (HB: %i towers,HE: %i towers,HO: %i towers,HF: %i towers)"
552 " CSC: %i DT: %i RPC: %i GCT: %i\n",
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.
HcalTimingMonitorModule(const edm::ParameterSet &)
MonitorElement * HBTimeGCT
#define DEFINE_FWK_MODULE(type)
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< T >::const_iterator const_iterator
static const int TRIG_GCT
MonitorElement * HOEnergy
bool getByType(Handle< PROD > &result) const
void set_hf(int eta, int phi, int depth, int cap, float val)
MonitorElement * HETimeCSCp
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
const T & max(const T &a, const T &b)
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
std::vector< bool > DecisionWord
typedefs
MonitorElement * HOTimeRPC
double nHBHE[100][73][5][4]
MonitorElement * RPCfcand
std::vector< bool > TechnicalTriggerWord
technical trigger bits (64 bits)
MonitorElement * HOShapeRPC
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
double get_ped_hbhe(int eta, int phi, int depth, int cup)
MonitorElement * HEEnergy
MonitorElement * HBTimeDT
std::vector< L1MuGMTReadoutRecord > getRecords() const
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)
virtual void analyze(const edm::Event &, const edm::EventSetup &)
double HBHE[100][73][5][4]
T const * product() const
MonitorElement * HEShapeCSCp
double nHF[100][73][5][4]
MonitorElement * HBTimeRPC
MonitorElement * HFTimeCSCp
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