Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:31:05

0001 
0002 #ifndef TrackCategories_h
0003 #define TrackCategories_h
0004 
0005 #include <ostream>
0006 #include <vector>
0007 
0008 class TrackCategories {
0009 public:
0010   //! Categories available to vertex
0011   enum Category {
0012     Fake = 0,
0013     Reconstructed = Fake,
0014     Bad,
0015     BadInnerHits,
0016     SharedInnerHits,
0017     SignalEvent,
0018     Bottom,
0019     Charm,
0020     Light,
0021     Muon,
0022     TrackerSimHits,
0023     BWeakDecay,
0024     CWeakDecay,
0025     ChargePionDecay,
0026     ChargeKaonDecay,
0027     TauDecay,
0028     KsDecay,
0029     LambdaDecay,
0030     JpsiDecay,
0031     XiDecay,
0032     OmegaDecay,
0033     SigmaPlusDecay,
0034     SigmaMinusDecay,
0035     LongLivedDecay,
0036     KnownProcess,
0037     UndefinedProcess,
0038     UnknownProcess,
0039     PrimaryProcess,
0040     HadronicProcess,
0041     DecayProcess,
0042     ComptonProcess,
0043     AnnihilationProcess,
0044     EIoniProcess,
0045     HIoniProcess,
0046     MuIoniProcess,
0047     PhotonProcess,
0048     MuPairProdProcess,
0049     ConversionsProcess,
0050     EBremProcess,
0051     SynchrotronRadiationProcess,
0052     MuBremProcess,
0053     MuNuclProcess,
0054     FromBWeakDecayMuon,
0055     FromCWeakDecayMuon,
0056     DecayOnFlightMuon,
0057     FromChargePionMuon,
0058     FromChargeKaonMuon,
0059     PrimaryVertex,
0060     SecondaryVertex,
0061     TertiaryVertex,
0062     TierciaryVertex = TertiaryVertex,
0063     Unknown
0064   };
0065 
0066   //! Name of the different categories
0067   static const char *const Names[];
0068 
0069   //! Main types associated to the class
0070   typedef std::vector<bool> Flags;
0071 
0072   //! Void constructor
0073   TrackCategories() { reset(); }
0074 
0075   //! Returns track flag for a given category
0076   bool is(Category category) const { return flags_[category]; }
0077 
0078   //! Returns flags with the category descriptions
0079   const Flags &flags() const { return flags_; }
0080 
0081 protected:
0082   //! Reset the categories flags
0083   void reset() { flags_ = Flags(Unknown + 1, false); }
0084 
0085   // Check for unkown classification
0086   void unknownTrack();
0087 
0088   //! Flag containers
0089   Flags flags_;
0090 };
0091 
0092 // Operation overload for printing the categories
0093 std::ostream &operator<<(std::ostream &, TrackCategories const &);
0094 
0095 #endif