Fork me on GitHub

Changeset 55 in svn


Ignore:
Timestamp:
Nov 27, 2008, 3:05:11 PM (16 years ago)
Author:
severine ovyn
Message:

1file ->several

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Delphes.cpp

    r49 r55  
    1919#include "Utilities/ExRootAnalysis/interface/ExRootTreeBranch.h"
    2020
    21 #include "H_BeamParticle.h"
    22 #include "H_BeamLine.h"
    23 #include "H_RomanPot.h"
    24 
    2521#include "interface/DataConverter.h"
    2622#include "interface/HEPEVTConverter.h"
     
    2925
    3026#include "interface/SmearUtil.h"
    31 #include "Utilities/Fastjet/include/fastjet/PseudoJet.hh"
    32 #include "Utilities/Fastjet/include/fastjet/ClusterSequence.hh"
    33 
    34 // get info on how fastjet was configured
    35 #include "Utilities/Fastjet/include/fastjet/config.h"
    36 
    37 // make sure we have what is needed
    38 #ifdef ENABLE_PLUGIN_SISCONE
    39 #  include "Utilities/Fastjet/plugins/SISCone/SISConePlugin.hh"
    40 #endif
    41 #ifdef ENABLE_PLUGIN_CDFCONES
    42 #  include "Utilities/Fastjet/plugins/CDFCones/CDFMidPointPlugin.hh"
    43 #  include "Utilities/Fastjet/plugins/CDFCones/CDFJetCluPlugin.hh"
    44 #endif
    45 
    46 #include<vector>
    47 #include<iostream>
    48 
    49 
     27#include "interface/BFieldProp.h"
     28#include "interface/TriggerUtil.h"
     29#include "interface/VeryForward.h"
     30#include "interface/JetUtils.h"
     31
     32#include <vector>
     33#include <iostream>
    5034
    5135using namespace std;
     
    6852{
    6953  int appargc = 2;
    70   char *appName = "JetsSim";
     54  char *appName = "Delphes";
    7155  char *appargv[] = {appName, "-b"};
    7256  TApplication app(appName, &appargc, appargv);
     
    10387  string DetDatacard("");
    10488  if(argc==4)  DetDatacard =argv[3];
     89
     90  //Smearing information
    10591  RESOLution *DET = new RESOLution();
    10692  DET->ReadDataCard(DetDatacard);
    10793  DET->Logfile(LogName);
    10894
    109   todo(LogName.c_str());
     95  //Trigger information
     96  Trigger *TRIG = new Trigger();
     97  TRIG->TriggerReader("data/trigger.dat");
     98
     99  //Propagation of tracks in the B field
     100  TrackPropagation *TRACP = new TrackPropagation();
     101
     102  //Jet information
     103  JetsUtil *JETRUN = new JetsUtil();
     104
     105  //VFD information
     106  VeryForward * VFD = new VeryForward();
     107
     108  //todo(LogName.c_str());
    110109 
    111110  DataConverter *converter=0;
     
    163162  TRootMuon *elementMu;
    164163  TRootPhoton *elementPhoton;
    165   TRootJet *elementJet;
    166   TRootTauJet *elementTauJet;
    167164  TRootTracks *elementTracks;
    168165  TRootCalo *elementCalo;
    169   TRootZdcHits *elementZdc;
    170   TRootRomanPotHits *elementRP220, *elementFP420;
    171166 
    172167  TLorentzVector genMomentum(0,0,0,0);
    173168  TLorentzVector genMomentumCalo(0,0,0,0);
    174169  LorentzVector jetMomentum;
     170 
     171  vector<fastjet::PseudoJet> input_particles;//for FastJet algorithm
     172  vector<fastjet::PseudoJet> sorted_jets;
     173
    175174  vector<TLorentzVector> TrackCentral; 
    176175  vector<PhysicsTower> towers;
    177   vector<fastjet::PseudoJet> input_particles;//for FastJet algorithm
    178   vector<fastjet::PseudoJet> inclusive_jets;
    179   vector<fastjet::PseudoJet> sorted_jets;
    180176 
    181177  vector<TLorentzVector> electron;
     
    185181  TSimpleArray<TRootGenParticle> NFCentralQ;
    186182 
    187   //Initialisation of Hector
    188   extern bool relative_energy;
    189   relative_energy = true; // should always be true
    190   extern int kickers_on;
    191   kickers_on = 1;         // should always be 1
    192  
    193   // user should provide : (1) optics file for each beamline, and IPname,
    194   // and offset data (s,x) for optical elements
    195   H_BeamLine* beamline1 = new H_BeamLine(1,500.);
    196   beamline1->fill("data/LHCB1IR5_v6.500.tfs",1,"IP5");
    197   beamline1->offsetElements(120,-0.097);
    198   H_RomanPot * rp220_1 = new H_RomanPot("rp220_1",220,2000); // RP 220m, 2mm, beam 1
    199   H_RomanPot * rp420_1 = new H_RomanPot("rp420_1",420,4000); // RP 420m, 4mm, beam 1
    200   beamline1->add(rp220_1);
    201   beamline1->add(rp420_1);
    202  
    203   H_BeamLine* beamline2 = new H_BeamLine(1,500.);
    204   beamline2->fill("data/LHCB1IR5_v6.500.tfs",-1,"IP5");
    205   beamline2->offsetElements(120,+0.097);
    206   H_RomanPot * rp220_2 = new H_RomanPot("rp220_2",220,2000);// RP 220m, 2mm, beam 2
    207   H_RomanPot * rp420_2 = new H_RomanPot("rp420_2",420,4000);// RP 420m, 4mm, beam 2
    208   beamline2->add(rp220_2);
    209   beamline2->add(rp420_2);
    210  
    211   // we will have four jet definitions, and the first three will be
    212   // plugins
    213   fastjet::JetDefinition jet_def;
    214   fastjet::JetDefinition::Plugin * plugins;
    215  
    216   switch(DET->JETALGO) {
    217   default:
    218   case 1: {
    219    
    220     // set up a CDF midpoint jet definition
    221 #ifdef ENABLE_PLUGIN_CDFCONES
    222     plugins = new fastjet::CDFJetCluPlugin(DET->SEEDTHRESHOLD,DET->CONERADIUS,DET->C_ADJACENCYCUT,DET->C_MAXITERATIONS,DET->C_IRATCH,DET->OVERLAPTHRESHOLD);
    223     jet_def = fastjet::JetDefinition(plugins);
    224 #else
    225     plugins = NULL;
    226 #endif
    227   }
    228     break;
    229    
    230   case 2: {
    231    
    232     // set up a CDF midpoint jet definition
    233 #ifdef ENABLE_PLUGIN_CDFCONES
    234     plugins = new fastjet::CDFMidPointPlugin (DET->SEEDTHRESHOLD,DET->CONERADIUS,DET->M_CONEAREAFRACTION,DET->M_MAXPAIRSIZE,DET->M_MAXITERATIONS,DET->OVERLAPTHRESHOLD);
    235     jet_def = fastjet::JetDefinition(plugins);
    236 #else
    237     plugins = NULL;
    238 #endif
    239   }
    240     break;
    241   case 3: {
    242     // set up a siscone jet definition
    243 #ifdef ENABLE_PLUGIN_SISCONE
    244     plugins = new fastjet::SISConePlugin (DET->CONERADIUS,DET->OVERLAPTHRESHOLD,DET->NPASS, DET->PROTOJET_PTMIN);
    245     jet_def = fastjet::JetDefinition(plugins);
    246 #else
    247     plugins = NULL;
    248 #endif
    249   }
    250     break;
    251    
    252   case 4: {
    253     jet_def = fastjet::JetDefinition(fastjet::kt_algorithm, DET->CONERADIUS);
    254   }
    255     break;
    256    
    257   case 5: {
    258     jet_def = fastjet::JetDefinition(fastjet::cambridge_algorithm,DET->CONERADIUS);
    259   }
    260     break;
    261    
    262   case 6: {
    263     jet_def = fastjet::JetDefinition(fastjet::antikt_algorithm,DET->CONERADIUS);
    264   }
    265     break;
    266   }
    267  
     183
     184
    268185  // Loop over all events
    269186  Long64_t entry, allEntries = treeReader->GetEntries();
     
    286203      towers.clear();
    287204      input_particles.clear();
    288       inclusive_jets.clear();
    289       sorted_jets.clear();
    290205     
    291206      // Loop over all particles in event
     
    294209          genMomentum.SetPxPyPzE(particle->Px, particle->Py, particle->Pz, particle->E);
    295210         
    296           int pid = abs(particle->PID);
    297           float eta = fabs(particle->Eta);
    298          
     211          int pid = abs(particle->PID);
     212          float eta = fabs(genMomentum.Eta());
     213
    299214          //subarray of the quarks (i.e. not final particles, i.e status not equal to 1)
    300215          // in the tracker (i.e. for those we know the tracks)
     
    312227          // keeps only final particles, visible by the central detector, including the fiducial volume
    313228          // the ordering of conditions have been optimised for speed : put first the STATUS condition
     229          //
     230          //
    314231          if( (particle->Status == 1)    &&
    315232              (
     
    318235                )
    319236              ) {
    320             switch(pid) {
     237          //  TRACP->Propagation(particle,genMomentum);
     238            eta = fabs(genMomentum.Eta());
     239            switch(pid) {
    321240             
    322241            case pE: // all electrons with eta < DET->MAX_CALO_FWD
     
    363282            }
    364283           
    365            
    366284            // all final charged particles
    367285            if(
    368286               ((rand()%100) < DET->TRACKING_EFF)  &&
    369287               (genMomentum.E()!=0) &&
    370                (fabs(particle->Eta) < DET->MAX_TRACKER) &&
     288               (fabs(genMomentum.Eta()) < DET->MAX_TRACKER) &&
    371289               (genMomentum.Pt() > DET->PT_TRACKS_MIN ) &&     // pt too small to be taken into account
    372290               (pid != pGAMMA)    &&
     
    386304          } // switch
    387305         
    388           // Forward particles in CASTOR ?
    389           /*      if (particle->Status == 1 && (fabs(particle->Eta) > DET->MIN_CALO_VFWD)
    390                   && (fabs(particle->Eta) < DET->MAX_CALO_VFWD)) {
    391                  
    392                  
    393                   } // CASTOR
    394           */
    395           // Zero degree calorimeter, for forward neutrons and photons
    396           if (particle->Status ==1 && (pid == pN || pid == pGAMMA ) && eta > DET->MIN_ZDC ) {
    397             // !!!!!!!!! vérifier que particle->Z est bien en micromÚtres!!!
    398             // !!!!!!!!! vérifier que particle->T est bien en secondes!!!
    399             // !!!!!!!!! pas de smearing ! on garde trop d'info !
    400             elementZdc = (TRootZdcHits*) branchZDC->NewEntry();
    401             elementZdc->Set(genMomentum);
    402            
    403             // time of flight t is t = T + d/[ cos(theta) v ]
    404             //double tx = acos(particle->Px/particle->Pz);
    405             //double ty = acos(particle->Py/particle->Pz);
    406             //double theta = (1E-6)*sqrt( pow(tx,2) + pow(ty,2) );
    407             //double flight_distance = (DET->ZDC_S - particle->Z*(1E-6))/cos(theta) ; // assumes that Z is in micrometers
    408             double flight_distance = (DET->ZDC_S - particle->Z*(1E-6));
    409             // assumes also that the emission angle is so small that 1/(cos theta) = 1
    410             elementZdc->T = 0*particle->T + flight_distance/speed_of_light; // assumes highly relativistic particles
    411             elementZdc->side = sign(particle->Eta);
    412            
    413           }
    414          
    415           // if forward proton
    416           if( (pid == pP)  && (particle->Status == 1) &&  (fabs(particle->Eta) > DET->MAX_CALO_FWD) )
    417             {
    418               // !!!!!!!! put here particle->CHARGE and particle->MASS
    419               H_BeamParticle p1; /// put here particle->CHARGE and particle->MASS
    420               p1.smearAng();
    421               p1.smearPos();
    422               p1.setPosition(p1.getX()-500.,p1.getY(),p1.getTX()-1*kickers_on*CRANG,p1.getTY(),0);
    423               p1.set4Momentum(particle->Px,particle->Py,particle->Pz,particle->E);
    424              
    425               H_BeamLine *beamline;
    426               if(particle->Eta >0) beamline = beamline1;
    427               else beamline = beamline2;
    428              
    429               p1.computePath(beamline,1);
    430              
    431               if(p1.stopped(beamline)) {
    432                 if (p1.getStoppingElement()->getName()=="rp220_1" || p1.getStoppingElement()->getName()=="rp220_2") {
    433                   p1.propagate(DET->RP220_S);
    434                   elementRP220 = (TRootRomanPotHits*) branchRP220->NewEntry();
    435                   elementRP220->X  = (1E-6)*p1.getX();  // [m]
    436                   elementRP220->Y  = (1E-6)*p1.getY();  // [m]
    437                   elementRP220->Tx = (1E-6)*p1.getTX(); // [rad]
    438                   elementRP220->Ty = (1E-6)*p1.getTY(); // [rad]
    439                   elementRP220->S = p1.getS();          // [m]
    440                   elementRP220->T = -1;                 // not yet implemented
    441                   elementRP220->E = p1.getE();  // not yet implemented
    442                   elementRP220->q2 = -1;                // not yet implemented
    443                   elementRP220->side = sign(particle->Eta);
    444                  
    445                 } else if (p1.getStoppingElement()->getName()=="rp420_1" || p1.getStoppingElement()->getName()=="rp420_2") {
    446                   p1.propagate(DET->FP420_S);
    447                   elementFP420 = (TRootRomanPotHits*) branchFP420->NewEntry();
    448                   elementFP420->X  = (1E-6)*p1.getX();  // [m]
    449                   elementFP420->Y  = (1E-6)*p1.getY();  // [m]
    450                   elementFP420->Tx = (1E-6)*p1.getTX(); // [rad]
    451                   elementFP420->Ty = (1E-6)*p1.getTY(); // [rad]
    452                   elementFP420->S = p1.getS();        // [m]
    453                   elementFP420->T = -1;                       // not yet implemented
    454                   elementFP420->E = p1.getE();          // not yet implemented
    455                   elementFP420->q2 = -1;                // not yet implemented
    456                   elementFP420->side = sign(particle->Eta);
    457                 }
    458               }
    459              
    460               //                if(p1.stopped(beamline) && (p1.getStoppingElement()->getS() > 100))
    461               //                        cout << "Eloss ="  << 7000.-p1.getE() << " ; " << p1.getStoppingElement()->getName() << endl;
    462             } // if forward proton
     306          VFD->ZDC(treeWriter,branchZDC,particle);
     307          VFD->RomanPots(treeWriter,branchRP220,branchFP420,particle);
    463308         
    464309        } // while
     
    497342      //*****************************
    498343     
    499       // run the jet clustering with the above jet definition
    500       if(input_particles.size()!=0)
    501         {
    502           fastjet::ClusterSequence clust_seq(input_particles, jet_def);
    503           // extract the inclusive jets with pt > 5 GeV
    504           double ptmin = 5.0;
    505           inclusive_jets = clust_seq.inclusive_jets(ptmin);
    506           // sort jets into increasing pt
    507           sorted_jets = sorted_by_pt(inclusive_jets);
    508         }
    509       for (unsigned int i = 0; i < sorted_jets.size(); i++) {
    510         TLorentzVector JET;
    511         JET.SetPxPyPzE(sorted_jets[i].px(),sorted_jets[i].py(),sorted_jets[i].pz(),sorted_jets[i].E());
    512         // Tau jet identification : 1! track and electromagnetic collimation
    513         if(fabs(JET.Eta()) < (DET->MAX_TRACKER - DET->TAU_CONE_TRACKS)) {
    514           double Energie_tau_central = DET->EnergySmallCone(towers,JET.Eta(),JET.Phi());
    515           if(
    516              ( Energie_tau_central/JET.E() > DET->TAU_EM_COLLIMATION ) &&
    517              ( DET->NumTracks(TrackCentral,DET->PT_TRACK_TAU,JET.Eta(),JET.Phi()) == 1 ) &&
    518              ( JET.Pt() > DET->TAUJET_pt)
    519              ) {
    520             elementTauJet = (TRootTauJet*) branchTauJet->NewEntry();
    521             elementTauJet->Set(JET);
    522           } // if tau jet
    523         } // if JET.eta < tracker - tau_cone : Tau jet identification
    524        
    525         if(JET.Pt() > DET->JET_pt)
    526           {
    527             elementJet = (TRootJet*) branchJet->NewEntry();
    528             elementJet->Set(JET);
    529             // b-jets
    530             bool btag=false;
    531             if((fabs(JET.Eta()) < DET->MAX_TRACKER && DET->Btaggedjet(JET, NFCentralQ)))btag=true;
    532             elementJet->Btag = btag;
    533           }
    534       } // for itJet : loop on all jets
    535      
     344      sorted_jets=JETRUN->RunJets(input_particles);
     345      JETRUN->RunJetBtagging(treeWriter, branchJet,sorted_jets,NFCentralQ);
     346      JETRUN->RunTauJets(treeWriter,branchTauJet,sorted_jets,towers, TrackCentral);
     347
     348
    536349      treeWriter->Fill();
     350
    537351      // Add here the trigger
    538352      // Should test all the trigger table on the event, based on reconstructed objects
     353     
     354 //     Trigger *TRIG = new Trigger();
     355 //     TRIG->TriggerReader("data/trigger.dat");
     356     
    539357    } // Loop over all events
     358
    540359  treeWriter->Write();
    541360 
  • trunk/Makefile

    r19 r55  
    4141        interface/STDHEPConverter.h \
    4242        interface/SmearUtil.h \
    43         Utilities/Fastjet/include/fastjet/PseudoJet.hh \
    44         Utilities/Fastjet/include/fastjet/ClusterSequence.hh \
    45         Utilities/Fastjet/include/fastjet/config.h
     43        interface/BFieldProp.h \
     44        interface/TriggerUtil.h \
     45        interface/VeryForward.h \
     46        interface/JetUtils.h
    4647Resolutions$(ExeSuf): \
    4748        tmp/Resolutions.$(ObjSuf)
     
    6162        Utilities/Fastjet/include/fastjet/config.h \
    6263        interface/TreeClasses.h
     64h_bb$(ExeSuf): \
     65        tmp/h_bb.$(ObjSuf)
     66
     67tmp/h_bb.$(ObjSuf): \
     68        h_bb.cpp \
     69        Utilities/ExRootAnalysis/interface/TSimpleArray.h \
     70        Utilities/ExRootAnalysis/interface/TSimpleBranch.h \
     71        Utilities/ExRootAnalysis/interface/BlockClasses.h \
     72        Utilities/ExRootAnalysis/interface/ExRootTreeReader.h \
     73        Utilities/ExRootAnalysis/interface/ExRootTreeWriter.h \
     74        Utilities/ExRootAnalysis/interface/ExRootTreeBranch.h \
     75        interface/TUtil.h \
     76        interface/h_bb.h
    6377EXECUTABLE =  \
    6478        Delphes$(ExeSuf) \
    65         Resolutions$(ExeSuf)
     79        Resolutions$(ExeSuf) \
     80        h_bb$(ExeSuf)
    6681
    6782EXECUTABLE_OBJ =  \
    6883        tmp/Delphes.$(ObjSuf) \
    69         tmp/Resolutions.$(ObjSuf)
     84        tmp/Resolutions.$(ObjSuf) \
     85        tmp/h_bb.$(ObjSuf)
    7086
    7187tmp/Utilities/ExRootAnalysis/src/BlockClassesDict.$(SrcSuf): \
     
    8399        tmp/src/TreeClassesDict.$(ObjSuf)
    84100
     101tmp/src/h_bb.$(ObjSuf): \
     102        src/h_bb.$(SrcSuf) \
     103        interface/h_bb.h
    85104tmp/src/HEPEVTConverter.$(ObjSuf): \
    86105        src/HEPEVTConverter.$(SrcSuf) \
     
    113132        src/TreeClasses.$(SrcSuf) \
    114133        interface/TreeClasses.h
     134tmp/src/TUtil.$(ObjSuf): \
     135        src/TUtil.$(SrcSuf) \
     136        interface/TUtil.h
     137tmp/src/TriggerUtil.$(ObjSuf): \
     138        src/TriggerUtil.$(SrcSuf) \
     139        interface/TriggerUtil.h
     140tmp/src/BFieldProp.$(ObjSuf): \
     141        src/BFieldProp.$(SrcSuf) \
     142        interface/BFieldProp.h
     143tmp/src/JetUtils.$(ObjSuf): \
     144        src/JetUtils.$(SrcSuf) \
     145        interface/JetUtils.h
     146tmp/src/VeryForward.$(ObjSuf): \
     147        src/VeryForward.$(SrcSuf) \
     148        interface/VeryForward.h \
     149        interface/SmearUtil.h
    115150tmp/Utilities/ExRootAnalysis/src/BlockClasses.$(ObjSuf): \
    116151        Utilities/ExRootAnalysis/src/BlockClasses.$(SrcSuf) \
     
    184219tmp/Utilities/Hector/src/H_VerticalQuadrupole.$(ObjSuf): \
    185220        Utilities/Hector/src/H_VerticalQuadrupole.$(SrcSuf)
    186 tmp/Utilities/Fastjet/src/DnnPlane.$(ObjSuf): \
    187         Utilities/Fastjet/src/DnnPlane.$(SrcSuf)
    188 tmp/Utilities/Fastjet/src/Dnn4piCylinder.$(ObjSuf): \
    189         Utilities/Fastjet/src/Dnn4piCylinder.$(SrcSuf)
    190 tmp/Utilities/Fastjet/src/Dnn3piCylinder.$(ObjSuf): \
    191         Utilities/Fastjet/src/Dnn3piCylinder.$(SrcSuf)
    192 tmp/Utilities/Fastjet/src/Dnn2piCylinder.$(ObjSuf): \
    193         Utilities/Fastjet/src/Dnn2piCylinder.$(SrcSuf)
     221tmp/Utilities/Fastjet/src/AreaDefinition.$(ObjSuf): \
     222        Utilities/Fastjet/src/AreaDefinition.$(SrcSuf)
     223tmp/Utilities/Fastjet/src/BasicRandom.$(ObjSuf): \
     224        Utilities/Fastjet/src/BasicRandom.$(SrcSuf)
     225tmp/Utilities/Fastjet/src/ClosestPair2D.$(ObjSuf): \
     226        Utilities/Fastjet/src/ClosestPair2D.$(SrcSuf)
    194227tmp/Utilities/Fastjet/src/ClusterSequence.$(ObjSuf): \
    195228        Utilities/Fastjet/src/ClusterSequence.$(SrcSuf)
    196 tmp/Utilities/Fastjet/src/PseudoJet.$(ObjSuf): \
    197         Utilities/Fastjet/src/PseudoJet.$(SrcSuf)
     229tmp/Utilities/Fastjet/src/ClusterSequence1GhostPassiveArea.$(ObjSuf): \
     230        Utilities/Fastjet/src/ClusterSequence1GhostPassiveArea.$(SrcSuf)
     231tmp/Utilities/Fastjet/src/ClusterSequenceActiveArea.$(ObjSuf): \
     232        Utilities/Fastjet/src/ClusterSequenceActiveArea.$(SrcSuf)
     233tmp/Utilities/Fastjet/src/ClusterSequenceActiveAreaExplicitGhosts.$(ObjSuf): \
     234        Utilities/Fastjet/src/ClusterSequenceActiveAreaExplicitGhosts.$(SrcSuf)
     235tmp/Utilities/Fastjet/src/ClusterSequenceArea.$(ObjSuf): \
     236        Utilities/Fastjet/src/ClusterSequenceArea.$(SrcSuf)
     237tmp/Utilities/Fastjet/src/ClusterSequenceAreaBase.$(ObjSuf): \
     238        Utilities/Fastjet/src/ClusterSequenceAreaBase.$(SrcSuf)
     239tmp/Utilities/Fastjet/src/ClusterSequencePassiveArea.$(ObjSuf): \
     240        Utilities/Fastjet/src/ClusterSequencePassiveArea.$(SrcSuf)
     241tmp/Utilities/Fastjet/src/ClusterSequenceVoronoiArea.$(ObjSuf): \
     242        Utilities/Fastjet/src/ClusterSequenceVoronoiArea.$(SrcSuf)
     243tmp/Utilities/Fastjet/src/ClusterSequence_CP2DChan.$(ObjSuf): \
     244        Utilities/Fastjet/src/ClusterSequence_CP2DChan.$(SrcSuf)
     245tmp/Utilities/Fastjet/src/ClusterSequence_Delaunay.$(ObjSuf): \
     246        Utilities/Fastjet/src/ClusterSequence_Delaunay.$(SrcSuf)
     247tmp/Utilities/Fastjet/src/ClusterSequence_DumbN3.$(ObjSuf): \
     248        Utilities/Fastjet/src/ClusterSequence_DumbN3.$(SrcSuf)
    198249tmp/Utilities/Fastjet/src/ClusterSequence_N2.$(ObjSuf): \
    199250        Utilities/Fastjet/src/ClusterSequence_N2.$(SrcSuf)
    200251tmp/Utilities/Fastjet/src/ClusterSequence_TiledN2.$(ObjSuf): \
    201252        Utilities/Fastjet/src/ClusterSequence_TiledN2.$(SrcSuf)
    202 tmp/Utilities/Fastjet/src/ClusterSequence_Delaunay.$(ObjSuf): \
    203         Utilities/Fastjet/src/ClusterSequence_Delaunay.$(SrcSuf)
    204 tmp/Utilities/Fastjet/src/ClusterSequence_DumbN3.$(ObjSuf): \
    205         Utilities/Fastjet/src/ClusterSequence_DumbN3.$(SrcSuf)
    206 tmp/Utilities/Fastjet/src/ClusterSequence_CP2DChan.$(ObjSuf): \
    207         Utilities/Fastjet/src/ClusterSequence_CP2DChan.$(SrcSuf)
    208 tmp/Utilities/Fastjet/src/ClosestPair2D.$(ObjSuf): \
    209         Utilities/Fastjet/src/ClosestPair2D.$(SrcSuf)
     253tmp/Utilities/Fastjet/src/Dnn2piCylinder.$(ObjSuf): \
     254        Utilities/Fastjet/src/Dnn2piCylinder.$(SrcSuf)
     255tmp/Utilities/Fastjet/src/Dnn3piCylinder.$(ObjSuf): \
     256        Utilities/Fastjet/src/Dnn3piCylinder.$(SrcSuf)
     257tmp/Utilities/Fastjet/src/Dnn4piCylinder.$(ObjSuf): \
     258        Utilities/Fastjet/src/Dnn4piCylinder.$(SrcSuf)
     259tmp/Utilities/Fastjet/src/DnnPlane.$(ObjSuf): \
     260        Utilities/Fastjet/src/DnnPlane.$(SrcSuf)
     261tmp/Utilities/Fastjet/src/Error.$(ObjSuf): \
     262        Utilities/Fastjet/src/Error.$(SrcSuf)
     263tmp/Utilities/Fastjet/src/GhostedAreaSpec.$(ObjSuf): \
     264        Utilities/Fastjet/src/GhostedAreaSpec.$(SrcSuf)
     265tmp/Utilities/Fastjet/src/JetDefinition.$(ObjSuf): \
     266        Utilities/Fastjet/src/JetDefinition.$(SrcSuf)
    210267tmp/Utilities/Fastjet/src/MinHeap.$(ObjSuf): \
    211268        Utilities/Fastjet/src/MinHeap.$(SrcSuf)
    212 tmp/Utilities/Fastjet/src/ClusterSequenceAreaBase.$(ObjSuf): \
    213         Utilities/Fastjet/src/ClusterSequenceAreaBase.$(SrcSuf)
    214 tmp/Utilities/Fastjet/src/ClusterSequenceActiveAreaExplicitGhosts.$(ObjSuf): \
    215         Utilities/Fastjet/src/ClusterSequenceActiveAreaExplicitGhosts.$(SrcSuf)
    216 tmp/Utilities/Fastjet/src/ClusterSequenceArea.$(ObjSuf): \
    217         Utilities/Fastjet/src/ClusterSequenceArea.$(SrcSuf)
    218 tmp/Utilities/Fastjet/src/GhostedAreaSpec.$(ObjSuf): \
    219         Utilities/Fastjet/src/GhostedAreaSpec.$(SrcSuf)
    220 tmp/Utilities/Fastjet/src/ClusterSequenceActiveArea.$(ObjSuf): \
    221         Utilities/Fastjet/src/ClusterSequenceActiveArea.$(SrcSuf)
     269tmp/Utilities/Fastjet/src/PseudoJet.$(ObjSuf): \
     270        Utilities/Fastjet/src/PseudoJet.$(SrcSuf)
     271tmp/Utilities/Fastjet/src/RangeDefinition.$(ObjSuf): \
     272        Utilities/Fastjet/src/RangeDefinition.$(SrcSuf)
    222273tmp/Utilities/Fastjet/src/Voronoi.$(ObjSuf): \
    223274        Utilities/Fastjet/src/Voronoi.$(SrcSuf)
    224 tmp/Utilities/Fastjet/src/ClusterSequenceVoronoiArea.$(ObjSuf): \
    225         Utilities/Fastjet/src/ClusterSequenceVoronoiArea.$(SrcSuf)
    226 tmp/Utilities/Fastjet/src/ClusterSequencePassiveArea.$(ObjSuf): \
    227         Utilities/Fastjet/src/ClusterSequencePassiveArea.$(SrcSuf)
    228 tmp/Utilities/Fastjet/src/ClusterSequence1GhostPassiveArea.$(ObjSuf): \
    229         Utilities/Fastjet/src/ClusterSequence1GhostPassiveArea.$(SrcSuf)
    230 tmp/Utilities/Fastjet/src/BasicRandom.$(ObjSuf): \
    231         Utilities/Fastjet/src/BasicRandom.$(SrcSuf)
    232 tmp/Utilities/Fastjet/src/JetDefinition.$(ObjSuf): \
    233         Utilities/Fastjet/src/JetDefinition.$(SrcSuf)
    234 tmp/Utilities/Fastjet/src/Error.$(ObjSuf): \
    235         Utilities/Fastjet/src/Error.$(SrcSuf)
    236 tmp/Utilities/Fastjet/src/AreaDefinition.$(ObjSuf): \
    237         Utilities/Fastjet/src/AreaDefinition.$(SrcSuf)
    238 tmp/Utilities/Fastjet/src/RangeDefinition.$(ObjSuf): \
    239         Utilities/Fastjet/src/RangeDefinition.$(SrcSuf)
    240275tmp/Utilities/Fastjet/plugins/CDFCones/CDFJetCluPlugin.$(ObjSuf): \
    241276        Utilities/Fastjet/plugins/CDFCones/CDFJetCluPlugin.$(SrcSuf) \
     
    264299        Utilities/Fastjet/plugins/SISCone/SISConePlugin.$(SrcSuf) \
    265300        Utilities/Fastjet/include/fastjet/ClusterSequence.hh
     301tmp/Utilities/Fastjet/plugins/SISCone/src/geom_2d.$(ObjSuf): \
     302        Utilities/Fastjet/plugins/SISCone/src/geom_2d.$(SrcSuf)
    266303tmp/Utilities/Fastjet/plugins/SISCone/src/area.$(ObjSuf): \
    267304        Utilities/Fastjet/plugins/SISCone/src/area.$(SrcSuf)
    268 tmp/Utilities/Fastjet/plugins/SISCone/src/geom_2d.$(ObjSuf): \
    269         Utilities/Fastjet/plugins/SISCone/src/geom_2d.$(SrcSuf)
     305tmp/Utilities/Fastjet/plugins/SISCone/src/momentum.$(ObjSuf): \
     306        Utilities/Fastjet/plugins/SISCone/src/momentum.$(SrcSuf)
    270307tmp/Utilities/Fastjet/plugins/SISCone/src/hash.$(ObjSuf): \
    271308        Utilities/Fastjet/plugins/SISCone/src/hash.$(SrcSuf)
    272 tmp/Utilities/Fastjet/plugins/SISCone/src/momentum.$(ObjSuf): \
    273         Utilities/Fastjet/plugins/SISCone/src/momentum.$(SrcSuf)
    274309tmp/Utilities/Fastjet/plugins/SISCone/src/protocones.$(ObjSuf): \
    275310        Utilities/Fastjet/plugins/SISCone/src/protocones.$(SrcSuf)
     
    289324        Utilities/Fastjet/plugins/SISCone/src/vicinity.$(SrcSuf)
    290325SOURCE_OBJ =  \
     326        tmp/src/h_bb.$(ObjSuf) \
    291327        tmp/src/HEPEVTConverter.$(ObjSuf) \
    292328        tmp/src/LHEFConverter.$(ObjSuf) \
     
    294330        tmp/src/SmearUtil.$(ObjSuf) \
    295331        tmp/src/TreeClasses.$(ObjSuf) \
     332        tmp/src/TUtil.$(ObjSuf) \
     333        tmp/src/TriggerUtil.$(ObjSuf) \
     334        tmp/src/BFieldProp.$(ObjSuf) \
     335        tmp/src/JetUtils.$(ObjSuf) \
     336        tmp/src/VeryForward.$(ObjSuf) \
    296337        tmp/Utilities/ExRootAnalysis/src/BlockClasses.$(ObjSuf) \
    297338        tmp/Utilities/ExRootAnalysis/src/ExRootProgressBar.$(ObjSuf) \
     
    326367        tmp/Utilities/Hector/src/H_VerticalKicker.$(ObjSuf) \
    327368        tmp/Utilities/Hector/src/H_VerticalQuadrupole.$(ObjSuf) \
    328         tmp/Utilities/Fastjet/src/DnnPlane.$(ObjSuf) \
    329         tmp/Utilities/Fastjet/src/Dnn4piCylinder.$(ObjSuf) \
    330         tmp/Utilities/Fastjet/src/Dnn3piCylinder.$(ObjSuf) \
    331         tmp/Utilities/Fastjet/src/Dnn2piCylinder.$(ObjSuf) \
     369        tmp/Utilities/Fastjet/src/AreaDefinition.$(ObjSuf) \
     370        tmp/Utilities/Fastjet/src/BasicRandom.$(ObjSuf) \
     371        tmp/Utilities/Fastjet/src/ClosestPair2D.$(ObjSuf) \
    332372        tmp/Utilities/Fastjet/src/ClusterSequence.$(ObjSuf) \
    333         tmp/Utilities/Fastjet/src/PseudoJet.$(ObjSuf) \
     373        tmp/Utilities/Fastjet/src/ClusterSequence1GhostPassiveArea.$(ObjSuf) \
     374        tmp/Utilities/Fastjet/src/ClusterSequenceActiveArea.$(ObjSuf) \
     375        tmp/Utilities/Fastjet/src/ClusterSequenceActiveAreaExplicitGhosts.$(ObjSuf) \
     376        tmp/Utilities/Fastjet/src/ClusterSequenceArea.$(ObjSuf) \
     377        tmp/Utilities/Fastjet/src/ClusterSequenceAreaBase.$(ObjSuf) \
     378        tmp/Utilities/Fastjet/src/ClusterSequencePassiveArea.$(ObjSuf) \
     379        tmp/Utilities/Fastjet/src/ClusterSequenceVoronoiArea.$(ObjSuf) \
     380        tmp/Utilities/Fastjet/src/ClusterSequence_CP2DChan.$(ObjSuf) \
     381        tmp/Utilities/Fastjet/src/ClusterSequence_Delaunay.$(ObjSuf) \
     382        tmp/Utilities/Fastjet/src/ClusterSequence_DumbN3.$(ObjSuf) \
    334383        tmp/Utilities/Fastjet/src/ClusterSequence_N2.$(ObjSuf) \
    335384        tmp/Utilities/Fastjet/src/ClusterSequence_TiledN2.$(ObjSuf) \
    336         tmp/Utilities/Fastjet/src/ClusterSequence_Delaunay.$(ObjSuf) \
    337         tmp/Utilities/Fastjet/src/ClusterSequence_DumbN3.$(ObjSuf) \
    338         tmp/Utilities/Fastjet/src/ClusterSequence_CP2DChan.$(ObjSuf) \
    339         tmp/Utilities/Fastjet/src/ClosestPair2D.$(ObjSuf) \
     385        tmp/Utilities/Fastjet/src/Dnn2piCylinder.$(ObjSuf) \
     386        tmp/Utilities/Fastjet/src/Dnn3piCylinder.$(ObjSuf) \
     387        tmp/Utilities/Fastjet/src/Dnn4piCylinder.$(ObjSuf) \
     388        tmp/Utilities/Fastjet/src/DnnPlane.$(ObjSuf) \
     389        tmp/Utilities/Fastjet/src/Error.$(ObjSuf) \
     390        tmp/Utilities/Fastjet/src/GhostedAreaSpec.$(ObjSuf) \
     391        tmp/Utilities/Fastjet/src/JetDefinition.$(ObjSuf) \
    340392        tmp/Utilities/Fastjet/src/MinHeap.$(ObjSuf) \
    341         tmp/Utilities/Fastjet/src/ClusterSequenceAreaBase.$(ObjSuf) \
    342         tmp/Utilities/Fastjet/src/ClusterSequenceActiveAreaExplicitGhosts.$(ObjSuf) \
    343         tmp/Utilities/Fastjet/src/ClusterSequenceArea.$(ObjSuf) \
    344         tmp/Utilities/Fastjet/src/GhostedAreaSpec.$(ObjSuf) \
    345         tmp/Utilities/Fastjet/src/ClusterSequenceActiveArea.$(ObjSuf) \
     393        tmp/Utilities/Fastjet/src/PseudoJet.$(ObjSuf) \
     394        tmp/Utilities/Fastjet/src/RangeDefinition.$(ObjSuf) \
    346395        tmp/Utilities/Fastjet/src/Voronoi.$(ObjSuf) \
    347         tmp/Utilities/Fastjet/src/ClusterSequenceVoronoiArea.$(ObjSuf) \
    348         tmp/Utilities/Fastjet/src/ClusterSequencePassiveArea.$(ObjSuf) \
    349         tmp/Utilities/Fastjet/src/ClusterSequence1GhostPassiveArea.$(ObjSuf) \
    350         tmp/Utilities/Fastjet/src/BasicRandom.$(ObjSuf) \
    351         tmp/Utilities/Fastjet/src/JetDefinition.$(ObjSuf) \
    352         tmp/Utilities/Fastjet/src/Error.$(ObjSuf) \
    353         tmp/Utilities/Fastjet/src/AreaDefinition.$(ObjSuf) \
    354         tmp/Utilities/Fastjet/src/RangeDefinition.$(ObjSuf) \
    355396        tmp/Utilities/Fastjet/plugins/CDFCones/CDFJetCluPlugin.$(ObjSuf) \
    356397        tmp/Utilities/Fastjet/plugins/CDFCones/CDFMidPointPlugin.$(ObjSuf) \
     
    364405        tmp/Utilities/Fastjet/plugins/CDFCones/src/PhysicsTower.$(ObjSuf) \
    365406        tmp/Utilities/Fastjet/plugins/SISCone/SISConePlugin.$(ObjSuf) \
     407        tmp/Utilities/Fastjet/plugins/SISCone/src/geom_2d.$(ObjSuf) \
    366408        tmp/Utilities/Fastjet/plugins/SISCone/src/area.$(ObjSuf) \
    367         tmp/Utilities/Fastjet/plugins/SISCone/src/geom_2d.$(ObjSuf) \
     409        tmp/Utilities/Fastjet/plugins/SISCone/src/momentum.$(ObjSuf) \
    368410        tmp/Utilities/Fastjet/plugins/SISCone/src/hash.$(ObjSuf) \
    369         tmp/Utilities/Fastjet/plugins/SISCone/src/momentum.$(ObjSuf) \
    370411        tmp/Utilities/Fastjet/plugins/SISCone/src/protocones.$(ObjSuf) \
    371412        tmp/Utilities/Fastjet/plugins/SISCone/src/quadtree.$(ObjSuf) \
     
    464505        tmp/Utilities/stdhep/stdhep_mcfio.$(ObjSuf)
    465506
     507interface/TUtil.h: \
     508        Utilities/ExRootAnalysis/interface/BlockClasses.h \
     509        Utilities/ExRootAnalysis/interface/TSimpleArray.h
     510        @touch $@
     511
    466512interface/DataConverter.h: \
    467513        Utilities/ExRootAnalysis/interface/ExRootTreeBranch.h \
    468514        Utilities/ExRootAnalysis/interface/LHEF.h
     515        @touch $@
     516
     517interface/TriggerUtil.h: \
     518        Utilities/ExRootAnalysis/interface/BlockClasses.h \
     519        Utilities/ExRootAnalysis/interface/TSimpleArray.h
    469520        @touch $@
    470521
     
    475526        @touch $@
    476527
    477 interface/SmearUtil.h: \
     528interface/JetUtils.h: \
     529        interface/SmearUtil.h \
    478530        Utilities/ExRootAnalysis/interface/BlockClasses.h \
    479531        Utilities/ExRootAnalysis/interface/TSimpleArray.h \
    480         Utilities/Fastjet/plugins/CDFCones/interface/PhysicsTower.hh
     532        Utilities/ExRootAnalysis/interface/ExRootTreeReader.h \
     533        Utilities/ExRootAnalysis/interface/ExRootTreeWriter.h \
     534        Utilities/ExRootAnalysis/interface/ExRootTreeBranch.h \
     535        Utilities/Fastjet/plugins/CDFCones/interface/PhysicsTower.hh \
     536        Utilities/Fastjet/include/fastjet/PseudoJet.hh \
     537        Utilities/Fastjet/include/fastjet/ClusterSequence.hh \
     538        Utilities/Fastjet/include/fastjet/config.h
    481539        @touch $@
    482540
     
    486544        @touch $@
    487545
     546interface/SmearUtil.h: \
     547        Utilities/ExRootAnalysis/interface/BlockClasses.h \
     548        Utilities/ExRootAnalysis/interface/TSimpleArray.h \
     549        Utilities/Fastjet/plugins/CDFCones/interface/PhysicsTower.hh
     550        @touch $@
     551
    488552interface/LHEFConverter.h: \
    489553        Utilities/ExRootAnalysis/interface/ExRootTreeBranch.h \
    490554        Utilities/ExRootAnalysis/interface/LHEF.h \
    491555        interface/DataConverter.h
     556        @touch $@
     557
     558interface/BFieldProp.h: \
     559        interface/SmearUtil.h \
     560        Utilities/ExRootAnalysis/interface/BlockClasses.h \
     561        Utilities/ExRootAnalysis/interface/TSimpleArray.h
    492562        @touch $@
    493563
     
    513583        Utilities/stdhep/stdcm1.h \
    514584        Utilities/stdhep/stdver.h
     585        @touch $@
     586
     587interface/h_bb.h: \
     588        Utilities/ExRootAnalysis/interface/TSimpleArray.h \
     589        Utilities/ExRootAnalysis/interface/TSimpleBranch.h \
     590        Utilities/ExRootAnalysis/interface/BlockClasses.h \
     591        Utilities/ExRootAnalysis/interface/ExRootTreeReader.h \
     592        Utilities/ExRootAnalysis/interface/ExRootTreeWriter.h \
     593        interface/TUtil.h
     594        @touch $@
     595
     596interface/VeryForward.h: \
     597        interface/SmearUtil.h \
     598        Utilities/ExRootAnalysis/interface/BlockClasses.h \
     599        Utilities/ExRootAnalysis/interface/TSimpleArray.h \
     600        Utilities/ExRootAnalysis/interface/ExRootTreeBranch.h \
     601        Utilities/ExRootAnalysis/interface/ExRootTreeWriter.h \
     602        Utilities/Fastjet/plugins/CDFCones/interface/PhysicsTower.hh
    515603        @touch $@
    516604
  • trunk/interface/SmearUtil.h

    r44 r55  
    188188
    189189//************* Returns an array of the quarks sitting within the tracker acceptance ***************
    190 float Charge(const int pid);
     190int Charge(int pid);
    191191
    192192#endif
  • trunk/src/SmearUtil.cc

    r51 r55  
    427427                                         pow(ELG_Ccen*energy,2) +
    428428                                         pow(ELG_Scen*sqrt(energy),2) ));
    429   } else { // outside the tracker
     429  }
     430  if(fabs(electron.Eta()) > MAX_TRACKER && fabs(electron.Eta()) < MAX_CALO_FWD){
    430431    energyS = gRandom->Gaus(energy, sqrt(
    431432                                         pow(ELG_Nfwd,2) +
     
    478479
    479480  energyS = ((energyS1>0)?energyS1:0) + ((energyS2>0)?energyS2:0);
    480   } else {
     481  }
     482  if(abs(hadron.Eta()) > MAX_CALO_CEN && fabs(hadron.Eta()) < MAX_CALO_FWD){
    481483    energyS = gRandom->Gaus(energy, sqrt(
    482484                            pow(HAD_Nhf,2) +
    483485                            pow(HAD_Chf*energy,2) +
    484486                            pow(HAD_Shf*sqrt(energy),2) ));
    485   }
     487}
     488 
    486489
    487490
     
    602605}
    603606
    604 
    605 float Charge(const long int pid) {
    606    // source: RPP chap 34 Monte Carlo Particle Numbering Scheme
    607 /*   switch (abs(pid)) {
    608         case 1: case 3: case 5: case 7: return (float) sign(pid)*(-1/3); break;   // d, s, b, b'
    609         case 2: case 4: case 6: case 8: return (float) sign(pid)*2/3; break;      // u, c, t, t'
    610 
    611         case 11: case 13: case 15:      return (float) sign(pid)*(-1); break;     // e, mu, tau
    612         case 12: case 14: case 16:      return (float) 0; break;     // nu_e, nu_mu, nu_tau
    613 
    614         case 9: case 21: case 22: case 23: case 25:
    615                 case 32: case 33: case 35: case 36: return (float) 0; break; // neutral gauge/higgs bosons
    616         case 24: case 34: case 37: return (float) sign(pid); break; // charged gauge/higgs bosons
    617    }
    618 */
    619         return 0;
    620 }
     607int Charge(int pid)
     608{
     609  int charge;
     610  if(
     611     (pid == pGAMMA)    ||
     612     (pid == pPI0)      ||
     613     (pid == pK0L)      ||
     614     (pid == pN)        ||
     615     (pid == pSIGMA0)   ||
     616     (pid == pDELTA0)   ||
     617     (pid == pK0S)   // not charged particles : invisible by tracker
     618     )
     619    charge = 0;
     620  else charge = (sign(pid));
     621cout<<"charge "<<charge<<endl;
     622  return charge;
     623           
     624}
Note: See TracChangeset for help on using the changeset viewer.