110 likes | 262 Views
Some Ideas on the DAMPE Software Framework. Xin Wu University of Geneva. Software framework. A SW framework is just a structure to which all needed functionalities of a software project can be attached and connected to each other Core functionalities of the DAMPE SW framework
E N D
Some Ideas on the DAMPE Software Framework Xin Wu University of Geneva
Software framework • A SW framework is just a structure to which all needed functionalities of a software project can be attached and connected to each other • Core functionalities of the DAMPE SW framework • Simulation, digitization, reconstruction, analysis • Distributed development • developers from different geographical locations contribute to the development • Requirement • Version control, release management and code distribution • Platform dependent compiler and setup script • Central source server • External libraries • Constraints: lack of SW expertise, very short time available • Trade sophistication and flexibility for simplicity and robustness • Avoid bells and whistles and unnecessary software engineering! DAMPE Meeting, Beijing, 28-29/07/2013
Framework architecture • Simplified view: data driven and algorithm driven • Data driven • Algorithms communicate through data • Data collection pointers stored in the Transient Data Store • Very flexible; used in almost all the large experiments • Algorithm driven • No central TDS; data collection pointers pass around algorithms • Less flexible but no need to develop the TDS code • Geant4 is “kind of” algorithm driven • G4Event can only store 4 types of data: primaries, trajectories, hits and digits • My proposal for DAMPE: start with algorithm driven • Data collection pointers retrieved through a top level manager • Maybe develop a TDS later DAMPE Meeting, Beijing, 28-29/07/2013
Data driven data flow Algorithm C Algorithm B Algorithm D TDS Algorithm E Algorithm A Input Data Conversion Service Persistency Service Input File Output File DAMPE Meeting, Beijing, 28-29/07/2013
Algorithm driven data flow Input File Input Data Conversion Service Algorithm A Algorithm B Algorithm C Algorithm D Algorithm E Persistency Service Output File DAMPE Meeting, Beijing, 28-29/07/2013
A possible hybrid implementation • 3 main executables: raw data conversion, simulation, reconstruction • All produce output ROOT ntuple using the common RootNtupleManager • DmpRawDataCnv • Convert raw digitization data from bytestream format to ROOT ntuple • DmpSimu • Use Geant4 simulation framework • Implement code for input particle generation (DmpG4ParticleGenerator) • Construct detector geometry description (DmpG4DetectorConstruction) • Implement the G4DigiManager to use digitizer tools of the subsystems • DmpReco • Input ROOT digit ntuple, either from raw data or from simulation • Top level application manager (DmpEventProcessor) implements access to the TChain and the even loop to execute reconstruction and PID algorithms • Use the same DmpG4DetectorConstruction DAMPE Meeting, Beijing, 28-29/07/2013
Executable for raw data conversion DigiRawFile • DataCnvManager Dead channel maps, etc DataCorrectionManager RootNtupleManager • DmpRawDataCnv DigiRootFile DAMPE Meeting, Beijing, 28-29/07/2013
Executable for simulation G4VUserDetectorConstruction • DmpSimu G4VModularPhysicsList G4VUserPrimaryGeneratorAction G4UserRunAction G4RunManager G4UserTrackingAction G4UImanager G4UserSteppingAction G4UserEventAction RootNtupleManager G4SDManager G4DigiManager DigiRootFile macro DAMPE Meeting, Beijing, 28-29/07/2013
Executable for reconstruction PsdRecoManager DmpG4Propagator StkRecoManager DmpG4DetectorConstruction BgoRecoManager DmpRootNtupleManager • DmpReco NudRecoManager PidManager DmpEventProcessor DecCondManager DmpUIManager RecoRootFile DigiRootFile Alignment constants, etc Macro or Python script DAMPE Meeting, Beijing, 28-29/07/2013
Task list 1 : code management • Code repository tree: SVN? Git? Mercurial? • Top level package structure • DmpRawDataCnv, DmpSimu, DmpReco, DmpUtil, … • Build tool: make? gmake? cmt? Scon? • How to handle dependency (requirement in cmt)? • Package layout • (PackageName/include), src, script, (python), … • File extension convention: • *.h, *.cxx (ATLAS, Fermi) or *.hh, *.cc (Geant4) • Naming convention: PSD, STK, BGO, NUD • Platform dependent compiler • SLC5/SLC6, ??? • External libraries • Geant4, ROOT, ??? • Release management (TagCollector); setup scripts • Doxygen documentation DAMPE Meeting, Beijing, 28-29/07/2013
Task list 2 : infrastructure code • Raw data conversion • Develop DataCnvManager, DataCorrectionManager, … • Simulation • Implement G4VUserDetectorConstruction (DmpDetectorConstruction) to interface to the geometry description of the subsystems • Implement G4VUserPrimaryGeneratorAction (DmpParticleSourceManager) to interface to different particle generators • Implement G4UserEventAction (DmpEventAction) to interface to the digitizers of the subsystems • Implement other G4 Actions (DmpRunAction, DmpTrackingAction, DmpSteppingAction) needed • Reconstruction • Develop DmpG4Propagator to interface to the G4 geometry description • Develop DmpEventProcessor and interface to reco algorithms • Develop DmpUIManager, DecCondManager • Common • Develop ObjectCollection, DmpRootNtupleManage, ,,, DAMPE Meeting, Beijing, 28-29/07/2013