MarlinKinfitProcessors  0.4.2
PhotonResponseAdjuster.h
1 #include "marlin/Processor.h"
2 #include "EVENT/ReconstructedParticle.h"
3 #include "EVENT/MCParticle.h"
4 #include "lcio.h"
5 #include <vector>
6 #include "IMPL/LCCollectionVec.h"
7 //#include "TFile.h"
8 #include "TLorentzVector.h"
9 #include "IMPL/ParticleIDImpl.h"
10 #include "IMPL/ReconstructedParticleImpl.h"
11 #include "TRandom3.h"
12 
13 using namespace lcio ;
21  class PhotonResponseAdjuster : public marlin::Processor {
22 
23  public:
24 
25  virtual marlin::Processor* newProcessor() { return new PhotonResponseAdjuster ; }
26 
28  PhotonResponseAdjuster& operator=(const PhotonResponseAdjuster&) = delete ;
29 
31 
35  virtual void init() ;
38  virtual void processRunHeader( LCRunHeader* run ) ;
39 
42  virtual void processEvent( LCEvent * evt ) ;
43 
44 
47  virtual void end() ;
48 
49  bool FindMCParticles( LCEvent* evt );
50  bool FindPFOs( LCEvent* evt );
51  int getCorrespondingMCParticleIndex(TLorentzVector rec);
52  double* resimulateDirection(TLorentzVector mcgamma);
53  double safeAcos(double x);
54 
55  private:
56  int _nRun{};
57  int _nEvt{};
58  std::vector<ReconstructedParticle*> _pfovec{};
59  std::vector<MCParticle*> _mcpartvec{};
60  std::vector<bool> _mcpartflags{};
61  int _printing{};
62 
63  std::string _inputParticleCollectionName{};
64  std::string _mcParticleCollectionName{};
65  std::string _outputParticleCollectionName{};
66  double _energyScaleFactor{};
67  int nrejected{};
68  //matching cuts
69  TRandom3* rng{};
70  int _smearAngles{};
71  int _angularSmearingModel{};
72  double _dTheta{};
73  double _dPhi{};
74  double _allowedEnergyDeviation{};
75  double _allowedAngularDeviation{};
76  std::string m_rootFile{};
77 };
PhotonResponseAdjuster:
Definition: PhotonResponseAdjuster.h:21