"= %f, Crossing plane = %d\n\n", fFermiflag, fBeamDiv, fBeamCrossAngle,
fBeamCrossPlane);
- FermiTwoGaussian(207.,fPp,fProbintp,fProbintn);
+ FermiTwoGaussian(207.);
}
//_____________________________________________________________________________
// Beam divergence and crossing angle
if(fBeamCrossAngle!=0.) {
- BeamDivCross(1,fBeamDiv,fBeamCrossAngle,fBeamCrossPlane,pLab);
+ BeamDivCross(1, pLab);
for(i=0; i<=2; i++) fP[i] = pLab[i];
}
if(fBeamDiv!=0.) {
- BeamDivCross(0,fBeamDiv,fBeamCrossAngle,fBeamCrossPlane,pLab);
+ BeamDivCross(0, pLab);
for(i=0; i<=2; i++) fP[i] = pLab[i];
}
// If required apply the Fermi momentum
if(fFermiflag==1){
if((fIpart==kProton) || (fIpart==kNeutron))
- ExtractFermi(fIpart,fPp,fProbintp,fProbintn,ddp);
+ ExtractFermi(fIpart, ddp);
mass=gAlice->PDGDB()->GetParticle(fIpart)->Mass();
fP0 = TMath::Sqrt(fP[0]*fP[0]+fP[1]*fP[1]+fP[2]*fP[2]+mass*mass);
for(i=0; i<=2; i++) dddp[i] = ddp[i];
}
//_____________________________________________________________________________
-void AliGenZDC::FermiTwoGaussian(Float_t A, Double_t *fPp,
- Double_t *fProbintp, Double_t *fProbintn)
+void AliGenZDC::FermiTwoGaussian(Float_t A)
{
//
// Momenta distributions according to the "double-gaussian"
// distribution (Ilinov) - equal for protons and neutrons
//
- fProbintp[0] = 0;
- fProbintn[0] = 0;
Double_t sig1 = 0.113;
Double_t sig2 = 0.250;
Double_t alfa = 0.18*(TMath::Power((A/12.),(Float_t)1/3));
}
}
//_____________________________________________________________________________
-void AliGenZDC::ExtractFermi(Int_t id, Double_t *fPp, Double_t *fProbintp,
- Double_t *fProbintn, Double_t *ddp)
+void AliGenZDC::ExtractFermi(Int_t id, Double_t *ddp)
{
//
// Compute Fermi momentum for spectator nucleons
}
//_____________________________________________________________________________
-void AliGenZDC::BeamDivCross(Int_t icross, Float_t fBeamDiv, Float_t fBeamCrossAngle,
- Int_t fBeamCrossPlane, Double_t *pLab)
+void AliGenZDC::BeamDivCross(Int_t icross, Double_t *pLab)
{
// Applying beam divergence and crossing angle
//
fidiv = (gRandom->Rndm())*k2PI;
}
else if(icross==1){ // ##### Crossing angle
- if(fBeamCrossPlane==0.){
+ if(fBeamCrossPlane==0){
tetdiv = 0.;
fidiv = 0.;
}
- else if(fBeamCrossPlane==1.){ // Horizontal crossing plane
+ else if(fBeamCrossPlane==1){ // Horizontal crossing plane
tetdiv = fBeamCrossAngle;
fidiv = 0.;
}
- else if(fBeamCrossPlane==2.){ // Vertical crossing plane
+ else if(fBeamCrossPlane==2){ // Vertical crossing plane
tetdiv = fBeamCrossAngle;
fidiv = k2PI/4.;
}
void Generate();
// Fermi smearing, beam divergence and crossing angle
- void FermiTwoGaussian(Float_t A, Double_t *pp,
- Double_t *probintp, Double_t *probintn);
- void ExtractFermi(Int_t id, Double_t *pp, Double_t *probintp,
- Double_t *probintn, Double_t *pFermi);
- void BeamDivCross(Int_t icross, Float_t divergence, Float_t crossangle,
- Int_t crossplane, Double_t *pLab);
+ void FermiTwoGaussian(Float_t A);
+ void ExtractFermi(Int_t id, Double_t *ddp);
+ void BeamDivCross(Int_t icross, Double_t *pLab);
void AddAngle(Double_t theta1, Double_t phi1, Double_t theta2,
Double_t phi2, Double_t *angle);
}
//---------------------------------------------------------------
-void AliZDCDataDCS::ProcessData(TMap& aliasMap, Float_t *fCalibData)
+void AliZDCDataDCS::ProcessData(TMap& aliasMap)
{
// Data processing
void SetRun(Int_t run) {fRun = run;}
void SetStartTime(Int_t startTime) {fStartTime = startTime;}
void SetEndTime(Int_t endTime) {fEndTime = endTime;}
+ void SetCalibData(Float_t *val)
+ {for(Int_t i=0; i<kNGraphs; i++) fCalibData[i] = val[i];}
+ void SetCalibData(Int_t i, Float_t val) {fCalibData[i] = val;}
+ //
Int_t GetRun() {return fRun;}
Int_t GetStartTime() {return fStartTime;}
Int_t GetEndTime() {return fEndTime;}
+ Float_t GetCalibData() {return *fCalibData;}
+ Float_t GetCalibData(Int_t i) {return fCalibData[i];}
- void ProcessData(TMap& aliasMap, Float_t *CalibData);
+ void ProcessData(TMap& aliasMap);
const char* GetAliasName(UInt_t pos)
{return pos<kNAliases ? fAliasNames[pos].Data() : 0;}
{
// simulate fragmentation of spectators
- Int_t zz[100], nn[100];
AliZDCFragment frag(impPar);
- for(Int_t j=0; j<=99; j++){
- zz[j] =0;
- nn[j] =0;
- }
// Fragments generation
- Int_t nAlpha;
- frag.GenerateIMF(zz, nAlpha);
+ frag.GenerateIMF();
+ Int_t nAlpha = frag.GetNalpha();
// Attach neutrons
- Int_t ztot=0;
- Int_t ntot=0;
- frag.AttachNeutrons(zz, nn, ztot, ntot);
+ Int_t ztot = frag.GetZtot();
+ Int_t ntot = frag.GetNtot();
+ frag.AttachNeutrons();
freeSpecN = specN-ntot-2*nAlpha;
freeSpecP = specP-ztot-2*nAlpha;
// Removing deuterons
}
//_____________________________________________________________________________
-void AliZDCFragment::GenerateIMF(Int_t* fZZ, Int_t &fNalpha)
+void AliZDCFragment::GenerateIMF()
{
// Loop variables
}
//_____________________________________________________________________________
-void AliZDCFragment::AttachNeutrons(Int_t *fZZ, Int_t *fNN, Int_t &fZtot,Int_t &fNtot)
+void AliZDCFragment::AttachNeutrons()
{
//
// Prepare nuclear fragment by attaching a suitable number of neutrons
AliZDCFragment();
AliZDCFragment(Float_t b);
virtual ~AliZDCFragment() {}
- void GenerateIMF(Int_t* fZZ, Int_t &fNalpha);
- void AttachNeutrons(Int_t* fZZ, Int_t* fNN, Int_t &Ztot, Int_t &Ntot);
+ void GenerateIMF();
+ void AttachNeutrons();
Float_t DeuteronNumber();
// Setting parameters
virtual void SetImpactParameter(Float_t b) {fB=b;};
// Getting parameters
- Int_t GetFragmentNum() {return fNimf;};
-
+ Float_t GetZbAverage() {return fZbAverage;}
+ Int_t GetFragmentNum() {return fNimf;}
+ Float_t GetZmax() {return fZmax;}
+ Int_t* GetZZ() {return (int*)fZZ;}
+ Int_t* GetNN() {return (int*)fNN;}
+ Int_t GetNalpha() {return fNalpha;}
+ Int_t GetZtot() {return fZtot;}
+ Int_t GetNtot() {return fNtot;}
protected:
Float_t fB; // Impact parameter
- Float_t fZbAverage ; // Mean value of Z bound
+ Float_t fZbAverage; // Mean value of Z bound
Int_t fNimf; // Number of IMF
Float_t fZmax; // Mean value of maximum Z of fragment
Float_t fTau; // Exponent of charge distribution: dN/dZ = Z*exp(-fTau)
// The processing of the DCS input data is forwarded to AliZDCDataDCS
Float_t dcsValues[28]; // DCSAliases=28
- fData->ProcessData(*dcsAliasMap, dcsValues);
+ fData->SetCalibData(dcsValues);
+ fData->ProcessData(*dcsAliasMap);
// Store DCS data for reference
AliCDBMetaData metadata;
metadata.SetResponsible("Chiara Oppedisano");
}
Log(Form("File %s connected to process pedestal data", pedFileName));
Float_t pedVal[(3*knZDCch)][3];
- for(Int_t i=0; i<(3*knZDCch); i++){
+ for(Int_t k=0; k<(3*knZDCch); k++){
for(Int_t j=0; j<3; j++){
- fscanf(file,"%f",&pedVal[i][j]);
- //if(j==1) printf("pedVal[%d] -> %f, %f \n",i,pedVal[i][0],pedVal[i][1]);
+ fscanf(file,"%f",&pedVal[k][j]);
+ //if(j==1) printf("pedVal[%d] -> %f, %f \n",k,pedVal[k][0],pedVal[k][1]);
}
- if(i<knZDCch){
- pedCalib->SetMeanPed(i,pedVal[i][1]);
- pedCalib->SetMeanPedWidth(i,pedVal[i][2]);
+ if(k<knZDCch){
+ pedCalib->SetMeanPed(k,pedVal[k][1]);
+ pedCalib->SetMeanPedWidth(i,pedVal[k][2]);
}
- else if(i>=knZDCch && i<(2*knZDCch)){
- pedCalib->SetOOTPed(i-knZDCch,pedVal[i][1]);
- pedCalib->SetOOTPedWidth(i-knZDCch,pedVal[i][2]);
+ else if(k>=knZDCch && k<(2*knZDCch)){
+ pedCalib->SetOOTPed(k-knZDCch,pedVal[k][1]);
+ pedCalib->SetOOTPedWidth(k-knZDCch,pedVal[k][2]);
}
- else if(i>=(2*knZDCch) && i<(3*knZDCch)){
- pedCalib->SetPedCorrCoeff(i-(2*knZDCch),pedVal[i][1],pedVal[i][2]);
+ else if(k>=(2*knZDCch) && k<(3*knZDCch)){
+ pedCalib->SetPedCorrCoeff(k-(2*knZDCch),pedVal[k][1],pedVal[k][2]);
}
}
}
//
TIter iter2(daqSources);
TObjString* source = 0;
- Int_t j=0;
+ Int_t i=0;
while((source = dynamic_cast<TObjString*> (iter2.Next()))){
- Log(Form("\n\t Getting file #%d\n",++j));
+ Log(Form("\n\t Getting file #%d\n",++i));
TString stringEMDFileName = GetFile(kDAQ, "EMDCALIB", source->GetName());
if(stringEMDFileName.Length() <= 0){
Log(Form("No EMDCALIB file from source %s!", source->GetName()));
//
TIter iter2(daqSources);
TObjString* source = 0;
- Int_t j=0;
+ Int_t i=0;
while((source = dynamic_cast<TObjString*> (iter2.Next()))){
- Log(Form("\n\t Getting file #%d\n",++j));
+ Log(Form("\n\t Getting file #%d\n",++i));
TString stringPHYSFileName = GetFile(kDAQ, "PHYSICS", source->GetName());
if(stringPHYSFileName.Length() <= 0){
Log(Form("No PHYSICS file from source %s!", source->GetName()));
//
AliESDZDC * zdcESD = esd->GetESDZDC();
//
- const Float_t * Centr_ZNC, * Centr_ZNA;
+ Double32_t * Centr_ZNC, * Centr_ZNA;
Int_t NSpecnC = (Int_t) (esd->GetZDCN1Energy()/2.7);
if(NSpecnC!=0){
Centr_ZNC = zdcESD->GetZNCCentroid(NSpecnC);