X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=ZDC%2FAliZDCReco.cxx;h=4b9be7c2d2564050a133ad44c71163f58b39a0a1;hb=008e940283376d6e2f48100966de47b72f943d82;hp=62a86bf46b0706e74fa973d3574c6e9379450964;hpb=a85132e72f281b2dcd9172970c3813b07320f877;p=u%2Fmrichter%2FAliRoot.git diff --git a/ZDC/AliZDCReco.cxx b/ZDC/AliZDCReco.cxx index 62a86bf46b0..4b9be7c2d25 100644 --- a/ZDC/AliZDCReco.cxx +++ b/ZDC/AliZDCReco.cxx @@ -32,140 +32,215 @@ ClassImp(AliZDCReco) AliZDCReco::AliZDCReco() : TObject(), - fZN1Energy(0), - fZP1Energy(0), - fZN2Energy(0), - fZP2Energy(0), // - fZEM1signal(0), - fZEM2signal(0), - // - fNDetSpecNLeft(0), - fNDetSpecPLeft(0), - fNDetSpecNRight(0), - fNDetSpecPRight(0), - fNTrueSpecNLeft(0), - fNTrueSpecPLeft(0), - fNTrueSpecLeft(0), - fNTrueSpecNRight(0), - fNTrueSpecPRight(0), - fNTrueSpecRight(0), - fNPartLeft(0), - fNPartRight(0), - fImpPar(0) - + fNDetSpecNSideA(0), + fNDetSpecPSideA(0), + fNDetSpecNSideC(0), + fNDetSpecPSideC(0), + fNTrueSpectators(0), + fNTrueSpecSideA(0), + fNTrueSpecSideC(0), + fNParticipants(0), + fNPartSideA(0), + fNPartSideC(0), + fImpParameter(0), + fImpParSideA(0), + fImpParSideC(0), + fRecoFlag(0x0), + fEnergyFlag(kFALSE), + fIsScalerOn(kFALSE) { // // Default constructor // - for(Int_t i=0; i<5; i++){ - fZN1EnTow[i] = 0; - fZP1EnTow[i] = 0; - fZN2EnTow[i] = 0; - fZP2EnTow[i] = 0; - fZN1SigLowRes[i] = 0; - fZP1SigLowRes[i] = 0; - fZN2SigLowRes[i] = 0; - fZP2SigLowRes[i] = 0; - + for(Int_t i=0; i<10; i++){ + fZN1EnTow[i] = fZP1EnTow[i] = fZN2EnTow[i] = fZP2EnTow[i] = 0.; + if(i<2){ + fZN1Energy[i] = fZP1Energy[i] = fZN2Energy[i] = fZP2Energy[i] = 0.; + fZEM1signal[i] = fZEM2signal[i] = 0.; + fPMRef1[i] = fPMRef2[i] = 0.; + } + } + + for(Int_t i=0; i<32; i++){ + fZDCScaler[i] = 0; + for(Int_t ij=0; ij<4; ij++) fZDCTDCData[i][ij] = 0; } } //_____________________________________________________________________________ -AliZDCReco::AliZDCReco(Float_t ezn1, Float_t ezp1, Float_t ezn2, Float_t ezp2, - // - Float_t* ezn1tow, Float_t* ezp1tow, - Float_t* ezn2tow, Float_t* ezp2tow, - Float_t* ezn1siglr, Float_t* ezp1siglr, - Float_t* ezn2siglr, Float_t* ezp2siglr, - Float_t ezem1, Float_t ezem2, - // - Int_t detspnLeft, Int_t detsppLeft, Int_t detspnRight, - Int_t detsppRight, Int_t trspnLeft, Int_t trsppLeft, - Int_t trspLeft, Int_t partLeft, Int_t trspnRight, - Int_t trsppRight, Int_t trspRight, Int_t partRight, - Float_t b) : +AliZDCReco::AliZDCReco( + Float_t* ezn1, Float_t* ezp1, Float_t* ezn2, Float_t* ezp2, + Float_t* ezn1tow, Float_t* ezp1tow, Float_t* ezn2tow, Float_t* ezp2tow, + Float_t* ezem1, Float_t* ezem2, Float_t* ref1, Float_t* ref2, + // + Int_t detspnSideA, Int_t detsppSideA, Int_t detspnSideC, Int_t detsppSideC, + Int_t trsp, Int_t trspSideA,Int_t trspSideC, + Int_t npart, Int_t npartSideA, Int_t npartSideC, + Float_t b, Float_t bSideA, Float_t bSideC, + UInt_t recoFlag, Bool_t energyFlag, Bool_t scalerOn, + UInt_t* scaler, Int_t tdcData[32][4]) : TObject(), - fZN1Energy(ezn1), - fZP1Energy(ezp1), - fZN2Energy(ezn2), - fZP2Energy(ezp2), - // - fZEM1signal(ezem1), - fZEM2signal(ezem2), // - fNDetSpecNLeft(detspnLeft), - fNDetSpecPLeft(detsppLeft), - fNDetSpecNRight(detspnRight), - fNDetSpecPRight(detsppRight), - fNTrueSpecNLeft(trspnLeft), - fNTrueSpecPLeft(trsppLeft), - fNTrueSpecLeft(trspLeft), - fNTrueSpecNRight(trspnRight), - fNTrueSpecPRight(trsppRight), - fNTrueSpecRight(trspRight), - fNPartLeft(partLeft), - fNPartRight(partRight), - fImpPar(b) - + fNDetSpecNSideA(detspnSideA), + fNDetSpecPSideA(detsppSideA), + fNDetSpecNSideC(detspnSideC), + fNDetSpecPSideC(detsppSideC), + fNTrueSpectators(trsp), + fNTrueSpecSideA(trspSideA), + fNTrueSpecSideC(trspSideC), + fNParticipants(npart), + fNPartSideA(npartSideA), + fNPartSideC(npartSideC), + fImpParameter(b), + fImpParSideA(bSideA), + fImpParSideC(bSideC), + fRecoFlag(recoFlag), + fEnergyFlag(energyFlag), + fIsScalerOn(scalerOn) { // // Constructor // - for(Int_t j=0; j<5; j++){ + for(Int_t j=0; j<10; j++){ fZN1EnTow[j] = ezn1tow[j]; fZP1EnTow[j] = ezp1tow[j]; fZN2EnTow[j] = ezn2tow[j]; fZP2EnTow[j] = ezp2tow[j]; - fZN1SigLowRes[j] = ezn1siglr[j]; - fZP1SigLowRes[j] = ezp1siglr[j]; - fZN2SigLowRes[j] = ezn2siglr[j]; - fZP2SigLowRes[j] = ezp2siglr[j]; + if(j<2){ + fZN1Energy[j] = ezn1[j]; + fZP1Energy[j] = ezp1[j]; + fZN2Energy[j] = ezn2[j]; + fZP2Energy[j] = ezp2[j]; + fZEM1signal[j] = ezem1[j]; + fZEM2signal[j] = ezem2[j]; + fPMRef1[j] = ref1[j]; + fPMRef2[j] = ref2[j]; + } + } + for(Int_t j=0; j<32; j++){ + fZDCScaler[j] = scaler[j]; + for(Int_t y=0; y<4; y++) fZDCTDCData[j][y] = tdcData[j][y]; } - } //______________________________________________________________________________ AliZDCReco::AliZDCReco(const AliZDCReco &oldreco) : - - TObject() +TObject(), +fNDetSpecNSideA(oldreco.GetNDetSpecNSideA()), +fNDetSpecPSideA(oldreco.GetNDetSpecPSideA()), +fNDetSpecNSideC(oldreco.GetNDetSpecNSideC()), +fNDetSpecPSideC(oldreco.GetNDetSpecPSideC()), +fNTrueSpectators(oldreco.GetNTrueSpectators()), +fNTrueSpecSideA(oldreco.GetNTrueSpecSideA()), +fNTrueSpecSideC(oldreco.GetNTrueSpecSideC()), +fNParticipants(oldreco.GetNParticipants()), +fNPartSideA(oldreco.GetNPartSideA()), +fNPartSideC(oldreco.GetNPartSideC()), +fImpParameter(oldreco.GetImpParameter()), +fImpParSideA(oldreco.GetImpParSideA()), +fImpParSideC(oldreco.GetImpParSideC()), +fRecoFlag(oldreco.GetRecoFlag()), +fEnergyFlag(oldreco.GetEnergyFlag()), +fIsScalerOn(oldreco.IsScalerOn()) { // Copy constructor - fZN1Energy = oldreco.GetZN1Energy(); - fZP1Energy = oldreco.GetZP1Energy(); - fZN2Energy = oldreco.GetZN2Energy(); - fZP2Energy = oldreco.GetZP2Energy(); + fZN1Energy[0] = oldreco.GetZN1HREnergy(); + fZP1Energy[0] = oldreco.GetZP1HREnergy(); + fZN2Energy[0] = oldreco.GetZN2HREnergy(); + fZP2Energy[0] = oldreco.GetZP2HREnergy(); + // + fZN1Energy[1] = oldreco.GetZN1LREnergy(); + fZP1Energy[1] = oldreco.GetZP1LREnergy(); + fZN2Energy[1] = oldreco.GetZN2LREnergy(); + fZP2Energy[1] = oldreco.GetZP2LREnergy(); // for(Int_t i=0; i<5; i++){ - fZN1EnTow[i] = oldreco.GetZN1EnTow(i); - fZP1EnTow[i] = oldreco.GetZP1EnTow(i); - fZN2EnTow[i] = oldreco.GetZN2EnTow(i); - fZP2EnTow[i] = oldreco.GetZP2EnTow(i); - fZN1SigLowRes[i] = oldreco.GetZN1SigLowRes(i); - fZP1SigLowRes[i] = oldreco.GetZP1SigLowRes(i); - fZN2SigLowRes[i] = oldreco.GetZN2SigLowRes(i); - fZP2SigLowRes[i] = oldreco.GetZP2SigLowRes(i); + fZN1EnTow[i] = oldreco.GetZN1HREnTow(i); + fZP1EnTow[i] = oldreco.GetZP1HREnTow(i); + fZN2EnTow[i] = oldreco.GetZN2HREnTow(i); + fZP2EnTow[i] = oldreco.GetZP2HREnTow(i); + fZN1EnTow[i+5] = oldreco.GetZN1LREnTow(i); + fZP1EnTow[i+5] = oldreco.GetZP1LREnTow(i); + fZN2EnTow[i+5] = oldreco.GetZN2LREnTow(i); + fZP2EnTow[i+5] = oldreco.GetZP2LREnTow(i); } + fZEM1signal[0] = oldreco.GetZEM1HRsignal(); + fZEM1signal[1] = oldreco.GetZEM1LRsignal(); + fZEM2signal[0] = oldreco.GetZEM2HRsignal(); + fZEM2signal[1] = oldreco.GetZEM2LRsignal(); + fPMRef1[0] = oldreco.GetPMRef1HRsignal(); + fPMRef1[1] = oldreco.GetPMRef1LRsignal(); + fPMRef2[0] = oldreco.GetPMRef2HRsignal(); + fPMRef2[1] = oldreco.GetPMRef2LRsignal(); + for(Int_t j=0; j<32; j++){ + fZDCScaler[j] = oldreco.GetZDCScaler(j); + for(Int_t y=0; y<4; y++) fZDCTDCData[j][y] = oldreco.GetZDCTDCData(j, y); + } +} + + +//______________________________________________________________________________ +AliZDCReco &AliZDCReco::operator= (const AliZDCReco &reco) +{ + // assignment operator + if(&reco == this) return *this; + + fNDetSpecNSideA = reco.GetNDetSpecNSideA(); + fNDetSpecPSideA = reco.GetNDetSpecPSideA(); + fNDetSpecNSideC = reco.GetNDetSpecNSideC(); + fNDetSpecPSideC = reco.GetNDetSpecPSideC(); + fNTrueSpectators = reco.GetNTrueSpectators(); + fNTrueSpecSideA = reco.GetNTrueSpecSideA(); + fNTrueSpecSideC = reco.GetNTrueSpecSideC(); + fNParticipants = reco.GetNParticipants(); + fNPartSideA = reco.GetNPartSideA(); + fNPartSideC = reco.GetNPartSideC(); + fImpParameter = reco.GetImpParameter(); + fImpParSideA = reco.GetImpParSideA(); + fImpParSideC = reco.GetImpParSideC(); + fRecoFlag = reco.GetRecoFlag(); + fEnergyFlag = reco.GetEnergyFlag(); + fIsScalerOn = reco.IsScalerOn(); + + fZN1Energy[0] = reco.GetZN1HREnergy(); + fZP1Energy[0] = reco.GetZP1HREnergy(); + fZN2Energy[0] = reco.GetZN2HREnergy(); + fZP2Energy[0] = reco.GetZP2HREnergy(); + // + fZN1Energy[1] = reco.GetZN1LREnergy(); + fZP1Energy[1] = reco.GetZP1LREnergy(); + fZN2Energy[1] = reco.GetZN2LREnergy(); + fZP2Energy[1] = reco.GetZP2LREnergy(); // - fZEM1signal = oldreco.GetZEM1signal(); - fZEM2signal = oldreco.GetZEM2signal(); - // - fNDetSpecNLeft = oldreco.GetNDetSpecNLeft(); - fNDetSpecPLeft = oldreco.GetNDetSpecPLeft(); - fNDetSpecNRight = oldreco.GetNDetSpecNRight(); - fNDetSpecPRight = oldreco.GetNDetSpecPRight(); - fNTrueSpecNLeft = oldreco.GetNTrueSpecNLeft(); - fNTrueSpecPLeft = oldreco.GetNTrueSpecPLeft(); - fNTrueSpecLeft = oldreco.GetNTrueSpecLeft(); - fNTrueSpecNRight = oldreco.GetNTrueSpecNRight(); - fNTrueSpecPRight = oldreco.GetNTrueSpecPRight(); - fNTrueSpecRight = oldreco.GetNTrueSpecRight(); - fNPartLeft = oldreco.GetNPartLeft(); - fNPartRight = oldreco.GetNPartRight(); - fImpPar = oldreco.GetImpPar(); + for(Int_t i=0; i<5; i++){ + fZN1EnTow[i] = reco.GetZN1HREnTow(i); + fZP1EnTow[i] = reco.GetZP1HREnTow(i); + fZN2EnTow[i] = reco.GetZN2HREnTow(i); + fZP2EnTow[i] = reco.GetZP2HREnTow(i); + fZN1EnTow[i+5] = reco.GetZN1LREnTow(i); + fZP1EnTow[i+5] = reco.GetZP1LREnTow(i); + fZN2EnTow[i+5] = reco.GetZN2LREnTow(i); + fZP2EnTow[i+5] = reco.GetZP2LREnTow(i); + } + fZEM1signal[0] = reco.GetZEM1HRsignal(); + fZEM1signal[1] = reco.GetZEM1LRsignal(); + fZEM2signal[0] = reco.GetZEM2HRsignal(); + fZEM2signal[1] = reco.GetZEM2LRsignal(); + fPMRef1[0] = reco.GetPMRef1HRsignal(); + fPMRef1[1] = reco.GetPMRef1LRsignal(); + fPMRef2[0] = reco.GetPMRef2HRsignal(); + fPMRef2[1] = reco.GetPMRef2LRsignal(); + for(Int_t j=0; j<32; j++){ + fZDCScaler[j] = reco.GetZDCScaler(j); + for(Int_t y=0; y<4; y++) fZDCTDCData[j][y] = reco.GetZDCTDCData(j, y); + } + + + return *this; } //______________________________________________________________________________ @@ -173,15 +248,21 @@ void AliZDCReco::Print(Option_t *) const { // // Printing Reconstruction Parameters // - printf(" \t --- Reconstruction -> EZN1 = %f TeV, EZP1 = %f TeV, EZEM1 = %f GeV , EZEM2 = %f GeV \n " - "EZN2 = %f TeV, EZP2 = %f TeV \n" - " \t NDetSpecNLeft = %d, NDetSpecPLeft = %d, NspecnLeft = %d," - " NspecpLeft = %d, NpartLeft = %d" - " \t NDetSpecNRight = %d, NDetSpecPRight = %d, NspecnRight = %d," - " NspecpRight = %d, NpartRight = %d" - " \t b = %f fm\n ", - fZN1Energy,fZP1Energy,fZEM1signal,fZEM2signal, fZN2Energy, fZP2Energy, - fNDetSpecNLeft,fNDetSpecPLeft,fNTrueSpecNLeft,fNTrueSpecPLeft,fNPartLeft, - fNDetSpecNRight,fNDetSpecPRight,fNTrueSpecNRight,fNTrueSpecPRight,fNPartRight, - fImpPar); + printf(" ****************** AliZDCReco object ******************\n" + " --------------- side A ---------------\n" + " E_ZN = %1.2f TeV, E_ZP = %1.2f TeV, " + " E_ZEM1 = %1.2f TeV, E_ZEM2 = %1.2f TeV\n " + " N_spec_n = %d, N_spec_p = %d," + " N_part = %d, b = %1.4f fm\n" + " --------------- side C ---------------\n" + " E_ZN = %1.2f TeV, E_ZP = %1.2f TeV, " + " N_spec_n = %d, N_spec_p = %d," + " N_part = %d, b = %1.4f fm\n" + " *******************************************************\n", + fZN2Energy[0]/1000., fZP2Energy[0]/1000., + fZEM1signal[0]/1000.,fZEM2signal[0]/1000., + fNDetSpecNSideA,fNDetSpecPSideA, fNPartSideA,fImpParSideA, + fZN1Energy[0]/1000.,fZP1Energy[0]/1000., + fNDetSpecNSideC,fNDetSpecPSideC,fNPartSideC,fImpParSideC); + }