#include "AliITSRawClusterSDD.h"
#include "AliITSRawClusterSSD.h"
#include "AliITSRecPoint.h"
-#include "AliITSdigit.h"
+#include "AliITSdigitSPD.h"
+#include "AliITSdigitSDD.h"
+#include "AliITSdigitSSD.h"
#include "AliITSgeom.h"
#include "AliITShit.h"
#include "AliITSmodule.h"
#include "AliITSsimulationSSD.h"
#include "AliMC.h"
#include "AliITSDigitizer.h"
+#include "AliITSclustererV2.h"
+#include "AliITStrackerV2.h"
+#include "AliITSpidESD.h"
+#include "AliV0vertexer.h"
+#include "AliCascadeVertexer.h"
+#include "AliESD.h"
ClassImp(AliITS)
//______________________________________________________________________
void AliITS::AddSimDigit(Int_t id,Float_t phys,Int_t *digits,Int_t *tracks,
Int_t *hits,Float_t *charges){
- // Add a simulated digit to the list.
- // Inputs:
- // Int_t id Detector type number.
- // Float_t phys Physics indicator. See AliITSdigits.h
- // Int_t *digits Integer array containing the digits info. See
- // AliITSdigit.h
- // Int_t *tracks Integer array [AliITSdigitS?D::GetNTracks()]
- // containing the track numbers that contributed to
- // this digit.
- // Int_t *hits Integer array [AliITSdigitS?D::GetNTracks()]
- // containing the hit numbers, from AliITSmodule, that
- // contributed to this digit.
- // Float_t *charge Floating point array of the signals contributed
- // to this digit by each track.
- // Outputs:
- // none.
- // Return:
- // none.
+ // Add a simulated digit to the list.
+ // Inputs:
+ // Int_t id Detector type number.
+ // Float_t phys Physics indicator. See AliITSdigits.h
+ // Int_t *digits Integer array containing the digits info. See
+ // AliITSdigit.h
+ // Int_t *tracks Integer array [AliITSdigitS?D::GetNTracks()]
+ // containing the track numbers that contributed to
+ // this digit.
+ // Int_t *hits Integer array [AliITSdigitS?D::GetNTracks()]
+ // containing the hit numbers, from AliITSmodule, that
+ // contributed to this digit.
+ // Float_t *charge Floating point array of the signals contributed
+ // to this digit by each track.
+ // Outputs:
+ // none.
+ // Return:
+ // none.
- TClonesArray &ldigits = *((TClonesArray*)fDtype->At(id));
- switch(id){
- case 0:
- new(ldigits[fNdtype[id]++]) AliITSdigitSPD(digits,tracks,hits);
- break;
- case 1:
- new(ldigits[fNdtype[id]++]) AliITSdigitSDD(phys,digits,tracks,
- hits,charges);
- break;
- case 2:
- new(ldigits[fNdtype[id]++]) AliITSdigitSSD(digits,tracks,hits);
- break;
- } // end switch id
+ TClonesArray &ldigits = *((TClonesArray*)fDtype->At(id));
+ AliITSresponseSDD *resp = 0;
+ switch(id){
+ case 0:
+ new(ldigits[fNdtype[id]++]) AliITSdigitSPD(digits,tracks,hits);
+ break;
+ case 1:
+ resp = (AliITSresponseSDD*)DetType(1)->GetResponseModel();
+ new(ldigits[fNdtype[id]++]) AliITSdigitSDD(phys,digits,tracks,
+ hits,charges,resp);
+ break;
+ case 2:
+ new(ldigits[fNdtype[id]++]) AliITSdigitSSD(digits,tracks,hits);
+ break;
+ } // end switch id
}
//______________________________________________________________________
void AliITS::MakeTreeC(Option_t *option){
}
+//_____________________________________________________________________________
+void AliITS::Reconstruct() const
+{
+// reconstruct clusters
+
+ AliLoader* loader = GetLoader();
+ loader->LoadRecPoints("recreate");
+ loader->LoadDigits("read");
+
+ AliITSclustererV2 clusterer(GetITSgeom());
+ AliRunLoader* runLoader = loader->GetRunLoader();
+ Int_t nEvents = runLoader->GetNumberOfEvents();
+
+ for (Int_t iEvent = 0; iEvent < nEvents; iEvent++) {
+ runLoader->GetEvent(iEvent);
+
+ TTree* treeClusters = loader->TreeR();
+ if (!treeClusters) {
+ loader->MakeTree("R");
+ treeClusters = loader->TreeR();
+ }
+ TTree* treeDigits = loader->TreeD();
+ if (!treeDigits) {
+ Error("Reconstruct", "Can't get digits tree !");
+ return;
+ }
+
+ clusterer.Digits2Clusters(treeDigits, treeClusters);
+
+ loader->WriteRecPoints("OVERWRITE");
+ }
+
+ loader->UnloadRecPoints();
+ loader->UnloadDigits();
+}
+
+//_____________________________________________________________________________
+AliTracker* AliITS::CreateTracker() const
+{
+// create an ITS tracker
+
+ return new AliITStrackerV2(GetITSgeom());
+}
+
+//_____________________________________________________________________________
+void AliITS::FillESD(AliESD* esd) const
+{
+// make PID, find V0s and cascades
+
+ Double_t parITS[] = {34., 0.15, 10.};
+ AliITSpidESD itsPID(parITS);
+ itsPID.MakePID(esd);
+
+ // V0 finding
+ Double_t cuts[]={33, // max. allowed chi2
+ 0.16,// min. allowed negative daughter's impact parameter
+ 0.05,// min. allowed positive daughter's impact parameter
+ 0.080,// max. allowed DCA between the daughter tracks
+ 0.998,// max. allowed cosine of V0's pointing angle
+ 0.9, // min. radius of the fiducial volume
+ 2.9 // max. radius of the fiducial volume
+ };
+ AliV0vertexer vtxer(cuts);
+ Double_t vtx[3], cvtx[6];
+ esd->GetVertex(vtx, cvtx);
+ vtxer.SetVertex(vtx);
+ vtxer.Tracks2V0vertices(esd);
+
+ // cascade finding
+ Double_t cts[]={33., // max. allowed chi2
+ 0.05, // min. allowed V0 impact parameter
+ 0.008, // window around the Lambda mass
+ 0.035, // min. allowed bachelor's impact parameter
+ 0.10, // max. allowed DCA between a V0 and a track
+ 0.9985, //max. allowed cosine of the cascade pointing angle
+ 0.9, // min. radius of the fiducial volume
+ 2.9 // max. radius of the fiducial volume
+ };
+ AliCascadeVertexer cvtxer=AliCascadeVertexer(cts);
+ cvtxer.V0sTracks2CascadeVertices(esd);
+}
+