fSpectatorTracked(1),
fBeamEnergy(0.),
fIspASystem(kFALSE),
- fIsRELDISgen(kFALSE)
+ fIsRELDISgen(kFALSE),
+ fOnlyZEM(kFALSE),
+ fFindMother(kFALSE)
{
//
// Default constructor for the Zero Degree Calorimeter base class
//_____________________________________________________________________________
AliZDC::AliZDC(const char *name, const char *title) :
AliDetector(name,title),
- fNoShower (0),
+ fNoShower(0),
fPedCalib(0),
fEnCalibData(0),
fTowCalibData(0),
fSpectatorTracked(1),
fBeamEnergy(0.),
fIspASystem(kFALSE),
- fIsRELDISgen(kFALSE)
+ fIsRELDISgen(kFALSE),
+ fOnlyZEM(kFALSE),
+ fFindMother(kFALSE)
{
//
// Standard constructor for the Zero Degree Calorimeter base class
fSpectatorTracked(ZDC.fSpectatorTracked),
fBeamEnergy(ZDC.fBeamEnergy),
fIspASystem(ZDC.fIspASystem),
-fIsRELDISgen(ZDC.fIsRELDISgen)
+fIsRELDISgen(ZDC.fIsRELDISgen),
+fOnlyZEM(ZDC.fOnlyZEM),
+fFindMother(ZDC.fFindMother)
{
// copy constructor
}
fZDCCalibFName = ZDC.fZDCCalibFName;
fBeamEnergy = ZDC.fBeamEnergy;
fIspASystem = ZDC.fIspASystem;
+ fIsRELDISgen = ZDC.fIsRELDISgen;
+ fOnlyZEM = ZDC.fOnlyZEM;
+ fFindMother = ZDC.fFindMother;
} return *this;
}
// Add a ZDC hit to the hit list.
static Float_t trackTime=0., trackEta=0., primKinEn=0., xImpact=0., yImpact=0., sFlag=0.;
- static Int_t pcPDGcode, motPDGcode;
+ static Int_t pcPDGcode=0, motPDGcode=0;
AliZDCHit *newquad, *curprimquad;
newquad = new AliZDCHit(fIshunt, track, vol, hits);
if(fNhits==0){
// First hit -> setting flag for primary or secondary particle
- TParticle * p = gAlice->GetMCApp()->Particle(track);
+ /*TParticle * p = gAlice->GetMCApp()->Particle(track);
Int_t imo = p->GetFirstMother();
//
if(track != imo){
}
else if(track == imo){
newquad->SetSFlag(0); // PRIMARY particle entering the ZDC
- }
+ }*/
//
sFlag = newquad->GetSFlag();
primKinEn = newquad->GetPrimKinEn();
if(lADCDataGEO==0){
if(indADC0>=knADCData1){
- AliWarning(" Problem with digit index 4 ADC0\n");
+ AliWarning(Form(" Problem with digit index %d for ADC0\n", indADC0));
return;
}
Int_t indLG = indADC0+knADCData1;
}
else if(lADCDataGEO==1){
if(indADC1>=knADCData2){
- AliWarning(" Problem with digit index 4 ADC1\n");
+ AliWarning(Form(" Problem with digit index %d for ADC1\n", indADC1));
return;
}
Int_t indLG = indADC1+knADCData2;
}
else if(lADCDataGEO==2){
if(indADC2>=knADCData3){
- AliWarning(" Problem with digit index 4 ADC2\n");
+ AliWarning(Form(" Problem with digit index %d for ADC2\n", indADC2));
return;
}
Int_t indLG = indADC2+knADCData3;
}
else if(lADCDataGEO==3){
if(indADC3>=knADCData4){
- AliWarning(" Problem with digit index 4 ADC2\n");
+ AliWarning(Form(" Problem with digit index %d for ADC2\n", indADC3));
return;
}
Int_t indLG = indADC3+knADCData4;
// Returns a pedestal for detector det, PM quad, channel with res.
//
// Getting calibration object for ZDC set
+ Float_t pedValue = 0.;
AliCDBManager *man = AliCDBManager::Instance();
AliCDBEntry *entry = man->Get("ZDC/Calib/Pedestals");
+ AliZDCPedestals *calibPed = 0x0;
if(!entry) AliFatal("No calibration data loaded!");
- AliZDCPedestals *calibPed = (AliZDCPedestals*) entry->GetObject();
- //
- if(!calibPed){
- printf("\t No calibration object found for ZDC!");
- return -1;
- }
- //
- Int_t index=0, kNch=24;
- if(Quad!=5){
- if(Det==1) index = Quad+kNch*Res; // ZN1
- else if(Det==2) index = Quad+5+kNch*Res; // ZP1
- else if(Det==3) index = Quad+9+kNch*Res; // ZEM
- else if(Det==4) index = Quad+12+kNch*Res; // ZN2
- else if(Det==5) index = Quad+17+kNch*Res; // ZP2
+ else{
+ calibPed = (AliZDCPedestals*) entry->GetObject();
+ //
+ if(!calibPed){
+ printf("\t No calibration object found for ZDC!");
+ return -1;
+ }
+ //
+ Int_t index=0, kNch=24;
+ if(Quad!=5){
+ if(Det==1) index = Quad+kNch*Res; // ZN1
+ else if(Det==2) index = Quad+5+kNch*Res; // ZP1
+ else if(Det==3) index = Quad+9+kNch*Res; // ZEM
+ else if(Det==4) index = Quad+12+kNch*Res; // ZN2
+ else if(Det==5) index = Quad+17+kNch*Res; // ZP2
+ }
+ else index = (Det-1)/3+22+kNch*Res; // Reference PMs
+ //
+ //
+ Float_t meanPed = calibPed->GetMeanPed(index);
+ Float_t pedWidth = calibPed->GetMeanPedWidth(index);
+ pedValue = gRandom->Gaus(meanPed,pedWidth);
+ //
+ //printf("\t AliZDC::Pedestal - det(%d, %d) - Ped[%d] = %d\n",Det, Quad, index,(Int_t) pedValue); // Chiara debugging!
}
- else index = (Det-1)/3+22+kNch*Res; // Reference PMs
- //
- //
- Float_t meanPed = calibPed->GetMeanPed(index);
- Float_t pedWidth = calibPed->GetMeanPedWidth(index);
- Float_t pedValue = gRandom->Gaus(meanPed,pedWidth);
- //
- //printf("\t AliZDC::Pedestal - det(%d, %d) - Ped[%d] = %d\n",Det, Quad, index,(Int_t) pedValue); // Chiara debugging!
-
-
return (Int_t) pedValue;
}
{
// Getting calibration object for ZDC
-
+ AliZDCChMap *calibdata = 0x0;
AliCDBEntry *entry = AliCDBManager::Instance()->Get("ZDC/Calib/ChMap");
if(!entry) AliFatal("No calibration data loaded!");
-
- AliZDCChMap *calibdata = dynamic_cast<AliZDCChMap*> (entry->GetObject());
- if(!calibdata) AliFatal("Wrong calibration object in calibration file!");
-
+ else{
+ calibdata = dynamic_cast<AliZDCChMap*> (entry->GetObject());
+ if(!calibdata) AliFatal("Wrong calibration object in calibration file!");
+ }
return calibdata;
}