]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
This is an upgrade to the FMD analysis which includes better sharing correction,...
authorhdalsgaa <hdalsgaa@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 11 May 2009 13:02:07 +0000 (13:02 +0000)
committerhdalsgaa <hdalsgaa@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 11 May 2009 13:02:07 +0000 (13:02 +0000)
At the moment the pseudorapidity is calculated instead of being taken from the ESDs. I need to understand the differences I observe between these two before changing this.

FMD/analysis/AliFMDAnalysisTaskBackgroundCorrection.cxx
FMD/analysis/AliFMDAnalysisTaskBackgroundCorrection.h
FMD/analysis/AliFMDAnalysisTaskCollector.cxx
FMD/analysis/AliFMDAnalysisTaskDensity.cxx
FMD/analysis/AliFMDAnalysisTaskDndeta.cxx
FMD/analysis/AliFMDAnalysisTaskDndeta.h
FMD/analysis/AliFMDAnalysisTaskSE.cxx
FMD/analysis/AliFMDAnalysisTaskSharing.cxx

index 5f6946f11a33e84f0617647f7a7dd7789ec56d52..6f70730de5e9e3ee48007e5aaf0bb54ce2034a45 100644 (file)
@@ -28,6 +28,7 @@ AliFMDAnalysisTaskBackgroundCorrection::AliFMDAnalysisTaskBackgroundCorrection()
 : fDebug(0),
   fOutputList(0),
   fInputList(0),
+  fHitList(0),
   fArray(0),
   fInputArray(0),
   fVertexString(0x0),
@@ -46,6 +47,7 @@ AliFMDAnalysisTaskBackgroundCorrection::AliFMDAnalysisTaskBackgroundCorrection(c
     fDebug(0),
     fOutputList(0),
     fInputList(0),
+    fHitList(0),
     fArray(),
     fInputArray(0),
     fVertexString(0x0),
@@ -71,6 +73,9 @@ void AliFMDAnalysisTaskBackgroundCorrection::CreateOutputObjects()
   if(!fOutputList)
     fOutputList = new TList();
   fOutputList->SetName("BackgroundCorrectedPerEvent");
+  if(!fHitList)
+    fHitList = new TList();
+  fHitList->SetName("HitsList");
   
   
   TH2F* hMult = 0;
@@ -107,6 +112,7 @@ void AliFMDAnalysisTaskBackgroundCorrection::CreateOutputObjects()
                              nSec, 0, 2*TMath::Pi());
            
            hHits->Sumw2();
+           fHitList->Add(hHits);
            fOutputList->Add(hHits);
            vtxArray->AddAtAndExpand(hMult,i);
            
index 8c1e4e43f3ca73adeca81d9c85020a28e60ac5eb..94623de101f1a9bb840d1934eb5fe63a2a52ea16 100644 (file)
@@ -21,6 +21,7 @@ class AliFMDAnalysisTaskBackgroundCorrection : public AliAnalysisTask
       fDebug(o.fDebug),
       fOutputList(0),
       fInputList(0),
+      fHitList(0),
       fArray(o.fArray),
       fInputArray(o.fInputArray),
       fVertexString(o.fVertexString),
@@ -40,11 +41,12 @@ class AliFMDAnalysisTaskBackgroundCorrection : public AliAnalysisTask
     void SetOutputVertex(TObjString* vtxString) {fOutputVertexString = vtxString;}
     //void SetInputVtx(TObjString* vtxString) {fVertexString = vtxString;}
     void SetOutputList(TList* outputList) {fOutputList = outputList;}
-        
+    void SetHitList(TList* hitList) {fHitList = hitList;}
  private:
     Int_t         fDebug;        //  Debug flag
     TList*        fOutputList;
     TList*        fInputList;
+    TList*        fHitList;
     TObjArray     fArray;
     TObjArray*    fInputArray;
     TObjString*   fVertexString;
index 9e38c6f68f674545645a8f1bf5cf8c2587d5fc0f..164cc5f36d9f5fab6bda6a20778f9502e2aef1f0 100644 (file)
@@ -17,7 +17,7 @@
 #include "AliStack.h"
 #include "AliESDVertex.h"
 #include "AliFMDAnaParameters.h"
-
+#include "AliFMDGeometry.h"
 ClassImp(AliFMDAnalysisTaskCollector)
 
 
@@ -142,14 +142,28 @@ void AliFMDAnalysisTaskCollector::Exec(Option_t */*option*/)
       
       for(UShort_t sec =0; sec < nsec;  sec++)  {
        for(UShort_t strip = 0; strip < nstr; strip++) {
-         Float_t eta = fmd->Eta(det,ring,sec,strip);
+         
+         
+         Float_t mult = fmd->Multiplicity(det,ring,sec,strip);
+         if(mult == AliESDFMD::kInvalidMult || mult == 0) continue;
+         AliFMDGeometry* geo = AliFMDGeometry::Instance();
+  
+         Double_t x,y,z;
+         geo->Detector2XYZ(det,ring,sec,strip,x,y,z);
+         
+         Double_t r = TMath::Sqrt(x*x+y*y);
+         
+         Double_t z_real      = z-vertex[2];
+         Double_t theta       = TMath::ATan2(r,z_real);
+         // std::cout<<"From EtaFromStrip "<<theta<<std::endl;
+         Double_t eta         =  -1*TMath::Log(TMath::Tan(0.5*theta));
+         //Float_t eta = fmd->Eta(det,ring,sec,strip);
          Int_t nEta = hBg->GetXaxis()->FindBin(eta);
-        
+         
          TObjArray* etaArray = (TObjArray*)fArray->At(nEta);
          TObjArray* detArray = (TObjArray*)etaArray->At(det);
          TH1F* Edist = (TH1F*)detArray->At(ir);
-         Float_t mult = fmd->Multiplicity(det,ring,sec,strip);
-         if(mult == AliESDFMD::kInvalidMult || mult == 0) continue;
+         
          Edist->Fill(mult);
          
        }
index c10a16729795a619bdb8ea72367e824ceddba347..bb0da361d4cb57cbcfcb55d5e2137f50b580a5d6 100644 (file)
@@ -19,6 +19,7 @@
 #include "AliESDVertex.h"
 #include "TMath.h"
 #include "AliFMDAnaParameters.h"
+#include "AliFMDParameters.h"
 #include "AliFMDGeometry.h"
 #include "AliFMDRing.h"
 
@@ -171,14 +172,35 @@ void AliFMDAnalysisTaskDensity::Exec(Option_t */*option*/)
        for(UShort_t strip = 0; strip < nstr; strip++) {
          Float_t mult = fESD->Multiplicity(det,ring,sec,strip);
          Float_t eta = fESD->Eta(det,ring,sec,strip);
-         Float_t mult_cut = 0.2;
+         
          if(mult == 0 || mult == AliESDFMD::kInvalidMult) continue;
          //Particle number cut goes here...
+         Double_t x,y,z;
+         geo->Detector2XYZ(det,ring,sec,strip,x,y,z);
+         Float_t phi = TMath::ATan2(y,x);
+         if(phi<0)
+           phi = phi+2*TMath::Pi();
+         Float_t   r     = TMath::Sqrt(TMath::Power(x,2)+TMath::Power(y,2));
+         Float_t   theta = TMath::ATan2(r,z-vertex[2]);
+         Float_t   etacalc   = -1*TMath::Log(TMath::Tan(0.5*theta));
+         eta = etacalc;
+                 
+         Float_t m   = pars->GetMPV(det,ring,eta);
+         Float_t s   = pars->GetSigma(det,ring,eta);
+         AliFMDParameters* recopars = AliFMDParameters::Instance();
+         
+         Float_t mult_cut = m-2*s; //0.15;//0.2;//m-3*s;// 0.2;//0.01;//m-2*s;//0.2;
+         
+         mult_cut = (4*recopars->GetPedestalWidth(det,ring,sec,strip))/(recopars->GetPulseGain(det,ring,sec,strip)*recopars->GetDACPerMIP());
+         
          Float_t nParticles = 0;
          if(fESD->GetUniqueID() == kTRUE) {
            //proton + proton
-           if(mult > mult_cut) 
+           
+           if(mult > mult_cut) {
              nParticles = 1; 
+           
+           }
          }
          else {
            
@@ -196,24 +218,26 @@ void AliFMDAnalysisTaskDensity::Exec(Option_t */*option*/)
              3*beta*TMath::Landau(mult,3*mpv+3*sigma*TMath::Log(3),3*sigma,kTRUE);
            
            
-           if(mult > 0){//mult_cut) {
+           if(mult > mult_cut) {
              if(sumCor) nParticles = weight / sumCor;
              else nParticles = 1;
+             
            }
            //std::cout<<sumCor<<"    "<<weight<<"    "<<"    "<<mult<<"  "<<nParticles<<std::endl;
            
          }
          
          
-         Double_t x,y,z;
-         geo->Detector2XYZ(det,ring,sec,strip,x,y,z);
-         Float_t phi = TMath::ATan2(y,x);
-         if(phi<0)
-           phi = phi+2*TMath::Pi();
+         
+         
+         
          Float_t correction = GetAcceptanceCorrection(ring,strip);
          if(correction) nParticles = nParticles / correction;
-         hMult->Fill(eta,phi,nParticles);
+         if(nParticles > 0)
+           hMult->Fill(eta,phi,nParticles);
          
+         //if(det == 1 && ring =='I' && nParticles >0)
+         //  std::cout<<mult<<"    "<<sec<<"    "<<strip<<"   "<<eta<<"  "<<phi<<"   "<<etacalc<<std::endl;
          
        }
       }
index 018f8c6aa41e351138492cae35291e283086188e..52693340610f1bf59aa29f0f34a745078508597b 100644 (file)
 #include "AliFMDAnaParameters.h"
 #include "AliFMDGeometry.h"
 #include "AliGenEventHeader.h"
+#include "AliHeader.h"
 #include "TDatabasePDG.h"
 #include "TParticlePDG.h"
+#include "AliFMDStripIndex.h"
 ClassImp(AliFMDAnalysisTaskDndeta)
 
 
@@ -37,7 +39,8 @@ AliFMDAnalysisTaskDndeta::AliFMDAnalysisTaskDndeta()
   fNevents(),
   fNMCevents(),
   fStandalone(kTRUE),
-  fMCevent(0)
+  fMCevent(0),
+  fLastTrackByStrip()
 {
   // Default constructor
   DefineInput (0, TList::Class());
@@ -55,7 +58,8 @@ AliFMDAnalysisTaskDndeta::AliFMDAnalysisTaskDndeta(const char* name, Bool_t SE):
     fNevents(),
     fNMCevents(),
     fStandalone(kTRUE),
-    fMCevent(0)
+    fMCevent(0),
+    fLastTrackByStrip()
 {
   fStandalone = SE;
   if(fStandalone) {
@@ -79,6 +83,7 @@ void AliFMDAnalysisTaskDndeta::CreateOutputObjects()
   
   
   TH2F* hMult = 0;
+  TH1F* hHits = 0;
   TH1F* hPrimVertexBin = 0;
   
   
@@ -113,8 +118,18 @@ void AliFMDAnalysisTaskDndeta::CreateOutputObjects()
                              hBg->GetXaxis()->GetXmin(),
                              hBg->GetXaxis()->GetXmax(),
                              nSec, 0, 2*TMath::Pi());
+           
+           hHits  = new TH1F(Form("hHits_FMD%d%c_vtxbin%d",det,ringChar,i),Form("hHits_FMD%d%c_vtxbin%d",det,ringChar,i),
+                             hBg->GetNbinsX(),
+                             hBg->GetXaxis()->GetXmin(),
+                             hBg->GetXaxis()->GetXmax());
+                           
+           
+           
            hMult->Sumw2();
+           hHits->Sumw2();
            fOutputList->Add(hMult);
+           fOutputList->Add(hHits);
            vtxArray->AddAtAndExpand(hMult,i);
            
          }
@@ -206,13 +221,25 @@ void AliFMDAnalysisTaskDndeta::Terminate(Option_t */*option*/) {
 }
 //_____________________________________________________________________
 void AliFMDAnalysisTaskDndeta::ProcessPrimary() {
-
+  
+  fLastTrackByStrip.Reset(-1);
+  
   AliFMDAnaParameters* pars = AliFMDAnaParameters::Instance();
   
   AliMCParticle* particle = 0;
   AliStack* stack = fMCevent->Stack();
   
   TH1F* hPrimary = (TH1F*)fOutputList->FindObject("hMultvsEta");
+  AliHeader* header            = fMCevent->Header();
+  AliGenEventHeader* genHeader = header->GenEventHeader();
+  
+  TArrayF vertex;
+  genHeader->PrimaryVertex(vertex);
+  if(TMath::Abs(vertex.At(2)) > pars->GetVtxCutZ())
+    return;
+  Double_t delta           = 2*pars->GetVtxCutZ()/pars->GetNvtxBins();
+  Double_t vertexBinDouble = (vertex.At(2) + pars->GetVtxCutZ()) / delta;
+  Int_t    vertexBin       = (Int_t)vertexBinDouble;
   
   Bool_t firstTrack = kTRUE;
   Int_t nTracks = fMCevent->GetNumberOfTracks();
@@ -220,14 +247,10 @@ void AliFMDAnalysisTaskDndeta::ProcessPrimary() {
     particle = fMCevent->GetTrack(i);
     if(!particle)
       continue;
-    if(TMath::Abs(particle->Zv()) > pars->GetVtxCutZ())
-      continue;
     
     if(stack->IsPhysicalPrimary(i) && particle->Charge() != 0) {
       hPrimary->Fill(particle->Eta());
-      Double_t delta           = 2*pars->GetVtxCutZ()/pars->GetNvtxBins();
-      Double_t vertexBinDouble = (particle->Zv() + pars->GetVtxCutZ()) / delta;
-      Int_t    vertexBin       = (Int_t)vertexBinDouble;
+      
 
       TH1F* hPrimVtxBin = (TH1F*)fOutputList->FindObject(Form("primmult_vtxbin%d",vertexBin));
       hPrimVtxBin->Fill(particle->Eta());
@@ -236,13 +259,46 @@ void AliFMDAnalysisTaskDndeta::ProcessPrimary() {
        firstTrack = kFALSE;
       }
     }
+     
+    for(Int_t j=0; j<particle->GetNumberOfTrackReferences();j++) {
       
+      AliTrackReference* ref = particle->GetTrackReference(j);
+      UShort_t det,sec,strip;
+      Char_t   ring;
+      if(ref->DetectorId() != AliTrackReference::kFMD)
+       continue;
+      AliFMDStripIndex::Unpack(ref->UserId(),det,ring,sec,strip);
+      Float_t thisStripTrack = fLastTrackByStrip.operator()(det,ring,sec,strip);
+      if(particle->Charge() != 0 && i != thisStripTrack ) {
+       Double_t x,y,z;
+       AliFMDGeometry* fmdgeo = AliFMDGeometry::Instance();
+       fmdgeo->Detector2XYZ(det,ring,sec,strip,x,y,z);
+       
+       Float_t   phi   = TMath::ATan2(y,x);
+       if(phi<0) phi   = phi+2*TMath::Pi();
+       Float_t   r     = TMath::Sqrt(TMath::Power(x,2)+TMath::Power(y,2));
+       Float_t   theta = TMath::ATan2(r,z-vertex.At(2));
+       Float_t   eta   = -1*TMath::Log(TMath::Tan(0.5*theta));
+       TH1F* hHits = (TH1F*)fOutputList->FindObject(Form("hHits_FMD%d%c_vtxbin%d",det,ring,vertexBin));
+       hHits->Fill(eta);
+       Float_t nstrips = (ring =='O' ? 256 : 512);
+       
+       //      if(det == 1 && ring == 'I')
+       //  std::cout<<"hit in FMD 1I "<<sec<<"   "<<strip<<"   "<<eta<<"  "<<phi<<std::endl;
+       fLastTrackByStrip.operator()(det,ring,sec,strip) = (Float_t)i;
+       
+       if(strip >0)
+         fLastTrackByStrip.operator()(det,ring,sec,strip-1) = (Float_t)i;
+       if(strip < (nstrips - 1))
+         fLastTrackByStrip.operator()(det,ring,sec,strip+1) = (Float_t)i;
+       
+       
+      }
+    }
+    
+    
   }
   
-  
-  
-  
-
 }
 //_____________________________________________________________________
 //
index c12b76ab7a6c58177414eaeded33438ae89cdd35..c690f0763f6785ed6bd851bc97e4707dac0e2a27 100644 (file)
@@ -11,7 +11,7 @@
 #include "TArrayI.h"
 #include "TH1I.h"
 #include "AliMCEvent.h"
-
+#include "AliFMDFloatMap.h"
 class AliFMDAnalysisTaskDndeta : public AliAnalysisTask
 {
  public:
@@ -28,7 +28,8 @@ class AliFMDAnalysisTaskDndeta : public AliAnalysisTask
       fNevents(o.fNevents),
       fNMCevents(o.fNMCevents),
       fStandalone(o.fStandalone),
-      fMCevent(o.fMCevent) {}
+      fMCevent(o.fMCevent),
+      fLastTrackByStrip(o.fLastTrackByStrip) {}
     AliFMDAnalysisTaskDndeta& operator=(const AliFMDAnalysisTaskDndeta&) { return *this; }
     // Implementation of interface methods
     virtual void ConnectInputData(Option_t *option = "");
@@ -56,6 +57,7 @@ class AliFMDAnalysisTaskDndeta : public AliAnalysisTask
     TH1I          fNMCevents;
     Bool_t        fStandalone;
     AliMCEvent*   fMCevent;
+    AliFMDFloatMap fLastTrackByStrip;
     ClassDef(AliFMDAnalysisTaskDndeta, 0); // Analysis task for FMD analysis
 };
  
index 3a0a2fe7d339431832cda0cee7a07644b093be7d..2222046598b70793d7da3403023a0d581e3b7bcf 100644 (file)
@@ -53,6 +53,7 @@ void AliFMDAnalysisTaskSE::UserCreateOutputObjects()
   
   fBackground.SetInputList(densitylist);
   fBackground.SetOutputList(bgcorlist);
+  fBackground.SetHitList(fListOfHistos);
   fBackground.SetOutputVertex(vtxString1);
   
   fDndeta.SetInputVertex(vtxString1);
index ddb384ee5c62ad17ad8687d217fc737672bbfe52..0d34cddfbf6c0bb059a0d1878f18ebcb92dd0fab 100644 (file)
@@ -158,12 +158,12 @@ void AliFMDAnalysisTaskSharing::Exec(Option_t */*option*/)
          
          if(mult == AliESDFMD::kInvalidMult || mult == 0) continue;
          
-         Double_t eta  = fmd->Eta(det,ring,sec,strip);//EtaFromStrip(det,ring,sec,strip,vertex[2]);
+         Double_t eta  = EtaFromStrip(det,ring,sec,strip,vertex[2]);//fmd->Eta(det,ring,sec,strip);
          //std::cout<<EtaFromStrip(det,ring,sec,strip,vertex[2]) <<"    "<<fmd->Eta(det,ring,sec,strip)<<std::endl;
          
          hEdist->Fill(mult);
          if(fmd->IsAngleCorrected())
-           mult = mult/TMath::Cos(Eta2Theta(fmd->Eta(det,ring,sec,strip)));
+           mult = mult/TMath::Cos(Eta2Theta(eta));
          Float_t Eprev = 0;
          Float_t Enext = 0;
          if(strip != 0)
@@ -205,63 +205,93 @@ Float_t AliFMDAnalysisTaskSharing::GetMultiplicityOfStrip(Float_t mult,
                                                          Float_t Enext,
                                                          UShort_t   det,
                                                          Char_t  ring,
-                                                         UShort_t /*sec*/,
-                                                         UShort_t /*strip*/) {
+                                                         UShort_t sec,
+                                                         UShort_t strip) {
   AliFMDAnaParameters* pars = AliFMDAnaParameters::Instance();
  
   Float_t merged_energy = 0;
-  Float_t nParticles = 0;
-  Float_t cutLow  = 0.2;
-  Float_t cutHigh = pars->GetMPV(det,ring,eta) -1*pars->GetSigma(det,ring,eta);
+  //Float_t nParticles = 0;
+  Float_t cutLow  = 0.15;
+  AliFMDParameters* recopars = AliFMDParameters::Instance();
+  cutLow = (4*recopars->GetPedestalWidth(det,ring,sec,strip))/(recopars->GetPulseGain(det,ring,sec,strip)*recopars->GetDACPerMIP());
+  
+  
+  
+  Float_t cutHigh = pars->GetMPV(det,ring,eta);// - pars->GetSigma(det,ring,eta);
   // Float_t cutPart = pars->GetMPV(det,ring,eta) - 5*pars->GetSigma(det,ring,eta);
   Float_t Etotal  = mult;
   
   //if(mult > 5)
   //  std::cout<<mult<<"    "<<det<<"    "<<ring<<"   "<<sec<<"    "<<strip<<std::endl;
+  //Float_t slow_particle_cut = 2*pars->GetMPV(det,ring,eta);
   
-  if(foutputESDFMD->GetUniqueID() == kTRUE) {
+  //if(recopars->IsDead(det,ring,sec,strip))
+  //  std::cout<<"dead channel"<<std::endl;
+  //if(foutputESDFMD->GetUniqueID() == kTRUE) {
+  // Float_t mpv = pars->GetMPV(det,ring,eta);
+  
+  /*
+  if(foutputESDFMD->GetUniqueID() == kFALSE) {
     
+    if(mult > 15)
+      return 0;
+
     if(mult > cutLow ) {
       fEnergy = fEnergy + mult;
       fNstrips++;
     }
-  if((Enext <0.01 && fEnergy >0) || fNstrips >2 ) {
     
-          
-    //if((fEnergy*TMath::Cos(Eta2Theta(eta))) > cutPart || fNstrips > 1) {
+    if( (Enext < cutLow && fEnergy > 0 )   || fNstrips >2 ){
+      
+      //if((fEnergy*TMath::Cos(Eta2Theta(eta))) > cutPart || fNstrips > 1) {
       nParticles = 1;
       merged_energy = fEnergy*TMath::Cos(Eta2Theta(eta));
       TH1F* hEdist = (TH1F*)fDiagList.FindObject(Form("Edist_after_sharing_FMD%d%c",det,ring));
       hEdist->Fill(fEnergy);
       TH1F* hNstrips = (TH1F*)fDiagList.FindObject(Form("N_strips_hit_FMD%d%c",det,ring));
       hNstrips->Fill(fNstrips);
-      //  std::cout<<Form("Merged signals %f %f %f into %f , %f in strip %d, sec %d, ring %c, det %d",Eprev, mult, Enext, fEnergy/TMath::Cos(Eta2Theta(eta)),fEnergy,strip,sec,ring,det )<<std::endl;
+      // std::cout<<Form("Merged signals %f %f %f into %f , %f in det %d, ring %c, sec %d, strip %d",Eprev, mult, Enext, fEnergy/TMath::Cos(Eta2Theta(eta)),fEnergy,det,ring,sec,strip )<<std::endl;
       
       // }
     // else
     //std::cout<<Form("NO HIT  for  %f %f %f into %f , %f in strip %d, sec %d, ring %c, det %d, cuts %f , %f",Eprev, mult, Enext, fEnergy/TMath::Cos(Eta2Theta(eta)),fEnergy,strip,sec,ring,det,cutPart,cutHigh )<<std::endl;
+      
+      fEnergy  = 0;
+      fNstrips = 0;
     
-    fEnergy  = 0;
-    fNstrips = 0;
     return merged_energy;
+    }
+    
+    
+    return 0;
+    
   }
-  
-  return 0;
-  
-  }
-  else {
-     
+  else {*/
+    //std::cout<<det<<ring<<"   "<<sec<<"    "<<strip<<"   "<<cutLow<<std::endl;
   if(fSharedThis) {
     fSharedThis      = kFALSE;
     fSharedPrev      = kTRUE;
     return 0.;
   }
   
-  if(mult < cutLow) {
+  /*  if(mult < 0.33*pars->GetMPV(det,ring,eta)) {
     fSharedThis      = kFALSE;
     fSharedPrev      = kFALSE;
     return 0;
-  }
+    }*/
+  if(mult<Enext && Enext>cutHigh && foutputESDFMD->GetUniqueID() == kTRUE)
+    {
+      fSharedThis      = kFALSE;
+      fSharedPrev      = kFALSE;
+      return 0;
+    }
+  if(mult > 15)
+    {
+      std::cout<<"rejecting hit in FMD "<<det<<" "<<ring<<std::endl;
+      fSharedThis      = kFALSE;
+      fSharedPrev      = kFALSE;
+      return 0;
+    }
   
   if(Eprev > cutLow && Eprev < cutHigh && !fSharedPrev ) {
     Etotal += Eprev;
@@ -276,10 +306,11 @@ Float_t AliFMDAnalysisTaskSharing::GetMultiplicityOfStrip(Float_t mult,
   
   Etotal = Etotal*TMath::Cos(Eta2Theta(eta));
   if(Etotal > 0) {
+    
     merged_energy = Etotal;
     fSharedPrev      = kTRUE;
-    //if(det == 3 && ring =='I')
-    //  std::cout<<Form("Merged signals %f %f %f into %f , %f in strip %d, sec %d, ring %c, det %d",Eprev, mult, Enext, Etotal/TMath::Cos(Eta2Theta(eta)),Etotal,strip,sec,ring,det )<<std::endl;
+    // if(det == 1 && ring =='I')
+    // std::cout<<Form("Merged signals %f %f %f into %f , %f in strip %d, sec %d, ring %c, det %d",Eprev, mult, Enext, Etotal/TMath::Cos(Eta2Theta(eta)),Etotal,strip,sec,ring,det )<<std::endl;
   }
     else{// if(Etotal > 0) {
       //if(det == 3 && ring =='I')
@@ -290,7 +321,7 @@ Float_t AliFMDAnalysisTaskSharing::GetMultiplicityOfStrip(Float_t mult,
   // merged_energy = mult;
   
   return merged_energy; 
-  }  
+  //}  
 }
 //_____________________________________________________________________
 void AliFMDAnalysisTaskSharing::GetVertex(Double_t* vertexXYZ) 
@@ -327,7 +358,7 @@ Float_t AliFMDAnalysisTaskSharing::Eta2Theta(Float_t eta) {
   if(eta < 0)
     theta = theta-TMath::Pi();
   
-  std::cout<<"From eta2Theta: "<<theta<<"   "<<eta<<std::endl;
+  //  std::cout<<"From eta2Theta: "<<theta<<"   "<<eta<<std::endl;
   return theta;