Dear All,
I was applying one condition in root by using remainder operator(aB0Mode%100000==1877) but it was filling up the histogram. But If I draw it interactively (aB0Mode) then it is showing correct plot. Am I missing something when I am defining it in macro ? Do I need to define something for remainder operator while I am writing macro ?
{
TChain ch1("track");
ch1.Add("/home/souvik/tracking/root/root/mixed/recon_mixed*.root");
int aB0Mode;
ch1.SetBranchAddress("B0Mode",&aB0Mode);
TH1F *hist1 = new TH1F("hist1","",100, 0,2000);
for(Int_t i=0; i < ch1.GetEntries(); ++i){
ch1.GetEntry(i);
if(aB0Mode%100000==1877){
hist1->Fill(aB0Mode);
}
}
hist1->GetYaxis()->SetRangeUser(0,1200);
hist1->GetXaxis()->SetTitle("M_{bc} in GeV/C^{2}");
hist1->SetLineColor(kRed);
hist1->SetLineWidth(2);
hist1->SetFillColor(kRed);
hist1->Draw();
}
Thanks in Advance
__
Please read tips for efficient and successful posting and posting code
ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided