#include "Riostream.h"
#include "AliITSUReconstructor.h"
+#include "AliITSURecoDet.h"
#include "AliRun.h"
#include "AliRawReader.h"
#include "AliESDEvent.h"
AliITSUReconstructor::AliITSUReconstructor()
: AliReconstructor()
,fGeom(0)
+ ,fITS(0)
,fClusterFinders(0)
,fClusters(0)
{
}
delete[] fClusters;
//
+ delete fITS;
delete fGeom;
}
//______________________________________________________________________
void AliITSUReconstructor::Init()
{
- // Initalize this constructor
+ // Initalize this reconstructor
+ // Note: fITS cannot be initialized here since it requires RecoParams (not available ar
+ // the moment of reconstructors initialization)
+ //
AliInfo("Initializing");
if (fGeom) AliFatal("was already done, something is wrong...");
//
}
//
return;
-
}
//_____________________________________________________________________________
treeRP->GetEntry(0); // we are still in 1 ev/tree mode...
return 1;
}
+
+//_____________________________________________________________________________
+AliITSURecoDet* AliITSUReconstructor::GetITSInterface()
+{
+ // Create reco oriented interface to geometry
+ if (fITS) return fITS;
+ //
+ fITS = new AliITSURecoDet(fGeom,"ITSURecoInterface");
+ int nLr = fITS->GetNLayersActive();
+ for (int ilr=nLr;ilr--;) fITS->GetLayerActive(ilr)->SetClusters(GetClusters(ilr));
+ return fITS;
+}
class AliTracker;
class AliTrackleter;
class AliITSUGeomTGeo;
+class AliITSURecoDet;
class AliITSUReconstructor: public AliReconstructor {
public:
//
TClonesArray* GetClusters(Int_t lrID) const {return fClusters ? fClusters[lrID] : 0;}
AliITSUGeomTGeo* GetGeom() const {return (AliITSUGeomTGeo*)fGeom;}
+ AliITSURecoDet* GetITSInterface();
//
Int_t LoadClusters(TTree* treeRP);
//
AliITSUReconstructor(const AliITSUReconstructor &); //Not implemented
AliITSUReconstructor& operator=(const AliITSUReconstructor &); //Not implemented
AliITSUGeomTGeo* fGeom; // geometry wrapper
+ AliITSURecoDet* fITS; // interface to ITS (reconstruction oriented)
TObjArray fClusterFinders; // array of clusterfinders per layer
TClonesArray** fClusters; // container for recpoints TClonesArrays
//
{
// Default destructor
//
- delete fITS;
delete[] fClInfo;
//
}
{
// init with external reconstructor
//
- fITS = new AliITSURecoDet(rec->GetGeom(),"ITSURecoInterface");
+ fITS = rec->GetITSInterface();
int nLr = fITS->GetNLayersActive();
fClInfo = new Int_t[nLr<<1];
- for (int ilr=nLr;ilr--;) {
- fITS->GetLayerActive(ilr)->SetClusters(rec->GetClusters(ilr));
- }
//
fSeedsPool.ExpandCreateFast(1000); // RS TOCHECK
fFreeSeedsID.Set(1000);
//
- /*
- fTrCond.SetNLayers(fITS->GetNLayersActive());
- fTrCond.AddNewCondition(5);
- fTrCond.AddGroupPattern( (0x1<<0)|(0x1<<1) );
- fTrCond.AddGroupPattern( (0x1<<3)|(0x1<<4) );
- fTrCond.AddGroupPattern( (0x1<<5)|(0x1<<6) );
- //
- fTrCond.AddNewCondition(5);
- fTrCond.AddGroupPattern( (0x1<<0)|(0x1<<2) );
- fTrCond.AddGroupPattern( (0x1<<3)|(0x1<<4) );
- fTrCond.AddGroupPattern( (0x1<<5)|(0x1<<6) );
- //
- fTrCond.AddNewCondition(5);
- fTrCond.AddGroupPattern( (0x1<<1)|(0x1<<2) );
- fTrCond.AddGroupPattern( (0x1<<3)|(0x1<<4) );
- fTrCond.AddGroupPattern( (0x1<<5)|(0x1<<6) );
- //
- printf("Tracking Conditions: ");
- fTrCond.Print();
- */
}
//_________________________________________________________________________
//
protected:
AliITSUReconstructor* fReconstructor; // ITS global reconstructor
- AliITSURecoDet* fITS; // interface to ITS
+ AliITSURecoDet* fITS; // interface to ITS, borrowed from reconstructor
AliESDtrack* fCurrESDtrack; // current esd track in processing
Double_t fCurrMass; // current track mass
Double_t fTrImpData[kNTrImpData]; // data on track impact on the layer