ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/TriggerObjectBase.h
Revision: 1.2
Committed: Mon Jul 13 10:38:46 2009 UTC (15 years, 9 months ago) by loizides
Content type: text/plain
Branch: MAIN
Changes since 1.1: +14 -13 lines
Log Message:
Better name for tag input name index

File Contents

# User Rev Content
1 loizides 1.1 //--------------------------------------------------------------------------------------------------
2 loizides 1.2 // $Id: TriggerObjectBase.h,v 1.1 2009/07/13 09:42:15 loizides Exp $
3 loizides 1.1 //
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 loizides 1.2 TriggerObjectBase() : fId(0), fType(0), fTagInd(-1) {}
24 loizides 1.1 TriggerObjectBase(Int_t id, Char_t type, const FourVectorM32 &mom) :
25 loizides 1.2 fId(id), fMom(mom), fType(type), fTagInd(-1) {}
26 loizides 1.1 TriggerObjectBase(Int_t id, Char_t type,
27     Double_t pt, Double_t eta, Double_t phi, Double_t mass) :
28 loizides 1.2 fId(id), fMom(pt,eta,phi,mass), fType(type), fTagInd(-1) {}
29 loizides 1.1
30 loizides 1.2 Bool_t HasType() { return fType!=0; }
31     Int_t Id() const { return fId; }
32     Bool_t IsHLT() { return fType>0; }
33     Bool_t IsL1() { return fType<0; }
34     EObjType ObjType() const { return kTriggerObjectBase; }
35     Short_t TagInd() const { return fTagInd; }
36     Int_t Type() const { return fType; }
37     void SetTagInd(Short_t i) { fTagInd = i; }
38     void SetType(Char_t t) { fType = t; }
39 loizides 1.1
40     protected:
41     void GetMom() const;
42    
43     Int_t fId; //id or physics type (similar to pdgId)
44     Vect4M fMom; //object momentum
45     Char_t fType; //trigger type
46 loizides 1.2 Short_t fTagInd; //tag name index of original input tag
47 loizides 1.1
48     ClassDef(TriggerObjectBase, 2) // Trigger object base class
49     };
50     }
51    
52     //--------------------------------------------------------------------------------------------------
53     inline void mithep::TriggerObjectBase::GetMom() const
54     {
55     // Get momentum values from stored values.
56    
57     fCachedMom.SetCoordinates(fMom.Pt(),fMom.Eta(),fMom.Phi(),fMom.M());
58     }
59     #endif