Fork me on GitHub

Changeset 49234af in git for modules


Ignore:
Timestamp:
Dec 9, 2014, 1:27:13 PM (10 years ago)
Author:
Michele <michele.selvaggi@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
37deb3b, 9e991f8
Parents:
f6b6ee7 (diff), e7e90df (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'TestFastJet310b1'

Location:
modules
Files:
5 added
6 edited

Legend:

Unmodified
Added
Removed
  • modules/Calorimeter.cc

    rf6b6ee7 r49234af  
    153153  }
    154154*/
     155
     156  // read min E value for towers to be saved
     157  fEcalEnergyMin = GetDouble("EcalTowerMinEnergy", 0.0);
     158  fHcalEnergyMin = GetDouble("HcalTowerMinEnergy", 0.0);
     159 
     160  fEcalSigmaMin  = GetDouble("EcalTowerMinSignificance", 0.0);
     161  fHcalSigmaMin  = GetDouble("HcalTowerMinSignificance", 0.0);
     162
     163 
    155164  // read resolution formulas
    156165  fECalResolutionFormula->Compile(GetString("ECalResolutionFormula", "0"));
     
    432441
    433442  if(!fTower) return;
     443//  cout<<"----------------------"<<endl;
     444//  cout<<"Finalize Tower"<<endl;
     445//  cout<<""<<endl;
     446
    434447
    435448  ecalSigma = fECalResolutionFormula->Eval(0.0, fTowerEta, 0.0, fTowerECalEnergy);
     
    448461  hcalEnergy = LogNormal(fTowerHCalEnergy, hcalSigma);
    449462  hcalTime = (fTowerHCalWeightTime < 1.0E-09 ) ? 0 : fTowerHCalTime/fTowerHCalWeightTime;
     463
     464 
     465  ecalSigma = fECalResolutionFormula->Eval(0.0, fTowerEta, 0.0, ecalEnergy);
     466  hcalSigma = fHCalResolutionFormula->Eval(0.0, fTowerEta, 0.0, hcalEnergy);
     467
     468  ecalEnergy = (ecalEnergy < fEcalEnergyMin || ecalEnergy < fEcalSigmaMin*ecalSigma) ? 0 : ecalEnergy;
     469  hcalEnergy = (hcalEnergy < fHcalEnergyMin || hcalEnergy < fHcalSigmaMin*hcalSigma) ? 0 : hcalEnergy;
    450470
    451471  energy = ecalEnergy + hcalEnergy;
     
    471491  fTower->Edges[3] = fTowerEdges[3];
    472492
    473 
    474   // fill calorimeter towers
    475   if(energy > 0.0)
     493  if( energy > 0.0 )
    476494  {
    477495    if(fTowerPhotonHits > 0 && fTowerTrackHits == 0)
     
    493511
    494512  ecalEnergy -= fTrackECalEnergy;
    495   if(ecalEnergy < 0.0) ecalEnergy = 0.0;
     513  if(ecalEnergy < fEcalEnergyMin || ecalEnergy < fEcalSigmaMin*fECalResolutionFormula->Eval(0.0, fTowerEta, 0.0, ecalEnergy)) ecalEnergy = 0.0;
    496514
    497515  hcalEnergy -= fTrackHCalEnergy;
    498   if(hcalEnergy < 0.0) hcalEnergy = 0.0;
     516  if(hcalEnergy < fHcalEnergyMin || hcalEnergy < fHcalSigmaMin*fHCalResolutionFormula->Eval(0.0, fTowerEta, 0.0, hcalEnergy)) hcalEnergy = 0.0;
    499517
    500518  energy = ecalEnergy + hcalEnergy;
    501519
    502  
    503   // save ECAL and/or HCAL energy excess as an energy flow tower
    504520  if(ecalEnergy > 0.0)
    505521  {
     
    515531    fEFlowPhotonOutputArray->Add(tower);
    516532  }
    517 
    518533  if(hcalEnergy > 0.0)
    519534  {
  • modules/Calorimeter.h

    rf6b6ee7 r49234af  
    7272  Int_t fTowerTrackHits, fTowerPhotonHits;
    7373
     74  Double_t fEcalEnergyMin;
     75  Double_t fHcalEnergyMin;
     76 
     77  Double_t fEcalSigmaMin;
     78  Double_t fHcalSigmaMin;
     79
    7480  TFractionMap fFractionMap; //!
    7581  TBinMap fBinMap; //!
  • modules/FastJetFinder.cc

    rf6b6ee7 r49234af  
    241241  Candidate *candidate, *constituent;
    242242  TLorentzVector momentum;
     243 
     244  TLorentzVector constmomentum;
     245 
    243246  Double_t deta, dphi, detaMax, dphiMax;
    244247  Double_t time, weightTime, avTime;
     
    304307  for(itOutputList = outputList.begin(); itOutputList != outputList.end(); ++itOutputList)
    305308  {
    306     momentum.SetPxPyPzE(itOutputList->px(), itOutputList->py(), itOutputList->pz(), itOutputList->E());
     309    jet = *itOutputList;
     310    if(fJetAlgorithm == 7) jet = join(jet.constituents());
     311   
     312    momentum.SetPxPyPzE(jet.px(), jet.py(), jet.pz(), jet.E());
     313   
    307314    area.reset(0.0, 0.0, 0.0, 0.0);
    308315    if(fAreaDefinition) area = itOutputList->area_4vector();
     
    315322    inputList.clear();
    316323    inputList = sequence->constituents(*itOutputList);
     324
     325    constmomentum.SetPxPyPzE(0.0,0.0,0.0,0.0);;
    317326
    318327    for(itInputList = inputList.begin(); itInputList != inputList.end(); ++itInputList)
    319328    {
    320329      constituent = static_cast<Candidate*>(fInputArray->At(itInputList->user_index()));
     330
     331      constmomentum += constituent->Momentum;
    321332
    322333      deta = TMath::Abs(momentum.Eta() - constituent->Momentum.Eta());
  • modules/ModulesLinkDef.h

    rf6b6ee7 r49234af  
    3333
    3434#include "modules/FastJetFinder.h"
     35#include "modules/FastJetGridMedianEstimator.h"
    3536#include "modules/ParticlePropagator.h"
    3637#include "modules/Efficiency.h"
     
    5657#include "modules/ConstituentFilter.h"
    5758#include "modules/StatusPidFilter.h"
     59#include "modules/PdgCodeFilter.h"
    5860#include "modules/Cloner.h"
    5961#include "modules/Weighter.h"
     
    7072
    7173#pragma link C++ class FastJetFinder+;
     74#pragma link C++ class FastJetGridMedianEstimator+;
    7275#pragma link C++ class ParticlePropagator+;
    7376#pragma link C++ class Efficiency+;
     
    9396#pragma link C++ class ConstituentFilter+;
    9497#pragma link C++ class StatusPidFilter+;
     98#pragma link C++ class PdgCodeFilter+;
    9599#pragma link C++ class Cloner+;
    96100#pragma link C++ class Weighter+;
  • modules/SimpleCalorimeter.cc

    rf6b6ee7 r49234af  
    147147  }
    148148*/
     149
     150  // read min E value for towers to be saved
     151  fEnergyMin = GetDouble("TowerMinEnergy", 0.0);
     152  fSigmaMin  = GetDouble("TowerMinSignificance", 0.0);
     153 
    149154  // read resolution formulas
    150155  fResolutionFormula->Compile(GetString("ResolutionFormula", "0"));
     
    402407  time = (fTowerWeightTime < 1.0E-09 ) ? 0 : fTowerTime/fTowerWeightTime;
    403408
     409  sigma = fResolutionFormula->Eval(0.0, fTowerEta, 0.0, energy);
     410 
     411  energy = (energy < fEnergyMin || energy < fSigmaMin*sigma) ? 0 : energy;
     412 
    404413  eta = gRandom->Uniform(fTowerEdges[0], fTowerEdges[1]);
    405414  phi = gRandom->Uniform(fTowerEdges[2], fTowerEdges[3]);
     
    423432  // fill energy flow candidates
    424433  energy -= fTrackEnergy;
    425   if(energy < 0.0) energy = 0.0;
     434  if(energy < fEnergyMin || energy < fSigmaMin*fResolutionFormula->Eval(0.0, fTowerEta, 0.0, energy)) energy = 0.0;
    426435   
    427436  // save energy excess as an energy flow tower
  • modules/SimpleCalorimeter.h

    rf6b6ee7 r49234af  
    7272  Int_t fTowerTrackHits, fTowerPhotonHits;
    7373
     74  Double_t fEnergyMin;
     75  Double_t fSigmaMin;
     76
    7477  TFractionMap fFractionMap; //!
    7578  TBinMap fBinMap; //!
Note: See TracChangeset for help on using the changeset viewer.