Presentation is loading. Please wait.

Presentation is loading. Please wait.

Eric Charles ACD Software review Phase I Walkthrough of major ACD software compontents Jan. 24 2008.

Similar presentations


Presentation on theme: "Eric Charles ACD Software review Phase I Walkthrough of major ACD software compontents Jan. 24 2008."— Presentation transcript:

1 Eric Charles ACD Software review Phase I Walkthrough of major ACD software compontents Jan. 24 2008

2 Outline Overview Tasks of ACD software Code organization Calibrations Data structures and storage [in CalibData, CalibSvc] Access to calibrations [AcdCalibSvc and AcdSimCalibSvc] Acd calibration definitions and functions [AcdUtil/AcdCalib*] Storing digi data [Event/AcdDigi] Signal simulation [AcdDigiAlg] Reconstruction [AcdRecon] Applying calibrations [AcdPha2MipTool] Track based recon [AcdPocaTool, AcdTkrIntersectTool] Storing recon data: [Event/AcdRecon] Extracting stuff for merit files [AcdValsTool] Generating Calibrations: [calibGenACD]

3 Tasks of ACD software Handle calibrations Access calibrations in Gaudi (CalibData/Acd, CalibSvc) Generate calibrations (calibGenACD) Store data TDS (Event/Digi/AcdDigi, Event/Recon/AcdRecon) ROOT (digiRootData/AcdDigi, reconRootData/AcdRecon) Simulating detector response Making digis in Monte Carlo events (AcdDigi) Reconstruct events Geometrical calculations (AcdRecon) Filling Merit ntuple Extracting data from TDS (AnalysisNtuple/AcdValsTool)

4 Various Pieces of ACD software Event/ACD reconRootData/Acd* digiRootData/Acd* CalibData/Acd AcdUtil/AcdGeomMap AcdUtil/AcdCalibFuncsAcdRecon/AcdReconFuncs AcdRecon/AcdReconStruct AcdReconAlgAcdDigiAlgcalibGenACD/apps AcdPha2MipTool AcdPocaTool AcdTkrIntersectionTool RootConvert AcdDigiUtil Tools and Libraries Public Data Algs & Apps Internal Data AcdValsTool MeritTuple

5 ACD calibrations Seven types of calibrations Pedestals Gains (a.k.a. MIP peaks) High range PHA -> MIP Coherent readout noise effect on pedestal Veto Threshold CNO Threshold Range crossover All calibration are very similar A few numbers for each PMT Recycle as much technology as possible Not used in reconstruction, MC only

6 CalibData/Acd All calibrations are PMT based A few floats and a status flag CalibData::AcdCalibDescription captures this Gives names to each of the floats in order E.g. “mean”, “width”, or “veto”, “width” CalibData::AcdCalibObj stores calib constants Just stored as a vector Need AcdCalibDescription to give names to each slot Sub-class of AcdCalibObj for each calibration type Just there to provide fast access functions getMean() { return operator[](0); } getWidth() { return operator[](1); }

7 More on CalibData and CalibSvc CalibData/AcdCalibBase does all the work Just a map to associate calibrations with pmt IDs Stores data as vectors of Template CalibData/AcdCalib This is just there for type safety Forces use to get the right type of calibration Reuse same trick in CalibSvc Base class XmlAcdBaseCnv reads all the xml expect for the actual calibration constants All the channel ID and headers Template XmlAcdCnv read the calibration constants Uses AcdCalibDescription to know what attributes to expect

8 AcdCalibSvc and AcdSimCalibSvc AcdUtil provides two services to get calibrations Both are used in MC jobs, allows user different calibrations to generate and simulate AcdCalibSvc (for reconstruction) Pedestals, Gains, High Range, CoherentNoise AcdSimCalibSvc (for simulation) Also Veto & CNO thresholds, Range crossover Reuse same trick with templates Base class AcdCalibMgr talks to the CalibDataSvc Handles all the caching and validity checking Template AcdCalibMgrTmpl provides the type safety One AcdCalibMgrTmpl per calibration type

9 Using the Acd*CalibSvc Several Job options, somewhat confusing DefaultFlavor [“ideal”] Used for all calibrations unless overridden FlavorXXX [“”] Null string means use default, otherwise override “ideal” doesn’t access DB, just uses pre-defined values

10 AcdDigi AcdId m_id; const char* m_tileName; int m_tileNumber; VolumeIdentifier m_volId; double m_energy; unsigned short m_pha[2]; bool m_veto[2]; bool m_low[2]; bool m_high[2]; Range m_range[2]; ParityError m_error[4]; High range is set by board, not by PMT This is the MC energy 4 versions of same information AcdDigi merges data from both PMTs attached to a single tile or ribbon By design, data content is superset of data coming off detector

11 AcdDigiAlg overview Task: to simulate Acd electronics response Input: energy deposited in element from GEANT Event::McPositionHitCol Output: full AcdDigi collection Pulse height, Veto, CNO, zero suppression discriminators Ancillary inputs: From xml file Conversion from MeV -> p.e. Conversion from p.e. -> mips Zero suppression threshold (in PHA -> converted to mips) Edge effects From Calibrations DB Pedestal (in PHA) MIP peak (in PHA above Pedestal) Range crossover value (in PHA ->converted to mips) Veto threshold (in PHA->converted to mips) CNO threshold (in PHA->converted to mips) High Range gain and saturation Coherent noise effect ( in PHA )

12 AcdDigiAlg Algorithm p.e. nominal Readout range HIGH range PHA Event::AcdDigi Event::McPositionHit (Energy in MeV) p.e. observed Signal in MIP Conversion to p.e. Poisson Stats & dynode chain Conversion to MIPs Range Calibration High Range Calibration LOW range PHA Pedestals Gains (aka MIPs) VETOCNO Veto Calibration CNO Calibration Accept Map BitZero Sup.

13 AcdReconAlg overview Task: to do all ACD reconstruciton Input: Tracks and AcdDigis Event::TrkTrackCol Event::AcdDigiCol Output: full AcdRecon data Event::AcdHitCol -> calibrated signals Event::AcdTkrHitPocaCol -> track/hit associations Event::AcdTkrGapPocaCol -> track/gap associations Event::AcdTrkIntersectionCol -> track extrapolations to GEANT model Event::AcdTkrPointCol -> track extrapolations to ACD volume Ancillary inputs: From job options Cuts on signal size From xmlGeoDbs ACD detector geometry From Calibrations DB Pedestal (in PHA) MIP peak (in PHA above Pedestal) High Range gain and saturation Coherent Noise effect (in PHA)

14 AcdReconAlg algorithm Event::AcdDigiCol AcdRecon::TrackData AcdRecon::PocaDataMapEvent::AcdRecon::m_active* vector set Event::TkrTrackCol AcdRecon::ExitData AcdRecon::PocaDataMap AcdPha2MipTool Extract params Find lat exit point Calculate all POCAs Propagate track Apply calibrations AcdPocaTool Latch best act_distFilter POCAs AcdTrkIntersectionTool Find doca w.r.t GapsProject errorsIntersect w/ GEANT model

15 AcdRecon code elements AcdRecon/AcdReconStruct All the internal data structures AcdRecon/AcdReconFuncs A bunch of functions to do geometrical calculations AcdRecon/AcdPha2MipTool To convert AcdDigi to AcdHit using calibrations AcdRecon/AcdPocaTool To do POCA calculations AcdRecon/AcdTrkIntersectTool To use G4Propagator to extend tracks, calculate error matrices

16 Calibrated ACD Hits Just want to keep track of the pulses in terms of MIPs, rather than ADC counts Event::AcdHit { AcdId m_tileId; // which tile was hit ushort m_pha[2]; // Digi level data for both PMT ushort m_flags[2] // Veto, Accept bits, error flags for both PMT float m_mips[2]; // calibrated values for both PMT }

17 ACD hit flags These flags are defined so far: PMT_ACCEPT // pmt is above zero suppression threshold PMT_VETO // pmt fired veto discriminator PMT_CNO // pmt fired CNO discriminator PMT_RANGE // pmt was read out in high range PMT_ODD_PARITY_ERROR // pmt has parity error PMT_HEADER_PARITY_ERROR // parity error in header PMT_DEAD // pmt was dead or masked off PMT_HOT // pmt was hot Maybe others such as: PMT_IN_ROI // pmt was used in making an ROI coincidence Some of these require non-acd data PMT_DEAD, PMT_HOT could require offline tables Leave it for now

18 Associations Between Tracks and ACD hits We want to keep track of which track come close to which hit ACD element For each track with an arbitrary distance of a hit ACD element we can store Event::AcdTkrHitPoca { AcdId m_tileId; // which tile was hit int m_trkId; // which track did the hitting Event::AcdTkrLocalCoords { float m_local[XY]; // Position where track crossed element plane float m_local[XY]Cov; // Covariance on that positions float m_pathLength; // path length in sensor float m_cosTheta; // Angle of track w.r.t. element plane int m_region; // which part of element } Event::AcdPocaData { double m_arcLength; // distance from POCA to tile plane float m_doca, m_docaErr; // the active distance and the error on it Point m_poca; // 3D global postion of POCA Vector m_pocaVector; // Vector from POCA to element edge }

19 Track Extrapolation to ACD Top View m_arcLengthToISect; m_position; Last Hit in Tracker y x m_localX; m_localY; m_localXXCov; m_localXYCov; m_lcoalYYCov; m_pathLengthInTile;

20 Associations Between Tracks and ACD hits m_arcLengthToISect; m_position; m_params; Last Hit in Tracker m_doca

21 Much more to AcdRecon How to handle gaps Stored in AcdTkrGapPoca Calculated in AcdTkrIntersectTool What about screw holes? Track Error projection? How to handle bent tiles Ambiguity about active distance around bent part Plane v. 3D POCA calculations Currently meaning changes inside tile v. outside tile Using track error projections might get rid of this Details about using G4Propagator Sort PocaData objects by path length Need to seed it, how good is energy estimate?

22 AcdValsTool This Tool is simple, just extracts stuff from AcdRecon Loop over AcdTkrHitPoca objects and extract: Largest active distance for all tracks and tiles Largest active distance for all tiles and best track Energies deposited in said tiles Loop over AcdTkrGapPoca objects and extract: Smallest DOCA to gap for all ribbons and tracks Smallest DOCA to gap for all ribbons and best track Variety of other quantities Summary statistics Numbers of hit tiles, ribbons Total energy deposited

23 Generating calibrations w/ calibGenACD Framework to make calibrations All calibrations are PMT based Share lots of tools. Basically fill histograms for each PMT then fit them all at the event of the event loop For each calibrations type, may want try a couple different fitting methods Store all calibrations in xml files Standalone apps to run calibrations. calibGenACD/apps runPedestal.exe runMuonCalib_Svac.exe runVetoCalib.exe runCnoCalib.exe runRangeFit.exe runCoherentNoise.exe

24 Status, to do: Code is fairly well developed Still not totally stable Need better testing procedures Need performance benchmarks Some obvious points of work Code cleanup, adhering to GLAST conventions Track error projection Implementing CNO calibration generation More subtle issues Moving to more global use of ACD in merit tuple Considering both signal size and active distance when deciding to which track / tile pair to store Catching tracking errors ACD hit patterns that imply More studies of how to handle backsplash


Download ppt "Eric Charles ACD Software review Phase I Walkthrough of major ACD software compontents Jan. 24 2008."

Similar presentations


Ads by Google