This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
davinci:removetthits [2011/02/10 10:22] – decianm | davinci:removetthits [2011/02/11 22:28] (current) – [Idea] decianm | ||
---|---|---|---|
Line 2: | Line 2: | ||
===== Idea ===== | ===== Idea ===== | ||
Removing TT hits from long tracks can be a good check to see effects which are caused by the TT. | Removing TT hits from long tracks can be a good check to see effects which are caused by the TT. | ||
+ | TO BE FINISHED WHEN IT WORKED AS I THOUGHT | ||
===== How to ===== | ===== How to ===== | ||
Add the following two source files f.ex. to Tr/ | Add the following two source files f.ex. to Tr/ | ||
+ | **TrackRemoveSTIDs.cpp** | ||
<code c> | <code c> | ||
// Gaudi | // Gaudi | ||
#include " | #include " | ||
- | |||
#include < | #include < | ||
- | |||
// track interfaces | // track interfaces | ||
#include " | #include " | ||
#include " | #include " | ||
- | |||
#include " | #include " | ||
#include " | #include " | ||
Line 38: | Line 36: | ||
StatusCode TrackRemoveSTIDs:: | StatusCode TrackRemoveSTIDs:: | ||
{ | { | ||
- | // Initializes TsaInitialization at the begin of program execution. | ||
- | |||
StatusCode sc = GaudiAlgorithm:: | StatusCode sc = GaudiAlgorithm:: | ||
if (sc.isFailure()){ | if (sc.isFailure()){ | ||
| | ||
} | } | ||
- | |||
// da selector | // da selector | ||
m_selector = tool< | m_selector = tool< | ||
- | |||
return StatusCode:: | return StatusCode:: | ||
} | } | ||
StatusCode TrackRemoveSTIDs:: | StatusCode TrackRemoveSTIDs:: | ||
- | |||
Tracks* trackCont = get< | Tracks* trackCont = get< | ||
// loop and remove the hits | // loop and remove the hits | ||
Line 58: | Line 51: | ||
if ((*iterT)-> | if ((*iterT)-> | ||
} // iterT | } // iterT | ||
- | |||
return StatusCode:: | return StatusCode:: | ||
}; | }; | ||
void TrackRemoveSTIDs:: | void TrackRemoveSTIDs:: | ||
- | |||
// get the list of ones to remove.... | // get the list of ones to remove.... | ||
std:: | std:: | ||
Line 70: | Line 61: | ||
if (m_selector-> | if (m_selector-> | ||
} | } | ||
- | |||
BOOST_FOREACH(LHCb:: | BOOST_FOREACH(LHCb:: | ||
aTrack-> | aTrack-> | ||
} | } | ||
} | } | ||
+ | </ | ||
+ | and **TrackRemoveSTIDs.h** | ||
+ | <code c> | ||
+ | // $Id: $ | ||
+ | #ifndef _TrackRemoveSTIDs_H_ | ||
+ | #define _TrackRemoveSTIDs_H_ | ||
+ | /** @class TrackRemoveSTIDs TrackRemoveSTIDs.h | ||
+ | * | ||
+ | | ||
+ | * | ||
+ | | ||
+ | | ||
+ | */ | ||
+ | #include " | ||
+ | #include < | ||
+ | #include < | ||
+ | class ISTChannelIDSelector; | ||
+ | namespace LHCb{ | ||
+ | class Track; | ||
+ | } | ||
+ | class TrackRemoveSTIDs: | ||
+ | public: | ||
+ | // Constructors and destructor | ||
+ | TrackRemoveSTIDs(const std:: | ||
+ | ISvcLocator* pSvcLocator); | ||
+ | virtual ~TrackRemoveSTIDs(); | ||
+ | virtual StatusCode initialize(); | ||
+ | virtual StatusCode execute(); | ||
+ | | ||
+ | private: | ||
+ | std::string m_inputLocation; | ||
+ | ISTChannelIDSelector* m_selector; | ||
+ | std::string m_selectorType; | ||
+ | void removeHits(LHCb:: | ||
+ | }; | ||
+ | #endif | ||
+ | </ | ||
- | </> | + | In your options file, do something like: |
- | + | <code python> | |
+ | from Configurables import | ||
+ | hitRemover = TrackRemoveSTIDs(' | ||
+ | selector = STSelectChannelIDByElement(" | ||
+ | selector.elementNames = [" | ||
+ | selector.DetType = " | ||
+ | GaudiSequencer(" | ||
+ | RawBankToSTClusterAlg(" | ||
+ | createITClusters, | ||
+ | </ |