From eed4319f01e8eecac744532d0cec87536a0f9a6c Mon Sep 17 00:00:00 2001
From: Zhang Yao <zhangyao@ihep.ac.cn>
Date: Mon, 18 Jan 2021 11:49:11 +0800
Subject: [PATCH] Rename option file. Update README of RecGenfitAlg

---
 ...er_fit_DC.py => tut_detsim_digi_fit_DC.py} |   0
 Examples/options/tut_detsim_digi_fit_STD.py   | 210 ------------------
 Reconstruction/RecGenfitAlg/README.md         |   3 +-
 Utilities/DataHelper/src/HelixClass.cc        |   2 -
 4 files changed, 2 insertions(+), 213 deletions(-)
 rename Examples/options/{tut_detsim_digi_truthTracker_fit_DC.py => tut_detsim_digi_fit_DC.py} (100%)
 delete mode 100644 Examples/options/tut_detsim_digi_fit_STD.py

diff --git a/Examples/options/tut_detsim_digi_truthTracker_fit_DC.py b/Examples/options/tut_detsim_digi_fit_DC.py
similarity index 100%
rename from Examples/options/tut_detsim_digi_truthTracker_fit_DC.py
rename to Examples/options/tut_detsim_digi_fit_DC.py
diff --git a/Examples/options/tut_detsim_digi_fit_STD.py b/Examples/options/tut_detsim_digi_fit_STD.py
deleted file mode 100644
index 9dd7f4bb..00000000
--- a/Examples/options/tut_detsim_digi_fit_STD.py
+++ /dev/null
@@ -1,210 +0,0 @@
-#!/usr/bin/env python
-
-import os
-print(os.environ["DD4HEP_LIBRARY_PATH"])
-import sys
-# sys.exit(0)
-
-from Gaudi.Configuration import *
-
-##############################################################################
-# Random Number Svc
-##############################################################################
-from Configurables import RndmGenSvc, HepRndm__Engine_CLHEP__RanluxEngine_
-
-# rndmengine = HepRndm__Engine_CLHEP__RanluxEngine_() # The default engine in Gaudi
-rndmengine = HepRndm__Engine_CLHEP__HepJamesRandom_() # The default engine in Geant4
-rndmengine.SetSingleton = True
-rndmengine.Seeds = [42]
-
-# rndmgensvc = RndmGenSvc("RndmGenSvc")
-# rndmgensvc.Engine = rndmengine.name()
-
-
-##############################################################################
-# Event Data Svc
-##############################################################################
-from Configurables import k4DataSvc
-dsvc = k4DataSvc("EventDataSvc")
-
-
-##############################################################################
-# Geometry Svc
-##############################################################################
-
-# geometry_option = "CepC_v4-onlyTracker.xml"
-geometry_option = "det.xml"
-
-if not os.getenv("DETDRIFTCHAMBERROOT"):
-    print("Can't find the geometry. Please setup envvar DETCEPCV4ROOT." )
-    sys.exit(-1)
-
-geometry_path = os.path.join(os.getenv("DETDRIFTCHAMBERROOT"), "compact", geometry_option)
-if not os.path.exists(geometry_path):
-    print("Can't find the compact geometry file: %s"%geometry_path)
-    sys.exit(-1)
-
-from Configurables import GeomSvc
-geosvc = GeomSvc("GeomSvc")
-geosvc.compact = geometry_path
-
-##############################################################################
-# Physics Generator
-##############################################################################
-from Configurables import GenAlgo
-from Configurables import GtGunTool
-from Configurables import StdHepRdr
-from Configurables import SLCIORdr
-from Configurables import HepMCRdr
-from Configurables import GenPrinter
-
-gun = GtGunTool("GtGunTool")
-# gun.Particles = ["pi+"]
-# gun.EnergyMins = [100.] # GeV
-# gun.EnergyMaxs = [100.] # GeV
-
-gun.Particles = ["e-"]
-
-# gun.PositionXs = [100.] # mm
-# gun.PositionYs = [100.] # mm
-# gun.PositionZs = [0.] # mm
-
-
-gun.EnergyMins = [10.] # GeV
-gun.EnergyMaxs = [10.] # GeV
-
-gun.ThetaMins = [90] # rad; 45deg
-gun.ThetaMaxs = [90] # rad; 45deg
-
-gun.PhiMins = [90] # rad; 0deg
-gun.PhiMaxs = [90] # rad; 360deg
-#gun.PhiMins = [0] # rad; 0deg
-#gun.PhiMaxs = [360] # rad; 360deg
-
-# stdheprdr = StdHepRdr("StdHepRdr")
-# stdheprdr.Input = "/cefs/data/stdhep/CEPC250/2fermions/E250.Pbhabha.e0.p0.whizard195/bhabha.e0.p0.00001.stdhep"
-
-# lciordr = SLCIORdr("SLCIORdr")
-# lciordr.Input = "/cefs/data/stdhep/lcio250/signal/Higgs/E250.Pbbh.whizard195/E250.Pbbh_X.e0.p0.whizard195/Pbbh_X.e0.p0.00001.slcio"
-
-# hepmcrdr = HepMCRdr("HepMCRdr")
-# hepmcrdr.Input = "example_UsingIterators.txt"
-
-genprinter = GenPrinter("GenPrinter")
-
-genalg = GenAlgo("GenAlgo")
-genalg.GenTools = ["GtGunTool"]
-# genalg.GenTools = ["StdHepRdr"]
-# genalg.GenTools = ["StdHepRdr", "GenPrinter"]
-# genalg.GenTools = ["SLCIORdr", "GenPrinter"]
-# genalg.GenTools = ["HepMCRdr", "GenPrinter"]
-
-##############################################################################
-# Detector Simulation
-##############################################################################
-from Configurables import DetSimSvc
-
-detsimsvc = DetSimSvc("DetSimSvc")
-
-# from Configurables import ExampleAnaElemTool
-# example_anatool = ExampleAnaElemTool("ExampleAnaElemTool")
-
-from Configurables import DetSimAlg
-
-detsimalg = DetSimAlg("DetSimAlg")
-
-if int(os.environ.get("VIS", 0)):
-    detsimalg.VisMacs = ["vis.mac"]
-
-detsimalg.RunCmds = [
-#    "/tracking/verbose 1",
-]
-detsimalg.AnaElems = [
-    # example_anatool.name()
-    # "ExampleAnaElemTool"
-    "Edm4hepWriterAnaElemTool"
-]
-detsimalg.RootDetElem = "WorldDetElemTool"
-
-from Configurables import AnExampleDetElemTool
-example_dettool = AnExampleDetElemTool("AnExampleDetElemTool")
-
-from Configurables import CalorimeterSensDetTool
-from Configurables import DriftChamberSensDetTool
-
-calo_sensdettool = CalorimeterSensDetTool("CalorimeterSensDetTool")
-driftchamber_sensdettool = DriftChamberSensDetTool("DriftChamberSensDetTool")
-
-# dedxoption = "DummyDedxSimTool"
-dedxoption = "BetheBlochEquationDedxSimTool"
-
-driftchamber_sensdettool.DedxSimTool = dedxoption
-
-from Configurables import DummyDedxSimTool
-from Configurables import BetheBlochEquationDedxSimTool
-
-if dedxoption == "DummyDedxSimTool":
-    dedx_simtool = DummyDedxSimTool("DummyDedxSimTool")
-elif dedxoption == "BetheBlochEquationDedxSimTool":
-    dedx_simtool = BetheBlochEquationDedxSimTool("BetheBlochEquationDedxSimTool")
-    dedx_simtool.material_Z = 2
-    dedx_simtool.material_A = 4
-    dedx_simtool.scale = 10
-    dedx_simtool.resolution = 0.0001
-
-##############################################################################
-from Configurables import DCHDigiAlg
-dCHDigiAlg = DCHDigiAlg("DCHDigiAlg")
-dCHDigiAlg.readout = "DriftChamberHitsCollection"
-dCHDigiAlg.drift_velocity = 40#um/ns
-dCHDigiAlg.mom_threshold = 0 #GeV
-dCHDigiAlg.SimDCHitCollection = "DriftChamberHitsCollection"
-dCHDigiAlg.DigiDCHitCollection = "DigiDCHitsCollection"
-dCHDigiAlg.AssociationCollection = "DCHAssociationCollectio"
-dCHDigiAlg.WriteAna  = True
-
-##############################################################################
-# POD I/O
-##############################################################################
-from Configurables import PodioOutput
-out = PodioOutput("outputalg")
-out.filename = "fit_DCH.root"
-out.outputCommands = ["keep *"]
-
-##############################################################################
-# TruthTrackerAlg
-##############################################################################
-from Configurables import TruthTrackerAlg
-truthTrackerAlg = TruthTrackerAlg("TruthTrackerAlg")
-truthTrackerAlg.DCHitAssociationCollection="DCHAssociationCollectio"
-truthTrackerAlg.debug = 1
-
-##############################################################################
-# GenfitAlg
-##############################################################################
-from Configurables import RecGenfitAlgDC
-recGenfitAlgDC = RecGenfitAlgDC("RecGenfitAlgDC")
-recGenfitAlgDC.debug = 11
-
-##############################################################################
-# NTupleSvc
-##############################################################################
-from Configurables import NTupleSvc
-ntsvc = NTupleSvc("NTupleSvc")
-ntsvc.Output = ["MyTuples DATAFILE='DCH_digi_ana.root' OPT='NEW' TYP='ROOT'",
-                "TruthTrackerAlg DATAFILE='result_truthTracker_STD.root' OPT='NEW' TYP='ROOT'",
-                "RecGenfitAlgDC DATAFILE='result_fit_SDT.root' OPT='NEW' TYP='ROOT'"]
-
-##############################################################################
-# ApplicationMgr
-##############################################################################
-
-from Configurables import ApplicationMgr
-ApplicationMgr( TopAlg = [genalg, detsimalg, dCHDigiAlg, truthTrackerAlg,
-                          recGenfitAlgDC, out],
-                EvtSel = 'NONE',
-                EvtMax = 1,
-                ExtSvc = [rndmengine, dsvc, geosvc, ntsvc],
-                HistogramPersistency = "ROOT",
-                OutputLevel=DEBUG
-)
diff --git a/Reconstruction/RecGenfitAlg/README.md b/Reconstruction/RecGenfitAlg/README.md
index 3b08f667..c9cddb4c 100644
--- a/Reconstruction/RecGenfitAlg/README.md
+++ b/Reconstruction/RecGenfitAlg/README.md
@@ -8,5 +8,6 @@ It's incudingg the interface to genfit fitter, track and measurement:
 * GenfitField: implementation of genfit AbsField
 * GenfitGeoMaterialInterface: implementation of genfit AbsMaterialInterface
 * GenfitMsg: a class to get Gaudi message instance in Genfit classes.
-* HelixTrackModel: a class to get Gaudi message instance in Genfit classes.
+* GenfitAlgDC: a class to fit drift chamber
+* GenfitAlgSDT: a class to fit drift chamber+silicon
 
diff --git a/Utilities/DataHelper/src/HelixClass.cc b/Utilities/DataHelper/src/HelixClass.cc
index 8075c062..591acc51 100644
--- a/Utilities/DataHelper/src/HelixClass.cc
+++ b/Utilities/DataHelper/src/HelixClass.cc
@@ -49,8 +49,6 @@ void HelixClass::Initialize_VP(float * pos, float * mom, float q, float B) {
     else {
       d0 = double(q)*radius + double(sqrt(xCentre*xCentre+yCentre*yCentre));
     }
-    std::cout<<__FILE__<<"   "<<__LINE__<<" d0 "<<d0<<" r "<<radius<<" q "<<q<<" xCentre "<<xCentre<<" yCentre "<<yCentre<<std::endl;
-    std::cout<<__FILE__<<"   "<<__LINE__<<" pxy "<<_pxy<<" FCT "<<_FCT<<" B "<<B<<std::endl;
 
     _d0 = float(d0);
 
-- 
GitLab