Changeset 9 in ZHANGProjects


Ignore:
Timestamp:
Apr 24, 2014, 4:51:08 PM (10 years ago)
Author:
zhangj
Message:

Add feature to define the install location of the crystal inner side (-1) or out side (1) of the vacuum chamber in the 'crystalinfo.csv' file.

Location:
ICOSIM/CPP/trunk/source
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • ICOSIM/CPP/trunk/source/Collimator.h

    r5 r9  
    107107
    108108    int C_orient; //crystal orientation (1 for 110, 2 for 111)
    109     int IS; //integer that defines the substance (0 for Si, 1 for W, 2 for C, 3 for Ge)
     109    int IS; //integer that defines the substance (0 for Si, 1 for W, 2 for C, 3 for Ge
     110    double Mirror; // -1 or 1; an integer to define the install location of the crystal.
     111                // -1: the crystal is installed inner side of the vacuum chamber
     112                // 1: the crystal is installed at the out side of the vacuum chamber
    110113    double C_xmax; //maximum in the x direction (dimension of the crystal) [m]
    111114    double C_ymax; //maximum in the y direction (dimension of the cystal) [m]
  • ICOSIM/CPP/trunk/source/CrystalCollimator.cc

    r5 r9  
    9191    SimCrys sim(Crystal (C_orient,  IS, C_xmax, C_ymax, Cry_length, Rcurv), Partcrys (0)); //simulation of the passage through the crystal
    9292
    93     sim.general(sim, pas, outputpath, C_rotation, C_aperture, C_offset, C_tilt, Cry_tilt);
     93    sim.general(sim, pas, outputpath, Mirror, C_rotation, C_aperture, C_offset, C_tilt, Cry_tilt);
    9494
    9595    ifstream enter;
  • ICOSIM/CPP/trunk/source/simcrys.cc

    r8 r9  
    409409
    410410
    411 void SimCrys::general(SimCrys& sim, const int& pas, string outputpath, double C_rotation, double C_aperture, double C_offset, double C_tilt, double Crystal_tilt)
     411void SimCrys::general(SimCrys& sim, const int& pas, string outputpath, double Mirror, double C_rotation, double C_aperture, double C_offset, double C_tilt, double Crystal_tilt)
    412412{
    413413    srand ( time(NULL) );
     
    471471    double totcount(0);
    472472
    473     double mirror=0.0;
     473    double mirror=Mirror;
    474474    double tiltangle=0.0;
    475475
     
    639639                    //cout<<"PARTICULE NON PERDU>>><<"<<endl;
    640640
    641                     //?????????????? Need to define the correct value of the mirror for the install locations
     641                    //To define the correct value of the mirror for the install locations
    642642                    // of the crystal in SPS & LHC, inner side or outside of the vacuum chamber????
    643643                    //  by Zhang @ CERN, 23/04/2014.....
    644                     mirror = 1;
     644                    //mirror = 1;
     645                   
    645646                   
    646647                    x  = mirror * x;
  • ICOSIM/CPP/trunk/source/simcrys.h

    r5 r9  
    5353    //THE GENERAL FUNCTION OF THE TEST THAT REGROUP ALL THE PREVIOUS FUNCTIONS!!!!
    5454
    55     void general(SimCrys& sim, const int& pas, string outputpath, double C_rotation, double C_aperture, double C_offset, double C_tilt, double Crystal_tilt);
     55    void general(SimCrys& sim, const int& pas, string outputpath, double Mirror, double C_rotation, double C_aperture, double C_offset, double C_tilt, double Crystal_tilt);
    5656
    5757
  • ICOSIM/CPP/trunk/source/simulation.cc

    r8 r9  
    460460                        getline(readinfocrystal, temp1, ',');
    461461                        lat.resColli[j]->IS = atoi(temp1.c_str());
     462                        //added feature, to define the install location of the crystal, then
     463                        //get the correct transformation between the beam frame & crystal frame.
     464                        getline(readinfocrystal, temp1, ',');
     465                        lat.resColli[j]->Mirror = atoi(temp1.c_str());
     466                       
    462467                        getline(readinfocrystal, temp1, ',');
    463468                        lat.resColli[j]->C_xmax = atof(temp1.c_str());
Note: See TracChangeset for help on using the changeset viewer.