]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/AliTRDCalibChamberStatus.cxx
change momentum correction and AOD track cuts
[u/mrichter/AliRoot.git] / TRD / AliTRDCalibChamberStatus.cxx
index 08d41e23934cdd14f1bbf147ed80ab9d3b2b5dba..3dde09eec72617d346e74ef7590ed3226ec67a93 100644 (file)
@@ -266,7 +266,7 @@ void AliTRDCalibChamberStatus::Init()
 
 }
 //_____________________________________________________________________
-void AliTRDCalibChamberStatus::ProcessTrack(AliTRDtrackV1 * trdTrack)
+void AliTRDCalibChamberStatus::ProcessTrack(const AliTRDtrackV1 * trdTrack)
 {
   //
   // Track Processing to get half chamber status
@@ -410,7 +410,7 @@ Bool_t AliTRDCalibChamberStatus::TestEventHisto(Int_t nevent) /*FOLD00*/
 
 }
 //_____________________________________________________________________
-void AliTRDCalibChamberStatus::AnalyseHisto(Int_t limit) /*FOLD00*/
+void AliTRDCalibChamberStatus::AnalyseHisto(Int_t limit, Double_t chamberlimit) /*FOLD00*/
 {
   //
   //  Create the AliTRDCalChamberStatus according to the fHnSparseI
@@ -429,7 +429,7 @@ void AliTRDCalibChamberStatus::AnalyseHisto(Int_t limit) /*FOLD00*/
     mean+=fHnSparseI->GetBinContent(bin,coord2);
   }
   if(fHnSparseI->GetNbins() > 0.0) mean/=fHnSparseI->GetNbins();
-  //printf(" mean tracklets per halfchamber %f \n",mean);
+  //printf(" mean tracklets per halfchamber %.3e \n",mean);
   if((fCounterEventNotEmpty < limit) && (mean < limit)) {
     // Say all good
     for (Int_t idet=0; idet<540; idet++) {
@@ -449,12 +449,15 @@ void AliTRDCalibChamberStatus::AnalyseHisto(Int_t limit) /*FOLD00*/
   Int_t coord[4];
   for(Int_t bin = 0; bin < fHnSparseI->GetNbins(); bin++) {
     
-    //Double_t content = fHnSparseI->GetBinContent(bin,coord);
-    fHnSparseI->GetBinContent(bin,coord);
-    // layer, stack, sector
+    Double_t content = fHnSparseI->GetBinContent(bin,coord);
+    
+               // layer, stack, sector
     Int_t detector = AliTRDgeometry::GetDetector(coord[1]-1,coord[2]-1,coord[0]-1);
-    //
-    //printf("Number of entries for detector %d: %f\n",detector,content);
+    
+               if(content<chamberlimit*mean) {
+                       //printf("Number of entries for detector %03d-%s: %.3e -> %.3f \n",detector,(coord[3]-1==0?"A":"B"),content,content/mean);                      
+                       continue;
+               }
     //
     // Check which halfchamber side corresponds to the bin number (0=A, 1=B)
     // Change the status accordingly
@@ -471,8 +474,6 @@ void AliTRDCalibChamberStatus::AnalyseHisto(Int_t limit) /*FOLD00*/
     }
   }
 
-  //printf("test2\n");
-
   // printf
   //for (Int_t idet=0; idet<540; idet++) {
   //  if(fCalChamberStatus->IsNoData(idet)) printf("No Data: chamber %d\n",idet);
@@ -481,7 +482,7 @@ void AliTRDCalibChamberStatus::AnalyseHisto(Int_t limit) /*FOLD00*/
 
 }
 //_____________________________________________________________________
-void AliTRDCalibChamberStatus::CheckEORStatus(AliTRDCalDCSv2 *calDCS) /*FOLD00*/
+void AliTRDCalibChamberStatus::CheckEORStatus(const AliTRDCalDCSv2 *calDCS) /*FOLD00*/
 {
   //
   //  Correct the AliTRDCalChamberStatus according to the AliTRDCalDCSv2
@@ -556,8 +557,8 @@ void AliTRDCalibChamberStatus::CheckEORStatus(AliTRDCalDCSv2 *calDCS) /*FOLD00*/
     //---------------------------------------
     // Change the status according to DCS
     //---------------------------------------
-    Int_t StatusData = fCalChamberStatus->GetStatus(det);
-    switch(StatusData) 
+    Int_t statusData = fCalChamberStatus->GetStatus(det);
+    switch(statusData) 
       {
       case 1: 
        if(stateA==0 && stateB==0) fCalChamberStatus->SetStatus(det,2); // completely masked from DCS
@@ -587,7 +588,7 @@ void AliTRDCalibChamberStatus::CheckEORStatus(AliTRDCalDCSv2 *calDCS) /*FOLD00*/
 }
 
 //_____________________________________________________________________________________
-void AliTRDCalibChamberStatus::Add(AliTRDCalibChamberStatus *calibChamberStatus) /*FOLD00*/
+void AliTRDCalibChamberStatus::Add(const AliTRDCalibChamberStatus *calibChamberStatus) /*FOLD00*/
 {
     //
     //  Add the THnSparseI of this calibChamberStatus
@@ -653,7 +654,7 @@ TH2D* AliTRDCalibChamberStatus::PlotSparseI(Int_t sm,Int_t side)
 
 }
 //_____________________________________________________________________
-TH2F *AliTRDCalibChamberStatus::MakeHisto2DSmPlEORStatus(AliTRDCalDCSv2 *calDCS, Int_t sm, Int_t pl) /*FOLD00*/
+TH2F *AliTRDCalibChamberStatus::MakeHisto2DSmPlEORStatus(const AliTRDCalDCSv2 *calDCS, Int_t sm, Int_t pl) /*FOLD00*/
 {
   //
   //  Plot globale state of the HalfChamberMerger (HCM)