]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Minor changes
authorcoppedis <coppedis@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 9 Oct 2007 08:23:51 +0000 (08:23 +0000)
committercoppedis <coppedis@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 9 Oct 2007 08:23:51 +0000 (08:23 +0000)
ZDC/AliZDCReconstructor.cxx

index 5705ca2e85d66c3e7b3f557e2c69a920efdb0d3c..2c139c9ce1ad178476cfbf2c26af78bf5fd04d98 100644 (file)
@@ -339,9 +339,9 @@ void AliZDCReconstructor::ReconstructEvent(TTree *clustersTree,
   Float_t maxValEZN1 = fCalibData->GetEZN1MaxValue();
   Float_t maxValEZP1 = fCalibData->GetEZP1MaxValue();
   Float_t maxValEZDC1 = fCalibData->GetEZDC1MaxValue();
-  Float_t maxValEZN2 = fCalibData->GetEZN1MaxValue();
-  Float_t maxValEZP2 = fCalibData->GetEZP1MaxValue();
-  Float_t maxValEZDC2 = fCalibData->GetEZDC1MaxValue();
+  Float_t maxValEZN2 = fCalibData->GetEZN2MaxValue();
+  Float_t maxValEZP2 = fCalibData->GetEZP2MaxValue();
+  Float_t maxValEZDC2 = fCalibData->GetEZDC2MaxValue();
   //
   //printf("\n\t AliZDCReconstructor -> ZEMEndPoint %1.0f, ZEMCutValue %1.0f,"
   //   " ZEMSupValue %1.0f, ZEMInfValue %1.0f\n",endPointZEM,cutValueZEM,supValueZEM,infValueZEM);
@@ -483,12 +483,20 @@ void AliZDCReconstructor::ReconstructEvent(TTree *clustersTree,
   nPart = 207-nGenSpecNLeft-nGenSpecPLeft;
   nPartTotLeft = 207-nGenSpecLeft;
   nPartTotRight = 207-nGenSpecRight;
+  if(nPart<0) nPart=0;
+  if(nPartTotLeft<0) nPartTotLeft=0;
+  if(nPartTotRight<0) nPartTotRight=0;
   //
-  /*printf("\n\t AliZDCReconstructor -> nGenSpecNLeft %d, nGenSpecPLeft %d, nGenSpecLeft %d,"
-      " nGenSpecNRight %d, nGenSpecPRight %d, nGenSpecRight %d\n", 
-      nGenSpecNLeft, nGenSpecPLeft, nGenSpecLeft, nGenSpecNRight, 
-      nGenSpecPRight, nGenSpecRight);*/
-
+  // *** DEBUG ***
+/*  printf("\n\t AliZDCReconstructor -> calibSumZN1HG %1.0f, calibSumZP1HG %1.0f,"
+      "  calibSumZN2HG %1.0f, calibSumZP2HG %1.0f, corrADCZEMHG %1.0f\n", 
+      calibSumZN1HG,calibSumZP1HG,calibSumZN2HG,calibSumZP2HG,corrADCZEMHG);
+  printf("\t AliZDCReconstructor -> nGenSpecNLeft %d, nGenSpecPLeft %d, nGenSpecLeft %d\n"
+      "\t\t nGenSpecNRight %d, nGenSpecPRight %d, nGenSpecRight %d\n", 
+      nGenSpecNLeft, nGenSpecPLeft, nGenSpecLeft, 
+      nGenSpecNRight, nGenSpecPRight, nGenSpecRight);
+  printf("\t AliZDCReconstructor ->  NpartL %d,  NpartR %d,  b %1.2f fm\n\n",nPartTotLeft, nPartTotRight, impPar);
+*/
   // create the output tree
   AliZDCReco reco(calibSumZN1HG, calibSumZP1HG, calibSumZN2HG, calibSumZP2HG, 
                  calibTowZN1LG, calibTowZN2LG, calibTowZP1LG, calibTowZP2LG, 
@@ -516,7 +524,12 @@ void AliZDCReconstructor::FillZDCintoESD(TTree *clustersTree, AliESDEvent* esd)
   clustersTree->SetBranchAddress("ZDC", &preco);
 
   clustersTree->GetEntry(0);
-  esd->SetZDC(reco.GetZN1Energy(), reco.GetZP1Energy(), reco.GetZEMsignal(),
+  Double_t tZN1Ene[4], tZN2Ene[4];
+  for(Int_t i=0; i<4; i++){
+     tZN1Ene[i] = reco.GetZN1EnTow(i);
+     tZN2Ene[i] = reco.GetZN2EnTow(i);
+  }
+  esd->SetZDC(tZN1Ene, tZN2Ene, reco.GetZN1Energy(), reco.GetZP1Energy(), reco.GetZEMsignal(),
              reco.GetZN2Energy(), reco.GetZP2Energy(), 
              reco.GetNPartLeft());
   //