<commit_before>/**************************************************************************
 * Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
 *                                                                        *
 * Author: The ALICE Off-line Project.                                    *
 * Contributors are mentioned in the code where appropriate.              *
 *                                                                        *
 * Permission to use, copy, modify and distribute this software and its   *
 * documentation strictly for non-commercial purposes is hereby granted   *
 * without fee, provided that the above copyright notice appears in all   *
 * copies and that both the copyright notice and this permission notice   *
 * appear in the supporting documentation. The authors make no claims     *
 * about the suitability of this software for any purpose. It is          *
 * provided "as is" without express or implied warranty.                  *
 **************************************************************************/
///////////////////////////////////////////////////////////////////////////
//  Plane Efficiency class for ITS                      
//  It is used for module by module efficiency of the SSD,        
//  evaluated by tracks
//  (Inherits from AliITSPlaneEff)
//  Author: <NAME> 
//          <EMAIL>
//
///////////////////////////////////////////////////////////////////////////

/*  $Id$ */

#include <TMath.h>
#include <TH1F.h>
#include <TFile.h>
#include <TTree.h>
#include <TROOT.h>
#include "AliITSPlaneEffSSD.h"
#include "AliLog.h"
#include "AliCDBStorage.h"
#include "AliCDBEntry.h"
#include "AliCDBManager.h"
//#include "AliCDBRunRange.h"
#include "AliITSCalibrationSSD.h"

ClassImp(AliITSPlaneEffSSD)	
//______________________________________________________________________
AliITSPlaneEffSSD::AliITSPlaneEffSSD():
  AliITSPlaneEff(),
  fHisResX(0),
  fHisResZ(0),
  fHisResXZ(0),
  fHisClusterSize(0),
  fHisTrackErrX(0),
  fHisTrackErrZ(0),
  fHisClusErrX(0),
  fHisClusErrZ(0){
  for (UInt_t i=0; i<kNModule; i++){
  // default constructor
    fFound[i]=0;
    fTried[i]=0;
  }
  AliDebug(1,Form("Calling default constructor"));
}
//______________________________________________________________________
AliITSPlaneEffSSD::~AliITSPlaneEffSSD(){
    // destructor
    // Inputs:
    //    none.
    // Outputs:
    //    none.
    // Return:
    //     none.
    DeleteHistos();
}
//______________________________________________________________________
AliITSPlaneEffSSD::AliITSPlaneEffSSD(const AliITSPlaneEffSSD &s) : AliITSPlaneEff(s),
fHisResX(0),
fHisResZ(0),
fHisResXZ(0),
fHisClusterSize(0),
fHisTrackErrX(0),
fHisTrackErrZ(0),
fHisClusErrX(0),
fHisClusErrZ(0)
{
    //     Copy Constructor
    // Inputs:
    //    AliITSPlaneEffSSD &s The original class for which
    //                                this class is a copy of
    // Outputs:
    //    none.
    // Return:

 for (UInt_t i=0; i<kNModule; i++){
    fFound[i]=s.fFound[i];
    fTried[i]=s.fTried[i];
 }
 if(fHis) {
   InitHistos();
   for(Int_t i=0; i<kNHisto; i++) {
      s.fHisResX[i]->Copy(*fHisResX[i]);
      s.fHisResZ[i]->Copy(*fHisResZ[i]);
      s.fHisResXZ[i]->Copy(*fHisResXZ[i]);
      s.fHisClusterSize[i]->Copy(*fHisClusterSize[i]);
      s.fHisTrackErrX[i]->Copy(*fHisTrackErrX[i]);
      s.fHisTrackErrZ[i]->Copy(*fHisTrackErrZ[i]);
      s.fHisClusErrX[i]->Copy(*fHisTrackErrZ[i]);
      s.fHisClusErrZ[i]->Copy(*fHisClusErrZ[i]);
   }
 }
}
//_________________________________________________________________________
AliITSPlaneEffSSD& AliITSPlaneEffSSD::operator+=(const AliITSPlaneEffSSD &add){
    //    Add-to-me operator
    // Inputs:
    //    const AliITSPlaneEffSSD &add  simulation class to be added
    // Outputs:
    //    none.
    // Return:
    //    none
    for (UInt_t i=0; i<kNModule; i++){
      fFound[i] += add.fFound[i];
      fTried[i] += add.fTried[i];
    }
    if(fHis && add.fHis) {
      for(Int_t i=0; i<kNHisto; i++) {
        fHisResX[i]->Add(add.fHisResX[i]);
        fHisResZ[i]->Add(add.fHisResZ[i]);
        fHisResXZ[i]->Add(add.fHisResXZ[i]);
        fHisClusterSize[i]->Add(add.fHisClusterSize[i]);
        fHisTrackErrX[i]->Add(add.fHisTrackErrX[i]);
        fHisTrackErrZ[i]->Add(add.fHisTrackErrZ[i]);
        fHisClusErrX[i]->Add(add.fHisTrackErrZ[i]);
        fHisClusErrZ[i]->Add(add.fHisClusErrZ[i]);
      }
    }
    return *this;
}
//______________________________________________________________________
AliITSPlaneEffSSD&  AliITSPlaneEffSSD::operator=(const
                                           AliITSPlaneEffSSD &s){
    //    Assignment operator
    // Inputs:
    //    AliITSPlaneEffSSD &s The original class for which
    //                                this class is a copy of
    // Outputs:
    //    none.
    // Return:
 
    if(this==&s) return *this;
    this->~AliITSPlaneEffSSD();
    new(this) AliITSPlaneEffSSD();
    s.Copy(*this);
    return *this;
}
//______________________________________________________________________<commit_msg>Bug fix<commit_after>/**************************************************************************
 * Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
 *                                                                        *
 * Author: The ALICE Off-line Project.                                    *
 * Contributors are mentioned in the code where appropriate.              *
 *                                                                        *
 * Permission to use, copy, modify and distribute this software and its   *
 * documentation strictly for non-commercial purposes is hereby granted   *
 * without fee, provided that the above copyright notice appears in all   *
 * copies and that both the copyright notice and this permission notice   *
 * appear in the supporting documentation. The authors make no claims     *
 * about the suitability of this software for any purpose. It is          *
 * provided "as is" without express or implied warranty.                  *
 **************************************************************************/
///////////////////////////////////////////////////////////////////////////
//  Plane Efficiency class for ITS                      
//  It is used for module by module efficiency of the SSD,        
//  evaluated by tracks
//  (Inherits from AliITSPlaneEff)
//  Author: <NAME> 
//          <EMAIL>
//
///////////////////////////////////////////////////////////////////////////

/*  $Id$ */

#include <TMath.h>
#include <TH1F.h>
#include <TFile.h>
#include <TTree.h>
#include <TROOT.h>
#include "AliITSPlaneEffSSD.h"
#include "AliLog.h"
#include "AliCDBStorage.h"
#include "AliCDBEntry.h"
#include "AliCDBManager.h"
//#include "AliCDBRunRange.h"
#include "AliITSCalibrationSSD.h"

ClassImp(AliITSPlaneEffSSD)	
//______________________________________________________________________
AliITSPlaneEffSSD::AliITSPlaneEffSSD():
  AliITSPlaneEff(),
  fHisResX(0),
  fHisResZ(0),
  fHisResXZ(0),
  fHisClusterSize(0),
  fHisTrackErrX(0),
  fHisTrackErrZ(0),
  fHisClusErrX(0),
  fHisClusErrZ(0){
  for (UInt_t i=0; i<kNModule; i++){
  // default constructor
    fFound[i]=0;
    fTried[i]=0;
  }
  AliDebug(1,Form("Calling default constructor"));
}
//______________________________________________________________________
AliITSPlaneEffSSD::~AliITSPlaneEffSSD(){
    // destructor
    // Inputs:
    //    none.
    // Outputs:
    //    none.
    // Return:
    //     none.
    DeleteHistos();
}
//______________________________________________________________________
AliITSPlaneEffSSD::AliITSPlaneEffSSD(const AliITSPlaneEffSSD &s) : AliITSPlaneEff(s),
fHisResX(0),
fHisResZ(0),
fHisResXZ(0),
fHisClusterSize(0),
fHisTrackErrX(0),
fHisTrackErrZ(0),
fHisClusErrX(0),
fHisClusErrZ(0)
{
    //     Copy Constructor
    // Inputs:
    //    AliITSPlaneEffSSD &s The original class for which
    //                                this class is a copy of
    // Outputs:
    //    none.
    // Return:

 for (UInt_t i=0; i<kNModule; i++){
    fFound[i]=s.fFound[i];
    fTried[i]=s.fTried[i];
 }
 if(fHis) {
   InitHistos();
   for(Int_t i=0; i<kNHisto; i++) {
      s.fHisResX[i]->Copy(*fHisResX[i]);
      s.fHisResZ[i]->Copy(*fHisResZ[i]);
      s.fHisResXZ[i]->Copy(*fHisResXZ[i]);
      s.fHisClusterSize[i]->Copy(*fHisClusterSize[i]);
      s.fHisTrackErrX[i]->Copy(*fHisTrackErrX[i]);
      s.fHisTrackErrZ[i]->Copy(*fHisTrackErrZ[i]);
      s.fHisClusErrX[i]->Copy(*fHisClusErrX[i]);
      s.fHisClusErrZ[i]->Copy(*fHisClusErrZ[i]);
   }
 }
}
//_________________________________________________________________________
AliITSPlaneEffSSD& AliITSPlaneEffSSD::operator+=(const AliITSPlaneEffSSD &add){
    //    Add-to-me operator
    // Inputs:
    //    const AliITSPlaneEffSSD &add  simulation class to be added
    // Outputs:
    //    none.
    // Return:
    //    none
    for (UInt_t i=0; i<kNModule; i++){
      fFound[i] += add.fFound[i];
      fTried[i] += add.fTried[i];
    }
    if(fHis && add.fHis) {
      for(Int_t i=0; i<kNHisto; i++) {
        fHisResX[i]->Add(add.fHisResX[i]);
        fHisResZ[i]->Add(add.fHisResZ[i]);
        fHisResXZ[i]->Add(add.fHisResXZ[i]);
        fHisClusterSize[i]->Add(add.fHisClusterSize[i]);
        fHisTrackErrX[i]->Add(add.fHisTrackErrX[i]);
        fHisTrackErrZ[i]->Add(add.fHisTrackErrZ[i]);
        fHisClusErrX[i]->Add(add.fHisClusErrX[i]);
        fHisClusErrZ[i]->Add(add.fHisClusErrZ[i]);
      }
    }
    return *this;
}
//______________________________________________________________________
AliITSPlaneEffSSD&  AliITSPlaneEffSSD::operator=(const
                                           AliITSPlaneEffSSD &s){
    //    Assignment operator
    // Inputs:
    //    AliITSPlaneEffSSD &s The original class for which
    //                                this class is a copy of
    // Outputs:
    //    none.
    // Return:
 
    if(this==&s) return *this;
    this->~AliITSPlaneEffSSD();
    new(this) AliITSPlaneEffSSD();
    s.Copy(*this);
    return *this;
}
//______________________________________________________________________
{'fraction_non_alphanumeric': 0.18071105873109408, 'fraction_numerical': 0.00648202710665881, 'mean_word_length': 2.412533512064343, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 51, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 26, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4194347', 'n_tokens_mistral': 3297, 'n_tokens_neox': 3241, 'n_words': 607}