SND@LHC Software
Loading...
Searching...
No Matches
Hit2MCPoints.h
Go to the documentation of this file.
1#ifndef HIT2MCPOINTS_H
2#define HIT2MCPOINTS_H 1
3
4#include "TObject.h" //
5#include "Rtypes.h" // for Double_t, Int_t, Double32_t, etc
6#include <unordered_map>
7
8#ifndef __CINT__
9#include <boost/serialization/access.hpp>
10#include <boost/serialization/base_object.hpp>
11#endif //__CINT__
12
13class Hit2MCPoints : public TObject
14{
15
16 public:
17
20
22 Hit2MCPoints(const Hit2MCPoints& ti);
23
24 void Add(int detID,int key, float w);
25
27 virtual ~Hit2MCPoints();
28
30 unsigned int N(int detID){return linksToMCPoints[detID].size();}
31 std::unordered_map<int,float> wList(int detID){return linksToMCPoints[detID];}
32
33 /*** Output to screen */
34 virtual void Print(const Option_t* opt ="") const {;}
35
36 template<class Archive>
37 void serialize(Archive& ar, const unsigned int version)
38 {
39 ar& boost::serialization::base_object<TObject>(*this);
41 }
42
43 protected:
44#ifndef __CINT__ // for BOOST serialization
46#endif // for BOOST serialization
47 std::unordered_map<int,std::unordered_map<int,float>> linksToMCPoints;
49};
50
51#endif
ClassDef(Hit2MCPoints, 1)
void serialize(Archive &ar, const unsigned int version)
virtual ~Hit2MCPoints()
void Add(int detID, int key, float w)
virtual void Print(const Option_t *opt="") const
std::unordered_map< int, std::unordered_map< int, float > > linksToMCPoints
array of detector elements with list of contributing MCPoints
unsigned int N(int detID)
friend class boost::serialization::access
std::unordered_map< int, float > wList(int detID)