Fork me on GitHub

Changeset cc8716b in git


Ignore:
Timestamp:
Mar 7, 2022, 8:51:45 PM (2 years ago)
Author:
GitHub <noreply@…>
Branches:
master
Children:
7dbc149
Parents:
4e8e72b
git-author:
Christinaw97 <cwang5@…> (03/07/22 20:51:45)
git-committer:
GitHub <noreply@…> (03/07/22 20:51:45)
Message:

Update to handle CMS endcap muon detector showers for long-lived particles (#103)

Co-authored-by: christinaw97 <christina.wang@…>

Files:
10 added
9 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    r4e8e72b rcc8716b  
    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 \
     
    518522        classes/DelphesFactory.h \
    519523        classes/SortableObject.h
     524tmp/classes/DelphesCscClusterFormula.$(ObjSuf): \
     525        classes/DelphesCscClusterFormula.$(SrcSuf) \
     526        classes/DelphesCscClusterFormula.h
    520527tmp/classes/DelphesCylindricalFormula.$(ObjSuf): \
    521528        classes/DelphesCylindricalFormula.$(SrcSuf) \
     
    734741        external/TrackCovariance/TrkUtil.h
    735742tmp/modules/ConstituentFilter.$(ObjSuf): \
    736         modules/ConstituentFilter.$(SrcSuf) \
    737         modules/ConstituentFilter.h \
    738         classes/DelphesClasses.h \
    739         classes/DelphesFactory.h \
    740         classes/DelphesFormula.h \
     743        modules/ConstituentFilter.$(SrcSuf) \
     744        modules/ConstituentFilter.h \
     745        classes/DelphesClasses.h \
     746        classes/DelphesFactory.h \
     747        classes/DelphesFormula.h \
     748        external/ExRootAnalysis/ExRootClassifier.h \
     749        external/ExRootAnalysis/ExRootFilter.h \
     750        external/ExRootAnalysis/ExRootResult.h
     751tmp/modules/CscClusterEfficiency.$(ObjSuf): \
     752        modules/CscClusterEfficiency.$(SrcSuf) \
     753        modules/CscClusterEfficiency.h \
     754        classes/DelphesClasses.h \
     755        classes/DelphesFactory.h \
     756        classes/DelphesCscClusterFormula.h \
     757        external/ExRootAnalysis/ExRootClassifier.h \
     758        external/ExRootAnalysis/ExRootFilter.h \
     759        external/ExRootAnalysis/ExRootResult.h
     760tmp/modules/CscClusterId.$(ObjSuf): \
     761        modules/CscClusterId.$(SrcSuf) \
     762        modules/CscClusterId.h \
     763        classes/DelphesClasses.h \
     764        classes/DelphesFactory.h \
     765        classes/DelphesCscClusterFormula.h \
    741766        external/ExRootAnalysis/ExRootClassifier.h \
    742767        external/ExRootAnalysis/ExRootFilter.h \
     
    882907        external/ExRootAnalysis/ExRootFilter.h \
    883908        external/ExRootAnalysis/ExRootResult.h
     909tmp/modules/LLPFilter.$(ObjSuf): \
     910        modules/LLPFilter.$(SrcSuf) \
     911        modules/LLPFilter.h \
     912        classes/DelphesClasses.h \
     913        classes/DelphesFactory.h \
     914        classes/DelphesFormula.h \
     915        external/ExRootAnalysis/ExRootClassifier.h \
     916        external/ExRootAnalysis/ExRootFilter.h \
     917        external/ExRootAnalysis/ExRootResult.h
    884918tmp/modules/LeptonDressing.$(ObjSuf): \
    885919        modules/LeptonDressing.$(SrcSuf) \
     
    11631197DELPHES_OBJ +=  \
    11641198        tmp/classes/DelphesClasses.$(ObjSuf) \
     1199        tmp/classes/DelphesCscClusterFormula.$(ObjSuf) \
    11651200        tmp/classes/DelphesCylindricalFormula.$(ObjSuf) \
    11661201        tmp/classes/DelphesFactory.$(ObjSuf) \
     
    12271262        tmp/modules/ClusterCounting.$(ObjSuf) \
    12281263        tmp/modules/ConstituentFilter.$(ObjSuf) \
     1264        tmp/modules/CscClusterEfficiency.$(ObjSuf) \
     1265        tmp/modules/CscClusterId.$(ObjSuf) \
    12291266        tmp/modules/DecayFilter.$(ObjSuf) \
    12301267        tmp/modules/Delphes.$(ObjSuf) \
     
    12421279        tmp/modules/JetFlavorAssociation.$(ObjSuf) \
    12431280        tmp/modules/JetPileUpSubtractor.$(ObjSuf) \
     1281        tmp/modules/LLPFilter.$(ObjSuf) \
    12441282        tmp/modules/LeptonDressing.$(ObjSuf) \
    12451283        tmp/modules/Merger.$(ObjSuf) \
     
    17671805ifeq ($(HAS_PYTHIA8),true)
    17681806FASTJET_OBJ +=  \
    1769        
     1807
    17701808endif
    17711809
     
    18141852ifeq ($(HAS_PYTHIA8),true)
    18151853DISPLAY_OBJ +=  \
    1816        
     1854
    18171855endif
    18181856
     
    19281966        @touch $@
    19291967
     1968modules/LLPFilter.h: \
     1969        classes/DelphesModule.h
     1970        @touch $@
     1971
    19301972external/fastjet/internal/MinHeap.hh: \
    19311973        external/fastjet/internal/base.hh
     
    22572299        @touch $@
    22582300
     2301modules/CscClusterEfficiency.h: \
     2302        classes/DelphesModule.h
     2303        @touch $@
     2304
    22592305external/fastjet/PseudoJetStructureBase.hh: \
    22602306        external/fastjet/internal/base.hh
     
    23812427external/fastjet/config.h: \
    23822428        external/fastjet/config_win.h
     2429        @touch $@
     2430
     2431modules/CscClusterId.h: \
     2432        classes/DelphesModule.h
    23832433        @touch $@
    23842434
     
    25482598
    25492599###
    2550 
    2551 
  • classes/ClassesLinkDef.h

    r4e8e72b rcc8716b  
    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

    r4e8e72b rcc8716b  
    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),
     
    389392  object.Position = Position;
    390393  object.InitialPosition = InitialPosition;
     394  object.DecayPosition = DecayPosition;
    391395  object.PositionError = PositionError;
    392396  object.Area = Area;
     
    527531  Position.SetXYZT(0.0, 0.0, 0.0, 0.0);
    528532  InitialPosition.SetXYZT(0.0, 0.0, 0.0, 0.0);
     533  DecayPosition.SetXYZT(0.0, 0.0, 0.0, 0.0);
    529534  Area.SetXYZT(0.0, 0.0, 0.0, 0.0);
    530535  TrackCovariance.Zero();
  • classes/DelphesClasses.h

    r4e8e72b rcc8716b  
    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
    160165  static CompBase *fgCompare; //!
    161166  const CompBase *GetCompare() const { return fgCompare; }
     
    646651  ClassDef(HectorHit, 1)
    647652};
     653//---------------------------------------------------------------------------
     654
     655class CscCluster: public SortableObject
     656{
     657public:
     658  Float_t Eta; // eta of LLP
     659  Float_t Phi; // phi of LLP
     660  Float_t PT; // pt of LLP
     661  Float_t Px;// px of LLP
     662  Float_t Py;// py of LLP
     663  Float_t Pz;// pz of LLP
     664  Float_t E; // E of LLP
     665  Float_t Ehad; // had energy of LLP
     666  Float_t Eem; // em energy of LLP
     667  Float_t pid; // LLP pid
     668  Float_t T; // LLP decay time-photon travel time
     669  Float_t X; // LLP decay x
     670  Float_t Y; //  LLP decay y
     671  Float_t Z; //  LLP decay z
     672  Float_t R; //  LLP decay z
     673  Float_t beta; // LLP beta
     674  Float_t ctau; //LLP ctau
     675
     676
     677  static CompBase *fgCompare; //!
     678  const CompBase *GetCompare() const { return fgCompare; }
     679
     680  ClassDef(CscCluster, 5)
     681};
    648682
    649683//---------------------------------------------------------------------------
     
    690724  Float_t DeltaPhi;
    691725
    692   TLorentzVector Momentum, Position, InitialPosition, PositionError, Area;
     726  TLorentzVector Momentum, Position, InitialPosition, PositionError, DecayPosition, Area;
    693727
    694728  Float_t L; // path length
  • classes/DelphesHepMC2Reader.cc

    r4e8e72b rcc8716b  
    438438{
    439439  Candidate *candidate;
     440  Candidate *candidateDaughter;
    440441  map<int, pair<int, int> >::iterator itMotherMap;
    441442  map<int, pair<int, int> >::iterator itDaughterMap;
     
    446447    candidate = static_cast<Candidate *>(allParticleOutputArray->At(i));
    447448
     449
    448450    if(candidate->M1 > 0)
    449451    {
     
    477479        candidate->D1 = -1;
    478480        candidate->D2 = -1;
    479       }
     481        const TLorentzVector &decayPosition = candidate->Position;
     482        candidate->DecayPosition.SetXYZT(decayPosition.X(), decayPosition.Y(), decayPosition.Z(), decayPosition.T());// decay position
     483     }
    480484      else
    481485      {
    482486        candidate->D1 = itDaughterMap->second.first;
    483487        candidate->D2 = itDaughterMap->second.second;
    484       }
    485     }
    486   }
    487 }
    488 
    489 //---------------------------------------------------------------------------
     488        candidateDaughter = static_cast<Candidate *>(allParticleOutputArray->At(candidate->D1));
     489        const TLorentzVector &decayPosition = candidateDaughter->Position;
     490        candidate->DecayPosition.SetXYZT(decayPosition.X(), decayPosition.Y(), decayPosition.Z(), decayPosition.T());// decay position
     491       
     492
     493      }
     494    }
     495  }
     496}
     497
     498//---------------------------------------------------------------------------
  • classes/DelphesHepMC3Reader.cc

    r4e8e72b rcc8716b  
    458458  TObjArray *array;
    459459  Candidate *candidate;
     460  Candidate *candidateDaughter;
    460461  TParticlePDG *pdgParticle;
    461462  int pdgCode;
     
    573574        candidate->D1 = -1;
    574575        candidate->D2 = -1;
     576        const TLorentzVector &decayPosition = candidate->Position;
     577        candidate->DecayPosition.SetXYZT(decayPosition.X(), decayPosition.Y(), decayPosition.Z(), decayPosition.T());// decay position
    575578      }
    576579      else
     
    578581        candidate->D1 = itDaughterMap->second.first;
    579582        candidate->D2 = itDaughterMap->second.second;
    580       }
    581     }
    582   }
    583 }
    584 
    585 //---------------------------------------------------------------------------
     583        candidateDaughter = static_cast<Candidate *>(allParticleOutputArray->At(candidate->D1));
     584        const TLorentzVector &decayPosition = candidateDaughter->Position;
     585        candidate->DecayPosition.SetXYZT(decayPosition.X(), decayPosition.Y(), decayPosition.Z(), decayPosition.T());// decay position
     586      }
     587    }
     588  }
     589}
     590
     591//---------------------------------------------------------------------------
  • modules/ModulesLinkDef.h

    r4e8e72b rcc8716b  
    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

    r4e8e72b rcc8716b  
    7777  fClassMap[Electron::Class()] = &TreeWriter::ProcessElectrons;
    7878  fClassMap[Muon::Class()] = &TreeWriter::ProcessMuons;
     79  fClassMap[CscCluster::Class()] = &TreeWriter::ProcessCscCluster;
    7980  fClassMap[Jet::Class()] = &TreeWriter::ProcessJets;
    8081  fClassMap[MissingET::Class()] = &TreeWriter::ProcessMissingET;
     
    251252    entry->Z = position.Z();
    252253    entry->T = position.T() * 1.0E-3 / c_light;
     254
    253255  }
    254256}
     
    907909  }
    908910}
     911//------------------------------------------------------------------------------
     912
     913void TreeWriter::ProcessCscCluster(ExRootTreeBranch *branch, TObjArray *array)
     914{
     915  TIter iterator(array);
     916  Candidate *candidate = 0;
     917  CscCluster *entry = 0;
     918  Double_t pt, signPz, cosTheta, eta, rapidity;
     919
     920  const Double_t c_light = 2.99792458E8; // in unit of m/s
     921
     922  array->Sort();
     923
     924
     925  // loop over all clusters
     926  iterator.Reset();
     927  while((candidate = static_cast<Candidate *>(iterator.Next())))
     928  {
     929    const TLorentzVector &momentum = candidate->Momentum;
     930    const TLorentzVector &position = candidate->DecayPosition;
     931
     932    pt = momentum.Pt();
     933    cosTheta = TMath::Abs(momentum.CosTheta());
     934    signPz = (momentum.Pz() >= 0.0) ? 1.0 : -1.0;
     935    eta = (cosTheta == 1.0 ? signPz * 999.9 : momentum.Eta());
     936
     937    entry = static_cast<CscCluster *>(branch->NewEntry());
     938
     939    entry->SetBit(kIsReferenced);
     940    entry->SetUniqueID(candidate->GetUniqueID());
     941
     942    entry->Eta = eta;
     943    entry->Phi = momentum.Phi();
     944
     945    entry->PT = momentum.Pt(); // pt of LLP
     946    entry->Px = momentum.Px();// px of LLP
     947    entry->Py = momentum.Py();// py of LLP
     948    entry->Pz = momentum.Pz();// pz of LLP
     949    entry->E = momentum.E(); // E of LLP
     950    entry->pid = candidate->PID; // LLP pid
     951    entry->Eem = candidate->Eem; // LLP Eem
     952    entry->Ehad = candidate->Ehad; // LLP Ehad
     953    Double_t beta = momentum.P()/momentum.E();
     954    Double_t gamma = 1.0/sqrt(1-beta*beta);
     955    Double_t decayDistance = sqrt(pow(position.X(),2)+pow(position.Y(),2)+pow(position.Z(),2)); // mm
     956    entry->beta = beta; // LLP pid
     957    entry->ctau = decayDistance/(beta * gamma); // LLP travel time in its rest frame
     958    entry->T = decayDistance*(1./beta-1)* 1.0E-3/c_light*1e9; // ns
     959    entry->X = position.X(); // LLP decay x
     960    entry->Y = position.Y(); //  LLP decay y
     961    entry->Z = position.Z(); //  LLP decay z
     962  }
     963}
    909964
    910965//------------------------------------------------------------------------------
  • modules/TreeWriter.h

    r4e8e72b rcc8716b  
    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.