ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/TriggerObjectBase.h
Revision: 1.1
Committed: Mon Jul 13 09:42:15 2009 UTC (15 years, 9 months ago) by loizides
Content type: text/plain
Branch: MAIN
Log Message:
Split trigger classes into seperate files.

File Contents

# User Rev Content
1 loizides 1.1 //--------------------------------------------------------------------------------------------------
2     // $Id: TriggerObject.h,v 1.11 2009/07/13 06:37:34 loizides Exp $
3     //
4     // TriggerObjectBase
5     //
6     // This class holds the HLT trigger object information, ie mainly the kinematics and type of
7     // trigger, as known at tree filling time.
8     //
9     // Authors: C.Loizides
10     //--------------------------------------------------------------------------------------------------
11    
12     #ifndef MITANA_DATATREE_TRIGGEROBJECTBASE_H
13     #define MITANA_DATATREE_TRIGGEROBJECTBASE_H
14    
15     #include "MitCommon/DataFormats/interface/Vect4M.h"
16     #include "MitAna/DataTree/interface/Particle.h"
17    
18     namespace mithep
19     {
20     class TriggerObjectBase : public Particle
21     {
22     public:
23     TriggerObjectBase() : fId(0), fType(0), fNameInd(-1) {}
24     TriggerObjectBase(Int_t id, Char_t type, const FourVectorM32 &mom) :
25     fId(id), fMom(mom), fType(type), fNameInd(-1) {}
26     TriggerObjectBase(Int_t id, Char_t type,
27     Double_t pt, Double_t eta, Double_t phi, Double_t mass) :
28     fId(id), fMom(pt,eta,phi,mass), fType(type), fNameInd(-1) {}
29    
30     Int_t Id() const { return fId; }
31     Bool_t IsHLT() { return fType>0; }
32     Bool_t IsL1() { return fType<0; }
33     EObjType ObjType() const { return kTriggerObjectBase; }
34     Short_t NameInd() const { return fNameInd; }
35     Int_t Type() const { return fType; }
36     void SetType(Char_t t) { fType = t; }
37     void SetNameInd(Short_t i) { fNameInd = i; }
38    
39     protected:
40     void GetMom() const;
41    
42     Int_t fId; //id or physics type (similar to pdgId)
43     Vect4M fMom; //object momentum
44     Char_t fType; //trigger type
45     Short_t fNameInd; //name index of original input tag
46    
47     ClassDef(TriggerObjectBase, 2) // Trigger object base class
48     };
49     }
50    
51     //--------------------------------------------------------------------------------------------------
52     inline void mithep::TriggerObjectBase::GetMom() const
53     {
54     // Get momentum values from stored values.
55    
56     fCachedMom.SetCoordinates(fMom.Pt(),fMom.Eta(),fMom.Phi(),fMom.M());
57     }
58     #endif