CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1ParticleMap.h
Go to the documentation of this file.
1 #ifndef L1Trigger_L1ParticleMap_h
2 #define L1Trigger_L1ParticleMap_h
3 // -*- C++ -*-
4 //
5 // Package: L1Trigger
6 // Class : L1ParticleMap
7 //
12 //
13 // Original Author: Werner Sun
14 // Created: Fri Jul 14 19:46:30 EDT 2006
15 // $Id: L1ParticleMap.h,v 1.28 2007/08/08 03:49:03 wsun Exp $
16 // $Log: L1ParticleMap.h,v $
17 // Revision 1.28 2007/08/08 03:49:03 wsun
18 // Diffractive trigger threshold update from X. Rouby.
19 //
20 // Revision 1.27 2007/08/07 01:18:15 wsun
21 // Added JetMET calibration triggers from Len.
22 //
23 // Revision 1.26 2007/07/31 15:20:14 ratnik
24 // QA campaign: include cleanup based on CMSSW_1_7_X_2007-07-30-1600 includechecker results.
25 //
26 // Revision 1.25 2007/07/14 19:03:25 wsun
27 // Added diffractive triggers from X. Rouby and S. Ovyn.
28 //
29 // Revision 1.24 2007/06/16 16:50:03 wsun
30 // Added SingleTauJet35 and DoubleTauJet35 for 131HLT6.
31 //
32 // Revision 1.23 2007/06/15 19:27:31 wsun
33 // New L1 trigger table for 131HLT6.
34 //
35 // Revision 1.22 2007/06/03 00:06:30 wsun
36 // Revision of L1 trigger table for 131HLT5.
37 //
38 // Revision 1.21 2007/06/01 02:57:11 wsun
39 // New L1 trigger table for 131HLT5.
40 //
41 // Revision 1.20 2007/05/23 05:09:09 wsun
42 // L1 trigger table for 131HLT4.
43 //
44 // Revision 1.19 2007/05/15 14:52:40 wsun
45 // A_Mu3_IsoEG15 -> A_Mu7_IsoEG10
46 //
47 // Revision 1.18 2007/05/11 04:59:32 wsun
48 // Retweaked trigger table.
49 //
50 // Revision 1.17 2007/04/30 21:00:39 wsun
51 // QuadJet50 -> QuadJet20
52 //
53 // Revision 1.16 2007/04/23 18:33:31 wsun
54 // Another iteration of the L1 trigger table.
55 //
56 // Revision 1.15 2007/04/22 22:35:47 wsun
57 // Updated L1 trigger table yet again.
58 //
59 // Revision 1.14 2007/04/16 21:15:46 wsun
60 // Tweaks to trigger table for 131HLT.
61 //
62 // Revision 1.13 2007/04/13 17:50:46 wsun
63 // New trigger table for HLT exercise.
64 //
65 // Revision 1.12 2007/04/02 08:03:13 wsun
66 // Updated Doxygen documentation.
67 //
68 // Revision 1.11 2006/08/31 10:23:32 wsun
69 // Added MinBias trigger.
70 //
71 // Revision 1.10 2006/08/28 03:10:40 wsun
72 // Revamped L1ParticleMap to handle OR triggers.
73 //
74 // Revision 1.9 2006/08/23 23:09:04 wsun
75 // Separated iso/non-iso EM triggers and RefVectors.
76 //
77 // Revision 1.8 2006/08/10 18:47:41 wsun
78 // Removed L1PhysObjectBase; particle classes now derived from LeafCandidate.
79 //
80 // Revision 1.7 2006/08/06 15:32:26 wsun
81 // Added comment.
82 //
83 // Revision 1.6 2006/08/04 03:30:47 wsun
84 // Separated tau/jet bookkeeping, added static function objectTypeIsGlobal().
85 //
86 // Revision 1.5 2006/08/02 20:48:55 wsun
87 // Added more trigger lines, added mapping for global objects.
88 //
89 // Revision 1.4 2006/08/02 14:21:33 wsun
90 // Added trigger name dictionary, moved particle type enum to L1ParticleMap.
91 //
92 // Revision 1.3 2006/07/26 20:41:30 wsun
93 // Added implementation of L1ParticleMap.
94 //
95 // Revision 1.2 2006/07/26 00:05:39 wsun
96 // Structural mods for HLT use.
97 //
98 // Revision 1.1 2006/07/17 20:35:19 wsun
99 // First draft.
100 //
101 //
102 
103 // system include files
104 #include <string>
105 
106 // user include files
112 
113 // forward declarations
114 
115 namespace l1extra {
116 
118  {
119 
120  public:
122  {
123  kEM, // = isolated or non-isolated
124  kJet, // = central, forward, or tau
130  } ;
131 
132  // For now, use trigger menu from PTDR:
133  // http://monicava.web.cern.ch/monicava/hlt_rates.htm#l1bits
134 
135  // RelaxedEM = isolated OR non-isolated
136  // Jet = central OR forward OR tau
137 
139  {
264  } ;
265 
266  typedef std::vector< unsigned int > L1IndexCombo ;
267  typedef std::vector< L1IndexCombo > L1IndexComboVector ;
268  typedef std::vector< L1ObjectType > L1ObjectTypeVector ;
269 
270  L1ParticleMap();
273  bool triggerDecision,
285  ) ;
286 
287  virtual ~L1ParticleMap();
288 
289  // ---------- const member functions ---------------------
291  { return triggerType_ ; }
292 
293  const std::string& triggerName() const
294  { return triggerName( triggerType_ ) ; }
295 
296  bool triggerDecision() const
297  { return triggerDecision_ ; }
298 
299  // Indices of object types (see the above enum), that participated
300  // in this trigger. The order of these type indices corresponds to
301  // the particles listed in each L1IndexCombo.
303  { return objectTypes_ ; }
304 
305  // Number of objects that participated in this trigger.
306  int numOfObjects() const
307  { return objectTypes_.size() ; }
308 
310  { return emParticles_ ; }
311 
313  { return jetParticles_ ; }
314 
316  { return muonParticles_ ; }
317 
319  { return etMissParticle_ ; }
320 
321  // If there are zero or one non-global objects, then there is no need
322  // to store the object combinations. In this case, the stored
323  // vector m_objectCombinations will be empty, and it will be
324  // filled upon request at analysis time.
325  const L1IndexComboVector& indexCombos() const ;
326 
327  // These functions retrieve the object corresponding to a
328  // particular entry in a given combination. The pointer is null
329  // if an error occurs (e.g. the particle requested does not match
330  // the type of the function).
332  int aIndexInCombo, const L1IndexCombo& aCombo ) const ;
333 
335  int aIndexInCombo, const L1IndexCombo& aCombo ) const ;
336 
338  int aIndexInCombo, const L1IndexCombo& aCombo ) const ;
339 
341  int aIndexInCombo, const L1IndexCombo& aCombo ) const ;
342 
343  // This function just returns the single global object.
345  int aIndexInCombo, const L1IndexCombo& aCombo ) const ;
346 
347  // For a given particle combination, convert all the particles to
348  // reco::LeafCandidate pointers.
349  std::vector< const reco::LeafCandidate* > candidateCombo(
350  const L1IndexCombo& aCombo ) const ;
351 
352  // ---------- static member functions --------------------
353  static const std::string& triggerName( L1TriggerType type ) ;
354  static L1TriggerType triggerType( const std::string& name ) ;
355  static bool objectTypeIsGlobal( L1ObjectType type ) ;
356 
357  // ---------- member functions ---------------------------
358 
359  private:
360  // L1ParticleMap(const L1ParticleMap&); // stop default
361 
362  // const L1ParticleMap& operator=(const L1ParticleMap&); // stop default
363 
364  // ---------- member data --------------------------------
365 
366  // Index into trigger menu.
368 
370 
371  // Vector of length numOfObjects() that gives the
372  // type of each trigger object.
374 
375  // Lists of particles that fired this trigger, perhaps in combination
376  // with another particle.
380 
381  // Global (event-wide) objects. The Ref is null if the object
382  // was not used in this trigger.
384 
385  // Object combinations that fired this trigger. The inner
386  // vector< int > has length numOfObjects() and contains
387  // references to the elements in emParticles_, jetParticles_, and
388  // muonParticles_ for a successful combination. A dummy index is
389  // entered for each global object in the trigger. The object type
390  // of each entry is given by objectTypes_.
391  //
392  // This data member is mutable because if #particles = 1, then this
393  // vector is empty and is filled on request.
395 
396  // Static array of trigger names.
397  static std::string triggerNames_[ kNumOfL1TriggerTypes ] ;
398  };
399 
400 }
401 
402 #endif
std::vector< L1EmParticleRef > L1EmParticleVectorRef
type
Definition: HCALResponse.h:22
std::vector< L1JetParticleRef > L1JetParticleVectorRef
const L1EtMissParticleRefProd & etMissParticle() const
const std::string & triggerName() const
const L1JetParticle * jetParticleInCombo(int aIndexInCombo, const L1IndexCombo &aCombo) const
L1IndexComboVector indexCombos_
const L1MuonParticleVectorRef & muonParticles() const
const L1EtMissParticle * etMissParticleInCombo(int aIndexInCombo, const L1IndexCombo &aCombo) const
int numOfObjects() const
std::vector< unsigned int > L1IndexCombo
bool triggerDecision() const
const L1MuonParticle * muonParticleInCombo(int aIndexInCombo, const L1IndexCombo &aCombo) const
std::vector< L1IndexCombo > L1IndexComboVector
const L1EmParticleVectorRef & emParticles() const
L1EtMissParticleRefProd etMissParticle_
const L1EmParticle * emParticleInCombo(int aIndexInCombo, const L1IndexCombo &aCombo) const
const L1JetParticleVectorRef & jetParticles() const
std::vector< const reco::LeafCandidate * > candidateCombo(const L1IndexCombo &aCombo) const
L1EmParticleVectorRef emParticles_
L1MuonParticleVectorRef muonParticles_
static std::string triggerNames_[kNumOfL1TriggerTypes]
static bool objectTypeIsGlobal(L1ObjectType type)
L1TriggerType triggerType() const
const reco::LeafCandidate * candidateInCombo(int aIndexInCombo, const L1IndexCombo &aCombo) const
const L1IndexComboVector & indexCombos() const
std::vector< L1ObjectType > L1ObjectTypeVector
edm::RefProd< L1EtMissParticle > L1EtMissParticleRefProd
std::vector< L1MuonParticleRef > L1MuonParticleVectorRef
L1JetParticleVectorRef jetParticles_
L1ObjectTypeVector objectTypes_
L1TriggerType triggerType_
const L1ObjectTypeVector & objectTypes() const