EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FwdMcTrackMapper.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file FwdMcTrackMapper.h
1 //
2 // AYK (ayk@bnl.gov)
3 //
4 // Code helping to remap MC tracks into RC ones;
5 //
6 //
7 
8 #include <map>
9 
10 #include <TObject.h>
11 #include <TClonesArray.h>
12 
13 #include <PndMCTrack.h>
14 
15 #include <FwdMatchCandidate.h>
16 
17 #ifndef _FWD_MC_TRACK_MAPPER_
18 #define _FWD_MC_TRACK_MAPPER_
19 
21 {
22  public:
23  FwdMcTrackMapper(TClonesArray *mcarr = 0, TClonesArray *rcarr = 0):
24  mcTrackArray(mcarr), rcTrackArray(rcarr) {};
26 
27  int Rebuild();
28 
29  // FIXME: not exactly efficient stuff; first call allows to get number
30  // of RC tracks which associated themselves with this particular MC track;
31  // second call basically builds the same pair of iterators and pulls out
32  // N-th track out of the matching set;
33  unsigned GetRcTrackCount(PndMCTrack *mctrack);
34  FwdMatchCandidate *GetRcTrack(PndMCTrack *mctrack, unsigned id);
35 
36  private:
37  TClonesArray *mcTrackArray, *rcTrackArray;
38 
39  std::multimap<PndMCTrack*, FwdMatchCandidate*> mMcToRcMap;
40 
42 };
43 
44 #endif