Fork me on GitHub

Changeset 2e229c9 in git


Ignore:
Timestamp:
May 26, 2013, 2:00:39 AM (12 years ago)
Author:
pavel <pavel@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
6c4f14a
Parents:
3ccc2b6e
Message:

add Weight branch and Weighter module

Files:
6 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    r3ccc2b6e r2e229c9  
    186186        modules/StatusPidFilter.h \
    187187        modules/Cloner.h \
     188        modules/Weighter.h \
    188189        modules/ExampleModule.h
    189190tmp/external/ExRootAnalysis/ExRootAnalysisDict.$(SrcSuf): \
     
    396397        external/ExRootAnalysis/ExRootClassifier.h \
    397398        external/ExRootAnalysis/ExRootTreeBranch.h
     399tmp/modules/Weighter.$(ObjSuf): \
     400        modules/Weighter.$(SrcSuf) \
     401        modules/Weighter.h \
     402        classes/DelphesClasses.h \
     403        classes/DelphesFactory.h \
     404        classes/DelphesFormula.h \
     405        external/ExRootAnalysis/ExRootResult.h \
     406        external/ExRootAnalysis/ExRootFilter.h \
     407        external/ExRootAnalysis/ExRootClassifier.h
    398408tmp/modules/Delphes.$(ObjSuf): \
    399409        modules/Delphes.$(SrcSuf) \
     
    763773        tmp/modules/BTagging.$(ObjSuf) \
    764774        tmp/modules/TreeWriter.$(ObjSuf) \
     775        tmp/modules/Weighter.$(ObjSuf) \
    765776        tmp/modules/Delphes.$(ObjSuf) \
    766777        tmp/modules/Calorimeter.$(ObjSuf) \
     
    10221033        @touch $@
    10231034
     1035external/fastjet/Selector.hh: \
     1036        external/fastjet/PseudoJet.hh \
     1037        external/fastjet/RangeDefinition.hh
     1038        @touch $@
     1039
    10241040modules/JetPileUpSubtractor.h: \
    10251041        classes/DelphesModule.h
    1026         @touch $@
    1027 
    1028 external/fastjet/Selector.hh: \
    1029         external/fastjet/PseudoJet.hh \
    1030         external/fastjet/RangeDefinition.hh
    10311042        @touch $@
    10321043
     
    11591170
    11601171modules/BTagging.h: \
     1172        classes/DelphesModule.h
     1173        @touch $@
     1174
     1175modules/Weighter.h: \
    11611176        classes/DelphesModule.h
    11621177        @touch $@
  • classes/ClassesLinkDef.h

    r3ccc2b6e r2e229c9  
    3737#pragma link C++ class ScalarHT+;
    3838#pragma link C++ class Rho+;
     39#pragma link C++ class Weight+;
    3940#pragma link C++ class Photon+;
    4041#pragma link C++ class Electron+;
  • classes/DelphesClasses.h

    r3ccc2b6e r2e229c9  
    175175//---------------------------------------------------------------------------
    176176
     177class Weight: public TObject
     178{
     179public:
     180  Float_t Weight; // weight for the event
     181
     182  ClassDef(Weight, 1)
     183};
     184
     185//---------------------------------------------------------------------------
     186
    177187class Photon: public SortableObject
    178188{
  • modules/ModulesLinkDef.h

    r3ccc2b6e r2e229c9  
    77 *  $Revision$
    88 *
    9  * 
     9 *
    1010 *  \author P. Demin - UCL, Louvain-la-Neuve
    1111 *
     
    1313
    1414#include "modules/Delphes.h"
    15  
     15
    1616#include "modules/FastJetFinder.h"
    1717#include "modules/ParticlePropagator.h"
     
    3333#include "modules/StatusPidFilter.h"
    3434#include "modules/Cloner.h"
     35#include "modules/Weighter.h"
    3536#include "modules/ExampleModule.h"
    3637
     
    6263#pragma link C++ class StatusPidFilter+;
    6364#pragma link C++ class Cloner+;
     65#pragma link C++ class Weighter+;
    6466#pragma link C++ class ExampleModule+;
    6567
  • modules/TreeWriter.cc

    r3ccc2b6e r2e229c9  
    6565  fClassMap[ScalarHT::Class()] = &TreeWriter::ProcessScalarHT;
    6666  fClassMap[Rho::Class()] = &TreeWriter::ProcessRho;
     67  fClassMap[Weight::Class()] = &TreeWriter::ProcessWeight;
    6768
    6869  TBranchMap::iterator itBranchMap;
     
    538539//------------------------------------------------------------------------------
    539540
     541void TreeWriter::ProcessWeight(ExRootTreeBranch *branch, TObjArray *array)
     542{
     543  Candidate *candidate = 0;
     544  Weight *entry = 0;
     545
     546  // get the first entry
     547  if((candidate = static_cast<Candidate*>(array->At(0))))
     548  {
     549    const TLorentzVector &momentum = candidate->Momentum;
     550
     551    entry = static_cast<Weight*>(branch->NewEntry());
     552
     553    entry->Weight = momentum.E();
     554  }
     555}
     556
     557//------------------------------------------------------------------------------
     558
    540559void TreeWriter::Process()
    541560{
  • modules/TreeWriter.h

    r3ccc2b6e r2e229c9  
    5151  void ProcessScalarHT(ExRootTreeBranch *branch, TObjArray *array);
    5252  void ProcessRho(ExRootTreeBranch *branch, TObjArray *array);
     53  void ProcessWeight(ExRootTreeBranch *branch, TObjArray *array);
    5354
    5455#ifndef __CINT__
Note: See TracChangeset for help on using the changeset viewer.