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(
"/");
88 if (
debug_>1)
std::cout <<
"HcalDetDiagTimingMonitor::beginRun"<<std::endl;
129 str=
"HB Timing (HO SelfTrigger tech bit 11)";
HBTimeHO =
dbe_->
book1D(str,str,100,0,10);
130 str=
"HO Timing (HO SelfTrigger tech bit 11)";
HOTimeHO =
dbe_->
book1D(str,str,100,0,10);
132 str=
"HB Timing (GCT Trigger alg bit 15 16 17 18)";
HBTimeGCT =
dbe_->
book1D(str,str,100,0,10);
133 str=
"HO Timing (GCT Trigger alg bit 15 16 17 18)";
HOTimeGCT =
dbe_->
book1D(str,str,100,0,10);
160 if ( fedData.
size() < 24 )
continue ;
165 bool GCTTrigger1=
false,GCTTrigger2=
false,GCTTrigger3=
false,GCTTrigger4=
false,GCTTrigger5=
false,HOselfTrigger=
false;
174 if (!tWord.empty()) HOselfTrigger = tWord.at(11);
188 if(!gmtrc_handle.
isValid())
return;
195 int ndt[5] = {0,0,0,0,0};
196 int ncsc[5] = {0,0,0,0,0};
197 int nrpcb[5] = {0,0,0,0,0};
198 int nrpcf[5] = {0,0,0,0,0};
200 std::vector<L1MuGMTReadoutRecord> gmt_records = gmtrc->
getRecords();
201 std::vector<L1MuGMTReadoutRecord>::const_iterator igmtrr;
204 for(igmtrr=gmt_records.begin(); igmtrr!=gmt_records.end(); igmtrr++) {
205 if(igmtrr->getBxInEvent()==0) BXinEVENT=NN;
207 std::vector<L1MuRegionalCand>::const_iterator iter1;
208 std::vector<L1MuRegionalCand> rmc;
210 rmc = igmtrr->getDTBXCands();
211 for(iter1=rmc.begin(); iter1!=rmc.end(); iter1++) {
212 if ( idt <
MAXDTBX && !(*iter1).empty() ) {
219 rmc = igmtrr->getCSCCands();
220 for(iter1=rmc.begin(); iter1!=rmc.end(); iter1++) {
221 if ( icsc <
MAXCSC && !(*iter1).empty() ) {
227 rmc = igmtrr->getBrlRPCCands();
228 for(iter1=rmc.begin(); iter1!=rmc.end(); iter1++) {
229 if ( irpcb <
MAXRPC && !(*iter1).empty() ) {
236 rmc = igmtrr->getFwdRPCCands();
237 for(iter1=rmc.begin(); iter1!=rmc.end(); iter1++) {
238 if ( irpcf <
MAXRPC && !(*iter1).empty() ) {
251 if(GCTTrigger1 || GCTTrigger2 || GCTTrigger3 || GCTTrigger4 || GCTTrigger5) {
TRIGGER=+
TRIG_GCT; }
260 eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
261 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()]);
268 eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
269 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()]);
276 eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
277 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()]);
289 eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
294 if((
occHBHE[eta+50][phi][depth]/(
double)(
ievt_))>0.001)
continue;
318 eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
319 for(
int i=0;
i<nTS;
i++) data[
i]=
adc2fC[digi->sample(
i).adc()]-
get_ped_ho(eta,phi,depth,digi->sample(
i).capid());
323 if((
occHO[eta+50][phi][depth]/(
double)(
ievt_))>0.001)
continue;
337 eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
339 for(
int i=0;
i<nTS;
i++){
344 if(energy<25.0)
continue;
349 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 * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
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
std::vector< HBHEDataFrame >::const_iterator const_iterator
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
virtual void beginRun(const edm::Run &run, const edm::EventSetup &c)
void removeContents(void)
erase all monitoring elements in current directory (not including subfolders);
bool IsAllowedCalibType()
double occHBHE[100][73][5]
MonitorElement * HFTimeCSCm
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
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
static const int TRIG_RPCF
HcalDetDiagTimingMonitor(const edm::ParameterSet &ps)
double get_ped_hbhe(int eta, int phi, int depth, int cup)
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > tok_l1_
MonitorElement * HBTimeGCT
double get_ped_hf(int eta, int phi, int depth, int cup)
T const * product() const
char data[epos_bytes_allocation]
edm::InputTag L1ADataLabel_
void beginRun(const edm::Run &run, const edm::EventSetup &c)
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
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
double GetTime(double *data, int n)
edm::InputTag inputLabelDigi_
~HcalDetDiagTimingMonitor()
void setCurrentFolder(const std::string &fullpath)
edm::EDGetTokenT< HODigiCollection > tok_ho_