#ifndef _InteractionFinder_hh_ #define _InteractionFinder_hh_ #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include #include #include // FIXME: Should go into another namespace (?) namespace CALICE { /** Simple class to find a "first interaction" layer. * This processor applies criteria on energy deposition and * assigns the interaction layer to the event. * First criteria is the energy deposited in a given number of layers * Second criteria is the relative increase in the energy between 3 consecutive layers */ class InteractionFinder : public marlin::Processor { public: Processor* newProcessor() { return new InteractionFinder ; } InteractionFinder(); ~InteractionFinder() {}; /** Called at the begin of the job before anything is read. * Use to initialize the processor, e.g. book histograms. */ void init(); /** Called for every run, e.g. overwrite to initialize run dependent * histograms. */ void processRunHeader( LCRunHeader* run) { } /** Called for every event - the working horse. */ void processEvent( LCEvent * evtP ); void end(); protected: Float_t _Ecut; /**< Energy cut in MIPs (Marlin processor parameter).*/ Float_t _Fcut; /**< Fraction of increase in energy cut (Marlin processor parameter).*/ std::string _colName; /**< name of the hit input collection (Marlin processor parameter). The output will be written in its parameters*/ Bool_t _isInteraction; /**< is there an interaction found ?*/ Bool_t _isFireBall; /**< is it a fireball event ?*/ Bool_t _isPeak; /**< is it a peaked event ?*/ Int_t _InteractionLayer; /**< first interaction layer found by the test in [0,29].*/ private: }; } #endif