File indexing completed on 2023-10-25 09:39:26
0001 #ifndef L1Trigger_L1ParticleMap_h
0002 #define L1Trigger_L1ParticleMap_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061
0062
0063
0064
0065
0066
0067
0068
0069
0070
0071
0072
0073
0074
0075
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102 #include <string>
0103 #if !defined(__CINT__) && !defined(__MAKECINT__) && !defined(__REFLEX__)
0104 #include <atomic>
0105 #endif
0106
0107 #include "DataFormats/L1Trigger/interface/L1EmParticleFwd.h"
0108 #include "DataFormats/L1Trigger/interface/L1JetParticleFwd.h"
0109 #include "DataFormats/L1Trigger/interface/L1MuonParticleFwd.h"
0110 #include "DataFormats/L1Trigger/interface/L1EtMissParticle.h"
0111 #include "DataFormats/L1Trigger/interface/L1EtMissParticleFwd.h"
0112
0113
0114
0115 namespace l1extra {
0116
0117 class L1ParticleMap {
0118 public:
0119 enum L1ObjectType {
0120 kEM,
0121 kJet,
0122 kMuon,
0123 kEtMiss,
0124 kEtTotal,
0125 kEtHad,
0126 kNumOfL1ObjectTypes
0127 };
0128
0129
0130
0131
0132
0133
0134
0135 enum L1TriggerType {
0136 kSingleMu3,
0137 kSingleMu5,
0138 kSingleMu7,
0139 kSingleMu10,
0140 kSingleMu14,
0141 kSingleMu20,
0142 kSingleMu25,
0143 kSingleIsoEG5,
0144 kSingleIsoEG8,
0145 kSingleIsoEG10,
0146 kSingleIsoEG12,
0147 kSingleIsoEG15,
0148 kSingleIsoEG20,
0149 kSingleIsoEG25,
0150 kSingleEG5,
0151 kSingleEG8,
0152 kSingleEG10,
0153 kSingleEG12,
0154 kSingleEG15,
0155 kSingleEG20,
0156 kSingleEG25,
0157 kSingleJet15,
0158 kSingleJet20,
0159 kSingleJet30,
0160 kSingleJet50,
0161 kSingleJet70,
0162 kSingleJet100,
0163 kSingleJet150,
0164 kSingleJet200,
0165 kSingleTauJet10,
0166 kSingleTauJet20,
0167 kSingleTauJet30,
0168 kSingleTauJet35,
0169 kSingleTauJet40,
0170 kSingleTauJet60,
0171 kSingleTauJet80,
0172 kSingleTauJet100,
0173 kHTT100,
0174 kHTT200,
0175 kHTT250,
0176 kHTT300,
0177 kHTT400,
0178 kHTT500,
0179 kETM10,
0180 kETM15,
0181 kETM20,
0182 kETM30,
0183 kETM40,
0184 kETM50,
0185 kETM60,
0186 kETT60,
0187 kDoubleMu3,
0188 kDoubleIsoEG8,
0189 kDoubleIsoEG10,
0190 kDoubleEG5,
0191 kDoubleEG10,
0192 kDoubleEG15,
0193 kDoubleJet70,
0194 kDoubleJet100,
0195 kDoubleTauJet20,
0196 kDoubleTauJet30,
0197 kDoubleTauJet35,
0198 kDoubleTauJet40,
0199 kMu3_IsoEG5,
0200 kMu5_IsoEG10,
0201 kMu3_EG12,
0202 kMu3_Jet15,
0203 kMu5_Jet15,
0204 kMu3_Jet70,
0205 kMu5_Jet20,
0206 kMu5_TauJet20,
0207 kMu5_TauJet30,
0208 kIsoEG10_EG10,
0209 kIsoEG10_Jet15,
0210 kIsoEG10_Jet20,
0211 kIsoEG10_Jet30,
0212 kIsoEG10_Jet70,
0213 kIsoEG10_TauJet20,
0214 kIsoEG10_TauJet30,
0215 kEG10_Jet15,
0216 kEG12_Jet20,
0217 kEG12_Jet70,
0218 kEG12_TauJet40,
0219 kJet70_TauJet40,
0220 kMu3_HTT200,
0221 kIsoEG10_HTT200,
0222 kEG12_HTT200,
0223 kJet70_HTT200,
0224 kTauJet40_HTT200,
0225 kMu3_ETM30,
0226 kIsoEG10_ETM30,
0227 kEG12_ETM30,
0228 kJet70_ETM40,
0229 kTauJet20_ETM20,
0230 kTauJet30_ETM30,
0231 kTauJet30_ETM40,
0232 kHTT100_ETM30,
0233 kTripleMu3,
0234 kTripleIsoEG5,
0235 kTripleEG10,
0236 kTripleJet50,
0237 kTripleTauJet40,
0238 kDoubleMu3_IsoEG5,
0239 kDoubleMu3_EG10,
0240 kDoubleIsoEG5_Mu3,
0241 kDoubleEG10_Mu3,
0242 kDoubleMu3_HTT200,
0243 kDoubleIsoEG5_HTT200,
0244 kDoubleEG10_HTT200,
0245 kDoubleJet50_HTT200,
0246 kDoubleTauJet40_HTT200,
0247 kDoubleMu3_ETM20,
0248 kDoubleIsoEG5_ETM20,
0249 kDoubleEG10_ETM20,
0250 kDoubleJet50_ETM20,
0251 kDoubleTauJet40_ETM20,
0252 kQuadJet30,
0253 kExclusiveDoubleIsoEG4,
0254 kExclusiveDoubleJet60,
0255 kExclusiveJet25_Gap_Jet25,
0256 kIsoEG10_Jet20_ForJet10,
0257 kMinBias_HTT10,
0258 kZeroBias,
0259 kNumOfL1TriggerTypes
0260 };
0261
0262 typedef std::vector<unsigned int> L1IndexCombo;
0263 typedef std::vector<L1IndexCombo> L1IndexComboVector;
0264 typedef std::vector<L1ObjectType> L1ObjectTypeVector;
0265
0266 L1ParticleMap();
0267 L1ParticleMap(L1TriggerType triggerType,
0268 bool triggerDecision,
0269 const L1ObjectTypeVector& objectTypes,
0270 const L1EmParticleVectorRef& emParticles = L1EmParticleVectorRef(),
0271 const L1JetParticleVectorRef& jetParticles = L1JetParticleVectorRef(),
0272 const L1MuonParticleVectorRef& muonParticles = L1MuonParticleVectorRef(),
0273 const L1EtMissParticleRefProd& etMissParticle = L1EtMissParticleRefProd(),
0274 const L1IndexComboVector& indexCombos = L1IndexComboVector());
0275 L1ParticleMap(const L1ParticleMap&);
0276 L1ParticleMap& operator=(const L1ParticleMap&);
0277
0278 virtual ~L1ParticleMap();
0279
0280 void swap(L1ParticleMap&);
0281
0282 L1TriggerType triggerType() const { return triggerType_; }
0283
0284 const std::string& triggerName() const { return triggerName(triggerType_); }
0285
0286 bool triggerDecision() const { return triggerDecision_; }
0287
0288
0289
0290
0291 const L1ObjectTypeVector& objectTypes() const { return objectTypes_; }
0292
0293
0294 int numOfObjects() const { return objectTypes_.size(); }
0295
0296 const L1EmParticleVectorRef& emParticles() const { return emParticles_; }
0297
0298 const L1JetParticleVectorRef& jetParticles() const { return jetParticles_; }
0299
0300 const L1MuonParticleVectorRef& muonParticles() const { return muonParticles_; }
0301
0302 const L1EtMissParticleRefProd& etMissParticle() const { return etMissParticle_; }
0303
0304
0305
0306
0307
0308 const L1IndexComboVector& indexCombos() const;
0309
0310
0311
0312
0313
0314 const reco::LeafCandidate* candidateInCombo(int aIndexInCombo, const L1IndexCombo& aCombo) const;
0315
0316 const L1EmParticle* emParticleInCombo(int aIndexInCombo, const L1IndexCombo& aCombo) const;
0317
0318 const L1JetParticle* jetParticleInCombo(int aIndexInCombo, const L1IndexCombo& aCombo) const;
0319
0320 const L1MuonParticle* muonParticleInCombo(int aIndexInCombo, const L1IndexCombo& aCombo) const;
0321
0322
0323 const L1EtMissParticle* etMissParticleInCombo(int aIndexInCombo, const L1IndexCombo& aCombo) const;
0324
0325
0326
0327 std::vector<const reco::LeafCandidate*> candidateCombo(const L1IndexCombo& aCombo) const;
0328
0329
0330 static const std::string& triggerName(L1TriggerType type);
0331 static L1TriggerType triggerType(const std::string& name);
0332 static bool objectTypeIsGlobal(L1ObjectType type);
0333
0334
0335
0336 private:
0337
0338
0339
0340
0341 void setIndexCombos() const;
0342
0343
0344
0345 L1TriggerType triggerType_;
0346
0347 bool triggerDecision_;
0348 #if !defined(__CINT__) && !defined(__MAKECINT__) && !defined(__REFLEX__)
0349 mutable std::atomic<char> indexCombosState_;
0350 #else
0351 mutable char indexCombosState_;
0352 #endif
0353
0354
0355 L1ObjectTypeVector objectTypes_;
0356
0357
0358
0359 L1EmParticleVectorRef emParticles_;
0360 L1JetParticleVectorRef jetParticles_;
0361 L1MuonParticleVectorRef muonParticles_;
0362
0363
0364
0365 L1EtMissParticleRefProd etMissParticle_;
0366
0367
0368
0369
0370
0371
0372
0373
0374
0375
0376 mutable L1IndexComboVector indexCombos_;
0377
0378
0379 static const std::string triggerNames_[kNumOfL1TriggerTypes];
0380 };
0381
0382 }
0383
0384 #endif