MpdFemtoCutMonitorHandler.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. /**
  2. * \class MpdFemtoCutMonitorHandler
  3. * \brief A handler for cut monitors
  4. *
  5. * You add cut monitors to the collection which are stored in two separate
  6. * collections - one which stores characteristics of the entities (tracks,
  7. * particles, pairs, events) that pass the respective cuts and the other for
  8. * the ones that fail the cut.
  9. *
  10. * \author Grigory Nigmatkulov (NRNU MEPhI)
  11. * \date May 18, 2019
  12. * \email nigmatkulov@gmail.com
  13. */
  14. #ifndef MpdFemtoCutMonitorHandler_h
  15. #define MpdFemtoCutMonitorHandler_h
  16. // MpdFemtoMaker headers
  17. // Base
  18. #include "MpdFemtoBaseCutMonitor.h"
  19. // Infrastructure
  20. #include "MpdFemtoTypes.h"
  21. #include "MpdFemtoEvent.h"
  22. #include "MpdFemtoTrack.h"
  23. #include "MpdFemtoV0.h"
  24. #include "MpdFemtoKink.h"
  25. #include "MpdFemtoXi.h"
  26. #include "MpdFemtoPair.h"
  27. #include "MpdFemtoParticleCollection.h"
  28. #include "MpdFemtoCutMonitorCollection.h"
  29. // ROOT headers
  30. #include "Rtypes.h"
  31. #include "TList.h"
  32. //_________________
  33. class MpdFemtoCutMonitorHandler {
  34. public:
  35. /// Default constructor
  36. MpdFemtoCutMonitorHandler();
  37. /// Copy constructor
  38. MpdFemtoCutMonitorHandler(const MpdFemtoCutMonitorHandler& copy);
  39. /// Assignment operator
  40. MpdFemtoCutMonitorHandler& operator=(const MpdFemtoCutMonitorHandler& copy);
  41. /// Destructor
  42. virtual ~MpdFemtoCutMonitorHandler();
  43. /// Return monitor collection that passed cuts
  44. MpdFemtoCutMonitorCollection* passMonitorColl() {
  45. return mPassColl;
  46. }
  47. /// Return monitor collection that failed to pass cuts
  48. MpdFemtoCutMonitorCollection* failMonitorColl() {
  49. return mFailColl;
  50. }
  51. /// Return n-th monitor that passed cut
  52. MpdFemtoBaseCutMonitor* passMonitor(int n);
  53. /// Return n-th monitor that failed to pass cut
  54. MpdFemtoBaseCutMonitor* failMonitor(int n);
  55. /// Add cut monitor
  56. void addCutMonitor(MpdFemtoBaseCutMonitor* cutMoni1, MpdFemtoBaseCutMonitor* cutMoni2);
  57. /// Add cut monitor
  58. void addCutMonitor(MpdFemtoBaseCutMonitor* cutMoni);
  59. /// Add cut monitor that will be written in case the cut will be passed
  60. void addCutMonitorPass(MpdFemtoBaseCutMonitor* cutMoni);
  61. /// Add cut monitor that will be written in case the cut will not be passed
  62. void addCutMonitorFail(MpdFemtoBaseCutMonitor* cutMoni);
  63. /// Fill cut monitor for the event
  64. void fillCutMonitor(const MpdFemtoEvent* event, bool pass);
  65. /// Fill cut monitor for the track
  66. void fillCutMonitor(const MpdFemtoTrack* track, bool pass);
  67. /// Fill cut monitor for the v0
  68. void fillCutMonitor(const MpdFemtoV0* v0, bool pass);
  69. /// Fill cut monitor for the kink
  70. void fillCutMonitor(const MpdFemtoKink* kink, bool pass);
  71. /// Fill cut monitor for the xi
  72. void fillCutMonitor(const MpdFemtoXi* xi, bool pass);
  73. /// Fill cut monitor for the pair
  74. void fillCutMonitor(const MpdFemtoPair* pair, bool pass);
  75. /// Fill cut monitor for the pair
  76. void fillCutMonitor(const MpdFemtoParticleCollection* partColl);
  77. /// Fill cut monitor for the event and collection
  78. void fillCutMonitor(const MpdFemtoEvent* event, const MpdFemtoParticleCollection* partColl);
  79. /// Fill cut monitor for two collections
  80. void fillCutMonitor(const MpdFemtoParticleCollection* partColl1, const MpdFemtoParticleCollection* partColl2);
  81. /// Call finish
  82. void finish();
  83. /// Obtain list of objects to be written as an output
  84. virtual TList *getOutputList();
  85. /// Event begin
  86. virtual void eventBegin(const MpdFemtoEvent* event);
  87. /// Event end
  88. virtual void eventEnd(const MpdFemtoEvent* event);
  89. private:
  90. /// Are the collections empty?
  91. bool mCollectionsEmpty;
  92. /// Collection of cut monitors for passed entities
  93. MpdFemtoCutMonitorCollection* mPassColl;
  94. /// Collection of cut monitors for failed entities
  95. MpdFemtoCutMonitorCollection* mFailColl;
  96. ClassDef(MpdFemtoCutMonitorHandler, 0)
  97. };
  98. #endif // #define MpdFemtoCutMonitorHandler_h