Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "icetray/I3Tray.h"
- #include "icetray/I3Frame.h"
- #include "dataclasses/physics/I3MCHit.h"
- #include "dataclasses/geometry/I3Geometry.h"
- #include "dataclasses/I3Units.h"
- #include "dataclasses/physics/I3Particle.h"
- #include "dataclasses/physics/I3MCTree.h"
- #include "dataclasses/physics/I3MCTreeUtils.h"
- #include "phys-services/I3RandomService.h"
- #include "monopole-propagator/HIT_Test_Module.h"
- #include "fstream"
- I3_MODULE(HIT_Test_Module);
- HIT_Test_Module::HIT_Test_Module(const I3Context& ctx) :
- I3Module(ctx),
- mcMAP_("MCHitSeriesMap")
- {
- AddParameter("MCHitSeriesName","Name of I3MCHitSeriesMap",mcMAP_);
- AddOutBox("OutBox");
- }
- HIT_Test_Module::~HIT_Test_Module()
- {
- }
- //__________________________________________________________
- void HIT_Test_Module::Configure()
- {
- GetParameter("MCHitSeriesName",mcMAP_);
- }
- void HIT_Test_Module::Physics(I3FramePtr frame)
- {
- I3MCHitSeries mchits;
- double hit_time = 0;
- for(int i(0);i<=100;i++)
- {
- I3MCHit hit;
- if ( i==0 ) hit_time = 936990;
- if ( i==100 ) hit_time = 1.17422e+06;
- hit_time += (i+1) *I3Units::ns;
- hit.SetTime(hit_time);
- mchits.push_back(hit);
- }
- OMKey omKey;
- unsigned int om = omKey.GetOM();
- I3MCHitSeriesMapPtr mcMap(new I3MCHitSeriesMap());
- if ( omKey.GetString()==66 ){
- for(om=22;om<26;om++)
- {
- omKey.SetOM(om);
- (*mcMap)[omKey] = mchits;
- }
- }
- frame->Put(mcMAP_,mcMap);
- PushFrame(frame,"OutBox");
- }
Add Comment
Please, Sign In to add comment