/* * RefitTrackAction.h * * Created on: 10/may/2010 * Author: N. Mori */ #ifndef REFITTRACKACTION_H_ #define REFITTRACKACTION_H_ #include "../CollectionAction/CollectionAction.h" #include /*! @brief Track refitting. * * This action refits the TRK track using only level 2 data. This means that it will use the same * clusters which are associated to the track, with the possibility to mask or shift some of them. * For a complete reprocess and fit use #ReprocessTrackAction. */ class RefitTrackAction: public CollectionAction { public: /*! @brief Constructor * * @param actionName The action's name. * @param spreadX The width of the gaussian spread applied to all the X view coordinates, in cm. * @param spreadY The width of the gaussian spread applied to all the Y view coordinates, in cm. * @param maskedViews The excluded views. 0 means that all the views will be used, while #T6X means that the * X view of the last tracker plane will be ignored. For other combinations, sum up the values * defined in #TRKLAYERS: T1X + T1Y will exclude the whole first plane, for example. * */ RefitTrackAction(const char *actionName, float spreadX = 0., float spreadY = 0., int maskedViews = 0) : CollectionAction(actionName), _spreadX(spreadX), _spreadY(spreadY), _maskedViews(maskedViews) { } /*! @brief Destructor. */ ~RefitTrackAction() { } /* @brief The refitting procedure. * * This will refit the tracker track introducing the mask and spreads defined in the constructor. */ void OnGood(PamLevel2 *event); /*! @brief The finalization procedure. */ void Finalize() { } private: float _spreadX, _spreadY; int _maskedViews; static TRandom3 *_r3; static long int _currEvent; float _xmBackup[6], _ymBackup[6]; int _layerXBackup[6], _layerYBackup[6]; }; #endif /* REFITTRACKACTION_H_ */