Skip to content

Commit

Permalink
code format
Browse files Browse the repository at this point in the history
  • Loading branch information
civanch committed Dec 24, 2021
1 parent a4a5fbe commit d154254
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 14 deletions.
Expand Up @@ -44,7 +44,6 @@ class HectorTransport : public BaseProtonTransport {
void process(const HepMC::GenEvent* ev, const edm::EventSetup& es, CLHEP::HepRandomEngine* engine) override;

private:

static constexpr double fPPSBeamLineLength_ = 250.; // default beam line length

//!propagate the particles through a beamline to PPS
Expand Down
2 changes: 1 addition & 1 deletion SimTransport/PPSProtonTransport/src/BaseProtonTransport.cc
Expand Up @@ -43,7 +43,7 @@ void BaseProtonTransport::ApplyBeamCorrection(TLorentzVector& p_out) {

double dtheta_x = CLHEP::RandGauss::shoot(engine_, 0., m_sigmaSTX);
double dtheta_y = CLHEP::RandGauss::shoot(engine_, 0., m_sigmaSTY);
double denergy = CLHEP::RandGauss::shoot(engine_, 0., m_sig_E);
double denergy = CLHEP::RandGauss::shoot(engine_, 0., m_sig_E);

double s_theta = std::sqrt(pow(thetax + dtheta_x * urad, 2) + std::pow(thetay + dtheta_y * urad, 2));
double s_phi = std::atan2(thetay + dtheta_y * urad, thetax + dtheta_x * urad);
Expand Down
9 changes: 5 additions & 4 deletions SimTransport/PPSProtonTransport/src/HectorTransport.cc
Expand Up @@ -33,9 +33,10 @@ HectorTransport::HectorTransport(const edm::ParameterSet& iConfig, edm::Consumes
m_sig_E = iConfig.getParameter<double>("BeamEnergyDispersion");

//PPS
edm::LogVerbatim("ProtonTransport") << "=============================================================================\n"
<< " Bulding LHC Proton transporter based on HECTOR model\n"
<< "=============================================================================\n";
edm::LogVerbatim("ProtonTransport")
<< "=============================================================================\n"
<< " Bulding LHC Proton transporter based on HECTOR model\n"
<< "=============================================================================\n";
setBeamLine();
}
//
Expand Down Expand Up @@ -233,7 +234,7 @@ bool HectorTransport::setBeamLine() {
<< " Forward beam line elements \n";
m_beamline45->showElements();
edm::LogVerbatim("HectorTransportSetup") << "===================================================================\n"
<< " Backward beam line elements \n";
<< " Backward beam line elements \n";
m_beamline56->showElements();
}
return true;
Expand Down
20 changes: 12 additions & 8 deletions SimTransport/PPSProtonTransport/src/TotemTransport.cc
Expand Up @@ -27,9 +27,10 @@ TotemTransport::TotemTransport(const edm::ParameterSet& iConfig)
if (fPPSRegionStart_56 > 0)
fPPSRegionStart_56 *= -1; // make sure sector 56 has negative position, as TOTEM convention

edm::LogVerbatim("TotemTransport") << "=============================================================================\n"
<< " Bulding LHC Proton transporter based on TOTEM model\n"
<< "=============================================================================\n";
edm::LogVerbatim("TotemTransport")
<< "=============================================================================\n"
<< " Bulding LHC Proton transporter based on TOTEM model\n"
<< "=============================================================================\n";

m_aprox_ip_150_r = ReadParameterization(m_model_ip_150_r_name, beam1Filename_);
m_aprox_ip_150_l = ReadParameterization(m_model_ip_150_l_name, beam2Filename_);
Expand All @@ -40,7 +41,7 @@ TotemTransport::TotemTransport(const edm::ParameterSet& iConfig)
throw edm::Exception(edm::errors::Configuration) << "TotemTransport is not properly initialized";
}
edm::LogVerbatim("TotemTransport") << "Parameterizations read from file, pointers:" << m_aprox_ip_150_r << " "
<< m_aprox_ip_150_l << " ";
<< m_aprox_ip_150_l << " ";
}
//
// this method is the same for all propagator, but since transportProton is different for each derived class
Expand All @@ -53,7 +54,7 @@ void TotemTransport::process(const HepMC::GenEvent* ievt,

engine_ = _engine; // the engine needs to be updated for each event

HepMC::GenEvent *evt = new HepMC::GenEvent(*ievt);
HepMC::GenEvent* evt = new HepMC::GenEvent(*ievt);

for (HepMC::GenEvent::particle_const_iterator eventParticle = evt->particles_begin();
eventParticle != evt->particles_end();
Expand Down Expand Up @@ -105,8 +106,9 @@ bool TotemTransport::transportProton(HepMC::GenParticle* in_trk) {
double out_position[3];
double out_momentum[3];
edm::LogVerbatim("TotemTransport") << "before transport ->"
<< " position: " << in_position[0] << ", " << in_position[1] << ", " << in_position[2]
<< " momentum: " << in_momentum[0] << ", " << in_momentum[1] << ", " << in_momentum[2];
<< " position: " << in_position[0] << ", " << in_position[1] << ", "
<< in_position[2] << " momentum: " << in_momentum[0] << ", " << in_momentum[1]
<< ", " << in_momentum[2];

LHCOpticsApproximator* approximator_ = nullptr;
double m_Zin_;
Expand Down Expand Up @@ -137,7 +139,9 @@ bool TotemTransport::transportProton(HepMC::GenParticle* in_trk) {

if (out_position[0] * out_position[0] + out_position[1] * out_position[1] >
m_beampipe_aperture_radius * m_beampipe_aperture_radius) {
edm::LogVerbatim("TotemTransport") << "Proton ouside beampipe\n" << "===== END Transport " << "====================";
edm::LogVerbatim("TotemTransport") << "Proton ouside beampipe\n"
<< "===== END Transport "
<< "====================";
return false;
}

Expand Down

0 comments on commit d154254

Please sign in to comment.