Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 10:59:55

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 MAXEVENTS=25000
0004 
0005 
0006 import os
0007 
0008 # myfiles is list of input files
0009 myfiles=[]
0010 # Test -- put all .root files in the given directory dir into myfiles list
0011 dir="/store/data/Run2012C/JetHT/RAW/v1/000/199/834/"
0012 for i in os.listdir(dir):
0013     if i.endswith(".root"):
0014         full=os.path.join(dir,i)
0015         myfiles.append(full)
0016 
0017 
0018 
0019 process = cms.Process("HcalLaser")
0020 
0021 process.load("FWCore.MessageService.MessageLogger_cfi")
0022 process.MessageLogger.cerr.FwkReport.reportEvery = 1000
0023 #process.MessageLogger.cerr.FwkReport.reportEvery = 1
0024 
0025 # import of standard configurations
0026 process.load('Configuration/StandardSequences/Services_cff')
0027 process.load('FWCore/MessageService/MessageLogger_cfi')
0028 process.load('Configuration/StandardSequences/GeometryExtended_cff')
0029 process.load('Configuration/StandardSequences/MagneticField_AutoFromDBCurrent_cff')
0030 process.load('Configuration/StandardSequences/Reconstruction_cff')
0031 process.load('Configuration/StandardSequences/FrontierConditions_GlobalTag_cff')
0032 process.load('Configuration/EventContent/EventContent_cff')
0033 
0034 
0035 process.GlobalTag.globaltag = "GR_R_52_V9D::All"
0036 
0037 
0038 from Configuration.AlCa.autoCond import autoCond
0039 
0040 
0041 # Set maximum number of events to MAXEVENTS
0042 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(MAXEVENTS) )
0043 
0044 process.source = cms.Source("PoolSource",
0045     # replace 'myfile.root' with the source file you want to use
0046     fileNames = cms.untracked.vstring(myfiles
0047     )
0048 )
0049 
0050 
0051 # Load Hcal RAW-TO-DIGI producer
0052 process.load("EventFilter.HcalRawToDigi.HcalRawToDigi_cfi")
0053 process.hcalDigis.InputLabel="rawDataCollector"
0054 process.digipath=cms.Path(process.hcalDigis)
0055 
0056 
0057 # Load Hcal Laser Filters
0058 process.load("EventFilter.HcalRawToDigi.hcallasereventfilter2012_cfi")
0059 process.load("EventFilter.HcalRawToDigi.hcallaserhbhefilter2012_cfi")
0060 process.load("EventFilter.HcalRawToDigi.hcallaserhffilter2012_cfi")
0061 
0062 
0063 
0064 
0065 ### Filter definitions:
0066 # process.hcallasereventfilter2012 -- vetoes based on a user-provided list of bad events
0067 # process.hcallaserhbhefilter2012 -- vetoes HBHE laser events (based on calib and HBHE digis)
0068 # process.hcallaserhffilter2012 -- vetoes HF laser events (based on calib digis)
0069 
0070 # Setting a filter's 'verbose' variable to True will cause the event:LS:run of any event failing the filter to be printed
0071 # Setting a filter's 'prefix' variable will cause the specified prefix to be printed prior to the run:LS:event info.  (This is useful if you want to know which filter produced the failure.)
0072 process.hcallasereventfilter2012.verbose=True
0073 process.hcallasereventfilter2012.prefix="EVT__"
0074 process.hcallaserhbhefilter2012.verbose=True
0075 process.hcallaserhbhefilter2012.prefix="HBHE_"
0076 process.hcallaserhffilter2012.verbose=True
0077 process.hcallaserhffilter2012.prefix="HF___"
0078 
0079 process.hcallasereventfilter2012.WriteBadToFile=True
0080 process.hcallaserhbhefilter2012.WriteBadToFile=True
0081 process.hcallaserhffilter2012.WriteBadToFile=True
0082 
0083 
0084 # In general, you only need to run either the event filter, or the (hbhe*hf) filters.
0085 process.HcalLaser = cms.Path(
0086 #    process.hcallasereventfilter2012*
0087     process.hcallaserhbhefilter2012*
0088     process.hcallaserhffilter2012
0089     )
0090 
0091 
0092 
0093 process.schedule=cms.Schedule(process.digipath,  # make digis from raw
0094                               process.HcalLaser
0095                               )