Difference between revisions of "TVModularAnalysis"

From Atlas Wiki
Jump to navigation Jump to search
Line 37: Line 37:
 
If you like to have the same cuts as TopView, you should change in <tt>
 
If you like to have the same cuts as TopView, you should change in <tt>
 
MuonSelection.C</tt> to <tt>etcone20</tt> and the cut to 6 GeV.
 
MuonSelection.C</tt> to <tt>etcone20</tt> and the cut to 6 GeV.
 +
 +
===memory leak===
 +
The problem with the 'memory leak' has been solved: we were using "an emulated collection proxy for compiled std::vector<double> and std::vector<int>". Doh! See: https://savannah.cern.ch/bugs/?28099
 +
 +
You can check out a new version from CVS: V00-00-07
 +
 +
A bit more technical:
 +
Note that the fix is in <tt>CSCDriver.C</tt> so everybody using his/her own customised 'CSCDriver' should apply the following changes:
 +
 +
In <tt>CSCDriver.C</tt>:
 +
1) Add:
 +
<pre>
 +
  #include "TApplication.h"
 +
  #include "TROOT.h"
 +
</pre>
 +
 +
2) Change:
 +
<pre>
 +
  int main(int argc, const char** argv)
 +
</pre>
 +
to
 +
<pre>
 +
  int main(int argc, char** argv)
 +
</pre>
 +
 +
3) Add in <tt>main</tt>:
 +
<pre>
 +
  TApplication App(argv[0],&argc,argv);
 +
  gROOT->Processline("#include <vector>");
 +
</pre>
 +
 +
Except for the memory leak, you also get rid off the error message that shows up everytime a new EventView-based ntuple is read in:
 +
<pre>
 +
  Error in <TClass::Load>: dictionary of class TTreeIndex not found
 +
</pre>

Revision as of 12:31, 18 July 2007

define_sample

The ls -1 $DIR/*.root command it used is unable to cope with very large directories. Replacing it with find $DIR -name '*.root' seems to do the trick.

b-tagging

In case you're using the Nikhef TVNtuples, you should add || (FullReco0-> vPJet_weight(i_jet) > 4.5 && FullReco0->vPJet_p_T(i_jet)>20000) in the FillAODVectors module in TVModularAnalysis, like here:

//--------------------------------------
void FillAODVectors::fillBJetVec(){
//--------------------------------------
//----------------------------------------------------------------------
// Fill Vectors of TLorentzVectors-with-index for 'all' and 'good' Bjets
//----------------------------------------------------------------------
  vector<TLorentzVectorWIdx>& BJetVec      = gList["BJetVec"] ;
  BJetVec.clear();
  for(Int_t i_jet = 0; i_jet<FullReco0->PJet_N; i_jet++){
    if(FullReco0->vPJet_BTagged(i_jet)==1 || (FullReco0->vPJet_weight(i_jet) >
4.5 && FullReco0->vPJet_p_T(i_jet)>20000) ){
      TLorentzVectorWIdx v(FullReco0->vPJet_px(i_jet),FullReco0->vPJet_py
(i_jet),FullReco0->vPJet_pz(i_jet),FullReco0->vPJet_E(i_jet),i_jet);
      BJetVec.push_back(TLorentzVectorWIdx(FullReco0->vPJet_px
(i_jet),FullReco0->vPJet_py(i_jet),FullReco0->vPJet_pz(i_jet),FullReco0->
vPJet_E(i_jet),i_jet) );
    }
  }
}

Otherwise you don't have any b-jets, because the BTagged variable was not filled. In case of the centrally produced 'Akira' Ntuples it will work just fine the way it is now though.

isolation cuts

If you like to have the same cuts as TopView, you should change in MuonSelection.C to etcone20 and the cut to 6 GeV.

memory leak

The problem with the 'memory leak' has been solved: we were using "an emulated collection proxy for compiled std::vector<double> and std::vector<int>". Doh! See: https://savannah.cern.ch/bugs/?28099

You can check out a new version from CVS: V00-00-07

A bit more technical: Note that the fix is in CSCDriver.C so everybody using his/her own customised 'CSCDriver' should apply the following changes:

In CSCDriver.C: 1) Add:

  #include "TApplication.h"
  #include "TROOT.h"

2) Change:

  int main(int argc, const char** argv)

to

  int main(int argc, char** argv)

3) Add in main:

  TApplication App(argv[0],&argc,argv);
  gROOT->Processline("#include <vector>");

Except for the memory leak, you also get rid off the error message that shows up everytime a new EventView-based ntuple is read in:

  Error in <TClass::Load>: dictionary of class TTreeIndex not found