Fork me on GitHub

Changes in / [0c0c9af:d612dec] in git


Ignore:
Files:
7 added
7 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    r0c0c9af rd612dec  
    2222HAS_CMSSW = true
    2323CXXFLAGS += -std=c++0x -I$(subst :, -I,$(CMSSW_FWLITE_INCLUDE_PATH))
     24CXXFLAGS += -std=c++1y
    2425OPT_LIBS += -L$(subst include,lib,$(subst :, -L,$(CMSSW_FWLITE_INCLUDE_PATH)))
    2526ifneq ($(CMSSW_RELEASE_BASE),)
     
    461462        modules/VertexFinder.h \
    462463        modules/VertexFinderDA4D.h \
     464        modules/LLPFilter.h \
     465        modules/CscClusterEfficiency.h \
     466        modules/CscClusterId.h \
    463467        modules/DecayFilter.h \
    464468        modules/ParticleDensity.h \
     
    734738        external/TrackCovariance/TrkUtil.h
    735739tmp/modules/ConstituentFilter.$(ObjSuf): \
    736         modules/ConstituentFilter.$(SrcSuf) \
    737         modules/ConstituentFilter.h \
    738         classes/DelphesClasses.h \
    739         classes/DelphesFactory.h \
    740         classes/DelphesFormula.h \
     740        modules/ConstituentFilter.$(SrcSuf) \
     741        modules/ConstituentFilter.h \
     742        classes/DelphesClasses.h \
     743        classes/DelphesFactory.h \
     744        classes/DelphesFormula.h \
     745        external/ExRootAnalysis/ExRootClassifier.h \
     746        external/ExRootAnalysis/ExRootFilter.h \
     747        external/ExRootAnalysis/ExRootResult.h
     748tmp/modules/CscClusterEfficiency.$(ObjSuf): \
     749        modules/CscClusterEfficiency.$(SrcSuf) \
     750        modules/CscClusterEfficiency.h \
     751        classes/DelphesClasses.h \
     752        classes/DelphesFactory.h \
     753        classes/DelphesFormula.h \
     754        external/ExRootAnalysis/ExRootClassifier.h \
     755        external/ExRootAnalysis/ExRootFilter.h \
     756        external/ExRootAnalysis/ExRootResult.h
     757tmp/modules/CscClusterId.$(ObjSuf): \
     758        modules/CscClusterId.$(SrcSuf) \
     759        modules/CscClusterId.h \
     760        classes/DelphesClasses.h \
     761        classes/DelphesFactory.h \
     762        classes/DelphesFormula.h \
    741763        external/ExRootAnalysis/ExRootClassifier.h \
    742764        external/ExRootAnalysis/ExRootFilter.h \
     
    876898        modules/JetPileUpSubtractor.$(SrcSuf) \
    877899        modules/JetPileUpSubtractor.h \
     900        classes/DelphesClasses.h \
     901        classes/DelphesFactory.h \
     902        classes/DelphesFormula.h \
     903        external/ExRootAnalysis/ExRootClassifier.h \
     904        external/ExRootAnalysis/ExRootFilter.h \
     905        external/ExRootAnalysis/ExRootResult.h
     906tmp/modules/LLPFilter.$(ObjSuf): \
     907        modules/LLPFilter.$(SrcSuf) \
     908        modules/LLPFilter.h \
    878909        classes/DelphesClasses.h \
    879910        classes/DelphesFactory.h \
     
    12271258        tmp/modules/ClusterCounting.$(ObjSuf) \
    12281259        tmp/modules/ConstituentFilter.$(ObjSuf) \
     1260        tmp/modules/CscClusterEfficiency.$(ObjSuf) \
     1261        tmp/modules/CscClusterId.$(ObjSuf) \
    12291262        tmp/modules/DecayFilter.$(ObjSuf) \
    12301263        tmp/modules/Delphes.$(ObjSuf) \
     
    12421275        tmp/modules/JetFlavorAssociation.$(ObjSuf) \
    12431276        tmp/modules/JetPileUpSubtractor.$(ObjSuf) \
     1277        tmp/modules/LLPFilter.$(ObjSuf) \
    12441278        tmp/modules/LeptonDressing.$(ObjSuf) \
    12451279        tmp/modules/Merger.$(ObjSuf) \
     
    19281962        @touch $@
    19291963
     1964modules/LLPFilter.h: \
     1965        classes/DelphesModule.h
     1966        @touch $@
     1967
    19301968external/fastjet/internal/MinHeap.hh: \
    19311969        external/fastjet/internal/base.hh
     
    22572295        @touch $@
    22582296
     2297modules/CscClusterEfficiency.h: \
     2298        classes/DelphesModule.h
     2299        @touch $@
     2300
    22592301external/fastjet/PseudoJetStructureBase.hh: \
    22602302        external/fastjet/internal/base.hh
     
    23812423external/fastjet/config.h: \
    23822424        external/fastjet/config_win.h
     2425        @touch $@
     2426
     2427modules/CscClusterId.h: \
     2428        classes/DelphesModule.h
    23832429        @touch $@
    23842430
  • classes/ClassesLinkDef.h

    r0c0c9af rd612dec  
    5757#pragma link C++ class Electron+;
    5858#pragma link C++ class Muon+;
     59#pragma link C++ class CscCluster+;
     60
    5961#pragma link C++ class Jet+;
    6062#pragma link C++ class Track+;
     
    6668
    6769#endif
    68 
  • classes/DelphesClasses.cc

    r0c0c9af rd612dec  
    3535CompBase *Electron::fgCompare = CompPT<Electron>::Instance();
    3636CompBase *Muon::fgCompare = CompPT<Muon>::Instance();
     37
    3738CompBase *Jet::fgCompare = CompPT<Jet>::Instance();
    3839CompBase *Track::fgCompare = CompPT<Track>::Instance();
     
    4243CompBase *Vertex::fgCompare = CompSumPT2<Vertex>::Instance();
    4344CompBase *Candidate::fgCompare = CompMomentumPt<Candidate>::Instance();
     45CompBase *CscCluster::fgCompare = CompE<CscCluster>::Instance();
    4446
    4547//------------------------------------------------------------------------------
     
    218220  Position(0.0, 0.0, 0.0, 0.0),
    219221  InitialPosition(0.0, 0.0, 0.0, 0.0),
     222  DecayPosition(0.0, 0.0, 0.0, 0.0),
    220223  PositionError(0.0, 0.0, 0.0, 0.0),
    221224  Area(0.0, 0.0, 0.0, 0.0),
     
    388391  object.Position = Position;
    389392  object.InitialPosition = InitialPosition;
     393  object.DecayPosition = DecayPosition;
    390394  object.PositionError = PositionError;
    391395  object.Area = Area;
     
    523527  Position.SetXYZT(0.0, 0.0, 0.0, 0.0);
    524528  InitialPosition.SetXYZT(0.0, 0.0, 0.0, 0.0);
     529  DecayPosition.SetXYZT(0.0, 0.0, 0.0, 0.0);
    525530  Area.SetXYZT(0.0, 0.0, 0.0, 0.0);
    526531  TrackCovariance.Zero();
  • classes/DelphesClasses.h

    r0c0c9af rd612dec  
    158158  Float_t Z; // particle vertex position (z component) | hepevt.vhep[number][2]
    159159
     160  Float_t decayX;
     161  Float_t decayY;
     162  Float_t decayZ;
     163  Float_t decayT;
     164
     165  Float_t ctau;
     166
    160167  static CompBase *fgCompare; //!
    161168  const CompBase *GetCompare() const { return fgCompare; }
     
    638645  ClassDef(HectorHit, 1)
    639646};
     647//---------------------------------------------------------------------------
     648
     649class CscCluster: public SortableObject
     650{
     651public:
     652  Int_t NHits; //nCSC hits
     653  Float_t Eta; // eta of LLP
     654  Float_t Phi; // phi of LLP
     655  Float_t PT; // pt of LLP
     656  Float_t Px;// px of LLP
     657  Float_t Py;// py of LLP
     658  Float_t Pz;// pz of LLP
     659  Float_t E; // E of LLP
     660  Float_t Ehad; // had energy of LLP
     661  Float_t Eem; // em energy of LLP
     662
     663  Float_t pid; // LLP pid
     664
     665  Float_t T; // LLP decay time-photon travel time
     666  Float_t X; // LLP decay x
     667  Float_t Y; //  LLP decay y
     668  Float_t Z; //  LLP decay z
     669  Float_t R; //  LLP decay z
     670  Float_t beta;
     671  Float_t ctau;
     672
     673
     674  static CompBase *fgCompare; //!
     675  const CompBase *GetCompare() const { return fgCompare; }
     676
     677  ClassDef(CscCluster, 4)
     678};
    640679
    641680//---------------------------------------------------------------------------
     
    682721  Float_t DeltaPhi;
    683722
    684   TLorentzVector Momentum, Position, InitialPosition, PositionError, Area;
     723  TLorentzVector Momentum, Position, InitialPosition, DecayPosition, PositionError, Area;
    685724
    686725  Float_t L; // path length
  • modules/ModulesLinkDef.h

    r0c0c9af rd612dec  
    7979#include "modules/TruthVertexFinder.h"
    8080#include "modules/ExampleModule.h"
     81#include "modules/LLPFilter.h"
     82#include "modules/CscClusterEfficiency.h"
     83#include "modules/CscClusterId.h"
    8184
    8285#ifdef __CINT__
     
    139142#pragma link C++ class TruthVertexFinder+;
    140143#pragma link C++ class ExampleModule+;
     144#pragma link C++ class LLPFilter+;
     145#pragma link C++ class CscClusterEfficiency+;
     146#pragma link C++ class CscClusterId+;
    141147
    142148#endif
  • modules/TreeWriter.cc

    r0c0c9af rd612dec  
    7676  fClassMap[Electron::Class()] = &TreeWriter::ProcessElectrons;
    7777  fClassMap[Muon::Class()] = &TreeWriter::ProcessMuons;
     78  fClassMap[CscCluster::Class()] = &TreeWriter::ProcessCscCluster;
    7879  fClassMap[Jet::Class()] = &TreeWriter::ProcessJets;
    7980  fClassMap[MissingET::Class()] = &TreeWriter::ProcessMissingET;
     
    197198    const TLorentzVector &momentum = candidate->Momentum;
    198199    const TLorentzVector &position = candidate->Position;
     200    const TLorentzVector &DecayPosition = candidate->DecayPosition;
    199201
    200202    entry = static_cast<GenParticle *>(branch->NewEntry());
     
    238240    entry->Z = position.Z();
    239241    entry->T = position.T() * 1.0E-3 / c_light;
     242
     243    entry->decayX = DecayPosition.X();
     244    entry->decayY = DecayPosition.Y();
     245    entry->decayZ = DecayPosition.Z();
     246    entry->decayT = DecayPosition.T()* 1.0E-3 / c_light;
     247    float beta = entry->P/momentum.E();
     248    float gamma = 1./sqrt(1-beta*beta);
     249    entry->ctau = sqrt(pow(entry->decayX-entry->X,2)+pow(entry->decayY-entry->Y,2)+pow(entry->decayZ-entry->Z,2))/(beta*gamma);// in millimeter
    240250  }
    241251}
     
    886896  }
    887897}
     898//------------------------------------------------------------------------------
     899
     900void TreeWriter::ProcessCscCluster(ExRootTreeBranch *branch, TObjArray *array)
     901{
     902  TIter iterator(array);
     903  Candidate *candidate = 0;
     904  CscCluster *entry = 0;
     905  Double_t pt, signPz, cosTheta, eta, rapidity;
     906
     907  const Double_t c_light = 2.99792458E8; // in unit of m/s
     908
     909  array->Sort();
     910
     911
     912  // loop over all clusters
     913  iterator.Reset();
     914  while((candidate = static_cast<Candidate *>(iterator.Next())))
     915  {
     916    const TLorentzVector &momentum = candidate->Momentum;
     917    const TLorentzVector &position = candidate->DecayPosition;
     918
     919    pt = momentum.Pt();
     920    cosTheta = TMath::Abs(momentum.CosTheta());
     921    signPz = (momentum.Pz() >= 0.0) ? 1.0 : -1.0;
     922    eta = (cosTheta == 1.0 ? signPz * 999.9 : momentum.Eta());
     923
     924    entry = static_cast<CscCluster *>(branch->NewEntry());
     925
     926    entry->SetBit(kIsReferenced);
     927    entry->SetUniqueID(candidate->GetUniqueID());
     928
     929    entry->Eta = eta;
     930    entry->Phi = momentum.Phi();
     931
     932
     933    // entry->Eta = position.Eta();
     934    // entry->Phi = position.Phi();
     935
     936    entry->PT = momentum.Pt(); // pt of LLP
     937    entry->Px = momentum.Px();// px of LLP
     938    entry->Py = momentum.Py();// py of LLP
     939    entry->Pz = momentum.Pz();// pz of LLP
     940    entry->E = momentum.E(); // E of LLP
     941    entry->pid = candidate->PID; // LLP pid
     942    entry->Eem = candidate->Eem; // LLP pid
     943    entry->Ehad = candidate->Ehad; // LLP pid
     944    Double_t beta = momentum.P()/momentum.E();
     945    Double_t gamma = 1.0/sqrt(1-beta*beta);
     946    Double_t decayDistance = sqrt(pow(position.X(),2)+pow(position.Y(),2)+pow(position.Z(),2)); // mm
     947    entry->beta = beta; // LLP pid
     948    entry->ctau = decayDistance/(beta * gamma);; // LLP pid
     949
     950    // entry->T = (position.T()-sqrt(pow(position.X(),2)+pow(position.Y(),2)+pow(position.Z(),2)))* 1.0E-3 / c_light; // LLP decay time-photon travel time
     951
     952    entry->T = decayDistance*(1./beta-1)* 1.0E-3/c_light*1e9; // ns
     953    entry->X = position.X(); // LLP decay x
     954    entry->Y = position.Y(); //  LLP decay y
     955    entry->Z = position.Z(); //  LLP decay z
     956    // entry->Size = 100;
     957  }
     958}
    888959
    889960//------------------------------------------------------------------------------
  • modules/TreeWriter.h

    r0c0c9af rd612dec  
    6060  void ProcessElectrons(ExRootTreeBranch *branch, TObjArray *array);
    6161  void ProcessMuons(ExRootTreeBranch *branch, TObjArray *array);
     62  void ProcessCscCluster(ExRootTreeBranch *branch, TObjArray *array);
    6263  void ProcessTauJets(ExRootTreeBranch *branch, TObjArray *array);
    6364  void ProcessJets(ExRootTreeBranch *branch, TObjArray *array);
     
    6768  void ProcessWeight(ExRootTreeBranch *branch, TObjArray *array);
    6869  void ProcessHectorHit(ExRootTreeBranch *branch, TObjArray *array);
     70
    6971
    7072#if !defined(__CINT__) && !defined(__CLING__)
Note: See TracChangeset for help on using the changeset viewer.