]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Bug in number of layers.
authoramastros <amastros@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 12 May 2011 16:26:17 +0000 (16:26 +0000)
committeramastros <amastros@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 12 May 2011 16:26:17 +0000 (16:26 +0000)
readHits updated

ITS/UPGRADE/AliITSUpgradeClusterFinder.cxx
ITS/UPGRADE/readHit.C

index ca99ba34a9ba6b66ada34989a3dc50fc37606a4b..93d29fd09ef919420338fa084d7bebd28abbfa5a 100644 (file)
@@ -811,7 +811,7 @@ void AliITSUpgradeClusterFinder::DigitsToRecPoints(const TObjArray *digList) {
   AliITSRecPointU  recpnt;
   Int_t nClusters =0;
   TClonesArray &lrecp = *fRecPoints;
-  for(Int_t ilayer=0; ilayer < 6 ;ilayer ++){
+  for(Int_t ilayer=0; ilayer < segmentation->GetNLayers() ;ilayer ++){
     NewModule();
     TClonesArray *pArrDig= (TClonesArray*)digList->At(ilayer);
     StartEvent(); 
index 9bb5aae1667c938abdbbf4ad3f34be0dafa17c48..03aa5d6c4dd4b5d1dfb0e38ff79792b07eaae9f4 100644 (file)
@@ -12,12 +12,14 @@ void readHit(){
   zGlob->SetXTitle("cm");
 
   Int_t nbins=100;
-  Int_t xmin=0;
-  Int_t xmax=0.1;//00*1e-09;
+  Double_t xmin=0;
+  Double_t xmax=0.0001;//00*1e-09;
 
-  const Int_t nLayers = 6;
+ AliITSsegmentationUpgrade *segmentation = new AliITSsegmentationUpgrade();
+ const Int_t nLayers = segmentation->GetNLayers();
 
-  TH1D *hDeLoss[nLayers];
+  TH1D **hDeLoss;
+  hDeLoss = new TH1D[nLayers];
   for(Int_t i=0; i< nLayers; i++ ) {
     hDeLoss[i] = new TH1D(Form("hDeLossl%i",i),Form("E loss distribution [ Layer %i] ",i),nbins,xmin,xmax);
     hDeLoss[i]->SetXTitle("GeV");
@@ -59,7 +61,8 @@ void readHit(){
          pHit->GetPositionG(xg,yg,zg);
          xyGlob->Fill(xg,yg);
          zGlob->Fill(zg);
-         hDeLoss[pHit->GetModule()]->Fill(pHit->GetIonization());
+          Int_t layer = segmentation->GetLayerFromIdIndex(pHit->GetModule());
+          hDeLoss[layer]->Fill(pHit->GetIonization());
        } // is primary
       }//loop hit 
     }//entryloopHitList