00001
00002
00003
00004 #ifndef STJFOURVECLIST_H
00005 #define STJFOURVECLIST_H
00006
00007 #include <TObject.h>
00008
00009 #include <ostream>
00010 #include <vector>
00011
00012 class StjFourVec : public TObject {
00013 public:
00014 int runNumber;
00015 int eventId;
00016 int fourvecId;
00017 int type;
00018 int detectorId;
00019 short trackId;
00020 int towerId;
00021 int mcparticleId;
00022 double pt;
00023 double eta;
00024 double phi;
00025 double m;
00026 double vertexZ;
00027 ClassDef(StjFourVec, 1)
00028 };
00029
00030 typedef std::vector<StjFourVec> StjFourVecList;
00031
00032 inline bool operator==(const StjFourVec& v1, const StjFourVec& v2)
00033 {
00034 if(v1.runNumber != v2.runNumber) return false;
00035 if(v1.eventId != v2.eventId) return false;
00036 if(v1.fourvecId != v2.fourvecId) return false;
00037 if(v1.type != v2.type) return false;
00038 if(v1.detectorId != v2.detectorId) return false;
00039 if(v1.trackId != v2.trackId) return false;
00040 if(v1.towerId != v2.towerId) return false;
00041 if(v1.mcparticleId != v2.mcparticleId) return false;
00042 if(v1.pt != v2.pt) return false;
00043 if(v1.eta != v2.eta) return false;
00044 if(v1.phi != v2.phi) return false;
00045 if(v1.m != v2.m) return false;
00046 return true;
00047 }
00048
00049 inline bool operator!=(const StjFourVec& v1, const StjFourVec& v2)
00050 {
00051 return(!(v1 == v2));
00052 }
00053
00054 inline bool operator==(const StjFourVecList& v1, const StjFourVecList& v2){
00055 if(v1.size() != v2.size()) return false;
00056 for(size_t i = 0; i < v1.size(); ++i) if(v1[i] != v2[i]) return false;
00057 return true;
00058 }
00059
00060 inline std::ostream& operator<<(std::ostream& out, const StjFourVec& v)
00061 {
00062 out << "fourvecId: " << v.fourvecId << ", pt: " << v.pt << ", .... ";
00063 return out;
00064 }
00065
00066 inline std::ostream& operator<<(std::ostream& out, const StjFourVecList& v)
00067 {
00068 out << "FourVecList size: " << v.size();
00069 return out;
00070 }
00071
00072 #endif // STJFOURVECLIST_H