Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • rrabadan/LHCb
  • talin/LHCb
  • imjelde/LHCb
  • mstahl/LHCb
  • padeken/LHCb
  • mimazure/LHCb
  • roiser/LHCb
  • conrad/LHCb
  • kklimasz/LHCb
  • rcurrie/LHCb
  • wkrzemie/LHCb
  • fkeizer/LHCb
  • valassi/LHCb
  • hschrein/LHCb
  • anstahll/LHCb
  • jonrob/LHCb
  • graven/LHCb
  • clemenci/LHCb
  • chaen/LHCb
  • sstahl/LHCb
  • lhcb/LHCb
21 results
Show changes
Commits on Source (2)
......@@ -32,59 +32,56 @@ class MCTrackInfo final {
public:
enum flagMasks {
maskVeloR = 0x00000001,
maskVeloPhi = 0x00000002,
maskTT1 = 0x00000004,
maskTT2 = 0x00000008,
maskT1X = 0x00000010,
maskT1S = 0x00000020,
maskT2X = 0x00000040,
maskT2S = 0x00000080,
maskT3X = 0x00000100,
maskT3S = 0x00000200,
maskHasVelo = maskVeloR | maskVeloPhi, // R + Phi
maskHasTT = maskTT1 | maskTT2, // TT1 and TT2
maskVelo = 0x00000001,
maskUnused = 0x00000002,
maskUT1 = 0x00000004,
maskUT2 = 0x00000008,
maskT1X = 0x00000010,
maskT1S = 0x00000020,
maskT2X = 0x00000040,
maskT2S = 0x00000080,
maskT3X = 0x00000100,
maskT3S = 0x00000200,
maskHasVelo = maskVelo,
maskHasUT = maskUT1 | maskUT2, // UT1 and UT2
maskHasT1 = maskT1X | maskT1S,
maskHasT2 = maskT2X | maskT2S,
maskHasT3 = maskT3X | maskT3S,
maskHasT = maskHasT1 | maskHasT2 | maskHasT3, // all T stations
maskHasVeloAndT = maskHasVelo | maskHasT,
maskAccVeloR = 0x00000400,
maskAccVeloPhi = 0x00000800,
maskAccTT1 = 0x00001000,
maskAccTT2 = 0x00002000,
maskAccT1X = 0x00004000,
maskAccT1S = 0x00008000,
maskAccT2X = 0x00010000,
maskAccT2S = 0x00020000,
maskAccT3X = 0x00040000,
maskAccT3S = 0x00080000,
maskAccVelo = maskAccVeloR | maskAccVeloPhi, // R and Phi hits
maskAccTT = maskAccTT1 | maskAccTT2, // TT1 and TT2
maskAccVelo = 0x00000400,
maskAccUnused = 0x00000800,
maskAccUT1 = 0x00001000,
maskAccUT2 = 0x00002000,
maskAccT1X = 0x00004000,
maskAccT1S = 0x00008000,
maskAccT2X = 0x00010000,
maskAccT2S = 0x00020000,
maskAccT3X = 0x00040000,
maskAccT3S = 0x00080000,
maskAccUT = maskAccUT1 | maskAccUT2, // UT1 and UT2
maskAccT1 = maskAccT1X | maskAccT1S,
maskAccT2 = maskAccT2X | maskAccT2S,
maskAccT3 = maskAccT3X | maskAccT3S,
maskAccT = maskAccT1 | maskAccT2 | maskAccT3, // T stations
maskAccVeloAndT = maskAccVelo | maskAccT,
multVeloR = 20,
multVeloPhi = 25,
multVelo = 20,
maskMultVeloR = 0x01F00000, // Velo R CLuster multiplicity
maskMultVeloPhi = 0x3E000000 // VeloPhi cluster multipliity
maskMultVelo = 0x01F00000, // Velo cluster multiplicity
};
/// Standard constructor
MCTrackInfo( const LHCb::MCProperty& flags ) : m_flags( &flags ) {}
//== Main accessors: Velo, TT, T and Velo+T for cluster and acceptance
//== Main accessors: Velo, UT, T and Velo+T for cluster and acceptance
bool hasVelo( const LHCb::MCParticle* part ) const { return testMask( part, MCTrackInfo::maskHasVelo ); }
bool hasTT( const LHCb::MCParticle* part ) const { return testMask( part, MCTrackInfo::maskHasTT ); }
bool hasUT( const LHCb::MCParticle* part ) const { return testMask( part, MCTrackInfo::maskHasUT ); }
bool hasT( const LHCb::MCParticle* part ) const { return testMask( part, MCTrackInfo::maskHasT ); }
......@@ -98,7 +95,7 @@ public:
bool accVelo( const LHCb::MCParticle* part ) const { return testMask( part, MCTrackInfo::maskAccVelo ); }
bool accTT( const LHCb::MCParticle* part ) const { return testMask( part, MCTrackInfo::maskAccTT ); }
bool accUT( const LHCb::MCParticle* part ) const { return testMask( part, MCTrackInfo::maskAccUT ); }
bool accT( const LHCb::MCParticle* part ) const { return testMask( part, MCTrackInfo::maskAccT ); }
......@@ -114,13 +111,9 @@ public:
//============= Access to individual bits, 'has' = enough digits/clusters
bool hasVeloR( const LHCb::MCParticle* part ) const { return testMask( part, MCTrackInfo::maskVeloR ); }
bool hasUT1( const LHCb::MCParticle* part ) const { return testMask( part, MCTrackInfo::maskUT1 ); }
bool hasVeloPhi( const LHCb::MCParticle* part ) const { return testMask( part, MCTrackInfo::maskVeloPhi ); }
bool hasTT1( const LHCb::MCParticle* part ) const { return testMask( part, MCTrackInfo::maskTT1 ); }
bool hasTT2( const LHCb::MCParticle* part ) const { return testMask( part, MCTrackInfo::maskTT2 ); }
bool hasUT2( const LHCb::MCParticle* part ) const { return testMask( part, MCTrackInfo::maskUT2 ); }
bool hasT1X( const LHCb::MCParticle* part ) const { return testMask( part, MCTrackInfo::maskT1X ); }
......@@ -136,19 +129,13 @@ public:
//=== Number of Velo clusters
unsigned int nbVeloR( const LHCb::MCParticle* part ) const;
unsigned int nbVeloPhi( const LHCb::MCParticle* part ) const;
unsigned int nbVelo( const LHCb::MCParticle* part ) const; ///< number of velo clusters capped at 31
//============= Access to individual bits for acceptance = MCHits
bool accVeloR( const LHCb::MCParticle* part ) const { return testMask( part, MCTrackInfo::maskAccVeloR ); }
bool accVeloPhi( const LHCb::MCParticle* part ) const { return testMask( part, MCTrackInfo::maskAccVeloPhi ); }
bool accUT1( const LHCb::MCParticle* part ) const { return testMask( part, MCTrackInfo::maskAccUT1 ); }
bool accTT1( const LHCb::MCParticle* part ) const { return testMask( part, MCTrackInfo::maskAccTT1 ); }
bool accTT2( const LHCb::MCParticle* part ) const { return testMask( part, MCTrackInfo::maskAccTT2 ); }
bool accUT2( const LHCb::MCParticle* part ) const { return testMask( part, MCTrackInfo::maskAccUT2 ); }
bool accT1X( const LHCb::MCParticle* part ) const { return testMask( part, MCTrackInfo::maskAccT1X ); }
......@@ -186,14 +173,9 @@ inline bool MCTrackInfo::testMask( const LHCb::MCParticle* part, const unsigned
return !m_flags ? false : mask == ( mask & m_flags->property( part ) );
}
inline unsigned int MCTrackInfo::nbVeloR( const LHCb::MCParticle* part ) const {
const unsigned int word = m_flags->property( part ) & MCTrackInfo::maskMultVeloR;
return word >> MCTrackInfo::multVeloR;
}
inline unsigned int MCTrackInfo::nbVeloPhi( const LHCb::MCParticle* part ) const {
const unsigned int word = m_flags->property( part ) & MCTrackInfo::maskMultVeloPhi;
return word >> MCTrackInfo::multVeloPhi;
inline unsigned int MCTrackInfo::nbVelo( const LHCb::MCParticle* part ) const {
const unsigned int word = m_flags->property( part ) & MCTrackInfo::maskMultVelo;
return word >> MCTrackInfo::multVelo;
}
#endif // MCEVENT_MCTRACKINFO_H
......@@ -25,13 +25,11 @@ bool LHCb::MC::MCTrackGeomCriteria::accepted( MCTrackInfo& info, const LHCb::MCP
LHCb::MC::MCTrackGeomCriteria::FunctionMap::FunctionMap()
: m_mapping( {{"hasVeloAndT", &MCTrackInfo::hasVeloAndT},
{"hasTT", &MCTrackInfo::hasTT},
{"hasUT", &MCTrackInfo::hasUT},
{"hasT", &MCTrackInfo::hasT},
{"hasVelo", &MCTrackInfo::hasVelo},
{"hasVeloR", &MCTrackInfo::hasVeloR},
{"hasVeloPhi", &MCTrackInfo::hasVeloPhi},
{"hasTT1", &MCTrackInfo::hasTT1},
{"hasTT2", &MCTrackInfo::hasTT2},
{"hasUT1", &MCTrackInfo::hasUT1},
{"hasUT2", &MCTrackInfo::hasUT2},
{"hasT1X", &MCTrackInfo::hasT1X},
{"hasT1S", &MCTrackInfo::hasT1S},
{"hasT2X", &MCTrackInfo::hasT2X},
......@@ -42,13 +40,11 @@ LHCb::MC::MCTrackGeomCriteria::FunctionMap::FunctionMap()
{"hasT2", &MCTrackInfo::hasT2},
{"hasT3", &MCTrackInfo::hasT3},
{"accVeloAndT", &MCTrackInfo::accVeloAndT},
{"accTT", &MCTrackInfo::accTT},
{"accUT", &MCTrackInfo::accUT},
{"accT", &MCTrackInfo::accT},
{"accVelo", &MCTrackInfo::accVelo},
{"accVeloR", &MCTrackInfo::accVeloR},
{"accVeloPhi", &MCTrackInfo::accVeloPhi},
{"accTT1", &MCTrackInfo::accTT1},
{"accTT2", &MCTrackInfo::accTT2},
{"accUT1", &MCTrackInfo::accUT1},
{"accUT2", &MCTrackInfo::accUT2},
{"accT1X", &MCTrackInfo::accT1X},
{"accT1S", &MCTrackInfo::accT1S},
{"accT2X", &MCTrackInfo::accT2X},
......
......@@ -88,8 +88,8 @@ private:
ToolHandle<IMCParticleSelector> m_mcSel{this, "Selector", "MCParticleSelector/Selector"};
Gaudi::Property<std::vector<std::string>> m_chargedLongCriteria{this, "ChargedLong", {"hasVeloAndT"}};
Gaudi::Property<std::vector<std::string>> m_chargedUpstreamCriteria{this, "ChargedUpstream", {"hasVelo", "hasTT"}};
Gaudi::Property<std::vector<std::string>> m_chargedDownstreamCriteria{this, "ChargedDownstream", {"hasT", "hasTT"}};
Gaudi::Property<std::vector<std::string>> m_chargedUpstreamCriteria{this, "ChargedUpstream", {"hasVelo", "hasUT"}};
Gaudi::Property<std::vector<std::string>> m_chargedDownstreamCriteria{this, "ChargedDownstream", {"hasT", "hasUT"}};
Gaudi::Property<std::vector<std::string>> m_chargedVeloCriteria{this, "ChargedVelo", {"hasVelo"}};
Gaudi::Property<std::vector<std::string>> m_chargedTCriteria{this, "ChargedTtrack", {"hasT"}};
......@@ -168,7 +168,7 @@ bool MCReconstructible::accept_neutral( const LHCb::MCParticle* mcPart ) const {
//====================================================================
bool MCReconstructible::accept_charged( const LHCb::MCParticle* mcPart ) const {
auto mcTkInfo = MCTrackInfo{*m_track_info.get()};
return mcTkInfo.accVelo( mcPart ) || mcTkInfo.accTT( mcPart ) || mcTkInfo.accT( mcPart );
return mcTkInfo.accVelo( mcPart ) || mcTkInfo.accUT( mcPart ) || mcTkInfo.accT( mcPart );
}
//=============================================================================
......