/
FwdMcTrackMapper.h
44 lines (32 loc) · 1023 Bytes
/
FwdMcTrackMapper.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//
// AYK (ayk@bnl.gov)
//
// Code helping to remap MC tracks into RC ones;
//
//
#include <map>
#include <TObject.h>
#include <TClonesArray.h>
#include <PndMCTrack.h>
#include <FwdMatchCandidate.h>
#ifndef _FWD_MC_TRACK_MAPPER_
#define _FWD_MC_TRACK_MAPPER_
class FwdMcTrackMapper: public TObject
{
public:
FwdMcTrackMapper(TClonesArray *mcarr = 0, TClonesArray *rcarr = 0):
mcTrackArray(mcarr), rcTrackArray(rcarr) {};
~FwdMcTrackMapper() {};
int Rebuild();
// FIXME: not exactly efficient stuff; first call allows to get number
// of RC tracks which associated themselves with this particular MC track;
// second call basically builds the same pair of iterators and pulls out
// N-th track out of the matching set;
unsigned GetRcTrackCount(PndMCTrack *mctrack);
FwdMatchCandidate *GetRcTrack(PndMCTrack *mctrack, unsigned id);
private:
TClonesArray *mcTrackArray, *rcTrackArray;
std::multimap<PndMCTrack*, FwdMatchCandidate*> mMcToRcMap;
ClassDef(FwdMcTrackMapper,2);
};
#endif