6 #include "TClonesArray.h"
8 #include "TGeoManager.h"
10 #include "FairRootManager.h"
12 #include "FairRuntimeDb.h"
23 FairTask(
"MVD Ideal Track Finding Task"),
24 fHitBranchStrip(
"MVDHitsStrip"),
25 fHitBranchPixel(
"MVDHitsPixel"),
26 fClusterBranchStrip(
"MVDStripClusterCand"),
27 fClusterBranchPixel(
"MVDPixelClusterCand"),
28 fDigiBranchStrip(
"MVDStripDigis"),
29 fDigiBranchPixel(
"MVDPixelDigis"),
30 fMcBranch(
"MVDPoint"),
31 fTrackBranch(
"MCTrack"),
34 fStripClusterArray(NULL),
35 fPixelClusterArray(NULL),
36 fStripDigiArray(NULL),
37 fPixelDigiArray(NULL),
40 fTrackCandArray(NULL),
69 InitStatus stat=kSUCCESS;
85 FairRootManager* ioman = FairRootManager::Instance();
89 std::cout <<
"-E- PndMvdIdealTrackFinderTask::Init: "
90 <<
"RootManager not instantiated!" << std::endl;
97 std::cout <<
"-W- PndMvdIdealTrackFinderTask::Init: " <<
"No fStripHitArray!" << std::endl;
103 std::cout <<
"-W- PndMvdIdealTrackFinderTask::Init: " <<
"No fPixelHitArray!" << std::endl;
109 std::cout <<
"-W- PndMvdIdealTrackFinderTask::Init: " <<
"No StripclusterArray!" << std::endl;
114 std::cout <<
"-W- PndMvdIdealTrackFinderTask::Init: " <<
"No PixelclusterArray!" << std::endl;
121 std::cout <<
"-W- PndMvdIdealTrackFinderTask::Init: " <<
"No StripdigiArray!" << std::endl;
127 std::cout <<
"-W- PndMvdIdealTrackFinderTask::Init: " <<
"No PixeldigiArray!" << std::endl;
133 std::cout <<
"-W- PndMvdIdealTrackFinderTask::Init: " <<
"No mcArray!" << std::endl;
139 std::cout <<
"-W- PndMvdIdealTrackFinderTask::Init: " <<
"No trackArray!" << std::endl;
146 std::cout <<
"-I- PndMvdIdealTrackFinderTask: Initialisation successfull" << std::endl;
159 Fatal(
"Exec",
"No trackCandArray");
166 for (Int_t iHit = 0; iHit < nPixelHits; iHit++){
170 if (apixeldigi->
GetIndex(0) == -1)
continue;
177 for (Int_t iHit = 0; iHit < nStripHits; iHit++){
181 if (astripdigi->
GetIndex(0) == -1)
continue;
191 Double_t eventTime = FairRootManager::Instance()->GetEventTime();
192 kIt->second->SetTimeStamp(eventTime);
228 return (2/
TMath::Sqrt(p.Px()*p.Px() + p.Py()*p.Py()));
234 return (p.Mag()/
TMath::Sqrt(p.Px()*p.Px() + p.Py()*p.Py()));
239 std::cout <<
"**** TrackFinding *****" << std::endl;
241 for (std::map<Int_t, PndTrackCand*>::const_iterator kIt=
fTrackCandMap.begin();
243 std::cout <<
"TrackID: " << kIt->first << std::endl;
245 unsigned int detId, hitId;
246 for (
unsigned int i = 0;
i < trackCand->
GetNHits();
i++){
252 std::cout <<
"Detector no. " << detId <<
": "<< *myHit;
255 std::cout << std::endl;
260 for (std::map<Int_t,PndTrackCand*>::const_iterator kIt=
fTrackCandMap.begin();
void AddAndExpand(Int_t trackID, Int_t detnum, Int_t iHit, PndSdsHit *theHit)
TString fClusterBranchStrip
TVector3 GetPosition() const
Class to store the Digis which belong to one cluster This class holds the information which Digi belo...
virtual InitStatus Init()
PndMvdIdealTrackFinderTask()
Double_t GetTrackCurvature(PndMCTrack *myTrack)
static T Sqrt(const T &x)
TClonesArray * fTrackCandArray
Int_t GetIndex(int i=0) const
PndTrackCandHit GetSortedHit(UInt_t i)
Class for digitised strip hits.
TVector3 GetMomentum() const
std::map< Int_t, PndTrackCand * > fTrackCandMap
TClonesArray * fStripDigiArray
Double_t GetTrackDip(PndMCTrack *myTrack)
TClonesArray * fTrackArray
TClonesArray * fStripHitArray
Int_t GetDigiIndex(Int_t i) const
virtual InitStatus ReInit()
virtual void SetParContainers()
TClonesArray * fStripClusterArray
TClonesArray * fPixelClusterArray
ClassImp(PndMvdIdealTrackFinderTask)
virtual ~PndMvdIdealTrackFinderTask()
TClonesArray * fPixelDigiArray
TClonesArray * fPixelHitArray
Data class to store the digi output of a pixel module.
Int_t GetClusterIndex() const
virtual void Exec(Option_t *opt)
TString fClusterBranchPixel