00001 #pragma once
00002
00006 namespace InDet {
00007
00008 namespace TrkOrigin {
00009
00010 enum OriginType {
00011
00012 Fake=0,
00013
00014 Pileup,
00015
00016 KshortDecay,
00017 LambdaDecay,
00018 GammaConversion,
00019 OtherDecay,
00020 HadronicInteraction,
00021 OtherSecondary,
00022
00023 BHadronDecay,
00024 DHadronDecay,
00025
00026 Fragmentation,
00027
00028 OtherOrigin
00029 };
00030
00034 inline bool isFake(int origin) {
00035 if (origin & (0x1 << Fake)) return true;
00036 return false;
00037 }
00038
00040 inline bool isPileup(int origin) {
00041 if (origin & (0x1 << Pileup)) return true;
00042 return false;
00043 }
00044
00046 inline bool isV0Decay(int origin) {
00047 if (origin & (0x1 << KshortDecay)) return true;
00048 if (origin & (0x1 << LambdaDecay)) return true;
00049 return false;
00050 }
00051
00053 inline bool isGammaConversion(int origin) {
00054 if (origin & (0x1 << GammaConversion)) return true;
00055 return false;
00056 }
00057
00059 inline bool isHadronicInteraction(int origin) {
00060 if (origin & (0x1 << HadronicInteraction)) return true;
00061 return false;
00062 }
00063
00065 inline bool isSecondary(int origin) {
00066 if (origin & (0x1 << KshortDecay)) return true;
00067 if (origin & (0x1 << LambdaDecay)) return true;
00068 if (origin & (0x1 << GammaConversion)) return true;
00069 if (origin & (0x1 << HadronicInteraction)) return true;
00070 if (origin & (0x1 << OtherDecay)) return true;
00071 if (origin & (0x1 << OtherSecondary)) return true;
00072 return false;
00073 }
00074
00076 inline bool isFromB(int origin) {
00077 if (origin & (0x1 << BHadronDecay)) return true;
00078 return false;
00079 }
00080
00082 inline bool isFromD(int origin) {
00083 if (origin & (0x1 << DHadronDecay)) return true;
00084 return false;
00085 }
00086
00088 inline bool isFromDNotFromB(int origin) {
00089 if (isFromB(origin)) return false;
00090 if (origin & (0x1 << DHadronDecay)) return true;
00091 return false;
00092 }
00093
00095 inline bool isFromDfromB(int origin) {
00096 if (isFromB(origin) && isFromD(origin)) return true;
00097 return false;
00098 }
00099
00101 inline bool isFragmentation(int origin) {
00102 if (origin & (0x1 << Fragmentation)) return true;
00103 return false;
00104 }
00105
00107 inline bool isPrimary(int origin) {
00108 if (isFake(origin)) return false;
00109 if (isPileup(origin)) return false;
00110 if (isSecondary(origin)) return false;
00111 if (origin & (0x1 << OtherOrigin)) return false;
00112 return true;
00113 }
00114
00115 }
00116
00117 }
00118