Index: trunk/MagicSoft/Mars/mtrigger/MFTriggerPattern.cc
===================================================================
--- trunk/MagicSoft/Mars/mtrigger/MFTriggerPattern.cc	(revision 5880)
+++ trunk/MagicSoft/Mars/mtrigger/MFTriggerPattern.cc	(revision 5897)
@@ -91,18 +91,13 @@
     const Byte_t u = fPattern->GetUnprescaled();
 
-    // Check whether at least one bit fits our neeeds
-    if ( (p & fMaskRequiredPrescaled) == fMaskRequiredPrescaled)
-        fResult = kTRUE;
-
-    if ( (u & fMaskRequiredUnprescaled) == fMaskRequiredUnprescaled)
-        fResult = kTRUE;
+    // Check whether all the bits required are ON
+    if ( ((p & fMaskRequiredPrescaled) == fMaskRequiredPrescaled)
+	 && ((u & fMaskRequiredUnprescaled) == fMaskRequiredUnprescaled))
+      fResult = kTRUE;
 
     // Now overwrite the result if one of the bits is denied
-    if (p & fMaskDeniedPrescaled)
-        fResult = kFALSE;
-
-    if (u & fMaskDeniedUnprescaled)
-        fResult = kFALSE;
-
+    if ( (p & fMaskDeniedPrescaled) || (u & fMaskDeniedUnprescaled) )
+      fResult = kFALSE;
+    
     return kTRUE;
 }
Index: trunk/MagicSoft/Mars/mtrigger/MFTriggerPattern.h
===================================================================
--- trunk/MagicSoft/Mars/mtrigger/MFTriggerPattern.h	(revision 5880)
+++ trunk/MagicSoft/Mars/mtrigger/MFTriggerPattern.h	(revision 5897)
@@ -10,44 +10,47 @@
 class MFTriggerPattern : public MFilter
 {
-private:
-    MTriggerPattern *fPattern;        //!
+ private:
+  MTriggerPattern *fPattern;        //!
+  
+  Byte_t fMaskRequiredPrescaled;    // Mask for filtering Trigger Pattern allowed
+  Byte_t fMaskRequiredUnprescaled;  // Mask for filtering Trigger Pattern allowed
+  Byte_t fMaskDeniedPrescaled;      // Mask for filtering Trigger Pattern denied
+  Byte_t fMaskDeniedUnprescaled;    // Mask for filtering Trigger Pattern denied
+  
+  Bool_t fResult;                   //!
+  
+  Int_t PreProcess(MParList *pList);
+  Int_t Process();
+  
+  Bool_t IsExpressionTrue() const;
+  
+ public:
+  static const Bool_t kPrescaled = kTRUE;
+  static const Bool_t kUnPrescaled = kFALSE;
 
-    Byte_t fMaskRequiredPrescaled;    // Mask for filtering Trigger Pattern allowed
-    Byte_t fMaskRequiredUnprescaled;  // Mask for filtering Trigger Pattern allowed
-    Byte_t fMaskDeniedPrescaled;      // Mask for filtering Trigger Pattern denied
-    Byte_t fMaskDeniedUnprescaled;    // Mask for filtering Trigger Pattern denied
-
-    Bool_t fResult;                   //!
-
-    Int_t PreProcess(MParList *pList);
-    Int_t Process();
-
-    Bool_t IsExpressionTrue() const;
-
-public:
-    MFTriggerPattern(const char *name=NULL, const char *title=NULL);
-    MFTriggerPattern(MFTriggerPattern &trigpatt);
-
-    void RequireTriggerLvl1(Bool_t prescaled=kFALSE);
-    void RequireTriggerLvl2(Bool_t prescaled=kFALSE);
-    void RequireCalibration(Bool_t prescaled=kFALSE);
-    void RequirePedestal(Bool_t prescaled=kFALSE);
-    void RequirePinDiode(Bool_t prescaled=kFALSE);
-
-    void DenyTriggerLvl1(Bool_t prescaled=kFALSE);
-    void DenyTriggerLvl2(Bool_t prescaled=kFALSE);
-    void DenyCalibration(Bool_t prescaled=kFALSE);
-    void DenyPedestal(Bool_t prescaled=kFALSE);
-    void DenyPinDiode(Bool_t prescaled=kFALSE);
-
-    void Require(TString patt, Bool_t prescaled=kFALSE);
-    void Deny(TString patt, Bool_t prescaled=kFALSE);
-
-    // Low level settings. USE THESE ONLY IF YOU ARE AN EXPERT!
-    void SetMaskRequired(const Byte_t mask, Bool_t prescaled=kFALSE);
-    void SetMaskDenied(const Byte_t mask, Bool_t prescaled=kFALSE);
-
-    ClassDef(MFTriggerPattern, 1) // A Filter for the Trigger Pattern
+  MFTriggerPattern(const char *name=NULL, const char *title=NULL);
+  MFTriggerPattern(MFTriggerPattern &trigpatt);
+    
+  void RequireTriggerLvl1(Bool_t prescaled=kUnPrescaled);
+  void RequireTriggerLvl2(Bool_t prescaled=kUnPrescaled);
+  void RequireCalibration(Bool_t prescaled=kUnPrescaled);
+  void RequirePedestal(Bool_t prescaled=kUnPrescaled);
+  void RequirePinDiode(Bool_t prescaled=kUnPrescaled);
+  
+  void DenyTriggerLvl1(Bool_t prescaled=kUnPrescaled);
+  void DenyTriggerLvl2(Bool_t prescaled=kUnPrescaled);
+  void DenyCalibration(Bool_t prescaled=kUnPrescaled);
+  void DenyPedestal(Bool_t prescaled=kUnPrescaled);
+  void DenyPinDiode(Bool_t prescaled=kUnPrescaled);
+  
+  void Require(TString patt, Bool_t prescaled=kUnPrescaled);
+  void Deny(TString patt, Bool_t prescaled=kUnPrescaled);
+  
+  // Low level settings. USE THESE ONLY IF YOU ARE AN EXPERT!
+  void SetMaskRequired(const Byte_t mask, Bool_t prescaled=kUnPrescaled);
+  void SetMaskDenied(const Byte_t mask, Bool_t prescaled=kUnPrescaled);
+  
+  ClassDef(MFTriggerPattern, 1) // A Filter for the Trigger Pattern
 };
-
+    
 #endif
