All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
ThrustReconstruction.h
Go to the documentation of this file.
1 #ifndef ThrustReconstruction_h
2 #define ThrustReconstruction_h 1
3 #include <vector>
4 #include "marlin/Processor.h"
5 #include "lcio.h"
6 #include <iostream>
7 #include <string>
8 #include <IMPL/ReconstructedParticleImpl.h>
9 
10 #include <CLHEP/Vector/ThreeVector.h>
11 #include <CLHEP/Random/RanluxEngine.h>
12 
13 namespace CLHEP{} // declare namespace CLHEP for backward compatibility
14 using namespace CLHEP ;
15 
16 
17 using namespace lcio ;
18 using namespace marlin ;
19 
20 
21 
22 /** Thrust processor for marlin.
23  * Calculates the thrust axis and thrust value for each event using two
24  * different algorithms:
25  * Tasso algorithm --- calculates only the principle thrust value and axis
26  * Jetnet algorithm --- calculates the principle thrust value and axis
27  * the major thrust value and axis
28  * the minor thrust value and axis
29  */
30 class ThrustReconstruction : public Processor {
31 
32 public:
33 
35  ThrustReconstruction& operator=(const ThrustReconstruction&) = delete;
36 
37  virtual Processor* newProcessor() { return new ThrustReconstruction;}
38 
39 
41 
42  /** Called at the begin of the job before anything is read.
43  * Use to initialize the processor, e.g. book histograms.
44  */
45  virtual void init() ;
46 
47  /** Called for every run.
48  */
49  virtual void processRunHeader( LCRunHeader* run ) ;
50  virtual void modifyRunHeader( LCRunHeader* /*run*/ ) {}
51 
52  /** Called for every event - the working horse.
53  */
54  virtual void processEvent( LCEvent * evt ) ;
55  virtual void modifyEvent( LCEvent * /*evt*/ ) {}
56 
57 
58 
59 
60  /** Called after data processing for clean up.
61  */
62  virtual void end() ;
63 
64 protected:
65  int TassoThrust();
66  int JetsetThrust();
67  double sign(double a,double b);
68  double min(double a,double b);
69 
70  /** Input collection name.
71  */
72 
73  std::string _inputCollectionName{};
74  int _typeOfThrustFinder{};
75 
76  float _principleThrustValue{};
77  float _majorThrustValue{};
78  float _minorThrustValue{};
79  Hep3Vector _principleThrustAxis{};
80  Hep3Vector _majorThrustAxis{};
81  Hep3Vector _minorThrustAxis{};
82  float _min{},_max{};
83  LCCollection* _inParVec{};
84  std::vector<Hep3Vector> _partMom{};
85  std::string filename{};
86  RanluxEngine myrnd{};
87 } ;
88 
89 #endif
virtual Processor * newProcessor()
Thrust processor for marlin.
virtual void modifyRunHeader(LCRunHeader *)
virtual void modifyEvent(LCEvent *)