18 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,
19 13.5,15.,17.,19.,21.,23.,25.,27.,29.5,32.5,35.5,38.5,42.,46.,50.,54.5,59.5,
20 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,
21 124.5,129.5,137.,147.,157.,167.,177.,187.,197.,209.5,224.5,239.5,254.5,272.,
22 292.,312.,334.5,359.5,384.5,359.5,384.5,409.5,434.5,459.5,484.5,509.5,534.5,
23 559.5,584.5,609.5,634.5,659.5,684.5,709.5,747.,797.,847.,897.,947.,997.,
24 1047.,1109.5,1184.5,1259.5,1334.5,1422.,1522.,1622.,1734.5,1859.5,1984.5,
25 1859.5,1984.5,2109.5,2234.5,2359.5,2484.5,2609.5,2734.5,2859.5,2984.5,
26 3109.5,3234.5,3359.5,3484.5,3609.5,3797.,4047.,4297.,4547.,4797.,5047.,
27 5297.,5609.5,5984.5,6359.5,6734.5,7172.,7672.,8172.,8734.5,9359.5,9984.5};
45 if (prefixME_.substr(prefixME_.size()-1,prefixME_.size())!=
"/")
46 prefixME_.append(
"/");
81 if (
debug_>1)
std::cout <<
"HcalDetDiagTimingMonitor::bookHistograms"<<std::endl;
101 str=
"Hcal Timing summary";
Summary = ib.
book2D(str,str,6,0,6,6,0,6);
117 str=
"HB Timing (DT Trigger)";
HBTimeDT = ib.
book1D(str,str,100,0,10);
118 str=
"HO Timing (DT Trigger)";
HOTimeDT = ib.
book1D(str,str,100,0,10);
119 str=
"HB Timing (RPC Trigger)";
HBTimeRPC = ib.
book1D(str,str,100,0,10);
120 str=
"HO Timing (RPC Trigger)";
HOTimeRPC = ib.
book1D(str,str,100,0,10);
121 str=
"HB Timing (HO SelfTrigger tech bit 11)";
HBTimeHO = ib.
book1D(str,str,100,0,10);
122 str=
"HO Timing (HO SelfTrigger tech bit 11)";
HOTimeHO = ib.
book1D(str,str,100,0,10);
124 str=
"HB Timing (GCT Trigger alg bit 15 16 17 18)";
HBTimeGCT =ib.
book1D(str,str,100,0,10);
125 str=
"HO Timing (GCT Trigger alg bit 15 16 17 18)";
HOTimeGCT =ib.
book1D(str,str,100,0,10);
159 if ( fedData.
size() < 24 )
continue ;
164 bool GCTTrigger1=
false,GCTTrigger2=
false,GCTTrigger3=
false,GCTTrigger4=
false,GCTTrigger5=
false,HOselfTrigger=
false;
173 if (!tWord.empty()) HOselfTrigger = tWord.at(11);
187 if(!gmtrc_handle.
isValid())
return;
194 int ndt[5] = {0,0,0,0,0};
195 int ncsc[5] = {0,0,0,0,0};
196 int nrpcb[5] = {0,0,0,0,0};
197 int nrpcf[5] = {0,0,0,0,0};
199 std::vector<L1MuGMTReadoutRecord> gmt_records = gmtrc->
getRecords();
200 std::vector<L1MuGMTReadoutRecord>::const_iterator igmtrr;
203 for(igmtrr=gmt_records.begin(); igmtrr!=gmt_records.end(); igmtrr++) {
204 if(igmtrr->getBxInEvent()==0) BXinEVENT=NN;
206 std::vector<L1MuRegionalCand>::const_iterator iter1;
207 std::vector<L1MuRegionalCand> rmc;
209 rmc = igmtrr->getDTBXCands();
210 for(iter1=rmc.begin(); iter1!=rmc.end(); iter1++) {
211 if ( idt <
MAXDTBX && !(*iter1).empty() ) {
218 rmc = igmtrr->getCSCCands();
219 for(iter1=rmc.begin(); iter1!=rmc.end(); iter1++) {
220 if ( icsc <
MAXCSC && !(*iter1).empty() ) {
226 rmc = igmtrr->getBrlRPCCands();
227 for(iter1=rmc.begin(); iter1!=rmc.end(); iter1++) {
228 if ( irpcb <
MAXRPC && !(*iter1).empty() ) {
235 rmc = igmtrr->getFwdRPCCands();
236 for(iter1=rmc.begin(); iter1!=rmc.end(); iter1++) {
237 if ( irpcf <
MAXRPC && !(*iter1).empty() ) {
250 if(GCTTrigger1 || GCTTrigger2 || GCTTrigger3 || GCTTrigger4 || GCTTrigger5) {
TRIGGER=+
TRIG_GCT; }
259 eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
260 for(
int i=0;
i<nTS;
i++)
if(digi->sample(
i).adc()<20)
set_hbhe(eta,phi,depth,digi->sample(
i).capid(),
adc2fC[digi->sample(
i).adc()]);
267 eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
268 for(
int i=0;
i<nTS;
i++)
if(digi->sample(
i).adc()<20)
set_ho(eta,phi,depth,digi->sample(
i).capid(),
adc2fC[digi->sample(
i).adc()]);
275 eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
276 for(
int i=0;
i<nTS;
i++)
if(digi->sample(
i).adc()<20)
set_hf(eta,phi,depth,digi->sample(
i).capid(),
adc2fC[digi->sample(
i).adc()]);
288 eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
292 for(
int i=0;
i<nTS;
i++) energy+=data[
i];
298 if((
occHBHE[eta+50][phi][depth]/(
double)(
ievt_))>0.001)
continue;
322 eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
323 for(
int i=0;
i<nTS;
i++) data[
i]=
adc2fC[digi->sample(
i).adc()]-
get_ped_ho(eta,phi,depth,digi->sample(
i).capid());
326 for(
int i=0;
i<nTS;
i++) energy+=data[
i];
328 if(energy<100)
continue;
332 if((
occHO[eta+50][phi][depth]/(
double)(
ievt_))>0.001)
continue;
346 eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
348 for(
int i=0;
i<nTS;
i++){
353 if(energy<25.0)
continue;
358 if((
occHF[eta+50][phi][depth]/(
double)(
ievt_))>0.01)
continue;
T getUntrackedParameter(std::string const &, T const &) const
bool LumiInOrder(int lumisec)
MonitorElement * HBTimeHO
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * HOTimeRPC
MonitorElement * HETimeRPCp
edm::EDGetTokenT< HBHEDigiCollection > tok_hbhe_
virtual void analyze(const edm::Event &e, const edm::EventSetup &c)
MonitorElement * HBTimeRPC
MonitorElement * HBTimeDT
void set_hf(int eta, int phi, int depth, int cap, float val)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
static const int TRIG_CSC
MonitorElement * HETimeRPCm
#define DEFINE_FWK_MODULE(type)
std::vector< int > AllowedCalibTypes_
Sin< T >::type sin(const T &t)
MonitorElement * HOTimeGCT
virtual void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &)
std::vector< HBHEDataFrame >::const_iterator const_iterator
void setup(DQMStore::IBooker &)
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
edm::LuminosityBlockNumber_t luminosityBlock() const
edm::EDGetTokenT< FEDRawDataCollection > tok_raw_
MonitorElement * HFTimeCSCp
void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup)
double getEntries(void) const
get # of entries
static const float adc2fC[128]
size_t size() const
Lenght of the data buffer in bytes.
edm::EDGetTokenT< HFDigiCollection > tok_hf_
static const int TRIG_RPC
bool IsAllowedCalibType()
double occHBHE[100][73][5]
MonitorElement * HFTimeCSCm
void bookHistograms(DQMStore::IBooker &ib, const edm::Run &run, const edm::EventSetup &c)
bool isSignal(double *data, int n)
double get_ped_ho(int eta, int phi, int depth, int cup)
std::vector< bool > DecisionWord
typedefs
static const int TRIG_GCT
MonitorElement * book1D(Args &&...args)
std::vector< bool > TechnicalTriggerWord
technical trigger bits (64 bits)
edm::EDGetTokenT< L1MuGMTReadoutCollection > tok_l1mu_
MonitorElement * HOTimeHO
void set_ho(int eta, int phi, int depth, int cap, float val)
MonitorElement * HETimeCSCp
void setCurrentFolder(const std::string &fullpath)
static const int TRIG_RPCF
T const * product() const
MonitorElement * book2D(Args &&...args)
HcalDetDiagTimingMonitor(const edm::ParameterSet &ps)
double get_ped_hbhe(int eta, int phi, int depth, int cup)
MonitorElement * HBHEShape
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > tok_l1_
MonitorElement * HBTimeGCT
double get_ped_hf(int eta, int phi, int depth, int cup)
edm::InputTag L1ADataLabel_
void set_hbhe(int eta, int phi, int depth, int cap, float val)
std::vector< L1MuGMTReadoutRecord > const & getRecords() const
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
MonitorElement * HOTimeDT
MonitorElement * HETimeCSCm
double GetTime(double *data, int n)
virtual void setup(DQMStore::IBooker &)
edm::InputTag inputLabelDigi_
~HcalDetDiagTimingMonitor()
edm::EDGetTokenT< HODigiCollection > tok_ho_