Presentation is loading. Please wait.

Presentation is loading. Please wait.

Distribution of MC Information

Similar presentations


Presentation on theme: "Distribution of MC Information"— Presentation transcript:

1 Distribution of MC Information
| Tobias Stockmanns

2 Created Objects - MVD

3 Important Informations

4 Basic concept class FairLink { … private :
Int_t fType; //From which branch is the data coming Int_t fIndex; //Position in TClonesArray Float_t fWeight; //Individual weight } class FairMultiLinkedData { public : SetLink(FairLink); AddLink(FairLink); private : vector<FairLink> fLinks; } class FairBasePoint : public FairMultiLinkedData { private : Double_t fX, fY, fZ; } class FairHit : public FairBasePoint + Errors class FairMCPoint : public FairBasePoint + MC Information

5 How to implement it Make sure, that your subdetector has for each branch an entry in the fDetectorType enum The order of the entries should correspond to the sequence of simulation enum fDetectorType { kUnknown, kMCTrack, kMVDPoint, kMVDDigiStrip, kMVDDigiPixel, kMVDClusterPixel, kMVDClusterStrip, kMVDHitsStrip, kMVDHitsPixel, kLheHit, kLheCand, kLheTrack, kTrackCand, kTrack };

6 How to implement it Derive your data classes either from FairMultiLinkedData or from FairHit/FairMCPoint Add the link information during simulation via: SetLink(FairLink): Replaces existing link data with the given FairLink AddLink(FairLink): Adds the given FairLink at the end of the vector of FairLinks PndSttHit::PndSttHit(Int_t detID, TVector3& pos, TVector3& dpos,                      Int_t index, Int_t flag, Double_t isochrone,                      Double_t isochroneError, TVector3 wireDir)   : FairHit(detID, pos, dpos, index) { SetLink(FairLink(kSttPoint, index)); }

7 Increase of file size simulated 100 events with 4 µ per event for MVD and STT with links [byte] w/o links difference [%] data objects Points 4,725,200 4,713,659 11,541 0,2 11,473 Digi 1,619,496 81,055 5 28,373 Reco 2,882,485 2,647,842 234,643 8 12,115 Fit 57,8930 55,2416 26,514 4,5 352 size of links file: 275,714 byte

8 How to extract the Information
1: --MCTrack: 4: --MVDPoint: 0: (1/1) 1: (1/1) 2: (1/1) 3: (1/1) 4: (1/0) 5: (1/0) 6: (1/0) 7: (1/0) 5: --MVDStripDigis: 0: (4/3) 1: (4/3) 2: (4/6) 3: (4/6) 4: (4/6) 5: (4/7) 6: (4/7) 7: (4/7) 6: --MVDPixelDigis: 0: (4/0) 1: (4/0) 2: (4/1) 3: (4/1) 4: (4/2) 5: (4/2) 6: (4/4) 7: (4/4) 8: (4/4) 9: (4/5) 10: (4/5) 7: --MVDClusterCand: 0: (6/0) (6/1) 1: (6/2) (6/3) 2: (6/4) (6/5) 3: (6/6) (6/7) (6/8) 4: (6/9) (6/10) 8: --MVDStripClusterCand: 0: (5/0) 1: (5/1) 2: (5/3) (5/2) 3: (5/4) 4: (5/6) (5/5) 5: (5/7) 7: --MVDClusterCand: 0: (6/0) (6/1) 1: (6/2) (6/3) 2: (6/4) (6/5) 3: (6/6) (6/7) (6/8) 4: (6/9) (6/10)

9 How to extract the Information
Three important tasks: PndMCMatchCreatorTask Runs through all given files in macro Extracts link data from registered branches  fills PndMCMatch Stores data in separate root file PndMCMatchLoaderTask Reads in link root file  fills PndMCMatch PndMCMatchSelectorTask Crawles through link data and extracts wanted information Needs start and stop stage (given as fDetectorType values) Works in both directions Needs PndMCMatchCreator/LoaderTask beforehand

10 Real Life Example MC Info Digitization Clustering Point Reco
1: --MCTrack: 5: --MVDStripDigis: 0: (4/3) 1: (4/3) 2: (4/6) 3: (4/6) 4: (4/6) 5: (4/7) 6: (4/7) 7: (4/7) 8: --MVDStripClusterCand: 0: (5/0) 1: (5/1) 2: (5/3) (5/2) 3: (5/4) 4: (5/6) (5/5) 5: (5/7) 9: --MVDHitsStrip: 0: (8/0) 1: (8/2) 2: (8/4) 4: --MVDPoint: 0: (1/1) 1: (1/1) 2: (1/1) 3: (1/1) 4: (1/0) 5: (1/0) 6: (1/0) 7: (1/0) 10: --MVDHitsPixel: 0: (7/0) 1: (7/1) 2: (7/2) 3: (7/3) 4: (7/4) 7: --MVDClusterCand: 0: (6/0) (6/1) 1: (6/2) (6/3) 2: (6/4) (6/5) 3: (6/6) (6/7) (6/8) 4: (6/9) (6/10) 6: --MVDPixelDigis: 0: (4/0) 1: (4/0) 2: (4/1) 3: (4/1) 4: (4/2) 5: (4/2) 6: (4/4) 7: (4/4) 8: (4/4) 9: (4/5) 10: (4/5) Track Finder 18: --TrackCand: 0: (10/3) (10/4) (9/1) (9/2) 1: (10/0) (10/1) (10/2) (9/0) PndMCMatchSelectorTask (kTrackCand, kMCTrack) MC Link from: TrackCand to MCTrack: 0: (1/0) 1: (1/1)

11 How to use the Information
void PndMCTestMomentumCompare::Exec(Option_t* opt) { PndMCResult myResult = fMCMatch->GetMCInfo(kTrack, kMCTrack); for (int i = 0; i < myResult.GetNEntries(); i++){ PndMCEntry myLinks = myResult.GetMCLink(i); PndTrack* myTrack = (PndTrack*)fTrack->At(i); for (int j = 0; j < myLinks.GetNLinks(); j++){ PndMCTrack* myMCTrack = (PndMCTrack*)fMCTrack->At(myLinks.GetLink(j).GetIndex()); //At this point you have access to the PndTrack and the //MCTrack belonging to the PndTrack } } }

12 Example Comparison of Momentum after Kalman Fit with MC information TrackMatch: PndTrack 0 P: GeV/c Belongs to: MCTrack 0 P: 1 GeV/c PID: 13 MCTrack 22 P: GeV/c PID:

13 Ideal track finder MC Link from: MCTrack to STTHelixHit:
0: (8/0) (8/1) (8/4) (8/5) (15/0) (15/1) (15/2) (15/3) (15/4) (15/5) (15/6) (15/7) (15/8) (15/9) (15/10) (15/11) (15/12) (15/13) (15/14) (15/15) (15/16) (15/17) (15/18) (15/19) (15/20) (15/21) (15/22) (15/23) (15/24) (10/6) (10/7) (10/8) 1: (8/2) (8/3) (8/6) (8/7) (15/25) (15/26) (15/27) (15/28) (15/29) (15/30) (15/31) (15/32) (15/33) (15/35) (15/34) (15/36) (15/37) (15/39) (15/38) (15/40) (15/41) (15/42) (15/43) (15/44) (15/45) (15/46) (15/47) (15/48) (10/4) (10/5) 2: (8/8) (8/9) (15/49) (15/50) (15/51) (15/52) (15/53) (15/54) (15/55) (15/56) (15/57) (15/58) (15/59) (15/60) (15/61) (15/62) (15/63) (15/64) (15/65) (15/66) (15/67) (15/68) (15/69) (15/70) (15/71) (15/72) (15/73) (10/2) (10/3) 8: MvdStripHit 10: MvdPixelHit 15: STTHelixHit

14 Weighting Problem: If you have more than one MCTrack belonging to one PndTrack, which is the more relevant one? Possible solutions: Count the number of traces going to the MCTrack Count number of certain data in the MCTrack Implemented: Counting of links Different weights for a single link Different weights for a group of links (MVD Hits more precise than STT Hits)

15 Real Life Example MC Info Digitization Clustering Point Reco
1: --MCTrack: 5: --MVDStripDigis: 0: (4/3) 1: (4/3) 2: (4/6) 3: (4/6) 4: (4/6) 5: (4/7) 6: (4/7) 7: (4/7) 8: --MVDStripClusterCand: 0: (5/0) 1: (5/1) 2: (5/3) (5/2) 3: (5/4) 4: (5/6) (5/5) 5: (5/7) 9: --MVDHitsStrip: 0: (8/0) 1: (8/2) 2: (8/4) 4: --MVDPoint: 0: (1/1) 1: (1/1) 2: (1/1) 3: (1/1) 4: (1/0) 5: (1/0) 6: (1/0) 7: (1/0) 10: --MVDHitsPixel: 0: (7/0) 1: (7/1) 2: (7/2) 3: (7/3) 4: (7/4) 7: --MVDClusterCand: 0: (6/0) (6/1) 1: (6/2) (6/3) 2: (6/4) (6/5) 3: (6/6) (6/7) (6/8) 4: (6/9) (6/10) 6: --MVDPixelDigis: 0: (4/0) 1: (4/0) 2: (4/1) 3: (4/1) 4: (4/2) 5: (4/2) 6: (4/4) 7: (4/4) 8: (4/4) 9: (4/5) 10: (4/5) Track Finder 18: --TrackCand: 0: (10/3) (10/4) (9/1) (9/2) 1: (10/0) (10/1) (10/2) (9/0) PndMCMatchSelectorTask (kTrackCand, kMCTrack) MC Link from: TrackCand to MCTrack: (1/0) (1/1)

16 Real Life Example MC Info Digitization Clustering Point Reco
1: --MCTrack: 5: --MVDStripDigis: 0: (4/3) 1: (4/3) 2: (4/6) 3: (4/6) 4: (4/6) 5: (4/7) 6: (4/7) 7: (4/7) 8: --MVDStripClusterCand: 0: (5/0) 1: (5/1) 2: (5/3) (5/2) 3: (5/4) 4: (5/6) (5/5) 5: (5/7) 9: --MVDHitsStrip: 0: (8/0) 1: (8/2) 2: (8/4) 4: --MVDPoint: 0: (1/1) 1: (1/1) 2: (1/1) 3: (1/1) 4: (1/0) 5: (1/0) 6: (1/0) 7: (1/0) 10: --MVDHitsPixel: 0: (7/0) 1: (7/1) 2: (7/2) 3: (7/3) 4: (7/4) 7: --MVDClusterCand: 0: (6/0) (6/1) 1: (6/2) (6/3) 2: (6/4) (6/5) 3: (6/6) (6/7) (6/8) 4: (6/9) (6/10) 6: --MVDPixelDigis: 0: (4/0) 1: (4/0) 2: (4/1) 3: (4/1) 4: (4/2) 5: (4/2) 6: (4/4) 7: (4/4) 8: (4/4) 9: (4/5) 10: (4/5) Track Finder 18: --TrackCand: 0: (10/3) (10/4) (9/1) (9/2) (10/0) 1: (10/0) (10/1) (10/2) (9/0) PndMCMatchSelectorTask (kTrackCand, kMCTrack) (1/0) (1/1) Count traces: Count MCPoints: Give Weight 2 to StipHits: 6 1 MC Link from: TrackCand to MCTrack: (1/0/11) (1/1/2) (1/1)

17 Summary and Further Steps
Basic functionality is finished Links by themselves are powerful tools for analysis of data Allows easy access to MC data combined with a high degree of flexibility Code is available at SVN: /pandaroot/development/MCPropagation_TS Next steps: Connection to MicroCandidates (help from Klaus needed) Planned code merge into trunk after DPG meeting


Download ppt "Distribution of MC Information"

Similar presentations


Ads by Google