6 gROOT->LoadMacro(
"$VMCWORKDIR/gconfig/basiclibs.C");
10 gSystem->Load(
"libRho");
12 TCanvas *
c1=
new TCanvas(
"c1",
"c1",600,600);
20 TChain *
t=
new TChain(
"pndsim");
26 TClonesArray *
fMcCands=
new TClonesArray(
"TCandidate");
27 TClonesArray *fMicro=
new TClonesArray(
"PndPidCandidate");
29 t->SetBranchAddress(
"PndMcTracks",&fMcCands);
30 t->SetBranchAddress(
"PndPidCandidates",&fMicro);
36 TH1F *d0mass =
new TH1F(
"d0mass",
"Ds cands",100,1.864-0.05,1.864+0.05);
37 TH1F *ppmass =
new TH1F(
"ppmass",
"pbarp cands",100,4.4,4.6);
41 TH1F *nmult=
new TH1F(
"nmult",
"# neutrals",15,0,15);
43 if (
num==0)
num= t->GetEntries();
44 cout <<
"\n####### Processing "<<
num <<
" events...\n"<<endl;
50 TCandList neut,chrg, plus,minus;
52 TCandList kp,km,pip,pim;
54 TCandList
d0,d0b,pp,pipi;
58 TPidChargedSelector *chargedSel =
new TPidChargedSelector;
59 TPidNeutralSelector *neutralSel =
new TPidNeutralSelector;
60 TPidPlusSelector *plusSel =
new TPidPlusSelector;
61 TPidMinusSelector *minusSel =
new TPidMinusSelector;
65 TPidMassSelector *d0MSel =
new TPidMassSelector(
"d0Selector" , 1.864 , 0.03);
67 TPidSimpleKaonSelector *kSel =
new TPidSimpleKaonSelector();
68 kSel->SetCriterion(
"veryLoose");
69 TPidSimplePionSelector *piSel =
new TPidSimplePionSelector();
70 piSel->SetCriterion(
"veryLoose");
76 for (Int_t j=0; j<
num;j++)
78 if ((j%100)==0) cout <<
"evt "<<j<<endl;
81 TFactory::Instance()->Reset();
90 for (i1=0; i1<fMicro->GetEntriesFast(); i1++){
93 if (abs(tc2.Charge())>0.01)chrg.Add(tc2);
98 for (i1=0; i1<fMcCands->GetEntriesFast(); i1++){
99 tc = (TCandidate *)fMcCands->At(i1);
105 nmult->Fill(neut.GetLength());
107 plus.Select(chrg ,plusSel);
108 minus.Select(chrg ,minusSel);
112 kp.Select(plus ,kSel);
113 km.Select(minus ,kSel);
114 pip.Select(plus ,piSel);
115 pim.Select(minus ,piSel);
123 for (i2=0;i2<d0.GetLength();i2++) d0mass->Fill(d0[i2].M());
124 for (i2=0;i2<d0b.GetLength();i2++) d0mass->Fill(d0b[i2].M());
129 pp.Combine(d0,d0b,pip,pim);
131 for (i2=0;i2<pp.GetLength();i2++) ppmass->Fill(pp[i2].M());
148 printf(
"RealTime=%f seconds, CpuTime=%f seconds\n",rtime,ctime);
printf("RealTime=%f seconds, CpuTime=%f seconds\n", rtime, ctime)
int ana_d0d0b_micro(TString fname="dsds_10k.evt.root", int num=0)