if (gClassTable->GetID("AliRun") < 0) {
gROOT->LoadMacro("loadlibs.C");
loadlibs();
+ } else {
+ delete gAlice;
+ gAlice=0;
}
// Connect the Root Galice file containing Geometry, Kine and Hits
Int_t nxN;
Int_t hitprim;
Int_t partcode;
+ Int_t ntrover;
Float_t x;
Float_t z;
Float_t dx;
Int_t nxN;
Int_t noverlaps;
Int_t noverprim;
+ Int_t ntrover;
Float_t qclP;
Float_t qclN;
Float_t qrec;
ntuple->Branch("nxN",&ntuple_st.nxN,"nxN/I");
ntuple->Branch("hitprim",&ntuple_st.hitprim,"hitprim/I");
ntuple->Branch("partcode",&ntuple_st.partcode,"partcode/I");
+ ntuple->Branch("ntrover",&ntuple_st.ntrover,"ntrover/I");
ntuple->Branch("x",&ntuple_st.x,"x/F");
ntuple->Branch("z",&ntuple_st.z,"z/F");
ntuple->Branch("dx",&ntuple_st.dx,"dx/F");
ntuple1->Branch("dz",&ntuple1_st.dz,"dz/F");
ntuple1->Branch("noverlaps",&ntuple1_st.noverlaps,"noverlaps/I");
ntuple1->Branch("noverprim",&ntuple1_st.noverprim,"noverprim/I");
+ ntuple1->Branch("ntrover",&ntuple1_st.ntrover,"ntrover/I");
ntuple2 = new TTree("ntuple2","Demo ntuple2");
ntuple2->Branch("nxP",&ntuple2_st.nxP,"nxP/I");
//AliITSgeom *aliitsgeo = ITS->GetITSgeom();
AliITSgeom *geom = ITS->GetITSgeom();
+
//Int_t cp[8]={0,0,0,0,0,0,0,0};
- cout << "SSD" << endl;
+ //cout << "SSD" << endl;
AliITSDetType *iDetType=ITS->DetType(2);
AliITSsegmentationSSD *seg2=(AliITSsegmentationSSD*)iDetType->GetSegmentationModel();
TClonesArray *dig2 = ITS->DigitsAddress(2);
TClonesArray *recp2 = ITS->ClustersAddress(2);
- // AliITSClusterFinderSSD *rec2=new AliITSClusterFinderSSD(seg2,dig2,recp2);
AliITSClusterFinderSSD *rec2=new AliITSClusterFinderSSD(seg2,dig2);
ITS->SetReconstructionModel(2,rec2);
+
// test
- printf("SSD dimensions %f %f \n",seg2->Dx(),seg2->Dz());
+ printf("SSD dimensions %f %f %f \n",seg2->Dx(),seg2->Dz(),seg2->Dy());
printf("SSD nstrips %d %d \n",seg2->Npz(),seg2->Npx());
-
+ Float_t ylim = seg2->Dy()/2 - 12;
//
// Loop over events
printf("det type %d first2, last2 %d %d \n",2,first2,last2);
// module loop for the SSD
- for (mod=first2; mod<last2+1; mod++) {
+ for (mod=first2; mod<last2+1; mod++) { // for the "ALL" option
+ //for (mod=0; mod<last2-first2+1; mod++) { //for the "SSD" option
TTree *TR = gAlice->TreeR();
Int_t nentrec=TR->GetEntries();
Int_t nrecp = ITSrec->GetEntries();
totpoints += nrecp;
- if (nrecp) printf("Found %d rec points for module %d\n",nrecp,mod);
+ //if (nrecp) printf("Found %d rec points for module %d\n",nrecp,mod);
if (!nrecp) continue;
Int_t nclusters = ITSclu->GetEntries();
totclust += nclusters;
//if (nclusters) printf("Found %d clusters for module %d\n",nrecc,mod);
+ //AliITSmodule *Mod = (AliITSmodule *)fITSmodules->At(mod+first2);
+ // for the "SSD" option
+
AliITSmodule *Mod = (AliITSmodule *)fITSmodules->At(mod);
+ // for the "ALL" option
+
// printf("Mod: %X\n",Mod);
Int_t nhits = Mod->GetNhits();
Float_t epart = 0;
Int_t nxP = itsClu->fMultiplicity;
Int_t nxN = itsClu->fMultiplicityN;
+ Int_t ntrover = itsClu->fNtracks;
Float_t qclP = itsClu->fSignalP; // in ADC
Float_t qclN = itsClu->fSignalN; // in ADC
//Float_t dq = qclP - qclN;
Int_t tr2 = itsPnt->GetLabel(ii);
Int_t ii = 2;
Int_t tr3 = itsPnt->GetLabel(ii);
-
// fill ntuple2
ntuple2_st.nxP = nxP;
ntuple2_st.nxN = nxN;
// vertex
pmod *= 1.0e+3;
- if(hitstat == 66 && yhit < -146.) { // entering hit
+ if(hitstat == 66 && yhit < -ylim) { // entering hit
xhit0 = xhit;
yhit0 = yhit;
zhit0 = zhit;
// Consider the hits only with the track number equaled to one
// of the recpoint
- if(track == tr1) flagtrack = 1;
+ if((track == tr1) || (track == tr2) || (track == tr3)) flagtrack = 1;
if(flagtrack == 1) { // the hit corresponds to the recpoint
// x,z resolution colculation
- if((hitstat == 68 || hitsat == 33) && parent < 0) {
+ if((hitstat == 68 || hitsat == 33) && dray == 0) {
Float_t xmed = (xhit + xhit0)/2;
Float_t zmed = (zhit + zhit0)/2;
Float_t xdif = xmed - xrec;
Float_t zdif = zmed - zrec;
- hitprim = 1; // hitprim=1 for the primery particles
-
- noverprim += 1;
-
+ if(parent < 0) {
+ hitprim = 1; // hitprim=1 for the primery particles
+ noverprim += 1;
+ }
pathInSSD = TMath::Sqrt((xhit0-xhit)*(xhit0-xhit)+(yhit0-yhit)*(yhit0-yhit)+(zhit0-zhit)*(zhit0-zhit));
-
- // fill ntuple
+ // fill ntuple
ntuple_st.lay = hitlayer;
ntuple_st.nxP = nxP;
ntuple_st.nxN = nxN;
ntuple_st.hitprim = hitprim;
ntuple_st.partcode = partcode;
+ ntuple_st.ntrover = ntrover;
ntuple_st.x = xrec/1000;
ntuple_st.z = zrec/1000;
ntuple_st.dx = xdif;
ntuple_st.dz = zdif;
ntuple_st.pmod = pmod;
- if(qcut < 0.18) ntuple->Fill();
+ //if(qcut < 0.18) ntuple->Fill();
+ ntuple->Fill();
- if(hitlayer == 5 && qcut < 0.18) {
+ //if(hitlayer == 5 && qcut < 0.18) {
+
+ if(hitlayer == 5 ) {
Xres5->Fill(xdif);
Zres5->Fill(zdif);
Path5->Fill(pathInSSD);
- }
- if(hitlayer == 6 && qcut < 0.18) {
+ }
+ //if(hitlayer == 6 && qcut < 0.18) {
+ if(hitlayer == 6) {
Xres6->Fill(xdif);
Zres6->Fill(zdif);
Path6->Fill(pathInSSD);
noverprim -= 1;
ntuple1_st.noverlaps = noverlaps;
ntuple1_st.noverprim = noverprim;
+ ntuple1_st.ntrover = ntrover;
- if(qcut < 0.18) ntuple1->Fill();
+ //if(qcut < 0.18) ntuple1->Fill();
+ ntuple1->Fill();
Float_t de = dedx*300./pathInSSD;
dEdX->Fill(de);