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};
86 virtual void endJob()
override ;
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];
219 if (monitorName_ !=
"" ) monitorName_ =subsystemname+
"/"+monitorName_+
"/" ;
226 str=
"reportSummaryMap";
229 myhist->GetXaxis()->SetBinLabel(1,
"HB");
230 myhist->GetXaxis()->SetBinLabel(2,
"HE");
231 myhist->GetXaxis()->SetBinLabel(3,
"HO");
232 myhist->GetXaxis()->SetBinLabel(4,
"HF");
233 myhist->GetYaxis()->SetBinLabel(1,
"Status");
235 myhist->SetBinContent(1,1,-1);
236 myhist->SetBinContent(2,1,-1);
237 myhist->SetBinContent(3,1,-1);
238 myhist->SetBinContent(4,1,-1);
240 myhist->GetXaxis()->SetBinLabel(5,
"ZDC");
241 myhist->SetBinContent(5,1,-1);
242 myhist->SetOption(
"textcolz");
273 str=
"L1MuGMTReadoutRecord_getDTBXCands";
DTcand =
dbe_->
book1D(str,str,5,-0.5,4.5);
276 str=
"L1MuGMTReadoutRecord_getCSCCands";
CSCcand =
dbe_->
book1D(str,str,5,-0.5,4.5);
277 str=
"DT_OR_RPCb_OR_RPCf_OR_CSC";
OR =
dbe_->
book1D(str,str,5,-0.5,4.5);
310 int HBcnt=0,HEcnt=0,HOcnt=0,HFcnt=0,
eta,
phi,depth,nTS;
331 if(GCTTrigger1 || GCTTrigger2 || GCTTrigger3 || GCTTrigger4 || GCTTrigger5){
TrigGCT++; TRIGGER=+
TRIG_GCT; }
344 int ndt[5] = {0,0,0,0,0};
345 int ncsc[5] = {0,0,0,0,0};
346 int nrpcb[5] = {0,0,0,0,0};
347 int nrpcf[5] = {0,0,0,0,0};
350 std::vector<L1MuGMTReadoutRecord> gmt_records = gmtrc->
getRecords();
351 std::vector<L1MuGMTReadoutRecord>::const_iterator igmtrr;
353 for(igmtrr=gmt_records.begin(); igmtrr!=gmt_records.end(); igmtrr++) {
354 std::vector<L1MuRegionalCand>::const_iterator iter1;
355 std::vector<L1MuRegionalCand> rmc;
357 rmc = igmtrr->getDTBXCands();
358 for(iter1=rmc.begin(); iter1!=rmc.end(); iter1++) {
359 if ( idt <
MAXDTBX && !(*iter1).empty() ) {
366 rmc = igmtrr->getCSCCands();
367 for(iter1=rmc.begin(); iter1!=rmc.end(); iter1++) {
368 if ( icsc <
MAXCSC && !(*iter1).empty() ) {
374 rmc = igmtrr->getBrlRPCCands();
375 for(iter1=rmc.begin(); iter1!=rmc.end(); iter1++) {
376 if ( irpcb <
MAXRPC && !(*iter1).empty() ) {
383 rmc = igmtrr->getFwdRPCCands();
384 for(iter1=rmc.begin(); iter1!=rmc.end(); iter1++) {
385 if ( irpcf <
MAXRPC && !(*iter1).empty() ) {
414 if(ndt[0]||nrpcb[0]||nrpcf[0]||ncsc[0])
OR->
Fill(0);
415 if(ndt[1]||nrpcb[1]||nrpcf[1]||ncsc[1])
OR->
Fill(1);
416 if(ndt[2]||nrpcb[2]||nrpcf[2]||ncsc[2])
OR->
Fill(2);
417 if(ndt[3]||nrpcb[3]||nrpcf[3]||ncsc[3])
OR->
Fill(3);
418 if(ndt[4]||nrpcb[4]||nrpcf[4]||ncsc[4])
OR->
Fill(4);
432 eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
435 for(
int i=0;
i<nTS;
i++)
436 if(digi->sample(
i).adc()<20)
set_hbhe(
eta,phi,depth,digi->sample(
i).capid(),
adc2fC[digi->sample(
i).adc()]);
444 eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
446 for(
int i=0;
i<nTS;
i++)
447 if(digi->sample(
i).adc()<20)
set_ho(
eta,phi,depth,digi->sample(
i).capid(),
adc2fC[digi->sample(
i).adc()]);
456 eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
458 for(
int i=0;
i<nTS;
i++)
459 if(digi->sample(
i).adc()<20)
set_hf(
eta,phi,depth,digi->sample(
i).capid(),
adc2fC[digi->sample(
i).adc()]);
472 eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
477 for(
int i=0;
i<nTS;
i++){
484 for(
int i=0;
i<nTS;
i++){
512 eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
516 for(
int i=0;
i<nTS;
i++){
522 for(
int i=0;
i<nTS;
i++){
542 eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
546 for(
int i=0;
i<nTS;
i++){
551 if(energy<15.0)
continue;
552 for(
int i=0;
i<nTS;
i++){
565 if(
Debug_)
if((
counterEvt_%100)==0) printf(
"Run: %i,Events processed: %i (HB: %i towers,HE: %i towers,HO: %i towers,HF: %i towers)"
566 " 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
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]
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