Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:20:54

0001 //////////////////////////////////////////////////////////////////////////
0002 // ---------------------------Event.h------------------------------------
0003 //////////////////////////////////////////////////////////////////////////
0004 
0005 #ifndef L1Trigger_L1TMuonEndCap_emtf_Event
0006 #define L1Trigger_L1TMuonEndCap_emtf_Event
0007 
0008 #include <vector>
0009 #include <iostream>
0010 
0011 //////////////////////////////////////////////////////////////////////////
0012 // ----------------------------------------------------------------------
0013 //////////////////////////////////////////////////////////////////////////
0014 
0015 namespace emtf {
0016 
0017   struct Event {
0018     double trueValue;
0019     double predictedValue;
0020     double DTPt;
0021     double CSCPt;
0022     double tmvaPt;
0023     double tmvaPt1;
0024     int Mode;
0025     int Quality;
0026 
0027     static int sortingIndex;
0028     int id;
0029     std::vector<double> data;
0030 
0031     bool operator<(const Event &rhs) const { return data[sortingIndex] < rhs.data[sortingIndex]; }
0032 
0033     void outputEvent() {
0034       std::cout << "trueValue = " << trueValue << std::endl;
0035       std::cout << "predictedValue = " << predictedValue << std::endl;
0036       std::cout << "id = " << id << std::endl;
0037       for (unsigned int i = 0; i < data.size(); i++) {
0038         std::cout << "x" << i << "=" << data[i] << ", ";
0039       }
0040       std::cout << std::endl;
0041     }
0042 
0043     void resetPredictedValue() { predictedValue = 0; }
0044   };
0045 
0046 }  // namespace emtf
0047 
0048 #endif