Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 09:38:58

0001 #ifndef DIGIFTL_FTLDIGICOLLECTION_H
0002 #define DIGIFTL_FTLDIGICOLLECTION_H
0003 
0004 #include "DataFormats/Common/interface/SortedCollection.h"
0005 #include "DataFormats/FTLDigi/interface/FTLDataFrameT.h"
0006 #include "DataFormats/ForwardDetId/interface/MTDDetId.h"
0007 #include "DataFormats/FTLDigi/interface/FTLSample.h"
0008 
0009 #include "DataFormats/ForwardDetId/interface/BTLDetId.h"
0010 #include "DataFormats/ForwardDetId/interface/ETLDetId.h"
0011 #include "DataFormats/FTLDigi/interface/BTLSample.h"
0012 #include "DataFormats/FTLDigi/interface/ETLSample.h"
0013 
0014 namespace mtdhelpers {
0015   struct FTLRowColDecode {
0016     static inline int row(const DetId& id, const std::vector<FTLSample>& data) { return -1; }  // no rows or columns
0017     static inline int col(const DetId& id, const std::vector<FTLSample>& data) { return -1; }
0018   };
0019 
0020   struct BTLRowColDecode {
0021     static inline int row(const DetId& id, const std::vector<BTLSample>& data) { return data.front().row(); }
0022     static inline int col(const DetId& id, const std::vector<BTLSample>& data) { return data.front().column(); }
0023   };
0024 
0025   struct ETLRowColDecode {
0026     static inline int row(const DetId& id, const std::vector<ETLSample>& data) { return data.front().row(); }
0027     static inline int col(const DetId& id, const std::vector<ETLSample>& data) { return data.front().column(); }
0028   };
0029 }  // namespace mtdhelpers
0030 
0031 typedef FTLDataFrameT<MTDDetId, FTLSample, mtdhelpers::FTLRowColDecode> FTLDataFrame;
0032 typedef edm::SortedCollection<FTLDataFrame> FTLDigiCollection;
0033 
0034 typedef FTLDataFrameT<BTLDetId, BTLSample, mtdhelpers::BTLRowColDecode> BTLDataFrame;
0035 typedef edm::SortedCollection<BTLDataFrame> BTLDigiCollection;
0036 
0037 typedef FTLDataFrameT<ETLDetId, ETLSample, mtdhelpers::ETLRowColDecode> ETLDataFrame;
0038 typedef edm::SortedCollection<ETLDataFrame> ETLDigiCollection;
0039 
0040 #endif