import os from GaudiKernel import SystemOfUnits as units from GaudiKernel import PhysicalConstants as constants from Gaudi.Configuration import * from FWCore.joboptions import parse_standard_job_options args = parse_standard_job_options() inputfile = "muons_for_seeding.root" if args.inputfile: inputfile = args.inputfile from Configurables import FCCDataSvc podioevent = FCCDataSvc("EventDataSvc", input=inputfile) from Configurables import PodioInput podioinput = PodioInput( "PodioReader", collections=[ "GenParticles", "GenVertices", "SimParticles", "SimVertices", "TrackerHits", "TrackerHitsPosition", ], OutputLevel=DEBUG, )
from Gaudi.Configuration import * from Configurables import ApplicationMgr, FCCDataSvc, PodioOutput podioevent = FCCDataSvc("EventDataSvc", input="output.root") # reads HepMC text file and write the HepMC::GenEvent to the data service from Configurables import PodioInput, ReadTestConsumer podioinput = PodioInput( "PodioReader", collections=["allGenVertices", "allGenParticles", "hits"], OutputLevel=DEBUG) checker = ReadTestConsumer() out = PodioOutput("out", filename="out2.root", OutputLevel=DEBUG) out.outputCommands = ["keep *"] ApplicationMgr( TopAlg=[podioinput, checker, out], EvtSel='NONE', EvtMax=3, ExtSvc=[podioevent], )
from Gaudi.Configuration import * from Configurables import ApplicationMgr, FCCDataSvc, PodioOutput podioevent = FCCDataSvc("EventDataSvc", input="output_hcalSim_e50GeV_eta036_10events.root") # reads HepMC text file and write the HepMC::GenEvent to the data service from Configurables import PodioInput podioinput = PodioInput("PodioReader", collections=["HCalHits"], OutputLevel=DEBUG) from Configurables import GeoSvc geoservice = GeoSvc( "GeoSvc", detectors=[ 'file:Detector/DetFCChhBaseline1/compact/FCChh_DectEmptyMaster.xml', 'file:Detector/DetFCChhHCalTile/compact/FCChh_HCalBarrel_TileCal.xml' ], OutputLevel=INFO) from Configurables import CreateCaloCells createcells = CreateCaloCells("CreateCaloCells", doCellCalibration=False, addCellNoise=False, filterCellNoise=False, OutputLevel=DEBUG)
from Configurables import ApplicationMgr, FCCDataSvc, PodioOutput from GaudiKernel import SystemOfUnits as units import argparse recoparser = argparse.ArgumentParser() recoparser.add_argument('-r','--rootfile', type=str, default=None, help='rootfile') recoargs, _ = recoparser.parse_known_args() rootfile = recoargs.rootfile print "==================================" print "rootfile = ", rootfile print "==================================" ## read in generated particles from ROOT via podio podioevent = FCCDataSvc("EventDataSvc", input=rootfile) #"Sim/SimPapas/data/ee_ZH_Zmumu_Hbb.root") from Configurables import PodioInput, ReadTestConsumer podioinput = PodioInput("PodioReader", collections=["GenVertex", "GenParticle"], OutputLevel=DEBUG) from CMS_detector_cfg import detservice from papas_cfg import papasalg_pdebug #output fcc particles to root from Configurables import PodioOutput out = PodioOutput("out", OutputLevel=INFO) out.outputCommands = ["keep *"] from Configurables import ApplicationMgr ApplicationMgr(
"jets": { "jets": "jets", "jetConstituents": "jetParts", "jetsFlavorTagged": "jetsFlavor", "jetsBTagged": "bTags", "jetsCTagged": "cTags", "jetsTauTagged": "tauTags" }, # Missing transverse energy output tool "met": { "missingEt": "met" } } # Reading event date from root file podioEvent = FCCDataSvc("EventDataSvc", input=inputRootFile) # reads HepMC text file and write the HepMC::GenEvent to the data service from Configurables import PodioInput, ReadTestConsumer podioInput = PodioInput("PodioReader", collections=["all_genvertices", "all_genparticles"], OutputLevel=INFO) podioInput.DataOutputs.hepmc.Path = "hepmc" ############################################################ # # Expert: Configure individual modules (algorithms) # ############################################################ # Define all output tools that convert the Delphes collections to FCC-EDM: muonSaveTool = DelphesSaveChargedParticles(
from Gaudi.Configuration import * from Configurables import ApplicationMgr, FCCDataSvc, PodioOutput podioevent = FCCDataSvc("EventDataSvc", input="output_ecalSim_e50GeV_1events.root") # reads HepMC text file and write the HepMC::GenEvent to the data service from Configurables import PodioInput podioinput = PodioInput("PodioReader", collections=["ECalHits", "ECalPositionedHits"], OutputLevel=DEBUG) from Configurables import GeoSvc geoservice = GeoSvc( "GeoSvc", detectors=[ 'file:Detector/DetFCChhBaseline1/compact/FCChh_DectEmptyMaster.xml', 'file:Detector/DetFCChhECalSimple/compact/FCChh_ECalBarrel_Mockup.xml' ], OutputLevel=INFO) # common ECAL specific information # readout name ecalReadoutName = "ECalHitsPhiEta" # active material identifier name ecalIdentifierName = "active_layer" # active material volume name ecalVolumeName = "LAr_sensitive"
ecalEndcapReadoutName = "EMECPhiEtaReco" ecalFwdReadoutName = "EMFwdPhiEta" hcalBarrelReadoutName = "HCalBarrelReadout" hcalExtBarrelReadoutName = "HCalExtBarrelReadout" hcalBarrelReadoutPhiEtaName = "BarHCal_Readout_phieta" hcalExtBarrelReadoutPhiEtaName = "ExtBarHCal_Readout_phieta" hcalEndcapReadoutName = "HECPhiEtaReco" hcalFwdReadoutName = "HFwdPhiEta" # Number of events num_events = 3 from Gaudi.Configuration import * from Configurables import ApplicationMgr, FCCDataSvc, PodioOutput podioevent = FCCDataSvc("EventDataSvc", input="output_fullCalo_SimAndDigi_e50GeV_" + str(num_events) + "events.root") # reads HepMC text file and write the HepMC::GenEvent to the data service from Configurables import PodioInput podioinput = PodioInput("PodioReader", collections=[ "GenParticles", "GenVertices", ecalBarrelCellsName, ecalEndcapCellsName, ecalFwdCellsName, hcalBarrelCellsName, hcalExtBarrelCellsName, hcalEndcapCellsName, hcalFwdCellsName ], OutputLevel=DEBUG) from Configurables import GeoSvc geoservice = GeoSvc( "GeoSvc",
ecalBarrelReadoutName = "ECalBarrelPhiEta" ecalEndcapReadoutName = "EMECPhiEta" ecalFwdReadoutName = "EMFwdPhiEta" hcalBarrelReadoutName = "HCalBarrelReadout" hcalExtBarrelReadoutName = "HCalExtBarrelReadout" hcalBarrelReadoutPhiEtaName = "BarHCal_Readout_phieta" hcalExtBarrelReadoutPhiEtaName = "ExtBarHCal_Readout_phieta" hcalEndcapReadoutName = "HECPhiEta" hcalFwdReadoutName = "HFwdPhiEta" # Number of events num_events = 3 from Gaudi.Configuration import * from Configurables import ApplicationMgr, FCCDataSvc, PodioOutput podioevent = FCCDataSvc("EventDataSvc", input="output_allCalo_reco.root") # reads HepMC text file and write the HepMC::GenEvent to the data service from Configurables import PodioInput podioinput = PodioInput("PodioReader", collections=[ "GenParticles", "GenVertices", ecalBarrelCellsName, ecalEndcapCellsName, ecalFwdCellsName, "newHCalBarrelCells", "newHCalExtBarrelCells", hcalEndcapCellsName, hcalFwdCellsName ], OutputLevel=DEBUG) from Configurables import GeoSvc geoservice = GeoSvc(
import os from Gaudi.Configuration import * import GaudiKernel.SystemOfUnits as units from Configurables import ApplicationMgr, FCCDataSvc, PodioOutput podioevent = FCCDataSvc( "EventDataSvc", input= "https://fccsw.web.cern.ch/fccsw/testsamples/tutorial/fccee_idea_pgun.root" ) from Configurables import PodioInput, ReadTestConsumer podioinput = PodioInput("PodioReader", collections=["positionedHits_DCH"], OutputLevel=DEBUG) # Parses the given xml file from Configurables import GeoSvc geoservice = GeoSvc("GeoSvc", detectors=[ os.environ.get("FCC_DETECTORS", "") + '/Detector/DetFCCeeIDEA/compact/FCCee_DectMaster.xml', ]) from Configurables import CreateDCHHits createhits = CreateDCHHits("CreateDCHHits", readoutName="DriftChamberCollection", EdepCut=100 * 1e-9, DCACut=0.8, OutputLevel=INFO)
from Gaudi.Configuration import * from Configurables import ApplicationMgr, FCCDataSvc, PodioOutput podioevent = FCCDataSvc("EventDataSvc", input="pythia_test.root", OutputLevel=DEBUG) # reads HepMC text file and write the HepMC::GenEvent to the data service from Configurables import PodioInput, ReadTestConsumer podioinput = PodioInput("PodioReader", collections=["allGenVertices", "allGenParticles"], OutputLevel=DEBUG) checker = ReadTestConsumer() out = PodioOutput("out", filename="test.root") out.outputCommands = ["keep *"] ApplicationMgr( TopAlg = [podioinput, checker, out ], EvtSel = 'NONE', EvtMax = 3, ExtSvc = [podioevent], OutputLevel=DEBUG )
from Gaudi.Configuration import * from Configurables import ApplicationMgr, FCCDataSvc, PodioOutput podioevent = FCCDataSvc("EventDataSvc", input="tracker_with_field.root") # reads HepMC text file and write the HepMC::GenEvent to the data service from Configurables import PodioInput, ReadTestConsumer podioinput = PodioInput( "PodioReader", collections=["allGenVertices", "allGenParticles", "hits"], OutputLevel=DEBUG) checker = ReadTestConsumer() out = PodioOutput("out", filename="out2.root", OutputLevel=DEBUG) out.outputCommands = ["keep *"] ApplicationMgr( TopAlg=[podioinput, checker, out], EvtSel='NONE', EvtMax=3, ExtSvc=[podioevent], )
from Gaudi.Configuration import * from Configurables import ApplicationMgr, FCCDataSvc, PodioOutput podioevent = FCCDataSvc( "EventDataSvc", input= "/afs/cern.ch/exp/fcc/sw/0.8pre/testsamples/output_ecalSim_e50GeV_eta0_10events.root" ) # reads HepMC text file and write the HepMC::GenEvent to the data service from Configurables import PodioInput podioinput = PodioInput("PodioReader", collections=["ECalHits", "ECalPositionedHits"], OutputLevel=DEBUG) from Configurables import GeoSvc geoservice = GeoSvc( "GeoSvc", detectors=[ 'file:Detector/DetFCChhBaseline1/compact/FCChh_DectEmptyMaster.xml', 'file:Detector/DetFCChhECalSimple/compact/FCChh_ECalBarrel_Mockup.xml' ], OutputLevel=INFO) #Configure tools for calo reconstruction from Configurables import CalibrateCaloHitsTool calibcells = CalibrateCaloHitsTool("CalibrateCaloHitsTool", invSamplingFraction="5.4") from Configurables import CreateCaloCells
from GaudiKernel import SystemOfUnits as units import argparse recoparser = argparse.ArgumentParser() recoparser.add_argument('-r', '--rootfile', type=str, default=None, help='rootfile') recoargs, _ = recoparser.parse_known_args() rootfile = recoargs.rootfile print "==================================" print "rootfile = ", rootfile print "==================================" ## read in generated particles from ROOT via podio podioevent = FCCDataSvc("EventDataSvc", input=rootfile) #"Sim/SimPapas/data/ee_Z_ddbar.root") from Configurables import PodioInput, ReadTestConsumer podioinput = PodioInput("PodioReader", collections=["GenVertex", "GenParticle"], OutputLevel=DEBUG) from CLIC_detector_cfg import detservice from papas_cfg import papasalg_pdebug #output fcc particles to root from Configurables import PodioOutput out = PodioOutput("out", OutputLevel=INFO) out.outputCommands = ["keep *"] from Configurables import ApplicationMgr
import os from Gaudi.Configuration import * import GaudiKernel.SystemOfUnits as units from Configurables import ApplicationMgr, FCCDataSvc, PodioOutput podioevent = FCCDataSvc( "EventDataSvc", input= "root://eospublic.cern.ch//eos/experiment/fcc/ee/tutorial/fccee_idea_pgun.root" ) from Configurables import PodioInput, ReadTestConsumer podioinput = PodioInput("PodioReader", collections=["positionedHits_DCH"], OutputLevel=DEBUG) # Parses the given xml file from Configurables import GeoSvc geoservice = GeoSvc("GeoSvc", detectors=[ os.environ.get("FCC_DETECTORS", "") + '/Detector/DetFCCeeIDEA/compact/FCCee_DectMaster.xml', ]) from Configurables import CreateDCHHits createhits = CreateDCHHits("CreateDCHHits", readoutName="DriftChamberCollection", EdepCut=100 * 1e-9, DCACut=0.8, OutputLevel=INFO)
ecalEndcapNoisePath = "/afs/cern.ch/user/n/novaj/public/elecNoise_emec_6layers.root" ecalBarrelPileupNoisePath = "/afs/cern.ch/user/a/azaborow/public/FCCSW/elecNoise_pileup_cluster.root" ecalBarrelNoiseHistName = "h_elecNoise_fcc_" ecalBarrelPileupHistName = "h_pileup_layer" ecalEndcapNoiseHistName = "h_elecNoise_fcc_" # HCAL readouts hcalBarrelReadoutName = "HCalBarrelReadout" hcalExtBarrelReadoutName = "HCalExtBarrelReadout" hcalEndcapReadoutName = "HECPhiEta" hcalFwdReadoutName = "HFwdPhiEta" ############################################################################################################## ####### INPUT ############# ############################################################################################################## # reads HepMC text file and write the HepMC::GenEvent to the data service from Configurables import PodioInput, FCCDataSvc podioevent = FCCDataSvc("EventDataSvc", input=input_name) podioinput = PodioInput( "in", collections=[ "GenVertices", "GenParticles", "ECalBarrelCells", "ECalEndcapCells", "ECalFwdCells", # "HCalBarrelCells", # "HCalExtBarrelCells", "HCalEndcapCells", "HCalFwdCells" ]) ##############################################################################################################
################################ #my_input = "simu_test.root" #outfilename = "reco_100eV_DCA8mm.root" """ my_input ="/eos/user/n/nali/Hadrons/HadZ.root" outfilename = "/eos/user/n/nali/Hadrons/Analysis_HadZ.root" """ my_input ="/eos/user/n/nali/SR/SR.root" outfilename = "/eos/user/n/nali/SR/Analysis_SR.root" from GaudiKernel.SystemOfUnits import eV from Configurables import ApplicationMgr, FCCDataSvc, PodioOutput podioevent = FCCDataSvc("EventDataSvc", input=my_input) from Configurables import PodioInput, ReadTestConsumer podioinput = PodioInput("PodioReader", collections=["positionedHits_DCH"], OutputLevel=DEBUG) #checker = ReadTestConsumer() # DD4hep geometry service # Parses the given xml file from Configurables import GeoSvc geoservice = GeoSvc("GeoSvc", detectors=['Detector/DetFCCeeIDEA/compact/FCCee_DectEmptyMaster.xml', 'Detector/DetFCCeeIDEA/compact/DriftChamber.xml'], OutputLevel = DEBUG)
""" to run example > export PYTHIA8_XML=/afs/cern.ch/sw/lcg/releases/LCG_68/MCGenerators/pythia8/186/x86_64-slc6-gcc48-opt/xmldoc > ./run gaudirun.py simple_pythia.py """ from Gaudi.Configuration import * from Configurables import ApplicationMgr, FCCDataSvc #example of pythia configuration file to generate events pythiafile = "config/Pythia_standard.cmd" #example of pythia configuration file to read LH event file #pythiafile="config/Pythia_LHEinput.cmd" albersevent = FCCDataSvc("EventDataSvc") from Configurables import PythiaInterface # PythiaInterface parameter #pythia8gen = PythiaInterface("Pythia8Interface",Filename="main03.cmnd") pythia8gen = PythiaInterface(Filename=pythiafile) # write the HepMC::GenEvent to the data service pythia8gen.Outputs.hepmc.Path = "hepmc" from Configurables import HepMCConverter # reads an HepMC::GenEvent from the data service and writes # a collection of EDM Particles hepmc_converter = HepMCConverter("Converter") # the input product name matches the output product name of the previous module hepmc_converter.Inputs.hepmc.Path = "hepmc" hepmc_converter.Outputs.genparticles.Path = "all_genparticles"
from Gaudi.Configuration import * # list of names of files with pileup event data -- to be overlaid pileupFilenames = input_name # the file containing the signal events if simargs.inSignalName: # the collections to be read from the signal event signalCollections = [ "GenParticles", "GenVertices", "ECalBarrelCells", "ECalEndcapCells", "ECalFwdCells", "HCalBarrelCells", "HCalExtBarrelCells", "HCalEndcapCells", "HCalFwdCells" ] # Data service from Configurables import ApplicationMgr, FCCDataSvc, PodioInput, PodioOutput podioevent = FCCDataSvc("EventDataSvc", input=signalFilename) # use PodioInput for Signal podioinput = PodioInput("PodioReader", collections=signalCollections) list_of_algorithms = [podioinput] pileup = 1 else: noSignal = True list_of_algorithms = [] from Configurables import FCCDataSvc podioevent = FCCDataSvc("EventDataSvc") detectors_to_use = [ path_to_detector +
inspecttool = InspectHitsCollectionsTool("inspect", readoutNames=["ECalHits"], OutputLevel = DEBUG) savecaltool = SimG4SaveCalHits("saveECalHits", readoutNames = ["ECalHits"], OutputLevel = DEBUG) savecaltool.positionedCaloHits.Path = "positionedCaloHits" savecaltool.caloHits.Path = "caloHits" geantsim = SimG4Alg("SimG4Alg", outputs= ["SimG4SaveCalHits/saveECalHits","InspectHitsCollectionsTool/inspect"]) from Configurables import RedoSegmentation resegment = RedoSegmentation("ReSegmentation", # old bitfield (readout) oldReadoutName = "ECalHits", # specify which fields are going to be deleted oldSegmentationIds = ["x","y","z"], # new bitfield (readout), with new segmentation newReadoutName="ECalHitsReverseOrder", OutputLevel = DEBUG) # clusters are needed, with deposit position and cellID in bits resegment.inhits.Path = "positionedCaloHits" resegment.outhits.Path = "newCaloHits" from Configurables import FCCDataSvc, PodioOutput podiosvc = FCCDataSvc("EventDataSvc") out = PodioOutput("out", filename="testResegmentationXYZ.root") out.outputCommands = ["keep *"] ApplicationMgr(EvtSel='NONE', EvtMax=30, TopAlg=[reader, hepmc_converter, geantsim, resegment, out], ExtSvc = [podiosvc, geoservice, geantservice], OutputLevel=DEBUG)
from Gaudi.Configuration import * from Configurables import ApplicationMgr, FCCDataSvc, PodioOutput # v01 production - min. bias events podioevent = FCCDataSvc( "EventDataSvc", input= "http://fccsw.web.cern.ch/fccsw/testsamples/caloCells_minBiasEvent.root") # reads HepMC text file and write the HepMC::GenEvent to the data service from Configurables import PodioInput podioinput = PodioInput("in", collections=["ECalBarrelCells"]) from Configurables import GeoSvc geoservice = GeoSvc( "GeoSvc", detectors=[ 'file:Detector/DetFCChhBaseline1/compact/FCChh_DectEmptyMaster.xml', 'file:Detector/DetFCChhECalInclined/compact/FCChh_ECalBarrel_withCryostat.xml' ], OutputLevel=WARNING) # Pileup in ECal Barrel # readout name ecalBarrelReadoutNamePhiEta = "ECalBarrelPhiEta" # geometry tool from Configurables import TubeLayerPhiEtaCaloTool ecalBarrelGeometry = TubeLayerPhiEtaCaloTool(
# variables energy (energy in MeV!!!!), magnetic_field (0,1), num_events (number of events) to be defined before running energy = 50000 magnetic_field = 0 num_events = 1 from Gaudi.Configuration import * # Data service from Configurables import FCCDataSvc podioevent = FCCDataSvc("EventDataSvc") # DD4hep geometry service from Configurables import GeoSvc geoservice = GeoSvc( "GeoSvc", detectors=[ 'file:Detector/DetFCChhBaseline1/compact/FCChh_DectEmptyMaster.xml', 'file:Detector/DetFCChhHCalTile/compact/FCChh_HCalBarrel_TileCal.xml' ], OutputLevel=INFO) # Geant4 service # Configures the Geant simulation: geometry, physics list and user actions from Configurables import SimG4Svc geantservice = SimG4Svc("SimG4Svc", detector='SimG4DD4hepDetector', physicslist="SimG4FtfpBert", actions="SimG4FullSimActions") # Magnetic field from Configurables import SimG4ConstantMagneticFieldTool
from Gaudi.Configuration import * from Configurables import ApplicationMgr, FCCDataSvc, PodioOutput # v01 production - min. bias events podioevent = FCCDataSvc( "EventDataSvc", input="/eos/project/f/fccsw-web/testsamples/caloCells_minBiasEvent.root") # reads HepMC text file and write the HepMC::GenEvent to the data service from Configurables import PodioInput podioinput = PodioInput("in", collections=["ECalBarrelCells"]) from Configurables import GeoSvc geoservice = GeoSvc( "GeoSvc", detectors=[ 'file:Detector/DetFCChhBaseline1/compact/FCChh_DectEmptyMaster.xml', 'file:Detector/DetFCChhECalInclined/compact/FCChh_ECalBarrel_withCryostat.xml' ], OutputLevel=WARNING) # Pileup in ECal Barrel # readout name ecalBarrelReadoutNamePhiEta = "ECalBarrelPhiEta" # geometry tool from Configurables import TubeLayerPhiEtaCaloTool ecalBarrelGeometry = TubeLayerPhiEtaCaloTool( "EcalBarrelGeo",