<commit_before>/***************************************************************************
 *
 * $Id: AliFemtoCorrFctn3DSphercicalEMCIC.h  $
 *
 * Author: <NAME>, Ohio State University, <EMAIL>
 ***************************************************************************
 *
 * Description: Calculates of the 3D Correlation Function in Spherical
 *              coordinates, and also produces histograms to calculate 
 *              Energy Momentum Conservation Induced Correlations  (EMCICs)
 *
 * This Class produces the following histograms as function of Q, theta, phi
 * (for both real and mixed pairs):
 *        1)   E1 + E2
 *        2)   E1 * E2
 *        3)   Pt1*Pt2
 *        4)   Pz1*Pz2
 *  
 * This class is similar to AliFemtoCorrFctn3DSpherical, but it uses Q
 * instead of K to do the binning. 
 * 
 * NOTE: The EMCIC histograms are not averaged in this class, to obtain 
 * the average, the user needs to divide the real pair histograms by 
 * the numerator, and the mixed pair histograms by the denominator.
 *
 ***************************************************************************
 *
 **************************************************************************/

#include "AliFemtoCorrFctn3DSphericalEMCIC.h"
#include "AliFemtoKTPairCut.h"
#include <TMath.h>
#include <TVector2.h>
#include <cstdio>

#ifdef __ROOT__ 
ClassImp(AliFemtoCorrFctn3DSphericalEMCIC)
#endif


//____________________________
AliFemtoCorrFctn3DSphericalEMCIC::AliFemtoCorrFctn3DSphericalEMCIC(char* title, const int& nqbins, const float& QLo, const float& QHi, const int& nphibins, const int& ncthetabins):
  AliFemtoCorrFctn(),
  fNumerator(0),
  fDenominator(0),
/*fEnergyTotalReal(0),  
  fEnergyMultReal(0),        
  fPzMultReal(0),      
  fPtMultReal(0),*/            
  fEnergyTotalMix (0),      
  fEnergyMultMix (0),      
  fPzMultMix(0),            
  fPtMultMix(0),
  fPairCut(0x0)
{
  
  // To better sample on phi shift bin low edge by binsize/2 = Pi/numBins.
  Double_t shiftPhi=TMath::Pi()/nphibins;
  // set up numerator
  char tTitNum[100] = "Num";
  strncat(tTitNum,title, 100);
  fNumerator = new TH3D(tTitNum,title,nqbins,QLo,QHi,nphibins,
			-TMath::Pi()-shiftPhi,TMath::Pi()-shiftPhi,ncthetabins,-1.0,1.0);
  // set up denominator
  char tTitDen[100] = "Den";
  strncat(tTitDen,title, 100);
  fDenominator = new TH3D(tTitDen,title,nqbins,QLo,QHi,nphibins,
			  -TMath::Pi()-shiftPhi,TMath::Pi()-shiftPhi,ncthetabins,-1.0,1.0);

  //Added histograms to calculate EMCICs , <NAME> 19.01.2010
  //Setup EnergyTotalReal
  /*char tTitNum1[100] = "ESumReal";
  strncat(tTitNum1,title, 100);
  fEnergyTotalReal = new TH3D(tTitNum1,title,nqbins,QLo,QHi,nphibins,
			      -TMath::Pi()-shiftPhi,TMath::Pi()-shiftPhi,ncthetabins,-1.0,1.0);
 
  //Setup EnergyMultReal
  char tTitNum2[100] = "EMultReal";
  strncat(tTitNum2,title, 100);
  fEnergyMultReal = new TH3D(tTitNum2,title,nqbins,QLo,QHi,nphibins,
			     -TMath::Pi()-shiftPhi,TMath::Pi()-shiftPhi,ncthetabins,-1.0,1.0);
  
  //Setup Pz MultReal
  char tTitNum3[100] = "PzMultReal";
  strncat(tTitNum3,title, 100);
  fPzMultReal = new TH3D(tTitNum3,title,nqbins,QLo,QHi,nphibins,
			 -TMath::Pi()-shiftPhi,TMath::Pi()-shiftPhi,ncthetabins,-1.0,1.0);

  //Setup Pt MultReal
  char tTitNum4[100] = "PtMultReal";
  strncat(tTitNum4,title, 100);
  fPtMultReal = new TH3D(tTitNum4,title,nqbins,QLo,QHi,nphibins,
			 -TMath::Pi()-shiftPhi,TMath::Pi()-shiftPhi,ncthetabins,-1.0,1.0);
  */ 


  //Setup EnergyTotalMix
  char tTitNum5[100] = "ESumMix";
  strncat(tTitNum5,title, 100);
  fEnergyTotalMix = new TH3D(tTitNum5,title,nqbins,QLo,QHi,nphibins,
			     -TMath::Pi()-shiftPhi,TMath::Pi()-shiftPhi,ncthetabins,-1.0,1.0);
  
  //Setup EnergyMultMix
  char tTitNum6[100] = "EMultMix";
  strncat(tTitNum6,title, 100);
  fEnergyMultMix = new TH3D(tTitNum6,title,nqbins,QLo,QHi,nphibins,
			    -TMath::Pi()-shiftPhi,TMath::Pi()-shiftPhi,ncthetabins,-1.0,1.0);
  
  //Setup Pz MultMix
  char tTitNum7[100] = "PzMultMix";
  strncat(tTitNum7,title, 100);
  fPzMultMix = new TH3D(tTitNum7,title,nqbins,QLo,QHi,nphibins,
			-TMath::Pi()-shiftPhi,TMath::Pi()-shiftPhi,ncthetabins,-1.0,1.0);

  //Setup Pt MultMix
  char tTitNum8[100] = "PtMultMix";
  strncat(tTitNum8,title, 100);
  fPtMultMix = new TH3D(tTitNum8,title,nqbins,QLo,QHi,nphibins,
			-TMath::Pi()-shiftPhi,TMath::Pi()-shiftPhi,<commit_msg>Fix Coverity reports<commit_after>/***************************************************************************
 *
 * $Id: AliFemtoCorrFctn3DSphercicalEMCIC.h  $
 *
 * Author: <NAME>, Ohio State University, <EMAIL>
 ***************************************************************************
 *
 * Description: Calculates of the 3D Correlation Function in Spherical
 *              coordinates, and also produces histograms to calculate 
 *              Energy Momentum Conservation Induced Correlations  (EMCICs)
 *
 * This Class produces the following histograms as function of Q, theta, phi
 * (for both real and mixed pairs):
 *        1)   E1 + E2
 *        2)   E1 * E2
 *        3)   Pt1*Pt2
 *        4)   Pz1*Pz2
 *  
 * This class is similar to AliFemtoCorrFctn3DSpherical, but it uses Q
 * instead of K to do the binning. 
 * 
 * NOTE: The EMCIC histograms are not averaged in this class, to obtain 
 * the average, the user needs to divide the real pair histograms by 
 * the numerator, and the mixed pair histograms by the denominator.
 *
 ***************************************************************************
 *
 **************************************************************************/

#include "AliFemtoCorrFctn3DSphericalEMCIC.h"
#include "AliFemtoKTPairCut.h"
#include <TMath.h>
#include <TVector2.h>
#include <cstdio>

#ifdef __ROOT__ 
ClassImp(AliFemtoCorrFctn3DSphericalEMCIC)
#endif


//____________________________
AliFemtoCorrFctn3DSphericalEMCIC::AliFemtoCorrFctn3DSphericalEMCIC(char* title, const int& nqbins, const float& QLo, const float& QHi, const int& nphibins, const int& ncthetabins):
  AliFemtoCorrFctn(),
  fNumerator(0),
  fDenominator(0),
/*fEnergyTotalReal(0),  
  fEnergyMultReal(0),        
  fPzMultReal(0),      
  fPtMultReal(0),*/            
  fEnergyTotalMix (0),      
  fEnergyMultMix (0),      
  fPzMultMix(0),            
  fPtMultMix(0),
  fPairCut(0x0)
{
  
  // To better sample on phi shift bin low edge by binsize/2 = Pi/numBins.
  Double_t shiftPhi=TMath::Pi()/nphibins;
  // set up numerator
  char tTitNum[101] = "Num";
  strncat(tTitNum,title, 100);
  fNumerator = new TH3D(tTitNum,title,nqbins,QLo,QHi,nphibins,
			-TMath::Pi()-shiftPhi,TMath::Pi()-shiftPhi,ncthetabins,-1.0,1.0);
  // set up denominator
  char tTitDen[101] = "Den";
  strncat(tTitDen,title, 100);
  fDenominator = new TH3D(tTitDen,title,nqbins,QLo,QHi,nphibins,
			  -TMath::Pi()-shiftPhi,TMath::Pi()-shiftPhi,ncthetabins,-1.0,1.0);

  //Added histograms to calculate EMCICs , <NAME> 19.01.2010
  //Setup EnergyTotalReal
  /*char tTitNum1[101] = "ESumReal";
  strncat(tTitNum1,title, 100);
  fEnergyTotalReal = new TH3D(tTitNum1,title,nqbins,QLo,QHi,nphibins,
			      -TMath::Pi()-shiftPhi,TMath::Pi()-shiftPhi,ncthetabins,-1.0,1.0);
 
  //Setup EnergyMultReal
  char tTitNum2[101] = "EMultReal";
  strncat(tTitNum2,title, 100);
  fEnergyMultReal = new TH3D(tTitNum2,title,nqbins,QLo,QHi,nphibins,
			     -TMath::Pi()-shiftPhi,TMath::Pi()-shiftPhi,ncthetabins,-1.0,1.0);
  
  //Setup Pz MultReal
  char tTitNum3[101] = "PzMultReal";
  strncat(tTitNum3,title, 100);
  fPzMultReal = new TH3D(tTitNum3,title,nqbins,QLo,QHi,nphibins,
			 -TMath::Pi()-shiftPhi,TMath::Pi()-shiftPhi,ncthetabins,-1.0,1.0);

  //Setup Pt MultReal
  char tTitNum4[101] = "PtMultReal";
  strncat(tTitNum4,title, 100);
  fPtMultReal = new TH3D(tTitNum4,title,nqbins,QLo,QHi,nphibins,
			 -TMath::Pi()-shiftPhi,TMath::Pi()-shiftPhi,ncthetabins,-1.0,1.0);
  */ 


  //Setup EnergyTotalMix
  char tTitNum5[101] = "ESumMix";
  strncat(tTitNum5,title, 100);
  fEnergyTotalMix = new TH3D(tTitNum5,title,nqbins,QLo,QHi,nphibins,
			     -TMath::Pi()-shiftPhi,TMath::Pi()-shiftPhi,ncthetabins,-1.0,1.0);
  
  //Setup EnergyMultMix
  char tTitNum6[101] = "EMultMix";
  strncat(tTitNum6,title, 100);
  fEnergyMultMix = new TH3D(tTitNum6,title,nqbins,QLo,QHi,nphibins,
			    -TMath::Pi()-shiftPhi,TMath::Pi()-shiftPhi,ncthetabins,-1.0,1.0);
  
  //Setup Pz MultMix
  char tTitNum7[101] = "PzMultMix";
  strncat(tTitNum7,title, 100);
  fPzMultMix = new TH3D(tTitNum7,title,nqbins,QLo,QHi,nphibins,
			-TMath::Pi()-shiftPhi,TMath::Pi()-shiftPhi,ncthetabins,-1.0,1.0);

  //Setup Pt MultMix
  char tTitNum8[101] = "PtMultMix";
  strncat(tTitNum8,title, 100);
  fPtMultMix = new TH3D(tTitNum8,title,nqbins,QLo,QHi,nphibins,
			-TMath::Pi()-shiftPhi,TMath::Pi()-shiftPhi,
{'fraction_non_alphanumeric': 0.19951895544611156, 'fraction_numerical': 0.039170770816630396, 'mean_word_length': 4.51610865445357, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6439686', 'n_tokens_mistral': 3808, 'n_tokens_neox': 3475, 'n_words': 585}