Fork me on GitHub

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/Hector.cc

    rcab38f6 r341014c  
    1717 */
    1818
    19 
    2019/** \class Hector
    2120 *
     
    3231#include "classes/DelphesFormula.h"
    3332
     33#include "ExRootAnalysis/ExRootClassifier.h"
     34#include "ExRootAnalysis/ExRootFilter.h"
    3435#include "ExRootAnalysis/ExRootResult.h"
    35 #include "ExRootAnalysis/ExRootFilter.h"
    36 #include "ExRootAnalysis/ExRootClassifier.h"
    3736
     37#include "TDatabasePDG.h"
     38#include "TFormula.h"
     39#include "TLorentzVector.h"
    3840#include "TMath.h"
     41#include "TObjArray.h"
     42#include "TRandom3.h"
    3943#include "TString.h"
    40 #include "TFormula.h"
    41 #include "TRandom3.h"
    42 #include "TObjArray.h"
    43 #include "TDatabasePDG.h"
    44 #include "TLorentzVector.h"
    4544
    4645#include <algorithm>
    47 #include <stdexcept>
    4846#include <iostream>
    4947#include <sstream>
     48#include <stdexcept>
    5049
    5150#include "Hector/H_BeamLine.h"
     51#include "Hector/H_BeamParticle.h"
    5252#include "Hector/H_RecRPObject.h"
    53 #include "Hector/H_BeamParticle.h"
    5453
    5554using namespace std;
     
    120119
    121120  fItInputArray->Reset();
    122   while((candidate = static_cast<Candidate*>(fItInputArray->Next())))
     121  while((candidate = static_cast<Candidate *>(fItInputArray->Next())))
    123122  {
    124123    const TLorentzVector &candidatePosition = candidate->Position;
     
    132131    z = 1.0E-3 * candidatePosition.Z();
    133132
    134 //    tx = 1.0E6 * TMath::ATan(candidateMomentum.Px()/pz);
    135 //    ty = 1.0E6 * TMath::ATan(candidateMomentum.Py()/pz);
     133    //    tx = 1.0E6 * TMath::ATan(candidateMomentum.Px()/pz);
     134    //    ty = 1.0E6 * TMath::ATan(candidateMomentum.Py()/pz);
    136135
    137136    tx = 0.0;
    138137    ty = 0.0;
    139138
    140     theta = TMath::Hypot(TMath::ATan(candidateMomentum.Px()/pz), TMath::ATan(candidateMomentum.Py()/pz));
    141     distance = (fDistance - 1.0E-3 * candidatePosition.Z())/TMath::Cos(theta);
    142     time = gRandom->Gaus((distance + 1.0E-3 * candidatePosition.T())/c_light, fSigmaT);
     139    theta = TMath::Hypot(TMath::ATan(candidateMomentum.Px() / pz), TMath::ATan(candidateMomentum.Py() / pz));
     140    distance = (fDistance - 1.0E-3 * candidatePosition.Z()) / TMath::Cos(theta);
     141    time = gRandom->Gaus((distance + 1.0E-3 * candidatePosition.T()) / c_light, fSigmaT);
    143142
    144143    H_BeamParticle particle(candidate->Mass, candidate->Charge);
    145 //    particle.set4Momentum(candidateMomentum);
    146     particle.set4Momentum(candidateMomentum.Px(), candidateMomentum.Py(), 
    147                           candidateMomentum.Pz(), candidateMomentum.E());
     144    //    particle.set4Momentum(candidateMomentum);
     145    particle.set4Momentum(candidateMomentum.Px(), candidateMomentum.Py(),
     146      candidateMomentum.Pz(), candidateMomentum.E());
    148147    particle.setPosition(x, y, tx, ty, z);
    149148
     
    158157
    159158    mother = candidate;
    160     candidate = static_cast<Candidate*>(candidate->Clone());
     159    candidate = static_cast<Candidate *>(candidate->Clone());
    161160    candidate->Position.SetXYZT(particle.getX(), particle.getY(), particle.getS(), time);
    162161    candidate->Momentum.SetPxPyPzE(particle.getTX(), particle.getTY(), 0.0, particle.getE());
Note: See TracChangeset for help on using the changeset viewer.