Re: [ROOT] Chain projection

From: Rene Brun (Rene.Brun@cern.ch)
Date: Tue Mar 04 2003 - 18:40:24 MET


Hi Ciro,

chain.Print reports only 246 events in your chain. Are you sure that
you have added your first file. chain.Print should show the details
of each file in the chain.

To output the result of chain.Print to a file, do
  root > chain.Print("toponly"); >print.log

Rene Brun

Ciro Bigongiari wrote:
> 
> Rene Brun wrote:
> 
> > Hi Ciro,
> >
> > I cannot reproduce this problem with the old version 3.02/07.
> > Is chain.Draw("180.*fTheta/3.1415") featuring the same problem?
> >
> 
> Yes, it does.  I got always an histogram with 246 entries, like the second
> file tree,
> while I would expect 291+246 entries.
> 
> >
> > I need more  information like the result of chain.Print().
> >
> 
> chain.Print("toponly");       gives:
> 
> ******************************************************************************
> 
> *Tree    :Events    : Normal Triggered Events
> *
> *Entries :      246 : Total =         3267456 bytes  File  Size =    1103894
> *
> *        :          : Tree compression factor =   2.33
> *
> ******************************************************************************
> 
> branch: MMcEvt                       0
> branch: fEvtNumber                   0
> branch: fPartId                      0
> branch: fEnergy                      0
> branch: fThick0                      0
> branch: fFirstTarget                 0
> branch: fZFirstInteraction           0
> branch: fTheta                       0
> branch: fPhi                         0
> branch: fCoreD                       0
> branch: fCoreX                       0
> branch: fCoreY                       0
> branch: fImpact                      0
> branch: fTelescopePhi                0
> branch: fTelescopeTheta              0
> branch: fTimeFirst                   0
> branch: fTimeLast                    0
> branch: fLongiNmax                   0
> branch: fLongit0                     0
> branch: fLongitmax                   0
> branch: fLongia                      0
> branch: fLongib                      0
> branch: fLongic                      0
> branch: fLongichi2                   0
> branch: fPhotIni                     0
> branch: fPassPhotAtm                 0
> branch: fPassPhotRef                 0
> branch: fPassPhotCone                0
> branch: fPhotElfromShower            0
> branch: fPhotElinCamera              0
> branch: fElecCphFraction             0
> branch: fMuonCphFraction             0
> branch: fOtherCphFraction            0
> branch: MRawEvtHeader                0
> branch: fDAQEvtNumber                0
> branch: fNumTrigLvl1                 0
> branch: fNumTrigLvl2                 0
> branch: fTrigPattern[2]              0
> branch: fNumLoGainOn                 0
> branch: MRawEvtData                  0
> branch: fHiGainPixId             11714
> branch: fHiGainFadcSamples     1051332
> branch: fLoGainPixId                 0
> branch: fLoGainFadcSamples           0
> branch: MMcTrig                      0
> branch: fNumFirstLevel               0
> branch: fNumSecondLevel              0
> branch: fTimeFirst[4]                0
> branch: fPixelsFirst[73][4]       5231
> branch: fFirstToSecond               0
> 
> If I don' t use the toponly option I get a much longer output that I cannot
> cut&paste.
> BTW. Can I redirect the output of Print  to a file ?
> 
> >
> > I also suggest to move to a more recent version such as 3.05/02
> >
> 
> I installed  3.05/02 and tried. I got the same result.
> I could bypass the problem projecting the two trees onto two different
> histograms and then adding them,
> but I would prefer the chain solution because I would like to chain many
> files.
> 
> >
> > Rene Brun
> >
> 
> Thanx,
>              ciro
> 
> >
> > On Fri, 28
> > Feb 2003, Ciro Bigongiari wrote:
> >
> > >
> > >
> > > Hi rooters,
> > >
> > > I tried to project a chain on a predefined histo without success.
> > > Here is what I did:
> > >
> > > {
> > >    gROOT->Reset();
> > >
> > > //   Create the chain as above
> > >
> > >    TChain chain("Events")
> > >    chain.Add("Pseudoelectron_0_0_7_1000to1009_w0.root");
> > >    chain.Add("Pseudoelectron_0_0_7_1130to1139_w0.root");
> > >
> > > //   Create an histogram
> > >
> > >    TH1F *helectron = new TH1F("helectron","Triggered electrons",50,0,5);
> > >
> > > //   Project the chain
> > >
> > >    chain.Draw("180.0*fTheta/3.1415 >>+ helectron ");
> > >
> > > //  Draw the histogram
> > >
> > >    helectron ->Draw();
> > > }
> > >
> > >
> > > The histogram I got seems to contain only the events in the second file.
> > >
> > >
> > >
> > > My data are:
> > >
> > > PC Pentium IV
> > > Linux RedHat  7.2
> > > ROOT  Version   3.02/07   7 February 2003
> > >
> > > What  did I do wrong ?
> > > Thanks a lot in advance.
> > >
> > > Regards, ciro
> > >



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:09 MET