CMS 3D CMS Logo

GctUnpackCollections.cc
Go to the documentation of this file.
2 
3 
5  m_event(event),
6  m_gctFibres(new L1GctFibreCollection()), // GCT input collections
7  m_rctEm(new L1CaloEmCollection()),
8  m_rctCalo(new L1CaloRegionCollection()),
9  m_gctInternEm(new L1GctInternEmCandCollection()), // GCT internal collections
10  m_gctInternJets(new L1GctInternJetDataCollection()),
11  m_gctInternEtSums(new L1GctInternEtSumCollection()),
12  m_gctInternHFData(new L1GctInternHFDataCollection()),
13  m_gctInternHtMiss(new L1GctInternHtMissCollection()),
14  m_gctIsoEm(new L1GctEmCandCollection()), // GCT output collections
15  m_gctNonIsoEm(new L1GctEmCandCollection()),
16  m_gctCenJets(new L1GctJetCandCollection()),
17  m_gctForJets(new L1GctJetCandCollection()),
18  m_gctTauJets(new L1GctJetCandCollection()),
19  m_gctHfBitCounts(new L1GctHFBitCountsCollection()),
20  m_gctHfRingEtSums(new L1GctHFRingEtSumsCollection()),
21  m_gctEtTot(new L1GctEtTotalCollection()),
22  m_gctEtHad(new L1GctEtHadCollection()),
23  m_gctEtMiss(new L1GctEtMissCollection()),
24  m_gctHtMiss(new L1GctHtMissCollection()),
25  m_gctJetCounts(new L1GctJetCountsCollection()), // Deprecated (empty collection still needed by GT)
26  m_errors(new L1TriggerErrorCollection()) // Misc
27 {
28  m_gctIsoEm->reserve(4);
29  m_gctCenJets->reserve(4);
30  m_gctForJets->reserve(4);
31  m_gctTauJets->reserve(4);
32  // ** DON'T RESERVE SPACE IN VECTORS FOR DEBUG UNPACK ITEMS! **
33 }
34 
36 {
37  // GCT input collections
41 
42  // GCT internal collections
48 
49  // GCT output collections
50  m_event.put(std::move(m_gctIsoEm), "isoEm");
51  m_event.put(std::move(m_gctNonIsoEm), "nonIsoEm");
52  m_event.put(std::move(m_gctCenJets), "cenJets");
53  m_event.put(std::move(m_gctForJets), "forJets");
54  m_event.put(std::move(m_gctTauJets), "tauJets");
61  m_event.put(std::move(m_gctJetCounts)); // Deprecated (empty collection still needed by GT)
62 
63  // Misc
65 }
66 
67 std::ostream& operator<<(std::ostream& os, const GctUnpackCollections& rhs)
68 {
69  // GCT input collections
70  os << "Read " << rhs.gctFibres()->size() << " GCT raw fibre data\n"
71  << "Read " << rhs.rctEm()->size() << " RCT EM candidates\n"
72  << "Read " << rhs.rctCalo()->size() << " RCT Calo Regions\n"
73 
74  // GCT internal collections
75  << "Read " << rhs.gctInternEm()->size() << " GCT intermediate EM candidates\n"
76  << "Read " << rhs.gctInternJets()->size() << " GCT intermediate jet candidates\n"
77  << "Read " << rhs.gctInternEtSums()->size() << " GCT intermediate et sums\n"
78  << "Read " << rhs.gctInternHFData()->size() << " GCT intermediate HF data\n"
79  << "Read " << rhs.gctInternHtMiss()->size() << " GCT intermediate Missing Ht\n"
80 
81  // GCT output collections
82  << "Read " << rhs.gctIsoEm()->size() << " GCT iso EM candidates\n"
83  << "Read " << rhs.gctNonIsoEm()->size() << " GCT non-iso EM candidates\n"
84  << "Read " << rhs.gctCenJets()->size() << " GCT central jet candidates\n"
85  << "Read " << rhs.gctForJets()->size() << " GCT forward jet candidates\n"
86  << "Read " << rhs.gctTauJets()->size() << " GCT tau jet candidates\n"
87  << "Read " << rhs.gctHfBitCounts()->size() << " GCT HF ring bit counts\n"
88  << "Read " << rhs.gctHfRingEtSums()->size() << " GCT HF ring et sums\n"
89  << "Read " << rhs.gctEtTot()->size() << " GCT total et\n"
90  << "Read " << rhs.gctEtHad()->size() << " GCT ht\n"
91  << "Read " << rhs.gctEtMiss()->size() << " GCT met\n"
92  << "Read " << rhs.gctHtMiss()->size() << " GCT mht";
93 
94  // Any point in putting in an m_errors()->size()? Not sure.
95 
96  return os;
97 }
L1GctJetCandCollection *const gctTauJets() const
GCT output: Tau Jets collection.
L1GctHFBitCountsCollection *const gctHfBitCounts() const
GCT output: Hadronic-Forward bit-counts collection.
std::vector< L1CaloEmCand > L1CaloEmCollection
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:125
L1GctEmCandCollection *const gctNonIsoEm() const
GCT output: Non-isolated EM candidate collection.
std::unique_ptr< L1GctInternJetDataCollection > m_gctInternJets
std::unique_ptr< L1GctInternEtSumCollection > m_gctInternEtSums
L1CaloEmCollection *const rctEm() const
Input electrons from the RCT to the GCT.
std::vector< L1TriggerError > L1TriggerErrorCollection
std::vector< L1GctEtMiss > L1GctEtMissCollection
std::unique_ptr< L1GctEmCandCollection > m_gctNonIsoEm
edm::Event & m_event
The event the collections will be put into on destruction of the GctUnpackCollections instance...
L1GctHtMissCollection *const gctHtMiss() const
GCT output: Missing Ht collection.
std::vector< L1GctHFRingEtSums > L1GctHFRingEtSumsCollection
std::unique_ptr< L1CaloRegionCollection > m_rctCalo
Input calo regions.
std::unique_ptr< L1CaloEmCollection > m_rctEm
Input electrons.
std::vector< L1GctEtHad > L1GctEtHadCollection
std::vector< L1GctJetCounts > L1GctJetCountsCollection
std::vector< L1GctInternHtMiss > L1GctInternHtMissCollection
std::unique_ptr< L1GctFibreCollection > m_gctFibres
Raw fibre input to the GCT.
std::vector< L1GctInternEmCand > L1GctInternEmCandCollection
std::vector< L1GctFibreWord > L1GctFibreCollection
std::vector< L1GctEtTotal > L1GctEtTotalCollection
std::vector< L1GctInternHFData > L1GctInternHFDataCollection
L1GctInternHFDataCollection *const gctInternHFData() const
Internal Hadronic-Forward bit-counts/ring-sums data collection.
std::vector< L1GctHFBitCounts > L1GctHFBitCountsCollection
std::vector< L1GctJetCand > L1GctJetCandCollection
L1GctInternEtSumCollection *const gctInternEtSums() const
Internal Et Sum collection.
L1GctEtTotalCollection *const gctEtTot() const
GCT output: Total Et collection.
L1GctJetCandCollection *const gctCenJets() const
GCT output: Central Jets collection.
L1GctInternHtMissCollection *const gctInternHtMiss() const
Internal missing Ht collection.
std::ostream & operator<<(std::ostream &os, const GctUnpackCollections &rhs)
std::unique_ptr< L1GctInternHtMissCollection > m_gctInternHtMiss
L1GctEtMissCollection *const gctEtMiss() const
GCT output: Missing Et collection.
std::unique_ptr< L1TriggerErrorCollection > m_errors
std::unique_ptr< L1GctInternHFDataCollection > m_gctInternHFData
RAII and useful methods for the many dataformat collections required by the GCT unpacker.
std::unique_ptr< L1GctHtMissCollection > m_gctHtMiss
std::vector< L1GctHtMiss > L1GctHtMissCollection
std::unique_ptr< L1GctEtMissCollection > m_gctEtMiss
std::unique_ptr< L1GctEtHadCollection > m_gctEtHad
std::unique_ptr< L1GctJetCandCollection > m_gctTauJets
L1GctHFRingEtSumsCollection *const gctHfRingEtSums() const
GCT output: Hadronic-Forward ring-sums collection.
std::unique_ptr< L1GctInternEmCandCollection > m_gctInternEm
std::unique_ptr< L1GctJetCandCollection > m_gctForJets
std::vector< L1GctInternJetData > L1GctInternJetDataCollection
L1GctFibreCollection *const gctFibres() const
Raw fibre input to the GCT.
L1GctEmCandCollection *const gctIsoEm() const
GCT output: Isolated EM candidate collection.
std::unique_ptr< L1GctJetCountsCollection > m_gctJetCounts
L1GctInternJetDataCollection *const gctInternJets() const
Internal Jet candidate collection.
std::unique_ptr< L1GctHFRingEtSumsCollection > m_gctHfRingEtSums
std::unique_ptr< L1GctEmCandCollection > m_gctIsoEm
L1GctEtHadCollection *const gctEtHad() const
GCT output: Hadronic transverse-energy (Ht) collection.
~GctUnpackCollections()
Destructor - the last action of this object is to put the gct collections into the event provided on ...
std::vector< L1GctInternEtSum > L1GctInternEtSumCollection
std::vector< L1CaloRegion > L1CaloRegionCollection
L1GctInternEmCandCollection *const gctInternEm() const
Internal EM candidate collection.
std::unique_ptr< L1GctJetCandCollection > m_gctCenJets
def move(src, dest)
Definition: eostools.py:511
L1CaloRegionCollection *const rctCalo() const
Input calo regions from the RCT to the GCT.
Definition: event.py:1
std::unique_ptr< L1GctHFBitCountsCollection > m_gctHfBitCounts
std::vector< L1GctEmCand > L1GctEmCandCollection
GctUnpackCollections(edm::Event &event)
Construct with an event. The collections get put into the event when the object instance goes out of ...
std::unique_ptr< L1GctEtTotalCollection > m_gctEtTot
L1GctJetCandCollection *const gctForJets() const
GCT output: Forward Jets collection.