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.29 2007/09/27 22:31:18 ratnik Exp $
16 // $Log: L1ParticleMap.h,v $
17 // Revision 1.29 2007/09/27 22:31:18 ratnik
18 // QA campaign: merge includechecker changes back into the head, corresponding fixes being done in dependent packages
19 //
20 // Revision 1.28 2007/08/08 03:49:03 wsun
21 // Diffractive trigger threshold update from X. Rouby.
22 //
23 // Revision 1.27 2007/08/07 01:18:15 wsun
24 // Added JetMET calibration triggers from Len.
25 //
26 // Revision 1.26 2007/07/31 15:20:14 ratnik
27 // QA campaign: include cleanup based on CMSSW_1_7_X_2007-07-30-1600 includechecker results.
28 //
29 // Revision 1.25 2007/07/14 19:03:25 wsun
30 // Added diffractive triggers from X. Rouby and S. Ovyn.
31 //
32 // Revision 1.24 2007/06/16 16:50:03 wsun
33 // Added SingleTauJet35 and DoubleTauJet35 for 131HLT6.
34 //
35 // Revision 1.23 2007/06/15 19:27:31 wsun
36 // New L1 trigger table for 131HLT6.
37 //
38 // Revision 1.22 2007/06/03 00:06:30 wsun
39 // Revision of L1 trigger table for 131HLT5.
40 //
41 // Revision 1.21 2007/06/01 02:57:11 wsun
42 // New L1 trigger table for 131HLT5.
43 //
44 // Revision 1.20 2007/05/23 05:09:09 wsun
45 // L1 trigger table for 131HLT4.
46 //
47 // Revision 1.19 2007/05/15 14:52:40 wsun
48 // A_Mu3_IsoEG15 -> A_Mu7_IsoEG10
49 //
50 // Revision 1.18 2007/05/11 04:59:32 wsun
51 // Retweaked trigger table.
52 //
53 // Revision 1.17 2007/04/30 21:00:39 wsun
54 // QuadJet50 -> QuadJet20
55 //
56 // Revision 1.16 2007/04/23 18:33:31 wsun
57 // Another iteration of the L1 trigger table.
58 //
59 // Revision 1.15 2007/04/22 22:35:47 wsun
60 // Updated L1 trigger table yet again.
61 //
62 // Revision 1.14 2007/04/16 21:15:46 wsun
63 // Tweaks to trigger table for 131HLT.
64 //
65 // Revision 1.13 2007/04/13 17:50:46 wsun
66 // New trigger table for HLT exercise.
67 //
68 // Revision 1.12 2007/04/02 08:03:13 wsun
69 // Updated Doxygen documentation.
70 //
71 // Revision 1.11 2006/08/31 10:23:32 wsun
72 // Added MinBias trigger.
73 //
74 // Revision 1.10 2006/08/28 03:10:40 wsun
75 // Revamped L1ParticleMap to handle OR triggers.
76 //
77 // Revision 1.9 2006/08/23 23:09:04 wsun
78 // Separated iso/non-iso EM triggers and RefVectors.
79 //
80 // Revision 1.8 2006/08/10 18:47:41 wsun
81 // Removed L1PhysObjectBase; particle classes now derived from LeafCandidate.
82 //
83 // Revision 1.7 2006/08/06 15:32:26 wsun
84 // Added comment.
85 //
86 // Revision 1.6 2006/08/04 03:30:47 wsun
87 // Separated tau/jet bookkeeping, added static function objectTypeIsGlobal().
88 //
89 // Revision 1.5 2006/08/02 20:48:55 wsun
90 // Added more trigger lines, added mapping for global objects.
91 //
92 // Revision 1.4 2006/08/02 14:21:33 wsun
93 // Added trigger name dictionary, moved particle type enum to L1ParticleMap.
94 //
95 // Revision 1.3 2006/07/26 20:41:30 wsun
96 // Added implementation of L1ParticleMap.
97 //
98 // Revision 1.2 2006/07/26 00:05:39 wsun
99 // Structural mods for HLT use.
100 //
101 // Revision 1.1 2006/07/17 20:35:19 wsun
102 // First draft.
103 //
104 //
105 
106 // system include files
107 #include <string>
108 
109 // user include files
115 
116 // forward declarations
117 
118 namespace l1extra {
119 
121  {
122 
123  public:
125  {
126  kEM, // = isolated or non-isolated
127  kJet, // = central, forward, or tau
133  } ;
134 
135  // For now, use trigger menu from PTDR:
136  // http://monicava.web.cern.ch/monicava/hlt_rates.htm#l1bits
137 
138  // RelaxedEM = isolated OR non-isolated
139  // Jet = central OR forward OR tau
140 
142  {
267  } ;
268 
269  typedef std::vector< unsigned int > L1IndexCombo ;
270  typedef std::vector< L1IndexCombo > L1IndexComboVector ;
271  typedef std::vector< L1ObjectType > L1ObjectTypeVector ;
272 
273  L1ParticleMap();
276  bool triggerDecision,
288  ) ;
289 
290  virtual ~L1ParticleMap();
291 
292  // ---------- const member functions ---------------------
294  { return triggerType_ ; }
295 
296  const std::string& triggerName() const
297  { return triggerName( triggerType_ ) ; }
298 
299  bool triggerDecision() const
300  { return triggerDecision_ ; }
301 
302  // Indices of object types (see the above enum), that participated
303  // in this trigger. The order of these type indices corresponds to
304  // the particles listed in each L1IndexCombo.
306  { return objectTypes_ ; }
307 
308  // Number of objects that participated in this trigger.
309  int numOfObjects() const
310  { return objectTypes_.size() ; }
311 
313  { return emParticles_ ; }
314 
316  { return jetParticles_ ; }
317 
319  { return muonParticles_ ; }
320 
322  { return etMissParticle_ ; }
323 
324  // If there are zero or one non-global objects, then there is no need
325  // to store the object combinations. In this case, the stored
326  // vector m_objectCombinations will be empty, and it will be
327  // filled upon request at analysis time.
328  const L1IndexComboVector& indexCombos() const ;
329 
330  // These functions retrieve the object corresponding to a
331  // particular entry in a given combination. The pointer is null
332  // if an error occurs (e.g. the particle requested does not match
333  // the type of the function).
335  int aIndexInCombo, const L1IndexCombo& aCombo ) const ;
336 
338  int aIndexInCombo, const L1IndexCombo& aCombo ) const ;
339 
341  int aIndexInCombo, const L1IndexCombo& aCombo ) const ;
342 
344  int aIndexInCombo, const L1IndexCombo& aCombo ) const ;
345 
346  // This function just returns the single global object.
348  int aIndexInCombo, const L1IndexCombo& aCombo ) const ;
349 
350  // For a given particle combination, convert all the particles to
351  // reco::LeafCandidate pointers.
352  std::vector< const reco::LeafCandidate* > candidateCombo(
353  const L1IndexCombo& aCombo ) const ;
354 
355  // ---------- static member functions --------------------
356  static const std::string& triggerName( L1TriggerType type ) ;
357  static L1TriggerType triggerType( const std::string& name ) ;
358  static bool objectTypeIsGlobal( L1ObjectType type ) ;
359 
360  // ---------- member functions ---------------------------
361 
362  private:
363  // L1ParticleMap(const L1ParticleMap&); // stop default
364 
365  // const L1ParticleMap& operator=(const L1ParticleMap&); // stop default
366 
367  // ---------- member data --------------------------------
368 
369  // Index into trigger menu.
371 
373 
374  // Vector of length numOfObjects() that gives the
375  // type of each trigger object.
377 
378  // Lists of particles that fired this trigger, perhaps in combination
379  // with another particle.
383 
384  // Global (event-wide) objects. The Ref is null if the object
385  // was not used in this trigger.
387 
388  // Object combinations that fired this trigger. The inner
389  // vector< int > has length numOfObjects() and contains
390  // references to the elements in emParticles_, jetParticles_, and
391  // muonParticles_ for a successful combination. A dummy index is
392  // entered for each global object in the trigger. The object type
393  // of each entry is given by objectTypes_.
394  //
395  // This data member is mutable because if #particles = 1, then this
396  // vector is empty and is filled on request.
398 
399  // Static array of trigger names.
401  };
402 
403 }
404 
405 #endif
std::vector< L1EmParticleRef > L1EmParticleVectorRef
type
Definition: HCALResponse.h:21
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