TH1F *chargedspectra = new TH1F("chargedspectra","Charged particles above 1 GeV Spectra",100,.5,10.);
TH1F *hitsPhi = new TH1F("hitsPhi","Distribution of phi angle of incidence",100,-180,180);
TH1F *hitsTheta = new TH1F("hitsTheta","Distribution of Theta angle of incidence",100,0,15);
- TH1F *Omega = new TH1F("omega","Reconstructed Cerenkov angle per track",200,.5,1);
+ TH1F *Omega1D = new TH1F("omega","Reconstructed Cerenkov angle per track",200,.5,1);
TH1F *Theta = new TH1F("theta","Reconstructed theta incidence angle per track",200,0,15);
TH1F *Phi = new TH1F("phi","Reconstructed phi incidence per track",200,-180,180);
+ TH1F *Omega3D = new TH1F("omega","Reconstructed Cerenkov angle per track",200,.5,1);
TH1F *PhotonCer = new TH1F("photoncer","Reconstructed Cerenkov angle per photon",200,.5,1);
TH2F *PadsUsed = new TH2F("padsused","Pads Used for Reconstruction",100,-30,30,100,-30,30);
//cout<<"nev "<<nev<<endl;
- printf ("\nProcessing event: %d\n",nev);
+ printf ("\n**********************************\nProcessing Event: %d\n",nev);
//cout<<"nparticles "<<nparticles<<endl;
- printf ("Particles : %d\n",nparticles);
+ printf ("Particles : %d\n\n",nparticles);
if (nev < evNumber1) continue;
if (nparticles <= 0) return;
Int_t nrawclusters = Rawclusters->GetEntriesFast();
//printf (" nrawclusters:%d\n",nrawclusters);
gAlice->TreeR()->GetEvent(nent-1);
- TClonesArray *RecHits = RICH->RecHitsAddress(2);
- Int_t nrechits = RecHits->GetEntriesFast();
+ TClonesArray *RecHits1D = RICH->RecHitsAddress1D(2);
+ Int_t nrechits1D = RecHits1D->GetEntriesFast();
+ //printf (" nrechits:%d\n",nrechits);
+ TClonesArray *RecHits3D = RICH->RecHitsAddress3D(2);
+ Int_t nrechits3D = RecHits3D->GetEntriesFast();
//printf (" nrechits:%d\n",nrechits);
TTree *TH = gAlice->TreeH();
Int_t ntracks = TH->GetEntries();
// Start loop on tracks in the hits containers
Int_t Nc=0;
for (Int_t track=0; track<ntracks;track++) {
- printf ("Processing Track: %d\n",track);
+ printf ("\nProcessing Track: %d\n",track);
gAlice->ResetHits();
Int_t nbytes += TH->GetEvent(track);
if (RICH) {
Int_t nhits = Hits->GetEntriesFast();
if (nhits) Nh+=nhits;
- //printf("nhits %d\n",nhits);
+ printf("Hits : %d\n",nhits);
for (Int_t hit=0;hit<nhits;hit++) {
mHit = (AliRICHHit*) Hits->UncheckedAt(hit);
Int_t nch = mHit->fChamber; // chamber number
- Float_t x = mHit->fX; // x-pos of hit
- Float_t y = mHit->fZ; // y-pos
+ Float_t x = mHit->X(); // x-pos of hit
+ Float_t y = mHit->Z(); // y-pos
Float_t phi = mHit->fPhi; //Phi angle of incidence
Float_t theta = mHit->fTheta; //Theta angle of incidence
- Int_t index = mHit->fTrack;
+ Int_t index = mHit->Track();
Int_t particle = mHit->fParticle;
Int_t freon = mHit->fLoss;
- hitsX->Fill(x,(float) 1);
- hitsY->Fill(y,(float) 1);
+ hitsX->Fill(x,(float) 1);
+ hitsY->Fill(y,(float) 1);
//printf("Particle:%d\n",particle);
//if (current->GetPdgCode() < 50000051 && current->GetPdgCode() > 50000040)
//totalphotonsevent->Fill(ncerenkovs,(float) 1);
- if (ncerenkovs) {
+ if (ncerenkovs) {
+ printf("Cerenkovs : %d\n",ncerenkovs);
totalphotonsevent->Fill(ncerenkovs,(float) 1);
for (Int_t hit=0;hit<ncerenkovs;hit++) {
cHit = (AliRICHCerenkov*) Cerenkovs->UncheckedAt(hit);
Int_t nchamber = cHit->fChamber; // chamber number
- Int_t index = cHit->fTrack;
+ Int_t index = cHit->Track();
Int_t pindex = cHit->fIndex;
- Float_t cx = cHit->fX; // x-position
- Float_t cy = cHit->fZ; // y-position
+ Float_t cx = cHit->X(); // x-position
+ Float_t cy = cHit->Z(); // y-position
Int_t cmother = cHit->fCMother; // Index of mother particle
Int_t closs = cHit->fLoss; // How did the particle get lost?
//printf ("Cerenkov hit, X:%d, Y:%d\n",cx,cy);
mom[0] = current->Px();
mom[1] = current->Py();
mom[2] = current->Pz();
- /*mom[0] = cHit->fMomX;
- mom[1] = cHit->fMomZ;
- mom[2] = cHit->fMomY;*/
+ //mom[0] = cHit->fMomX;
+ // mom[1] = cHit->fMomZ;
+ //mom[2] = cHit->fMomY;
Float_t energymip = MIP->Energy();
Float_t Mip_px = mipHit->fMomX;
Float_t Mip_py = mipHit->fMomY;
Float_t Mip_pz = mipHit->fMomZ;
- /*Float_t Mip_px = MIP->Px();
- Float_t Mip_py = MIP->Py();
- Float_t Mip_pz = MIP->Pz();*/
+ //Float_t Mip_px = MIP->Px();
+ //Float_t Mip_py = MIP->Py();
+ //Float_t Mip_pz = MIP->Pz();
Float_t mix = MIP->Vx();
Float_t miy = MIP->Vy();
- Float_t mx = mipHit->fX;
- Float_t my = mipHit->fZ;
+ Float_t mx = mipHit->X();
+ Float_t my = mipHit->Z();
//printf("FX %e, FY %e, VX %e, VY %e\n",cx,cy,mx,my);
Float_t dx = cx - mx;
Float_t dy = cy - my;
}
if (nrawclusters) {
+ printf("Raw Clusters : %d\n",nrawclusters);
for (Int_t hit=0;hit<nrawclusters;hit++) {
rcHit = (AliRICHRawCluster*) Rawclusters->UncheckedAt(hit);
//Int_t nchamber = rcHit->fChamber; // chamber number
}
}
- if(nrechits)
+ if(nrechits1D)
{
- for (Int_t hit=0;hit<nrechits;hit++) {
- recHit = (AliRICHRecHit*) RecHits->UncheckedAt(hit);
- Float_t r_omega = recHit->fOmega; // Cerenkov angle
- Float_t r_theta = recHit->fTheta; // Theta angle of incidence
- Float_t r_phi = recHit->fPhi; // Phi angle if incidence
- Float_t *cer_pho = recHit->fCerPerPhoton; // Cerenkov angle per photon
- Int_t *padsx = recHit->fPadsUsedX; // Pads Used fo reconstruction (x)
- Int_t *padsy = recHit->fPadsUsedY; // Pads Used fo reconstruction (y)
- Int_t goodPhotons = recHit->fGoodPhotons; // Number of pads used for reconstruction
+ for (Int_t hit=0;hit<nrechits1D;hit++) {
+ recHit1D = (AliRICHRecHit1D*) RecHits1D->UncheckedAt(hit);
+ Float_t r_omega = recHit1D->fOmega; // Cerenkov angle
+ Float_t *cer_pho = recHit1D->fCerPerPhoton; // Cerenkov angle per photon
+ Int_t *padsx = recHit1D->fPadsUsedX; // Pads Used fo reconstruction (x)
+ Int_t *padsy = recHit1D->fPadsUsedY; // Pads Used fo reconstruction (y)
+ Int_t goodPhotons = recHit1D->fGoodPhotons; // Number of pads used for reconstruction
- Omega->Fill(r_omega,(float) 1);
- Theta->Fill(r_theta*180/TMath::Pi(),(float) 1);
- Phi->Fill(r_phi*180/TMath::Pi(),(float) 1);
-
+ Omega1D->Fill(r_omega,(float) 1);
+
for (Int_t i=0; i<goodPhotons; i++)
{
PhotonCer->Fill(cer_pho[i],(float) 1);
//printf("Omega: %f, Theta: %f, Phi: %f\n",r_omega,r_theta,r_phi);
}
}
+
+ if(nrechits3D)
+ {
+ for (Int_t hit=0;hit<nrechits3D;hit++) {
+ recHit3D = (AliRICHRecHit3D*) RecHits3D->UncheckedAt(hit);
+ Float_t r_omega = recHit3D->fOmega; // Cerenkov angle
+ Float_t r_theta = recHit3D->fTheta; // Theta angle of incidence
+ Float_t r_phi = recHit3D->fPhi; // Phi angle if incidence
+
+
+ Omega3D->Fill(r_omega,(float) 1);
+ Theta->Fill(r_theta*180/TMath::Pi(),(float) 1);
+ Phi->Fill(r_phi*180/TMath::Pi(),(float) 1);
+
+ }
+ }
}
for (Int_t nmothers=0;nmothers<ntracks;nmothers++){
TCanvas *c5 = new TCanvas("c5","Ring Reconstruction",100,100,900,700);
- c5->Divide(3,2);
+ c5->Divide(3,3);
c5->cd(1);
ckovangle->SetFillColor(42);
hc0->Draw("box");
c5->cd(5);
- Omega->SetFillColor(42);
- Omega->SetXTitle("angle (radians)");
- Omega->Draw();
+ Omega1D->SetFillColor(42);
+ Omega1D->SetXTitle("angle (radians)");
+ Omega1D->Draw();
c5->cd(4);
PhotonCer->SetFillColor(42);
PadsUsed->SetXTitle("pads");
PadsUsed->Draw("box");
+ c5->cd(7);
+ Omega3D->SetFillColor(42);
+ Omega3D->SetXTitle("angle (radians)");
+ Omega3D->Draw();
+
break;
case 5:
- if (ndigits)
- {
+ //if (ndigits)
+ //{
TCanvas *c1 = new TCanvas("c1","Alice RICH digits",50,50,1200,700);
c1->Divide(4,2);
c1->cd(1);
c1->cd(8);
hc0->SetXTitle("ix (npads)");
hc0->Draw("box");
- }
+ //}
//
TCanvas *c4 = new TCanvas("c4","Hits per type",100,100,600,700);
c4->Divide(2,2);
}
}
//printf("The total number of pads which give a signal: %d %d\n",Nh,Nh1);
- printf("End of macro\n");
+ printf("\nEnd of macro\n");
+ printf("**********************************\n");
}