File indexing completed on 2024-04-06 12:22:12
0001 #ifndef __L1Trigger_VertexFinder_TP_h__
0002 #define __L1Trigger_VertexFinder_TP_h__
0003
0004 #include "FWCore/Utilities/interface/Exception.h"
0005 #include "L1Trigger/VertexFinder/interface/AnalysisSettings.h"
0006 #include "L1Trigger/VertexFinder/interface/Stub.h"
0007 #include "SimDataFormats/TrackingAnalysis/interface/TrackingParticle.h"
0008
0009 namespace l1tVertexFinder {
0010
0011 class AnalysisSettings;
0012 class Stub;
0013
0014 typedef edm::Ptr<TrackingParticle> TrackingParticlePtr;
0015
0016 class TP {
0017 public:
0018
0019 TP();
0020 TP(const TrackingParticlePtr& tpPtr, const AnalysisSettings& settings);
0021 ~TP() {}
0022
0023
0024 bool operator==(const TP& rhs) const {
0025 return (trackingParticle_ == rhs.trackingParticle_ && settings_ == rhs.settings_ && inTimeBx_ == rhs.inTimeBx_ &&
0026 physicsCollision_ == rhs.physicsCollision_ && use_ == rhs.use_ && useForEff_ == rhs.useForEff_ &&
0027 useForAlgEff_ == rhs.useForAlgEff_ && useForVertexReco_ == rhs.useForVertexReco_ &&
0028 nLayersWithStubs_ == rhs.nLayersWithStubs_ && assocStubs_ == rhs.assocStubs_);
0029 }
0030
0031
0032 void setMatchingStubs(const std::vector<Stub>& vMatchingStubs);
0033
0034
0035
0036
0037
0038 unsigned int countLayers(bool onlyPS = false);
0039
0040 const TrackingParticlePtr getTrackingParticle() const { return trackingParticle_; }
0041
0042 bool physicsCollision() const { return physicsCollision_; }
0043
0044 unsigned int numAssocStubs() const { return assocStubs_.size(); }
0045
0046 const TrackingParticlePtr operator->() const { return trackingParticle_; }
0047
0048 bool use() const { return use_; }
0049
0050 bool useForEff() const { return useForEff_; }
0051
0052 bool useForAlgEff() const { return useForAlgEff_; }
0053
0054 bool useForVertexReco() const { return useForVertexReco_; }
0055
0056 private:
0057 void fillUse();
0058 void fillUseForEff();
0059 void fillUseForAlgEff();
0060 void fillUseForVertexReco();
0061
0062 private:
0063 TrackingParticlePtr trackingParticle_;
0064 const AnalysisSettings* settings_;
0065
0066 bool inTimeBx_;
0067 bool physicsCollision_;
0068 bool use_;
0069 bool useForEff_;
0070 bool useForAlgEff_;
0071 bool useForVertexReco_;
0072
0073 std::vector<Stub> assocStubs_;
0074 unsigned int nLayersWithStubs_;
0075 };
0076
0077 }
0078
0079 #endif